diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..d91bc07 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,13 @@ +{ + "singleQuote": true, + "printWidth": 80, + "editor.formatOnSave": true, + "proseWrap": "always", + "tabWidth": 4, + "requireConfig": false, + "useTabs": false, + "trailingComma": "none", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "semi": true +} \ No newline at end of file diff --git a/backend/.env.template b/backend/.env.template deleted file mode 100644 index 415dee4..0000000 --- a/backend/.env.template +++ /dev/null @@ -1,23 +0,0 @@ -############################################################### -# AWS Secrets -############################################################### -S3_REGION= #Your AWS S3 Region -S3_ACCESS_KEY_ID= #Your AWS Access Key ID -S3_SECRET_ACCESS_KEY= #Your AWS Secret Access Key - -############################################################### -# Application Settings -############################################################### -PORT= #FastAPI default port -LOG_LEVEL=info -NODE_ENV=development -DATABASE_URL= #PostgreSQL connection string -REACT_APP_GRAPHQL_ENDPOINT= #GraphQL endpoint URL (e.g., http://localhost:3000/graphql) - -############################################################### -# Security Settings -############################################################### -JWT_SECRET= #Your JWT secret key -COOKIE_SECRET= #Your cookie secret key - - diff --git a/backend/.gitignore b/backend/.gitignore new file mode 100644 index 0000000..4b56acf --- /dev/null +++ b/backend/.gitignore @@ -0,0 +1,56 @@ +# compiled output +/dist +/node_modules +/build + +# Logs +logs +*.log +npm-debug.log* +pnpm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# OS +.DS_Store + +# Tests +/coverage +/.nyc_output + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# temp directory +.temp +.tmp + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json diff --git a/backend/.prettierrc b/backend/.prettierrc new file mode 100644 index 0000000..bb80370 --- /dev/null +++ b/backend/.prettierrc @@ -0,0 +1,13 @@ +{ + "singleQuote": true, + "printWidth": 80, + "editor.formatOnSave": true, + "proseWrap": "always", + "tabWidth": 4, + "requireConfig": false, + "useTabs": false, + "trailingComma": "all", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "semi": true +} diff --git a/backend/Dockerfile b/backend/Dockerfile deleted file mode 100644 index f518b1c..0000000 --- a/backend/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM node:18-alpine - -WORKDIR /app - -COPY package*.json ./ -RUN npm ci --only=production - -COPY . . - -USER node - -ENV NODE_ENV=production -ENV PORT=3000 -EXPOSE 3000 - -CMD ["npm", "run", "dev"] \ No newline at end of file diff --git a/backend/README.md b/backend/README.md new file mode 100644 index 0000000..f61187c --- /dev/null +++ b/backend/README.md @@ -0,0 +1,195 @@ +
+ + The robust, high-performance backend powering the TaskFlow platform.
Built with NestJS, Fastify, and GraphQL.
Architecture • Getting Started • Testing • Documentation
+ +### Architecture + +TaskFlow API follows a **Modular Monolith architecture** designed for scalability and maintainability. + +It leverages the "Platform Agnostic" capability of NestJS by using the **Fastify Adapter** for maximum performance (up to 2x faster than Express). + +### Request Lifecycle + +```mermaid +graph TD + Client[("Client")] + + subgraph "Backend Core - NestJS" + Gateway["Fastify Adapter"] + Guard["Auth & Workspace Guards"] + Interceptor["DTO Validation Pipe"] + + subgraph "GraphQL Layer" + Resolver["Resolvers"] + FieldResolver["Field Resolvers"] + end + + Service["Services - Business Logic"] + Prisma["Prisma Client"] + end + + DB[("PostgresQL")] + + Client --> Gateway + Gateway --> Guard + Guard --> Interceptor + Interceptor --> Resolver + + Resolver -- "Main Data" --> Service + Resolver -. "Nested Data" .-> FieldResolver + + Service --> Prisma + FieldResolver --> Prisma + Prisma --> DB +``` + +### Key Design Patterns + +- **Schema First GraphQL**: Type definitions (.graphql files) are the single source of truth. TypeScript definitions are auto-generated. + +- **Hybrid Loading Strategy**: We optimize performance by avoiding massive SQL joins. The Main Resolver fetches the core entity, while Field Resolvers (@ResolveField) lazily fetch related data (Boards, Lists, Cards) only when requested by the client. + +- **Errors as Data**: Mutations do not throw generic exceptions. They return Union Types (e.g., RegisterSuccess | RegisterError) allowing the frontend to handle business errors (like "Email taken") as strongly-typed data. + +- **Secure Authentication**: Implementation of HttpOnly Cookies preventing XSS attacks on JWT tokens. + +## 🛠️ Tech Stack + +| Component | Technology | Benefit | +| :--- | :--- | :--- | +| **Framework** | **NestJS** | Strict architecture, Dependency Injection, Decorators. | +| **Engine** | **Fastify** | High performance, low overhead (up to 2x faster than Express). | +| **API** | **GraphQL (Mercurius)** | Efficient Data Fetching, Type Safety, Playground. | +| **Database** | **PostgreSQL + Prisma** | Reliability, Type-safe queries, Migrations. | +| **Testing** | **Jest** | Unit and Integration testing with mocking. | +| **Doc** | **Compodoc** | Visual documentation of the modules graph. | + +### Getting Started + +#### Prerequisites + +- **Node.js** (v18 or later) + +- **Docker** (for the local Database) + +- **npm or pnpm** + +### Installation + +#### Clone the repository + +```bash +git clone git@github.com:EliasJHL/TaskFlow.git +cd taskflow/backend +``` + +#### Install dependencies + +```bash +npm install +``` + +#### Environment Setup +Create a .env file in the root directory: + +```properties +DATABASE_URL="postgresql://user:password@localhost:5432/taskflow_db?schema=public" +JWT_SECRET="your_super_secret_key_change_me" +COOKIE_SECRET="another_secret_for_cookies" +NODE_ENV="development" +PORT=3000 +``` + +#### Database Setup + +Start the database container and apply migrations: + +```bash +# 1. Start Docker container +docker-compose up -d db + +# 2. Push schema to DB (Dev mode) +npx prisma db push + +# 3. Generate Prisma Client (Vital for TypeScript) +npx prisma generate +``` + +#### Running the App + +```bash +npm run start:dev +``` + +Once started, the GraphQL Playground is available at: 👉 http://localhost:3000/graphiql + +### Testing +We maintain a high standard of **code quality** with 100% coverage on critical paths (Services & Resolvers). + +#### Unit Tests + +Tests are located next to the files they test (*.spec.ts). + +```bash +# Run all unit tests +npm run test + +# Run tests in watch mode (TDD) +npm run test:watch +``` + +#### Coverage Report + +To generate the coverage report and verify system integrity: + +```bash +npm run test:cov +``` + +### Documentation +#### Code Architecture (Compodoc) + +Generate a static website exploring the modules, services, and dependency graph. + +```bash +npm run doc +``` +Then open http://localhost:8080 in your browser. + +#### API Documentation + +The API is self-documented via the GraphQL Schema. You can inspect the schema and test queries directly in the **Playground at /graphiql**. + +**Example Query:** +```graphql +query GetMyDashboard { + workspaces { + name + is_pinned + boards { + title + color + } + } +} +``` + +#### Project Structure +```text +src/ +├── auth/ # Authentication (Login, Register, Guards) +├── board/ # Board management (Kanban logic) +├── list/ # List management (Ordering, Creation) +├── card/ # Card management (Content, Moving) +├── label/ # Label management +├── workspace/ # Workspace logic (The root entity) +├── common/ # Shared Guards, Decorators, and Utilities +├── prisma/ # Prisma Module & Service +└── graphql/ # Generated TypeScript definitions +``` diff --git a/backend/documentation/classes/AddWorkspaceMemberInput.html b/backend/documentation/classes/AddWorkspaceMemberInput.html new file mode 100644 index 0000000..aecf9ec --- /dev/null +++ b/backend/documentation/classes/AddWorkspaceMemberInput.html @@ -0,0 +1,693 @@ + + + + + ++
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + Optional + role + + + | +
+ Type : Nullable<Role>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:112
+ |
+
| + + + user_email + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:111
+ |
+
| + + + workspace_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:110
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + attachment_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:168
+ |
+
| + + + card_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:169
+ |
+
| + + + filename + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:171
+ |
+
| + + + url + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:170
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + Optional + code + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:308
+ |
+
| + + + Optional + field + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:309
+ |
+
| + + + message + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:307
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/auth/auth.resolver.ts
+
+ Methods+ |
+
| + + | +
+constructor(authService: AuthService)
+ |
+ ||||||
|
+ Defined in src/auth/auth.resolver.ts:28
+ |
+ ||||||
|
+
+ Parameters :
+
+
|
+
| + + + + Async + login + + + | +||||||||||||
+
+ login(input: LoginInput, context: literal type)
+ |
+ ||||||||||||
|
+ Decorators :
+ + @Mutation()
+ |
+ ||||||||||||
|
+ Defined in src/auth/auth.resolver.ts:63
+ |
+ ||||||||||||
|
+ User authentication. +
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + + Async + logout + + + | +||||||
+
+ logout(context: literal type)
+ |
+ ||||||
|
+ Decorators :
+ + @Mutation()
+ |
+ ||||||
|
+ Defined in src/auth/auth.resolver.ts:142
+ |
+ ||||||
|
+ Logout mutation. +This mutation clears the session cookie. +
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + + Async + register + + + | +||||||||||||
+
+ register(input: RegisterInput, context: literal type)
+ |
+ ||||||||||||
|
+ Decorators :
+ + @Mutation('register')
+ |
+ ||||||||||||
|
+ Defined in src/auth/auth.resolver.ts:120
+ |
+ ||||||||||||
|
+ Mutation for user registration. +
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+ An |
+
import {
+ Resolver,
+ Mutation,
+ Args,
+ Context,
+ ResolveField,
+} from '@nestjs/graphql';
+import { AuthService } from './auth.service';
+import { FastifyReply } from 'fastify';
+import { RegisterInput, LoginInput } from '../graphql/graphql';
+
+@Resolver('AuthResult')
+export class AuthResultResolver {
+ @ResolveField()
+ __resolveType(value) {
+ return value.__typename;
+ }
+}
+
+@Resolver()
+export class AuthResolver {
+ constructor(private authService: AuthService) {}
+
+ /**
+ * User authentication.
+ * * Returns an `AuthResult` containing the token on success.
+ * * @param input Email and Password
+ * ```graphql
+ * mutation Login($input: LoginInput!) {
+ * login(input: $input) {
+ * __typename
+ * # Success case
+ * ... on AuthSuccess {
+ * token
+ * user {
+ * username
+ * email
+ * }
+ * # Error case
+ * ... on AuthError {
+ * message
+ * code
+ * }
+ * }
+ * ```
+ * ```json
+ * {
+ * "input": {
+ * "email": "john@example.com",
+ * "password": "secretPassword"
+ * }
+ * }
+ * ```
+ */
+ @Mutation()
+ async login(
+ @Args('input')
+ input: LoginInput,
+ @Context() context: { reply: FastifyReply },
+ ) {
+ const result = await this.authService.loginUser(input);
+
+ if (result.__typename === 'AuthSuccess' && result.token) {
+ context.reply.setCookie('session', result.token, {
+ httpOnly: true,
+ secure: process.env.NODE_ENV === 'production',
+ path: '/',
+ });
+ }
+ return result;
+ }
+
+ /**
+ * Mutation for user registration.
+ * * This mutation returns an Union (`AuthResult`): either a success with the token, or a detailed error.
+ *
+ * @param input The registration data (username, email, password)
+ * @returns An `AuthResult` which can be either `AuthSuccess` or `AuthError`
+ *
+ * ```graphql
+ * mutation Register($input: RegisterInput!) {
+ * register(input: $input) {
+ * __typename
+ * # Success case
+ * ... on AuthSuccess {
+ * token
+ * user {
+ * user_id
+ * username
+ * email
+ * }
+ * }
+ * # Error case
+ * ... on AuthError {
+ * message
+ * code
+ * field
+ * }
+ * }
+ * }
+ * ```
+ * ```json
+ * {
+ * "input": {
+ * "username": "John",
+ * "email": "john@test.com",
+ * "password": "secretPassword"
+ * }
+ * }
+ * ```
+ */
+ @Mutation('register')
+ async register(
+ @Args('input')
+ input: RegisterInput,
+ @Context() context: { reply: FastifyReply },
+ ) {
+ const result = await this.authService.registerUser(input);
+
+ if (result.__typename === 'AuthSuccess' && result.token) {
+ context.reply.setCookie('session', result.token, {
+ httpOnly: true,
+ secure: process.env.NODE_ENV === 'production',
+ path: '/',
+ });
+ }
+ return result;
+ }
+
+ /**
+ * Logout mutation.
+ * This mutation clears the session cookie.
+ */
+ @Mutation()
+ async logout(@Context() context: { reply: FastifyReply }) {
+ try {
+ context.reply.clearCookie('session', { path: '/' });
+ return {
+ __typename: 'Success',
+ successMessage: 'Logout successful',
+ };
+ } catch (error) {
+ return {
+ __typename: 'Error',
+ errorMessage: 'Logout failed',
+ code: 'LOGOUT_FAILED',
+ };
+ }
+ }
+}
+
+ +
+ src/auth/auth.resolver.ts
+
+ Methods+ |
+
+
|
+
| + + + + __resolveType + + + | +||||||
+
+ __resolveType(value: unknown)
+ |
+ ||||||
|
+ Decorators :
+ + @ResolveField()
+ |
+ ||||||
|
+ Defined in src/auth/auth.resolver.ts:22
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ any
+
+
+
+
+ |
+
import {
+ Resolver,
+ Mutation,
+ Args,
+ Context,
+ ResolveField,
+} from '@nestjs/graphql';
+import { AuthService } from './auth.service';
+import { FastifyReply } from 'fastify';
+import { RegisterInput, LoginInput } from '../graphql/graphql';
+
+@Resolver('AuthResult')
+export class AuthResultResolver {
+ @ResolveField()
+ __resolveType(value) {
+ return value.__typename;
+ }
+}
+
+@Resolver()
+export class AuthResolver {
+ constructor(private authService: AuthService) {}
+
+ /**
+ * User authentication.
+ * * Returns an `AuthResult` containing the token on success.
+ * * @param input Email and Password
+ * ```graphql
+ * mutation Login($input: LoginInput!) {
+ * login(input: $input) {
+ * __typename
+ * # Success case
+ * ... on AuthSuccess {
+ * token
+ * user {
+ * username
+ * email
+ * }
+ * # Error case
+ * ... on AuthError {
+ * message
+ * code
+ * }
+ * }
+ * ```
+ * ```json
+ * {
+ * "input": {
+ * "email": "john@example.com",
+ * "password": "secretPassword"
+ * }
+ * }
+ * ```
+ */
+ @Mutation()
+ async login(
+ @Args('input')
+ input: LoginInput,
+ @Context() context: { reply: FastifyReply },
+ ) {
+ const result = await this.authService.loginUser(input);
+
+ if (result.__typename === 'AuthSuccess' && result.token) {
+ context.reply.setCookie('session', result.token, {
+ httpOnly: true,
+ secure: process.env.NODE_ENV === 'production',
+ path: '/',
+ });
+ }
+ return result;
+ }
+
+ /**
+ * Mutation for user registration.
+ * * This mutation returns an Union (`AuthResult`): either a success with the token, or a detailed error.
+ *
+ * @param input The registration data (username, email, password)
+ * @returns An `AuthResult` which can be either `AuthSuccess` or `AuthError`
+ *
+ * ```graphql
+ * mutation Register($input: RegisterInput!) {
+ * register(input: $input) {
+ * __typename
+ * # Success case
+ * ... on AuthSuccess {
+ * token
+ * user {
+ * user_id
+ * username
+ * email
+ * }
+ * }
+ * # Error case
+ * ... on AuthError {
+ * message
+ * code
+ * field
+ * }
+ * }
+ * }
+ * ```
+ * ```json
+ * {
+ * "input": {
+ * "username": "John",
+ * "email": "john@test.com",
+ * "password": "secretPassword"
+ * }
+ * }
+ * ```
+ */
+ @Mutation('register')
+ async register(
+ @Args('input')
+ input: RegisterInput,
+ @Context() context: { reply: FastifyReply },
+ ) {
+ const result = await this.authService.registerUser(input);
+
+ if (result.__typename === 'AuthSuccess' && result.token) {
+ context.reply.setCookie('session', result.token, {
+ httpOnly: true,
+ secure: process.env.NODE_ENV === 'production',
+ path: '/',
+ });
+ }
+ return result;
+ }
+
+ /**
+ * Logout mutation.
+ * This mutation clears the session cookie.
+ */
+ @Mutation()
+ async logout(@Context() context: { reply: FastifyReply }) {
+ try {
+ context.reply.clearCookie('session', { path: '/' });
+ return {
+ __typename: 'Success',
+ successMessage: 'Logout successful',
+ };
+ } catch (error) {
+ return {
+ __typename: 'Error',
+ errorMessage: 'Logout failed',
+ code: 'LOGOUT_FAILED',
+ };
+ }
+ }
+}
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + token + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:302
+ |
+
| + + + user + + + | +
+ Type : User
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:303
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + board_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:122
+ |
+
| + + + color + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:125
+ |
+
| + + + Optional + description + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:124
+ |
+
| + + + lists + + + | +
+ Type : List[]
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:126
+ |
+
| + + + title + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:123
+ |
+
| + + + workspace_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:127
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + Optional + attachments + + + | +
+ Type : Nullable<Nullable[]>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:148
+ |
+
| + + + card_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:140
+ |
+
| + + + Optional + comments + + + | +
+ Type : Nullable<Nullable[]>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:147
+ |
+
| + + + Optional + description + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:142
+ |
+
| + + + Optional + due_date + + + | +
+ Type : Nullable<DateTime>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:146
+ |
+
| + + + Optional + labels + + + | +
+ Type : Nullable<Nullable[]>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:145
+ |
+
| + + + list_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:144
+ |
+
| + + + Optional + members + + + | +
+ Type : Nullable<Nullable[]>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:149
+ |
+
| + + + position + + + | +
+ Type : number
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:143
+ |
+
| + + + title + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:141
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + card_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:175
+ |
+
| + + + label_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:176
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + card_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:180
+ |
+
| + + + user_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:181
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + card_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:156
+ |
+
| + + + comment_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:153
+ |
+
| + + + content + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:154
+ |
+
| + + + created_at + + + | +
+ Type : DateTime
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:155
+ |
+
| + + + user_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:157
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + color + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:20
+ |
+
| + + + Optional + description + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:19
+ |
+
| + + + title + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:18
+ |
+
| + + + workspace_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:21
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + Optional + board + + + | +
+ Type : Nullable<Board>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:215
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + Optional + description + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:48
+ |
+
| + + + Optional + due_date + + + | +
+ Type : Nullable<DateTime>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:50
+ |
+
| + + + list_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:47
+ |
+
| + + + position + + + | +
+ Type : number
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:49
+ |
+
| + + + title + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:46
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + board_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:64
+ |
+
| + + + color + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:63
+ |
+
| + + + name + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:62
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + board_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:33
+ |
+
| + + + Optional + color + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:35
+ |
+
| + + + position + + + | +
+ Type : number
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:34
+ |
+
| + + + title + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:32
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + email + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:86
+ |
+
| + + + password + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:87
+ |
+
| + + + username + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:85
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + Optional + color + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:100
+ |
+
| + + + Optional + description + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:99
+ |
+
| + + + name + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:98
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + Optional + code + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:284
+ |
+
| + + + errorMessage + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:283
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + Optional + message + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:290
+ |
+
| + + + success + + + | +
+ Type : boolean
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:288
+ |
+
| + + + Optional + url + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:289
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Methods+ |
+
+
|
+
| + + + Abstract + addWorkspaceMember + + + | +||||||
+
+ addWorkspaceMember(input: AddWorkspaceMemberInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:271
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ WorkspaceMembers | Promise
+
+
+
+
+ |
+
| + + + Abstract + createBoard + + + | +||||||
+
+ createBoard(input: CreateBoardInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:219
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ CreateBoardPayload | Promise
+
+
+
+
+ |
+
| + + + Abstract + createCard + + + | +||||||
+
+ createCard(input: CreateCardInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:233
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Card | Promise
+
+
+
+
+ |
+
| + + + Abstract + createLabel + + + | +||||||
+
+ createLabel(input: CreateLabelInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:241
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Label | Promise
+
+
+
+
+ |
+
| + + + Abstract + createList + + + | +||||||
+
+ createList(input: CreateListInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:225
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ List | Promise
+
+
+
+
+ |
+
| + + + Abstract + createUser + + + | +||||||
+
+ createUser(input: CreateUserInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:249
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + createWorkspace + + + | +||||||
+
+ createWorkspace(input: CreateWorkspaceInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:261
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Workspace | Promise
+
+
+
+
+ |
+
| + + + Abstract + deleteBoard + + + | +||||||
+
+ deleteBoard(board_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:223
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Status | Promise
+
+
+
+
+ |
+
| + + + Abstract + deleteCard + + + | +||||||
+
+ deleteCard(card_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:237
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Status | Promise
+
+
+
+
+ |
+
| + + + Abstract + deleteLabel + + + | +||||||
+
+ deleteLabel(label_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:245
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Status | Promise
+
+
+
+
+ |
+
| + + + Abstract + deleteList + + + | +||||||
+
+ deleteList(list_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:229
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Status | Promise
+
+
+
+
+ |
+
| + + + Abstract + deleteUser + + + | +||||||
+
+ deleteUser(user_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:253
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + deleteWorkspace + + + | +||||||
+
+ deleteWorkspace(workspace_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:265
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Status | Promise
+
+
+
+
+ |
+
| + + + Abstract + login + + + | +||||||
+
+ login(input: LoginInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:255
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + logout + + + | +
+
+ logout()
+ |
+
|
+ Defined in src/graphql/graphql.ts:259
+ |
+
|
+
+
+ Returns :
+ Status | Promise
+
+ |
+
| + + + Abstract + moveCard + + + | +||||||||||||
+
+ moveCard(card_id: string, list_id: string, position: number)
+ |
+ ||||||||||||
|
+ Defined in src/graphql/graphql.ts:239
+ |
+ ||||||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Card | Promise
+
+
+
+
+ |
+
| + + + Abstract + pinWorkspace + + + | +||||||
+
+ pinWorkspace(workspace_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:267
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ PinWorkspacePayload | Promise
+
+
+
+
+ |
+
| + + + Abstract + register + + + | +||||||
+
+ register(input: RegisterInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:257
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + removeWorkspaceMember + + + | +|||||||||
+
+ removeWorkspaceMember(workspace_id: string, user_id: string)
+ |
+ |||||||||
|
+ Defined in src/graphql/graphql.ts:273
+ |
+ |||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Status | Promise
+
+
+
+
+ |
+
| + + + Abstract + reorderLists + + + | +|||||||||
+
+ reorderLists(board_id: string, list_ids: string[])
+ |
+ |||||||||
|
+ Defined in src/graphql/graphql.ts:231
+ |
+ |||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ [] | Promise
+
+
+
+
+ |
+
| + + + Abstract + unpinWorkspace + + + | +||||||
+
+ unpinWorkspace(workspace_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:269
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ PinWorkspacePayload | Promise
+
+
+
+
+ |
+
| + + + Abstract + updateBoard + + + | +||||||
+
+ updateBoard(input: UpdateBoardInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:221
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Board | Promise
+
+
+
+
+ |
+
| + + + Abstract + updateCard + + + | +||||||
+
+ updateCard(input: UpdateCardInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:235
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Card | Promise
+
+
+
+
+ |
+
| + + + Abstract + updateLabel + + + | +||||||
+
+ updateLabel(input: UpdateLabelInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:243
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Label | Promise
+
+
+
+
+ |
+
| + + + Abstract + updateList + + + | +||||||
+
+ updateList(input: UpdateListInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:227
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ List | Promise
+
+
+
+
+ |
+
| + + + Abstract + updateMemberRole + + + | +||||||
+
+ updateMemberRole(input: UpdateMemberRoleInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:275
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ WorkspaceMembers | Promise
+
+
+
+
+ |
+
| + + + Abstract + updateUser + + + | +||||||
+
+ updateUser(input: UpdateUserInput)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:251
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + updateWorkspace + + + | +|||||||||
+
+ updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput)
+ |
+ |||||||||
|
+ Defined in src/graphql/graphql.ts:263
+ |
+ |||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Workspace | Promise
+
+
+
+
+ |
+
| + + + Abstract + uploadFile + + + | +||||||
+
+ uploadFile(file: Upload)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:247
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ FileResponse | Promise
+
+
+
+
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Methods+ |
+
+
|
+
| + + + Abstract + board + + + | +||||||
+
+ board(board_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:187
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + boards + + + | +||||||
+
+ boards(workspace_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:185
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + card + + + | +||||||
+
+ card(card_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:195
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + cards + + + | +||||||
+
+ cards(list_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:193
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + comments + + + | +||||||
+
+ comments(card_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:199
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + labels + + + | +||||||
+
+ labels(workspace_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:197
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + list + + + | +||||||
+
+ list(list_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:191
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + lists + + + | +||||||
+
+ lists(board_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:189
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + me + + + | +
+
+ me()
+ |
+
|
+ Defined in src/graphql/graphql.ts:205
+ |
+
|
+
+
+ Returns :
+ Nullable | Promise
+
+ |
+
| + + + Abstract + user + + + | +||||||
+
+ user(user_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:203
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + users + + + | +
+
+ users()
+ |
+
|
+ Defined in src/graphql/graphql.ts:201
+ |
+
|
+
+
+ Returns :
+ Nullable | Promise
+
+ |
+
| + + + Abstract + workspace + + + | +||||||
+
+ workspace(workspace_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:209
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Nullable | Promise
+
+
+
+
+ |
+
| + + + Abstract + workspaceMembers + + + | +||||||
+
+ workspaceMembers(workspace_id: string)
+ |
+ ||||||
|
+ Defined in src/graphql/graphql.ts:211
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ [] | Promise
+
+
+
+
+ |
+
| + + + Abstract + workspaces + + + | +
+
+ workspaces()
+ |
+
|
+ Defined in src/graphql/graphql.ts:207
+ |
+
|
+
+
+ Returns :
+ Nullable | Promise
+
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + color + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:163
+ |
+
| + + + label_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:161
+ |
+
| + + + name + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:162
+ |
+
| + + + workspace_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:164
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + board_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:135
+ |
+
| + + + Optional + cards + + + | +
+ Type : Nullable<Nullable[]>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:136
+ |
+
| + + + color + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:134
+ |
+
| + + + list_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:131
+ |
+
| + + + position + + + | +
+ Type : number
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:133
+ |
+
| + + + title + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:132
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + email + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:74
+ |
+
| + + + password + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:75
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + workspace + + + | +
+ Type : Workspace
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:334
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + email + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:80
+ |
+
| + + + password + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:81
+ |
+
| + + + username + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:79
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + Optional + successMessage + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:279
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + board_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:25
+ |
+
| + + + Optional + color + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:28
+ |
+
| + + + Optional + description + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:27
+ |
+
| + + + Optional + title + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:26
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + card_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:54
+ |
+
| + + + Optional + description + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:56
+ |
+
| + + + Optional + due_date + + + | +
+ Type : Nullable<DateTime>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:58
+ |
+
| + + + Optional + position + + + | +
+ Type : Nullable<number>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:57
+ |
+
| + + + Optional + title + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:55
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + Optional + color + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:70
+ |
+
| + + + label_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:68
+ |
+
| + + + Optional + name + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:69
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + Optional + color + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:42
+ |
+
| + + + list_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:39
+ |
+
| + + + Optional + position + + + | +
+ Type : Nullable<number>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:41
+ |
+
| + + + Optional + title + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:40
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + role + + + | +
+ Type : Role
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:118
+ |
+
| + + + user_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:117
+ |
+
| + + + workspace_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:116
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
| + + | +
| + + + Optional + email + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:93
+ |
+
| + + + Optional + password + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:94
+ |
+
| + + + user_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:91
+ |
+
| + + + Optional + username + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:92
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + Optional + color + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:106
+ |
+
| + + + Optional + description + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:105
+ |
+
| + + + Optional + name + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:104
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + created_at + + + | +
+ Type : DateTime
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:298
+ |
+
| + + + email + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:296
+ |
+
| + + + Optional + picture + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:297
+ |
+
| + + + user_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:294
+ |
+
| + + + username + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:295
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + Optional + boards + + + | +
+ Type : Nullable<Nullable[]>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:320
+ |
+
| + + + color + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:315
+ |
+
| + + + Optional + description + + + | +
+ Type : Nullable<string>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:316
+ |
+
| + + + is_pinned + + + | +
+ Type : boolean
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:322
+ |
+
| + + + Optional + labels + + + | +
+ Type : Nullable<Nullable[]>
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:321
+ |
+
| + + + members + + + | +
+ Type : WorkspaceMembers[]
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:319
+ |
+
| + + + name + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:314
+ |
+
| + + + owner + + + | +
+ Type : User
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:318
+ |
+
| + + + owner_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:317
+ |
+
| + + + workspace_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:313
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/graphql/graphql.ts
+
+ Properties+ |
+
+
|
+
| + + + role + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:328
+ |
+
| + + + user + + + | +
+ Type : User
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:329
+ |
+
| + + + user_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:327
+ |
+
| + + + workspace + + + | +
+ Type : Workspace
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:330
+ |
+
| + + + workspace_id + + + | +
+ Type : string
+
+ |
+
|
+ Defined in src/graphql/graphql.ts:326
+ |
+
export enum Role {
+ Admin = "Admin",
+ Member = "Member",
+ Viewer = "Viewer"
+}
+
+export class CreateBoardInput {
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ workspace_id: string;
+}
+
+export class UpdateBoardInput {
+ board_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class CreateListInput {
+ title: string;
+ board_id: string;
+ position: number;
+ color?: Nullable<string>;
+}
+
+export class UpdateListInput {
+ list_id: string;
+ title?: Nullable<string>;
+ position?: Nullable<number>;
+ color?: Nullable<string>;
+}
+
+export class CreateCardInput {
+ title: string;
+ list_id: string;
+ description?: Nullable<string>;
+ position: number;
+ due_date?: Nullable<DateTime>;
+}
+
+export class UpdateCardInput {
+ card_id: string;
+ title?: Nullable<string>;
+ description?: Nullable<string>;
+ position?: Nullable<number>;
+ due_date?: Nullable<DateTime>;
+}
+
+export class CreateLabelInput {
+ name: string;
+ color: string;
+ board_id: string;
+}
+
+export class UpdateLabelInput {
+ label_id: string;
+ name?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class LoginInput {
+ email: string;
+ password: string;
+}
+
+export class RegisterInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class CreateUserInput {
+ username: string;
+ email: string;
+ password: string;
+}
+
+export class UpdateUserInput {
+ user_id: string;
+ username?: Nullable<string>;
+ email?: Nullable<string>;
+ password?: Nullable<string>;
+}
+
+export class CreateWorkspaceInput {
+ name: string;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class UpdateWorkspaceInput {
+ name?: Nullable<string>;
+ description?: Nullable<string>;
+ color?: Nullable<string>;
+}
+
+export class AddWorkspaceMemberInput {
+ workspace_id: string;
+ user_email: string;
+ role?: Nullable<Role>;
+}
+
+export class UpdateMemberRoleInput {
+ workspace_id: string;
+ user_id: string;
+ role: Role;
+}
+
+export class Board {
+ board_id: string;
+ title: string;
+ description?: Nullable<string>;
+ color: string;
+ lists: List[];
+ workspace_id: string;
+}
+
+export class List {
+ list_id: string;
+ title: string;
+ position: number;
+ color: string;
+ board_id: string;
+ cards?: Nullable<Nullable<Card>[]>;
+}
+
+export class Card {
+ card_id: string;
+ title: string;
+ description?: Nullable<string>;
+ position: number;
+ list_id: string;
+ labels?: Nullable<Nullable<Label>[]>;
+ due_date?: Nullable<DateTime>;
+ comments?: Nullable<Nullable<Comment>[]>;
+ attachments?: Nullable<Nullable<Attachment>[]>;
+ members?: Nullable<Nullable<CardMember>[]>;
+}
+
+export class Comment {
+ comment_id: string;
+ content: string;
+ created_at: DateTime;
+ card_id: string;
+ user_id: string;
+}
+
+export class Label {
+ label_id: string;
+ name: string;
+ color: string;
+ workspace_id: string;
+}
+
+export class Attachment {
+ attachment_id: string;
+ card_id: string;
+ url: string;
+ filename: string;
+}
+
+export class CardLabel {
+ card_id: string;
+ label_id: string;
+}
+
+export class CardMember {
+ card_id: string;
+ user_id: string;
+}
+
+export abstract class IQuery {
+ abstract boards(workspace_id: string): Nullable<Nullable<Board>[]> | Promise<Nullable<Nullable<Board>[]>>;
+
+ abstract board(board_id: string): Nullable<Board> | Promise<Nullable<Board>>;
+
+ abstract lists(board_id: string): Nullable<Nullable<List>[]> | Promise<Nullable<Nullable<List>[]>>;
+
+ abstract list(list_id: string): Nullable<List> | Promise<Nullable<List>>;
+
+ abstract cards(list_id: string): Nullable<Nullable<Card>[]> | Promise<Nullable<Nullable<Card>[]>>;
+
+ abstract card(card_id: string): Nullable<Card> | Promise<Nullable<Card>>;
+
+ abstract labels(workspace_id: string): Nullable<Nullable<Label>[]> | Promise<Nullable<Nullable<Label>[]>>;
+
+ abstract comments(card_id: string): Nullable<Nullable<Comment>[]> | Promise<Nullable<Nullable<Comment>[]>>;
+
+ abstract users(): Nullable<Nullable<User>[]> | Promise<Nullable<Nullable<User>[]>>;
+
+ abstract user(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract me(): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract workspaces(): Nullable<Nullable<Workspace>[]> | Promise<Nullable<Nullable<Workspace>[]>>;
+
+ abstract workspace(workspace_id: string): Nullable<Workspace> | Promise<Nullable<Workspace>>;
+
+ abstract workspaceMembers(workspace_id: string): WorkspaceMembers[] | Promise<WorkspaceMembers[]>;
+}
+
+export class CreateBoardPayload {
+ board?: Nullable<Board>;
+}
+
+export abstract class IMutation {
+ abstract createBoard(input: CreateBoardInput): CreateBoardPayload | Promise<CreateBoardPayload>;
+
+ abstract updateBoard(input: UpdateBoardInput): Board | Promise<Board>;
+
+ abstract deleteBoard(board_id: string): Status | Promise<Status>;
+
+ abstract createList(input: CreateListInput): List | Promise<List>;
+
+ abstract updateList(input: UpdateListInput): List | Promise<List>;
+
+ abstract deleteList(list_id: string): Status | Promise<Status>;
+
+ abstract reorderLists(board_id: string, list_ids: string[]): List[] | Promise<List[]>;
+
+ abstract createCard(input: CreateCardInput): Card | Promise<Card>;
+
+ abstract updateCard(input: UpdateCardInput): Card | Promise<Card>;
+
+ abstract deleteCard(card_id: string): Status | Promise<Status>;
+
+ abstract moveCard(card_id: string, list_id: string, position: number): Card | Promise<Card>;
+
+ abstract createLabel(input: CreateLabelInput): Label | Promise<Label>;
+
+ abstract updateLabel(input: UpdateLabelInput): Label | Promise<Label>;
+
+ abstract deleteLabel(label_id: string): Status | Promise<Status>;
+
+ abstract uploadFile(file: Upload): FileResponse | Promise<FileResponse>;
+
+ abstract createUser(input: CreateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract updateUser(input: UpdateUserInput): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract deleteUser(user_id: string): Nullable<User> | Promise<Nullable<User>>;
+
+ abstract login(input: LoginInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract register(input: RegisterInput): Nullable<AuthResult> | Promise<Nullable<AuthResult>>;
+
+ abstract logout(): Status | Promise<Status>;
+
+ abstract createWorkspace(input: CreateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput): Workspace | Promise<Workspace>;
+
+ abstract deleteWorkspace(workspace_id: string): Status | Promise<Status>;
+
+ abstract pinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract unpinWorkspace(workspace_id: string): PinWorkspacePayload | Promise<PinWorkspacePayload>;
+
+ abstract addWorkspaceMember(input: AddWorkspaceMemberInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+
+ abstract removeWorkspaceMember(workspace_id: string, user_id: string): Status | Promise<Status>;
+
+ abstract updateMemberRole(input: UpdateMemberRoleInput): WorkspaceMembers | Promise<WorkspaceMembers>;
+}
+
+export class Success {
+ successMessage?: Nullable<string>;
+}
+
+export class Error {
+ errorMessage: string;
+ code?: Nullable<string>;
+}
+
+export class FileResponse {
+ success: boolean;
+ url?: Nullable<string>;
+ message?: Nullable<string>;
+}
+
+export class User {
+ user_id: string;
+ username: string;
+ email: string;
+ picture?: Nullable<string>;
+ created_at: DateTime;
+}
+
+export class AuthSuccess {
+ token: string;
+ user: User;
+}
+
+export class AuthError {
+ message: string;
+ code?: Nullable<string>;
+ field?: Nullable<string>;
+}
+
+export class Workspace {
+ workspace_id: string;
+ name: string;
+ color: string;
+ description?: Nullable<string>;
+ owner_id: string;
+ owner: User;
+ members: WorkspaceMembers[];
+ boards?: Nullable<Nullable<Board>[]>;
+ labels?: Nullable<Nullable<Label>[]>;
+ is_pinned: boolean;
+}
+
+export class WorkspaceMembers {
+ workspace_id: string;
+ user_id: string;
+ role: string;
+ user: User;
+ workspace: Workspace;
+}
+
+export class PinWorkspacePayload {
+ workspace: Workspace;
+}
+
+export type DateTime = any;
+export type Upload = any;
+export type Status = Success | Error;
+export type AuthResult = AuthSuccess | AuthError;
+type Nullable<T> = T | null;
+
+ +
+ src/workspace/workspace.resolver.ts
+
+ Methods+ |
+
+
|
+
+constructor(workspaceService: WorkspaceService)
+ |
+ ||||||
|
+ Defined in src/workspace/workspace.resolver.ts:17
+ |
+ ||||||
|
+
+ Parameters :
+
+
|
+
| + + + + + Async + createWorkspace + + + | +|||||||||
+
+ createWorkspace(input: CreateWorkspaceInput, context: any)
+ |
+ |||||||||
|
+ Decorators :
+ + @Mutation()
+ |
+ |||||||||
|
+ Defined in src/workspace/workspace.resolver.ts:22
+ |
+ |||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + + + Async + deleteWorkspace + + + | +|||||||||
+
+ deleteWorkspace(workspace_id: string, context: any)
+ |
+ |||||||||
|
+ Decorators :
+ + @Mutation()
+ |
+ |||||||||
|
+ Defined in src/workspace/workspace.resolver.ts:52
+ |
+ |||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + + + Async + getUserWorkspaces + + + | +||||||
+
+ getUserWorkspaces(context: any)
+ |
+ ||||||
|
+ Decorators :
+ + @Query('workspaces')
+ |
+ ||||||
|
+ Defined in src/workspace/workspace.resolver.ts:31
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + + + Async + getWorkspace + + + | +||||||
+
+ getWorkspace(workspace_id: string)
+ |
+ ||||||
|
+ Decorators :
+ + @Query('workspace')
+ |
+ ||||||
|
+ Defined in src/workspace/workspace.resolver.ts:37
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + + + Async + updateWorkspace + + + | +|||||||||
+
+ updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput)
+ |
+ |||||||||
|
+ Decorators :
+ + @Mutation('updateWorkspace')
+ |
+ |||||||||
|
+ Defined in src/workspace/workspace.resolver.ts:43
+ |
+ |||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
import { Args, Mutation, Resolver, Context, Query } from '@nestjs/graphql';
+import { UseGuards } from '@nestjs/common';
+import { WorkspaceService } from './workspace.service';
+import { AuthGuard } from '../common/guards/auth.guard';
+import { WorkspaceAuth } from '../common/decorators/workspace-auth.decorator';
+import { CreateWorkspaceInput, UpdateWorkspaceInput } from '../graphql/graphql';
+import { Role } from '@prisma/client';
+
+@Resolver('Workspace')
+export class WorkspaceResolver {
+ constructor(private workspaceService: WorkspaceService) {}
+
+ @Mutation()
+ @UseGuards(AuthGuard)
+ async createWorkspace(
+ @Args('input') input: CreateWorkspaceInput,
+ @Context() context: any,
+ ) {
+ return this.workspaceService.createWorkspace(context.user.user_id, input);
+ }
+
+ @Query("workspaces")
+ @UseGuards(AuthGuard)
+ async getUserWorkspaces(@Context() context: any) {
+ return this.workspaceService.findAllUserWorkspaces(context.user.user_id);
+ }
+
+ @Query("workspace")
+ @WorkspaceAuth(Role.Viewer)
+ async getWorkspace(@Args('workspace_id') workspace_id: string) {
+ return this.workspaceService.findWorkspace(workspace_id);
+ }
+
+ @Mutation("updateWorkspace")
+ @WorkspaceAuth(Role.Admin)
+ async updateWorkspace(
+ @Args('workspace_id') workspace_id: string,
+ @Args('input') input: UpdateWorkspaceInput,
+ ) {
+ return this.workspaceService.updateWorkspace(workspace_id, input);
+ }
+
+ @Mutation()
+ @WorkspaceAuth(Role.Admin)
+ async deleteWorkspace(
+ @Args('workspace_id') workspace_id: string,
+ @Context() context: any,
+ ) {
+ return this.workspaceService.delete(
+ workspace_id,
+ context.user.user_id,
+ );
+ }
+}
+
+ +
+ documentation/template-playground/template-playground.component.ts
+
+
+ OnInit
+ OnDestroy
+
| selector | +template-playground-root |
+
| styles | +
+ .template-playground {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ }
+
+ .template-playground-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1rem 2rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .template-playground-status {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ font-size: 0.875rem;
+ }
+
+ .session-info {
+ color: #6c757d;
+ font-family: monospace;
+ }
+
+ .saving-indicator {
+ color: #ffc107;
+ font-weight: bold;
+ }
+
+ .last-saved {
+ color: #28a745;
+ }
+
+ .template-playground-actions {
+ display: flex;
+ gap: 0.5rem;
+ }
+
+ .config-panel {
+ background: #e9ecef;
+ padding: 1rem 2rem;
+ border-bottom: 1px solid #dee2e6;
+ transition: all 0.3s ease;
+ max-height: 200px;
+ overflow: hidden;
+ }
+
+ .config-panel.collapsed {
+ max-height: 0;
+ padding: 0 2rem;
+ }
+
+ .config-options {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 0.5rem;
+ margin-top: 0.5rem;
+ }
+
+ .config-options label {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ font-size: 0.875rem;
+ }
+
+ .template-playground-body {
+ display: flex;
+ flex: 1;
+ overflow: hidden;
+ }
+
+ .template-playground-sidebar {
+ width: 250px;
+ background: #f8f9fa;
+ border-right: 1px solid #dee2e6;
+ overflow-y: auto;
+ }
+
+ .template-file-list {
+ padding: 1rem;
+ }
+
+ .template-file-list h3 {
+ margin: 0 0 0.5rem 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ color: #495057;
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ }
+
+ .file-list {
+ list-style: none;
+ padding: 0;
+ margin: 0 0 1.5rem 0;
+ }
+
+ .file-list li {
+ display: flex;
+ align-items: center;
+ padding: 0.5rem;
+ cursor: pointer;
+ border-radius: 4px;
+ font-size: 0.875rem;
+ transition: background-color 0.15s ease;
+ }
+
+ .file-list li:hover {
+ background: #e9ecef;
+ }
+
+ .file-list li.active {
+ background: #007bff;
+ color: white;
+ }
+
+ .file-icon {
+ margin-right: 0.5rem;
+ opacity: 0.7;
+ }
+
+ .file-type {
+ margin-left: auto;
+ font-size: 0.75rem;
+ opacity: 0.7;
+ text-transform: uppercase;
+ }
+
+ .loading-templates {
+ text-align: center;
+ color: #6c757d;
+ font-style: italic;
+ padding: 2rem;
+ }
+
+ .template-playground-main {
+ flex: 1;
+ display: flex;
+ overflow: hidden;
+ }
+
+ .template-playground-editor {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ border-right: 1px solid #dee2e6;
+ }
+
+ .editor-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .editor-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .file-type-badge {
+ background: #6c757d;
+ color: white;
+ padding: 0.125rem 0.5rem;
+ border-radius: 12px;
+ font-size: 0.75rem;
+ text-transform: uppercase;
+ }
+
+ .editor-container {
+ flex: 1;
+ position: relative;
+ }
+
+ .template-playground-preview {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .preview-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .preview-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .preview-frame {
+ flex: 1;
+ border: none;
+ background: white;
+ }
+
+ .btn {
+ padding: 0.375rem 0.75rem;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+ font-size: 0.875rem;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ transition: all 0.15s ease;
+ }
+
+ .btn-primary {
+ background: #007bff;
+ border-color: #007bff;
+ color: white;
+ }
+
+ .btn-primary:hover {
+ background: #0056b3;
+ border-color: #004085;
+ }
+
+ .btn-secondary {
+ background: #6c757d;
+ border-color: #6c757d;
+ color: white;
+ }
+
+ .btn-secondary:hover {
+ background: #545b62;
+ border-color: #4e555b;
+ }
+
+ .btn-success {
+ background: #28a745;
+ border-color: #28a745;
+ color: white;
+ }
+
+ .btn-success:hover {
+ background: #1e7e34;
+ border-color: #1c7430;
+ }
+
+ .btn-sm {
+ padding: 0.25rem 0.5rem;
+ font-size: 0.75rem;
+ }
+ |
+
| template | + |
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
+ Accessors+ |
+
+
|
+
+constructor(http: HttpClient, editorService: TemplateEditorService, zipService: ZipExportService, hbsService: HbsRenderService)
+ |
+ |||||||||||||||
| + + | +|||||||||||||||
|
+
+ Parameters :
+
+
|
+
| + + + Private + Async + createSession + + + | +
+
+ createSession()
+ |
+
| + + | +
|
+
+
+ Returns :
+ Promise<void>
+
+ |
+
| + + + Async + exportZip + + + | +
+
+ exportZip()
+ |
+
| + + | +
|
+
+
+ Returns :
+ Promise<void>
+
+ |
+
| + + + initializeEditor + + + | +
+initializeEditor()
+ |
+
| + + | +
|
+
+
+ Returns :
+ void
+
+ |
+
| + + + Private + Async + loadSessionConfig + + + | +
+
+ loadSessionConfig()
+ |
+
| + + | +
|
+
+
+ Returns :
+ Promise<void>
+
+ |
+
| + + + Private + Async + loadSessionTemplates + + + | +
+
+ loadSessionTemplates()
+ |
+
| + + | +
|
+
+
+ Returns :
+ Promise<void>
+
+ |
+
| + + + ngOnDestroy + + + | +
+ngOnDestroy()
+ |
+
| + + | +
|
+
+
+ Returns :
+ void
+
+ |
+
| + + + Async + ngOnInit + + + | +
+
+ ngOnInit()
+ |
+
| + + | +
|
+
+
+ Returns :
+ any
+
+ |
+
| + + + refreshPreview + + + | +
+refreshPreview()
+ |
+
| + + | +
|
+
+
+ Returns :
+ void
+
+ |
+
| + + + resetToDefault + + + | +
+resetToDefault()
+ |
+
| + + | +
|
+
+
+ Returns :
+ void
+
+ |
+
| + + + Private + Async + saveTemplate + + + | +||||||
+
+ saveTemplate(content: string)
+ |
+ ||||||
| + + | +||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Promise<void>
+
+
+
+
+ |
+
| + + + Private + scheduleAutoSave + + + | +||||||
+
+ scheduleAutoSave(content: string)
+ |
+ ||||||
| + + | +||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
| + + + Async + selectFile + + + | +||||||
+
+ selectFile(template: Template)
+ |
+ ||||||
| + + | +||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ any
+
+
+
+
+ |
+
| + + + toggleConfigPanel + + + | +
+toggleConfigPanel()
+ |
+
| + + | +
|
+
+
+ Returns :
+ void
+
+ |
+
| + + + trackByName + + + | +|||||||||
+trackByName(index: number, item: Template)
+ |
+ |||||||||
| + + | +|||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ string
+
+
+
+
+ |
+
| + + + Async + updateConfig + + + | +
+
+ updateConfig()
+ |
+
| + + | +
|
+
+
+ Returns :
+ Promise<void>
+
+ |
+
| + + + config + + + | +
+ Type : CompoDocConfig
+
+ |
+
+ Default value : {}
+ |
+
| + + | +
| + + + + editorContainer + + + | +
+ Type : ElementRef
+
+ |
+
|
+ Decorators :
+ +
+ @ViewChild('editorContainer', {static: true})
+ |
+
| + + | +
| + + + lastSaved + + + | +
+ Type : Date | null
+
+ |
+
+ Default value : null
+ |
+
| + + | +
| + + + + previewFrame + + + | +
+ Type : ElementRef
+
+ |
+
|
+ Decorators :
+ +
+ @ViewChild('previewFrame', {static: true})
+ |
+
| + + | +
| + + + Private + Readonly + SAVE_DELAY + + + | +
+ Type : number
+
+ |
+
+ Default value : 300
+ |
+
| + + | +
| + + + Private + Optional + saveTimeout + + + | +
+ Type : number
+
+ |
+
| + + | +
| + + + saving + + + | +
+ Type : boolean
+
+ |
+
+ Default value : false
+ |
+
| + + | +
| + + + selectedFile + + + | +
+ Type : Template | null
+
+ |
+
+ Default value : null
+ |
+
| + + | +
| + + + sessionId + + + | +
+ Type : string
+
+ |
+
+ Default value : ''
+ |
+
| + + | +
| + + + showConfigPanel + + + | +
+ Type : boolean
+
+ |
+
+ Default value : false
+ |
+
| + + | +
| + + + templates + + + | +
+ Type : Template[]
+
+ |
+
+ Default value : []
+ |
+
| + + | +
| + + previewUrl + | +
+ getpreviewUrl()
+ |
+
| + + | +
import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { TemplateEditorService } from './template-editor.service';
+import { ZipExportService } from './zip-export.service';
+import { HbsRenderService } from './hbs-render.service';
+
+interface Template {
+ name: string;
+ path: string;
+ type: 'template' | 'partial';
+}
+
+interface Session {
+ sessionId: string;
+ success: boolean;
+ message: string;
+}
+
+interface CompoDocConfig {
+ hideGenerator?: boolean;
+ disableSourceCode?: boolean;
+ disableGraph?: boolean;
+ disableCoverage?: boolean;
+ disablePrivate?: boolean;
+ disableProtected?: boolean;
+ disableInternal?: boolean;
+ disableLifeCycleHooks?: boolean;
+ disableConstructors?: boolean;
+ disableRoutesGraph?: boolean;
+ disableSearch?: boolean;
+ disableDependencies?: boolean;
+ disableProperties?: boolean;
+ disableDomTree?: boolean;
+ disableTemplateTab?: boolean;
+ disableStyleTab?: boolean;
+ disableMainGraph?: boolean;
+ disableFilePath?: boolean;
+ disableOverview?: boolean;
+ hideDarkModeToggle?: boolean;
+ minimal?: boolean;
+ customFavicon?: string;
+ includes?: string;
+ includesName?: string;
+}
+
+@Component({
+ selector: 'template-playground-root',
+ template: `
+ <div class="template-playground">
+ <div class="template-playground-header">
+ <h2>Template Playground</h2>
+ <div class="template-playground-status">
+ <span *ngIf="sessionId" class="session-info">Session: {{sessionId.substring(0, 8)}}...</span>
+ <span *ngIf="saving" class="saving-indicator">Saving...</span>
+ <span *ngIf="lastSaved" class="last-saved">Last saved: {{lastSaved | date:'short'}}</span>
+ </div>
+ <div class="template-playground-actions">
+ <button class="btn btn-secondary" (click)="toggleConfigPanel()">⚙️ Config</button>
+ <button class="btn btn-primary" (click)="resetToDefault()">Reset to Default</button>
+ <button class="btn btn-success" (click)="exportZip()">Download Templates</button>
+ </div>
+ </div>
+
+ <!-- Configuration Panel -->
+ <div class="config-panel" [class.collapsed]="!showConfigPanel">
+ <h3>CompoDoc Configuration</h3>
+ <div class="config-options">
+ <label><input type="checkbox" [(ngModel)]="config.hideGenerator" (change)="updateConfig()"> Hide Generator</label>
+ <label><input type="checkbox" [(ngModel)]="config.hideDarkModeToggle" (change)="updateConfig()"> Hide Dark Mode Toggle</label>
+ <label><input type="checkbox" [(ngModel)]="config.minimal" (change)="updateConfig()"> Minimal Mode</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableOverview" (change)="updateConfig()"> Disable Overview</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableFilePath" (change)="updateConfig()"> Disable File Path</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableSourceCode" (change)="updateConfig()"> Disable Source Code</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableGraph" (change)="updateConfig()"> Disable Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableMainGraph" (change)="updateConfig()"> Disable Main Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableRoutesGraph" (change)="updateConfig()"> Disable Routes Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableCoverage" (change)="updateConfig()"> Disable Coverage</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableSearch" (change)="updateConfig()"> Disable Search</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableDependencies" (change)="updateConfig()"> Disable Dependencies</label>
+ <label><input type="checkbox" [(ngModel)]="config.disablePrivate" (change)="updateConfig()"> Disable Private</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableProtected" (change)="updateConfig()"> Disable Protected</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableInternal" (change)="updateConfig()"> Disable Internal</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableLifeCycleHooks" (change)="updateConfig()"> Disable Lifecycle Hooks</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableConstructors" (change)="updateConfig()"> Disable Constructors</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableProperties" (change)="updateConfig()"> Disable Properties</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableDomTree" (change)="updateConfig()"> Disable DOM Tree</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableTemplateTab" (change)="updateConfig()"> Disable Template Tab</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableStyleTab" (change)="updateConfig()"> Disable Style Tab</label>
+ </div>
+ </div>
+
+ <div class="template-playground-body">
+ <div class="template-playground-sidebar">
+ <div class="template-file-list">
+ <h3>Templates</h3>
+ <ul class="file-list">
+ <li *ngFor="let template of templates; trackBy: trackByName"
+ [class.active]="selectedFile === template"
+ (click)="selectFile(template)">
+ <i class="file-icon ion-document-text"></i>
+ {{template.name}}
+ <span class="file-type">{{template.type}}</span>
+ </li>
+ </ul>
+
+ <div *ngIf="templates.length === 0" class="loading-templates">
+ Loading templates...
+ </div>
+ </div>
+ </div>
+
+ <div class="template-playground-main">
+ <div class="template-playground-editor">
+ <div class="editor-header" *ngIf="selectedFile">
+ <h4>{{selectedFile.path}}</h4>
+ <span class="file-type-badge">{{selectedFile.type}}</span>
+ </div>
+ <div #editorContainer class="editor-container"></div>
+ </div>
+
+ <div class="template-playground-preview">
+ <div class="preview-header">
+ <h4>Live Preview</h4>
+ <button class="btn btn-sm btn-secondary" (click)="refreshPreview()">🔄 Refresh</button>
+ </div>
+ <iframe #previewFrame class="preview-frame" [src]="previewUrl"></iframe>
+ </div>
+ </div>
+ </div>
+ </div>
+ `,
+ styles: [`
+ .template-playground {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ }
+
+ .template-playground-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1rem 2rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .template-playground-status {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ font-size: 0.875rem;
+ }
+
+ .session-info {
+ color: #6c757d;
+ font-family: monospace;
+ }
+
+ .saving-indicator {
+ color: #ffc107;
+ font-weight: bold;
+ }
+
+ .last-saved {
+ color: #28a745;
+ }
+
+ .template-playground-actions {
+ display: flex;
+ gap: 0.5rem;
+ }
+
+ .config-panel {
+ background: #e9ecef;
+ padding: 1rem 2rem;
+ border-bottom: 1px solid #dee2e6;
+ transition: all 0.3s ease;
+ max-height: 200px;
+ overflow: hidden;
+ }
+
+ .config-panel.collapsed {
+ max-height: 0;
+ padding: 0 2rem;
+ }
+
+ .config-options {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 0.5rem;
+ margin-top: 0.5rem;
+ }
+
+ .config-options label {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ font-size: 0.875rem;
+ }
+
+ .template-playground-body {
+ display: flex;
+ flex: 1;
+ overflow: hidden;
+ }
+
+ .template-playground-sidebar {
+ width: 250px;
+ background: #f8f9fa;
+ border-right: 1px solid #dee2e6;
+ overflow-y: auto;
+ }
+
+ .template-file-list {
+ padding: 1rem;
+ }
+
+ .template-file-list h3 {
+ margin: 0 0 0.5rem 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ color: #495057;
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ }
+
+ .file-list {
+ list-style: none;
+ padding: 0;
+ margin: 0 0 1.5rem 0;
+ }
+
+ .file-list li {
+ display: flex;
+ align-items: center;
+ padding: 0.5rem;
+ cursor: pointer;
+ border-radius: 4px;
+ font-size: 0.875rem;
+ transition: background-color 0.15s ease;
+ }
+
+ .file-list li:hover {
+ background: #e9ecef;
+ }
+
+ .file-list li.active {
+ background: #007bff;
+ color: white;
+ }
+
+ .file-icon {
+ margin-right: 0.5rem;
+ opacity: 0.7;
+ }
+
+ .file-type {
+ margin-left: auto;
+ font-size: 0.75rem;
+ opacity: 0.7;
+ text-transform: uppercase;
+ }
+
+ .loading-templates {
+ text-align: center;
+ color: #6c757d;
+ font-style: italic;
+ padding: 2rem;
+ }
+
+ .template-playground-main {
+ flex: 1;
+ display: flex;
+ overflow: hidden;
+ }
+
+ .template-playground-editor {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ border-right: 1px solid #dee2e6;
+ }
+
+ .editor-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .editor-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .file-type-badge {
+ background: #6c757d;
+ color: white;
+ padding: 0.125rem 0.5rem;
+ border-radius: 12px;
+ font-size: 0.75rem;
+ text-transform: uppercase;
+ }
+
+ .editor-container {
+ flex: 1;
+ position: relative;
+ }
+
+ .template-playground-preview {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .preview-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .preview-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .preview-frame {
+ flex: 1;
+ border: none;
+ background: white;
+ }
+
+ .btn {
+ padding: 0.375rem 0.75rem;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+ font-size: 0.875rem;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ transition: all 0.15s ease;
+ }
+
+ .btn-primary {
+ background: #007bff;
+ border-color: #007bff;
+ color: white;
+ }
+
+ .btn-primary:hover {
+ background: #0056b3;
+ border-color: #004085;
+ }
+
+ .btn-secondary {
+ background: #6c757d;
+ border-color: #6c757d;
+ color: white;
+ }
+
+ .btn-secondary:hover {
+ background: #545b62;
+ border-color: #4e555b;
+ }
+
+ .btn-success {
+ background: #28a745;
+ border-color: #28a745;
+ color: white;
+ }
+
+ .btn-success:hover {
+ background: #1e7e34;
+ border-color: #1c7430;
+ }
+
+ .btn-sm {
+ padding: 0.25rem 0.5rem;
+ font-size: 0.75rem;
+ }
+ `]
+})
+export class TemplatePlaygroundComponent implements OnInit, OnDestroy {
+ @ViewChild('editorContainer', { static: true }) editorContainer!: ElementRef;
+ @ViewChild('previewFrame', { static: true }) previewFrame!: ElementRef;
+
+ sessionId: string = '';
+ templates: Template[] = [];
+ selectedFile: Template | null = null;
+ config: CompoDocConfig = {};
+ showConfigPanel: boolean = false;
+ saving: boolean = false;
+ lastSaved: Date | null = null;
+
+ private saveTimeout?: number;
+ private readonly SAVE_DELAY = 300; // 300ms debounce
+
+ get previewUrl(): string {
+ return this.sessionId ? `/api/session/${this.sessionId}/docs/` : '';
+ }
+
+ constructor(
+ private http: HttpClient,
+ private editorService: TemplateEditorService,
+ private zipService: ZipExportService,
+ private hbsService: HbsRenderService
+ ) {}
+
+ async ngOnInit() {
+ try {
+ await this.createSession();
+ await this.loadSessionTemplates();
+ await this.loadSessionConfig();
+ this.initializeEditor();
+ } catch (error) {
+ console.error('Error initializing template playground:', error);
+ }
+ }
+
+ ngOnDestroy() {
+ if (this.saveTimeout) {
+ clearTimeout(this.saveTimeout);
+ }
+ }
+
+ private async createSession(): Promise<void> {
+ const response = await this.http.post<Session>('/api/session/create', {}).toPromise();
+ if (response && response.success) {
+ this.sessionId = response.sessionId;
+ console.log('Session created:', this.sessionId);
+ } else {
+ throw new Error('Failed to create session');
+ }
+ }
+
+ private async loadSessionTemplates(): Promise<void> {
+ if (!this.sessionId) return;
+
+ const response = await this.http.get<{templates: Template[], success: boolean}>(`/api/session/${this.sessionId}/templates`).toPromise();
+ if (response && response.success) {
+ this.templates = response.templates;
+
+ // Auto-select the first template
+ if (this.templates.length > 0 && !this.selectedFile) {
+ this.selectFile(this.templates[0]);
+ }
+ }
+ }
+
+ private async loadSessionConfig(): Promise<void> {
+ if (!this.sessionId) return;
+
+ const response = await this.http.get<{config: CompoDocConfig, success: boolean}>(`/api/session/${this.sessionId}/config`).toPromise();
+ if (response && response.success) {
+ this.config = response.config;
+ }
+ }
+
+ initializeEditor() {
+ this.editorService.initializeEditor(this.editorContainer.nativeElement);
+
+ // Set up debounced save on content change
+ this.editorService.setOnChangeCallback((content: string) => {
+ this.scheduleAutoSave(content);
+ });
+ }
+
+ async selectFile(template: Template) {
+ this.selectedFile = template;
+
+ if (!this.sessionId) return;
+
+ try {
+ const response = await this.http.get<{content: string, success: boolean}>(`/api/session/${this.sessionId}/template/${template.path}`).toPromise();
+ if (response && response.success) {
+ this.editorService.setEditorContent(response.content, template.type === 'template' ? 'handlebars' : 'handlebars');
+ }
+ } catch (error) {
+ console.error('Error loading template:', error);
+ }
+ }
+
+ private scheduleAutoSave(content: string): void {
+ if (!this.selectedFile || !this.sessionId) return;
+
+ // Clear existing timeout
+ if (this.saveTimeout) {
+ clearTimeout(this.saveTimeout);
+ }
+
+ // Set saving indicator
+ this.saving = true;
+
+ // Schedule new save
+ this.saveTimeout = window.setTimeout(async () => {
+ try {
+ await this.saveTemplate(content);
+ this.saving = false;
+ this.lastSaved = new Date();
+ } catch (error) {
+ console.error('Error saving template:', error);
+ this.saving = false;
+ }
+ }, this.SAVE_DELAY);
+ }
+
+ private async saveTemplate(content: string): Promise<void> {
+ if (!this.selectedFile || !this.sessionId) return;
+
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/template/${this.selectedFile.path}`, {
+ content
+ }).toPromise();
+
+ if (!response || !response.success) {
+ throw new Error('Failed to save template');
+ }
+ }
+
+ async updateConfig(): Promise<void> {
+ if (!this.sessionId) return;
+
+ try {
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/config`, {
+ config: this.config
+ }).toPromise();
+
+ if (response && response.success) {
+ // Config updated, documentation will be regenerated automatically
+ }
+ } catch (error) {
+ console.error('Error updating config:', error);
+ }
+ }
+
+ toggleConfigPanel(): void {
+ this.showConfigPanel = !this.showConfigPanel;
+ }
+
+ refreshPreview(): void {
+ if (this.previewFrame?.nativeElement) {
+ this.previewFrame.nativeElement.src = this.previewFrame.nativeElement.src;
+ }
+ }
+
+ resetToDefault(): void {
+ // Implementation for resetting to default templates
+ if (confirm('Are you sure you want to reset all templates to their default values? This action cannot be undone.')) {
+ // TODO: Implement reset functionality
+ console.log('Reset to default templates');
+ }
+ }
+
+ async exportZip(): Promise<void> {
+ try {
+ if (!this.sessionId) {
+ console.error('No active session. Please refresh the page and try again.');
+ return;
+ }
+
+ console.log('Creating template package...');
+
+ // Call server-side ZIP creation endpoint for all templates
+ const response = await this.http.post(`/api/session/${this.sessionId}/download-all-templates`, {}, {
+ responseType: 'blob',
+ observe: 'response'
+ }).toPromise();
+
+ if (!response || !response.body) {
+ throw new Error('Failed to create template package');
+ }
+
+ // Get the ZIP file as a blob
+ const zipBlob = response.body;
+
+ // Get filename from response headers or construct it
+ const contentDisposition = response.headers.get('Content-Disposition');
+ let filename = `compodoc-templates-${this.sessionId}.zip`;
+
+ if (contentDisposition) {
+ const filenameMatch = contentDisposition.match(/filename="([^"]+)"/);
+ if (filenameMatch) {
+ filename = filenameMatch[1];
+ }
+ }
+
+ // Create download link and trigger download
+ const url = URL.createObjectURL(zipBlob);
+ const a = document.createElement('a');
+ a.href = url;
+ a.download = filename;
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ URL.revokeObjectURL(url);
+
+ console.log('Template package downloaded successfully!');
+ } catch (error) {
+ console.error('Error downloading template package:', error);
+ }
+ }
+
+ trackByName(index: number, item: Template): string {
+ return item.name;
+ }
+}
+
+
+ .template-playground {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ }
+
+ .template-playground-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1rem 2rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .template-playground-status {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ font-size: 0.875rem;
+ }
+
+ .session-info {
+ color: #6c757d;
+ font-family: monospace;
+ }
+
+ .saving-indicator {
+ color: #ffc107;
+ font-weight: bold;
+ }
+
+ .last-saved {
+ color: #28a745;
+ }
+
+ .template-playground-actions {
+ display: flex;
+ gap: 0.5rem;
+ }
+
+ .config-panel {
+ background: #e9ecef;
+ padding: 1rem 2rem;
+ border-bottom: 1px solid #dee2e6;
+ transition: all 0.3s ease;
+ max-height: 200px;
+ overflow: hidden;
+ }
+
+ .config-panel.collapsed {
+ max-height: 0;
+ padding: 0 2rem;
+ }
+
+ .config-options {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 0.5rem;
+ margin-top: 0.5rem;
+ }
+
+ .config-options label {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ font-size: 0.875rem;
+ }
+
+ .template-playground-body {
+ display: flex;
+ flex: 1;
+ overflow: hidden;
+ }
+
+ .template-playground-sidebar {
+ width: 250px;
+ background: #f8f9fa;
+ border-right: 1px solid #dee2e6;
+ overflow-y: auto;
+ }
+
+ .template-file-list {
+ padding: 1rem;
+ }
+
+ .template-file-list h3 {
+ margin: 0 0 0.5rem 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ color: #495057;
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ }
+
+ .file-list {
+ list-style: none;
+ padding: 0;
+ margin: 0 0 1.5rem 0;
+ }
+
+ .file-list li {
+ display: flex;
+ align-items: center;
+ padding: 0.5rem;
+ cursor: pointer;
+ border-radius: 4px;
+ font-size: 0.875rem;
+ transition: background-color 0.15s ease;
+ }
+
+ .file-list li:hover {
+ background: #e9ecef;
+ }
+
+ .file-list li.active {
+ background: #007bff;
+ color: white;
+ }
+
+ .file-icon {
+ margin-right: 0.5rem;
+ opacity: 0.7;
+ }
+
+ .file-type {
+ margin-left: auto;
+ font-size: 0.75rem;
+ opacity: 0.7;
+ text-transform: uppercase;
+ }
+
+ .loading-templates {
+ text-align: center;
+ color: #6c757d;
+ font-style: italic;
+ padding: 2rem;
+ }
+
+ .template-playground-main {
+ flex: 1;
+ display: flex;
+ overflow: hidden;
+ }
+
+ .template-playground-editor {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ border-right: 1px solid #dee2e6;
+ }
+
+ .editor-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .editor-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .file-type-badge {
+ background: #6c757d;
+ color: white;
+ padding: 0.125rem 0.5rem;
+ border-radius: 12px;
+ font-size: 0.75rem;
+ text-transform: uppercase;
+ }
+
+ .editor-container {
+ flex: 1;
+ position: relative;
+ }
+
+ .template-playground-preview {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .preview-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .preview-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .preview-frame {
+ flex: 1;
+ border: none;
+ background: white;
+ }
+
+ .btn {
+ padding: 0.375rem 0.75rem;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+ font-size: 0.875rem;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ transition: all 0.15s ease;
+ }
+
+ .btn-primary {
+ background: #007bff;
+ border-color: #007bff;
+ color: white;
+ }
+
+ .btn-primary:hover {
+ background: #0056b3;
+ border-color: #004085;
+ }
+
+ .btn-secondary {
+ background: #6c757d;
+ border-color: #6c757d;
+ color: white;
+ }
+
+ .btn-secondary:hover {
+ background: #545b62;
+ border-color: #4e555b;
+ }
+
+ .btn-success {
+ background: #28a745;
+ border-color: #28a745;
+ color: white;
+ }
+
+ .btn-success:hover {
+ background: #1e7e34;
+ border-color: #1c7430;
+ }
+
+ .btn-sm {
+ padding: 0.25rem 0.5rem;
+ font-size: 0.75rem;
+ }
+
+
+ +
+ src/app.controller.ts
+
+ Methods+ |
+
+
|
+
| + + + + getHello + + + | +
+
+ getHello()
+ |
+
|
+ Decorators :
+ + @Get()
+ |
+
|
+ Defined in src/app.controller.ts:16
+ |
+
|
+
+
+ Returns :
+ string
+
+ |
+
/*
+** EPITECH PROJECT, 2025
+** TaskFlow
+** File description:
+** app.controller
+*/
+
+import { Controller, Get } from '@nestjs/common';
+import { AppService } from './app.service';
+
+@Controller()
+export class AppController {
+ constructor(private readonly appService: AppService) {}
+
+ @Get()
+ getHello(): string {
+ return this.appService.getHello();
+ }
+}
+
+ | File | +Type | +Identifier | +Statements | +
|---|---|---|---|
| + + documentation/template-playground/hbs-render.service.ts + | +injectable | +HbsRenderService | ++ 0 % + (0/7) + | +
| + + documentation/template-playground/hbs-render.service.ts + | +variable | +Handlebars | ++ 0 % + (0/1) + | +
| + + documentation/template-playground/template-editor.service.ts + | +injectable | +TemplateEditorService | ++ 0 % + (0/9) + | +
| + + documentation/template-playground/template-editor.service.ts + | +variable | +monaco | ++ 0 % + (0/1) + | +
| + + documentation/template-playground/template-playground.component.ts + | +component | +TemplatePlaygroundComponent | ++ 0 % + (0/28) + | +
| + + documentation/template-playground/template-playground.component.ts + | +interface | +CompoDocConfig | ++ 0 % + (0/25) + | +
| + + documentation/template-playground/template-playground.component.ts + | +interface | +Session | ++ 0 % + (0/4) + | +
| + + documentation/template-playground/template-playground.component.ts + | +interface | +Template | ++ 0 % + (0/4) + | +
| + + documentation/template-playground/zip-export.service.ts + | +injectable | +ZipExportService | ++ 0 % + (0/4) + | +
| + + documentation/template-playground/zip-export.service.ts + | +variable | +JSZip | ++ 0 % + (0/1) + | +
| + + src/app.controller.ts + | +controller | +AppController | ++ 0 % + (0/2) + | +
| + + src/app.service.ts + | +injectable | +AppService | ++ 0 % + (0/2) + | +
| + + src/auth/auth.resolver.ts + | +class | +AuthResolver | ++ 60 % + (3/5) + | +
| + + src/auth/auth.resolver.ts + | +class | +AuthResultResolver | ++ 0 % + (0/2) + | +
| + + src/auth/auth.service.ts + | +injectable | +AuthService | ++ 0 % + (0/4) + | +
| + + src/common/decorators/workspace-auth.decorator.ts + | +function | +WorkspaceAuth | ++ 0 % + (0/1) + | +
| + + src/common/decorators/workspace-auth.decorator.ts + | +variable | +ROLES_KEY | ++ 0 % + (0/1) + | +
| + + src/common/guards/auth.guard.ts + | +guard | +AuthGuard | ++ 0 % + (0/3) + | +
| + + src/common/guards/workspace.guard.ts + | +guard | +WorkspaceGuard | ++ 0 % + (0/5) + | +
| + + src/graphql/graphql.ts + | +class | +AddWorkspaceMemberInput | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +Attachment | ++ 0 % + (0/5) + | +
| + + src/graphql/graphql.ts + | +class | +AuthError | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +AuthSuccess | ++ 0 % + (0/3) + | +
| + + src/graphql/graphql.ts + | +class | +Board | ++ 0 % + (0/7) + | +
| + + src/graphql/graphql.ts + | +class | +Card | ++ 0 % + (0/11) + | +
| + + src/graphql/graphql.ts + | +class | +CardLabel | ++ 0 % + (0/3) + | +
| + + src/graphql/graphql.ts + | +class | +CardMember | ++ 0 % + (0/3) + | +
| + + src/graphql/graphql.ts + | +class | +Comment | ++ 0 % + (0/6) + | +
| + + src/graphql/graphql.ts + | +class | +CreateBoardInput | ++ 0 % + (0/5) + | +
| + + src/graphql/graphql.ts + | +class | +CreateBoardPayload | ++ 0 % + (0/2) + | +
| + + src/graphql/graphql.ts + | +class | +CreateCardInput | ++ 0 % + (0/6) + | +
| + + src/graphql/graphql.ts + | +class | +CreateLabelInput | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +CreateListInput | ++ 0 % + (0/5) + | +
| + + src/graphql/graphql.ts + | +class | +CreateUserInput | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +CreateWorkspaceInput | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +Error | ++ 0 % + (0/3) + | +
| + + src/graphql/graphql.ts + | +class | +FileResponse | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +IMutation | ++ 0 % + (0/30) + | +
| + + src/graphql/graphql.ts + | +class | +IQuery | ++ 0 % + (0/15) + | +
| + + src/graphql/graphql.ts + | +class | +Label | ++ 0 % + (0/5) + | +
| + + src/graphql/graphql.ts + | +class | +List | ++ 0 % + (0/7) + | +
| + + src/graphql/graphql.ts + | +class | +LoginInput | ++ 0 % + (0/3) + | +
| + + src/graphql/graphql.ts + | +class | +PinWorkspacePayload | ++ 0 % + (0/2) + | +
| + + src/graphql/graphql.ts + | +class | +RegisterInput | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +Success | ++ 0 % + (0/2) + | +
| + + src/graphql/graphql.ts + | +class | +UpdateBoardInput | ++ 0 % + (0/5) + | +
| + + src/graphql/graphql.ts + | +class | +UpdateCardInput | ++ 0 % + (0/6) + | +
| + + src/graphql/graphql.ts + | +class | +UpdateLabelInput | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +UpdateListInput | ++ 0 % + (0/5) + | +
| + + src/graphql/graphql.ts + | +class | +UpdateMemberRoleInput | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +UpdateUserInput | ++ 0 % + (0/5) + | +
| + + src/graphql/graphql.ts + | +class | +UpdateWorkspaceInput | ++ 0 % + (0/4) + | +
| + + src/graphql/graphql.ts + | +class | +User | ++ 0 % + (0/6) + | +
| + + src/graphql/graphql.ts + | +class | +Workspace | ++ 0 % + (0/11) + | +
| + + src/graphql/graphql.ts + | +class | +WorkspaceMembers | ++ 0 % + (0/6) + | +
| + + src/graphql/graphql.ts + | +type alias | +AuthResult | ++ 0 % + (0/1) + | +
| + + src/graphql/graphql.ts + | +type alias | +DateTime | ++ 0 % + (0/1) + | +
| + + src/graphql/graphql.ts + | +type alias | +Nullable | ++ 0 % + (0/1) + | +
| + + src/graphql/graphql.ts + | +type alias | +Status | ++ 0 % + (0/1) + | +
| + + src/graphql/graphql.ts + | +type alias | +Upload | ++ 0 % + (0/1) + | +
| + + src/main.ts + | +function | +bootstrap | ++ 0 % + (0/1) + | +
| + + src/prisma/prisma.service.ts + | +injectable | +PrismaService | ++ 0 % + (0/2) + | +
| + + src/workspace/workspace.resolver.ts + | +class | +WorkspaceResolver | ++ 0 % + (0/7) + | +
| + + src/workspace/workspace.service.ts + | +injectable | +WorkspaceService | ++ 14 % + (1/7) + | +
+
+ src/common/guards/auth.guard.ts
+
+ Methods+ |
+
+
|
+
+constructor(prisma: PrismaService)
+ |
+ ||||||
|
+ Defined in src/common/guards/auth.guard.ts:18
+ |
+ ||||||
|
+
+ Parameters :
+
+
|
+
| + + + Async + canActivate + + + | +||||||
+
+ canActivate(context: ExecutionContext)
+ |
+ ||||||
|
+ Defined in src/common/guards/auth.guard.ts:23
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Promise<boolean>
+
+
+
+
+ |
+
import {
+ CanActivate,
+ ExecutionContext,
+ Injectable,
+ ForbiddenException,
+} from '@nestjs/common';
+import { PrismaService } from '../../prisma/prisma.service';
+import { GqlExecutionContext } from '@nestjs/graphql';
+
+@Injectable()
+export class AuthGuard implements CanActivate {
+ constructor(
+ private prisma: PrismaService,
+ ) {}
+
+ async canActivate(context: ExecutionContext): Promise<boolean> {
+ const ctx = GqlExecutionContext.create(context);
+ const { user } = ctx.getContext();
+
+ if (!user) {
+ throw new ForbiddenException('Authentication required');
+ }
+
+ const existingUser = await this.prisma.user.findUnique({
+ where: { user_id: user.user_id },
+ });
+
+ if (!existingUser) {
+ throw new ForbiddenException('User does not exist');
+ }
+
+ return true;
+ }
+}
+
+ +
+ src/common/guards/workspace.guard.ts
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
+constructor(reflector: Reflector, prisma: PrismaService)
+ |
+ |||||||||
|
+ Defined in src/common/guards/workspace.guard.ts:21
+ |
+ |||||||||
|
+
+ Parameters :
+
+
|
+
| + + + Async + canActivate + + + | +||||||
+
+ canActivate(context: ExecutionContext)
+ |
+ ||||||
|
+ Defined in src/common/guards/workspace.guard.ts:33
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ Promise<boolean>
+
+
+
+
+ |
+
import {
+ CanActivate,
+ ExecutionContext,
+ Injectable,
+ ForbiddenException,
+} from '@nestjs/common';
+import { Reflector } from '@nestjs/core';
+import { GqlExecutionContext } from '@nestjs/graphql';
+import { PrismaService } from '../../prisma/prisma.service';
+import { Role } from '@prisma/client';
+import { ROLES_KEY } from '../decorators/workspace-auth.decorator';
+
+@Injectable()
+export class WorkspaceGuard implements CanActivate {
+ constructor(
+ private reflector: Reflector,
+ private prisma: PrismaService,
+ ) {}
+ Ò;
+ private roleHierarchy = {
+ [Role.Viewer]: 1,
+ [Role.Member]: 2,
+ [Role.Admin]: 3,
+ };
+
+ async canActivate(context: ExecutionContext): Promise<boolean> {
+ const requiredRole = this.reflector.getAllAndOverride<Role>(ROLES_KEY, [
+ context.getHandler(),
+ context.getClass(),
+ ]);
+
+ if (!requiredRole) return true;
+
+ const ctx = GqlExecutionContext.create(context);
+ const { user } = ctx.getContext();
+ const args = ctx.getArgs();
+
+ const workspaceId = args.workspace_id || args.input?.workspace_id;
+ if (!workspaceId) {
+ throw new ForbiddenException(
+ 'Cannot verify permissions: No workspace_id provided',
+ );
+ }
+
+ const membership = await this.prisma.workspaceMembers.findUnique({
+ where: {
+ workspace_id_user_id: {
+ workspace_id: workspaceId,
+ user_id: user.user_id,
+ },
+ },
+ });
+
+ if (!membership)
+ throw new ForbiddenException(
+ 'You are not a member of this workspace',
+ );
+
+ const userLevel = this.roleHierarchy[membership.role];
+ const requiredLevel = this.roleHierarchy[requiredRole];
+
+ if (userLevel < requiredLevel) {
+ throw new ForbiddenException(
+ `Insufficient permissions. Required: ${requiredRole}`,
+ );
+ }
+
+ return true;
+ }
+}
+
+ A progressive Node.js framework for building efficient and scalable server-side applications.
+ + + +Nest framework TypeScript starter repository.
+$ npm install# development
+$ npm run start
+
+# watch mode
+$ npm run start:dev
+
+# production mode
+$ npm run start:prod# unit tests
+$ npm run test
+
+# e2e tests
+$ npm run test:e2e
+
+# test coverage
+$ npm run test:covWhen you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the deployment documentation for more information.
+If you are looking for a cloud-based platform to deploy your NestJS application, check out Mau, our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
+Example :$ npm install -g @nestjs/mau
+$ mau deployWith Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
+Check out a few resources that may come in handy when working with NestJS:
+Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
+Nest is MIT licensed.
+ + + + + + + + + + + + + + + + + + + + + + + + ++
+ src/app.service.ts
+
+ Methods+ |
+
+
|
+
| + + + getHello + + + | +
+getHello()
+ |
+
|
+ Defined in src/app.service.ts:12
+ |
+
|
+
+
+ Returns :
+ string
+
+ |
+
import { Injectable } from '@nestjs/common';
+
+@Injectable()
+export class AppService {
+ getHello(): string {
+ return 'Hello World!';
+ }
+}
+
+ +
+ src/auth/auth.service.ts
+
+ Methods+ |
+
+
|
+
+constructor(prisma: PrismaService, jwtService: JwtService)
+ |
+ |||||||||
|
+ Defined in src/auth/auth.service.ts:16
+ |
+ |||||||||
|
+
+ Parameters :
+
+
|
+
| + + + Async + loginUser + + + | +||||||
+
+ loginUser(input: LoginInput)
+ |
+ ||||||
|
+ Defined in src/auth/auth.service.ts:22
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + Async + registerUser + + + | +||||||
+
+ registerUser(input: RegisterInput)
+ |
+ ||||||
|
+ Defined in src/auth/auth.service.ts:54
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
import { Injectable } from '@nestjs/common';
+import { PrismaService } from '../prisma/prisma.service';
+import * as bcrypt from 'bcrypt';
+import { JwtService } from '@nestjs/jwt';
+import { RegisterInput, LoginInput } from '../graphql/graphql';
+import { Prisma } from '@prisma/client';
+
+@Injectable()
+export class AuthService {
+ constructor(
+ private prisma: PrismaService,
+ private jwtService: JwtService,
+ ) {}
+
+ async loginUser(input: LoginInput) {
+ try {
+ const user = await this.prisma.user.findUniqueOrThrow({
+ where: { email: input.email },
+ });
+
+ const isPasswordValid = await bcrypt.compare(
+ input.password,
+ user.hashed_password,
+ );
+ if (!isPasswordValid) {
+ throw new Error('Invalid credentials');
+ }
+
+ const token = this.jwtService.sign({
+ sub: user.user_id,
+ email: user.email,
+ });
+ return {
+ __typename: 'AuthSuccess',
+ user,
+ token
+ };
+ } catch (error) {
+ return {
+ __typename: 'AuthError',
+ message: 'Invalid credentials',
+ code: 'INVALID_CREDENTIALS',
+ };
+ }
+ }
+
+ async registerUser(input: RegisterInput) {
+ const existingEmail = await this.prisma.user.findUnique({
+ where: { email: input.email },
+ });
+ if (existingEmail) {
+ return {
+ __typename: 'AuthError',
+ message: 'Email already in use',
+ code: 'EMAIL_TAKEN',
+ field: 'email',
+ };
+ }
+
+ const existingUsername = await this.prisma.user.findUnique({
+ where: { username: input.username },
+ });
+ if (existingUsername) {
+ return {
+ __typename: 'AuthError',
+ message: 'Username already taken',
+ code: 'USERNAME_TAKEN',
+ field: 'username',
+ };
+ }
+
+ try {
+ const hashedPassword = await bcrypt.hash(input.password, 10);
+
+ const newUser = await this.prisma.user.create({
+ data: {
+ username: input.username,
+ email: input.email,
+ hashed_password: hashedPassword,
+ },
+ });
+
+ const token = this.jwtService.sign({
+ sub: newUser.user_id,
+ email: newUser.email,
+ });
+
+ return {
+ __typename: 'RegisterSuccess',
+ user: newUser,
+ token: token,
+ };
+ } catch (error) {
+ if (
+ error instanceof Prisma.PrismaClientKnownRequestError &&
+ error.code === 'P2002'
+ ) {
+ const target = error.meta?.target as string[];
+
+ if (target.includes('email')) {
+ return {
+ __typename: 'AuthError',
+ message: 'Email already in use.',
+ code: 'EMAIL_TAKEN',
+ field: 'email',
+ };
+ }
+
+ if (target.includes('username')) {
+ return {
+ __typename: 'AuthError',
+ message: 'Username already taken',
+ code: 'USERNAME_TAKEN',
+ field: 'username',
+ };
+ }
+ }
+ return {
+ __typename: 'AuthError',
+ message: 'Registration failed',
+ code: 'REGISTRATION_FAILED',
+ };
+ }
+ }
+}
+
+ +
+ documentation/template-playground/hbs-render.service.ts
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
+constructor()
+ |
+
| + + | +
| + + + getMockData + + + | +
+getMockData()
+ |
+
| + + | +
|
+
+
+ Returns :
+ any
+
+ |
+
| + + + Private + initializeHandlebars + + + | +
+
+ initializeHandlebars()
+ |
+
| + + | +
|
+
+
+ Returns :
+ void
+
+ |
+
| + + + Private + registerHelpers + + + | +
+
+ registerHelpers()
+ |
+
| + + | +
|
+
+
+ Returns :
+ void
+
+ |
+
| + + + renderTemplate + + + | +|||||||||
+renderTemplate(templateContent: string, data: any)
+ |
+ |||||||||
| + + | +|||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ string
+
+
+
+
+ |
+
| + + + Private + handlebarsInstance + + + | +
+ Type : any
+
+ |
+
| + + | +
import { Injectable } from '@angular/core';
+
+declare const Handlebars: any;
+
+@Injectable({
+ providedIn: 'root'
+})
+export class HbsRenderService {
+ private handlebarsInstance: any;
+
+ constructor() {
+ this.initializeHandlebars();
+ }
+
+ private initializeHandlebars() {
+ // Create a new Handlebars instance for the playground
+ this.handlebarsInstance = Handlebars.create();
+
+ // Register common helpers used in Compodoc templates
+ this.registerHelpers();
+ }
+
+ private registerHelpers() {
+ // Register the 'compare' helper
+ this.handlebarsInstance.registerHelper('compare', (left: any, operator: string, right: any, options: any) => {
+ let result;
+ switch (operator) {
+ case '===':
+ result = left === right;
+ break;
+ case '!==':
+ result = left !== right;
+ break;
+ case '<':
+ result = left < right;
+ break;
+ case '>':
+ result = left > right;
+ break;
+ case '<=':
+ result = left <= right;
+ break;
+ case '>=':
+ result = left >= right;
+ break;
+ default:
+ result = false;
+ }
+ return result ? options.fn(this) : options.inverse(this);
+ });
+
+ // Register the 'unless' helper
+ this.handlebarsInstance.registerHelper('unless', (conditional: any, options: any) => {
+ return !conditional ? options.fn(this) : options.inverse(this);
+ });
+
+ // Register the 'each' helper with index
+ this.handlebarsInstance.registerHelper('each', (context: any, options: any) => {
+ let ret = '';
+ for (let i = 0; i < context.length; i++) {
+ ret += options.fn(context[i], { data: { index: i } });
+ }
+ return ret;
+ });
+
+ // Register the 'if' helper
+ this.handlebarsInstance.registerHelper('if', (conditional: any, options: any) => {
+ return conditional ? options.fn(this) : options.inverse(this);
+ });
+
+ // Register the 'relativeURL' helper
+ this.handlebarsInstance.registerHelper('relativeURL', (depth: number, page?: string) => {
+ let url = '';
+ for (let i = 0; i < depth; i++) {
+ url += '../';
+ }
+ return url + (page || '');
+ });
+
+ // Register the 't' helper for translations
+ this.handlebarsInstance.registerHelper('t', (key: string) => {
+ // Simple translation mapping for preview
+ const translations: { [key: string]: string } = {
+ 'info': 'Information',
+ 'source': 'Source',
+ 'example': 'Example',
+ 'template': 'Template',
+ 'styles': 'Styles',
+ 'component': 'Component',
+ 'module': 'Module',
+ 'overview': 'Overview',
+ 'components': 'Components',
+ 'modules': 'Modules',
+ 'file': 'File',
+ 'description': 'Description',
+ 'selector': 'Selector',
+ 'properties': 'Properties',
+ 'methods': 'Methods',
+ 'inputs': 'Inputs',
+ 'outputs': 'Outputs'
+ };
+ return translations[key] || key;
+ });
+
+ // Register the 'orLength' helper
+ this.handlebarsInstance.registerHelper('orLength', (...args: any[]) => {
+ const options = args[args.length - 1];
+ const values = args.slice(0, -1);
+
+ for (const value of values) {
+ if (value && value.length && value.length > 0) {
+ return options.fn(this);
+ }
+ }
+ return options.inverse(this);
+ });
+
+ // Register the 'isTabEnabled' helper
+ this.handlebarsInstance.registerHelper('isTabEnabled', (navTabs: any[], tabId: string, options: any) => {
+ const tab = navTabs && navTabs.find((t: any) => t.id === tabId);
+ return tab ? options.fn(this) : options.inverse(this);
+ });
+
+ // Register the 'isInitialTab' helper
+ this.handlebarsInstance.registerHelper('isInitialTab', (navTabs: any[], tabId: string, options: any) => {
+ const isInitial = navTabs && navTabs.length > 0 && navTabs[0].id === tabId;
+ return isInitial ? options.fn(this) : options.inverse(this);
+ });
+ }
+
+ renderTemplate(templateContent: string, data: any): string {
+ try {
+ // Create a complete HTML document for preview
+ const template = this.handlebarsInstance.compile(templateContent);
+ const rendered = template({ data });
+
+ // Wrap in a basic HTML structure for preview
+ return `
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <title>Template Preview</title>
+ <style>
+ body { font-family: Arial, sans-serif; margin: 20px; }
+ .preview-wrapper { border: 1px solid #ddd; padding: 20px; }
+ .preview-notice { background: #f0f8ff; padding: 10px; margin-bottom: 20px; border-left: 4px solid #007bff; }
+ </style>
+ </head>
+ <body>
+ <div class="preview-notice">
+ <strong>Template Preview:</strong> This is a live preview of your template with mock data.
+ </div>
+ <div class="preview-wrapper">
+ ${rendered}
+ </div>
+ </body>
+ </html>
+ `;
+ } catch (error) {
+ return `
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <meta charset="utf-8">
+ <title>Template Preview - Error</title>
+ <style>
+ body { font-family: Arial, sans-serif; margin: 20px; }
+ .error { color: red; background: #fff5f5; padding: 20px; border: 1px solid #red; }
+ </style>
+ </head>
+ <body>
+ <div class="error">
+ <h3>Template Error</h3>
+ <p><strong>Error:</strong> ${error.message}</p>
+ <p>Please check your template syntax and try again.</p>
+ </div>
+ </body>
+ </html>
+ `;
+ }
+ }
+
+ getMockData(): any {
+ return {
+ documentationMainName: 'Sample Documentation',
+ depth: 0,
+ context: 'component',
+ components: [
+ {
+ name: 'SampleComponent',
+ selector: 'app-sample',
+ file: 'src/app/sample/sample.component.ts',
+ description: 'A sample component for demonstration',
+ properties: [
+ { name: 'title', type: 'string', description: 'The component title' },
+ { name: 'isVisible', type: 'boolean', description: 'Whether the component is visible' }
+ ],
+ methods: [
+ { name: 'ngOnInit', description: 'Lifecycle hook', signature: 'ngOnInit(): void' },
+ { name: 'onClick', description: 'Handle click events', signature: 'onClick(event: MouseEvent): void' }
+ ]
+ }
+ ],
+ navTabs: [
+ { id: 'info', label: 'Info', href: '#info' },
+ { id: 'source', label: 'Source', href: '#source' },
+ { id: 'example', label: 'Example', href: '#example' }
+ ]
+ };
+ }
+}
+
+ +
+ src/prisma/prisma.service.ts
+
+
+ PrismaClient
+
+ Methods+ |
+
+
|
+
| + + + Async + onModuleInit + + + | +
+
+ onModuleInit()
+ |
+
|
+ Defined in src/prisma/prisma.service.ts:13
+ |
+
|
+
+
+ Returns :
+ any
+
+ |
+
import { Injectable, OnModuleInit } from '@nestjs/common';
+import { PrismaClient } from '@prisma/client';
+
+@Injectable()
+export class PrismaService extends PrismaClient implements OnModuleInit {
+ async onModuleInit() {
+ await this.$connect();
+ }
+}
+
+ +
+ documentation/template-playground/template-editor.service.ts
+
+ Properties+ |
+
+
|
+
+ Methods+ |
+
+
|
+
| + + + destroy + + + | +
+destroy()
+ |
+
| + + | +
|
+
+
+ Returns :
+ void
+
+ |
+
| + + + Private + getLanguageFromFileType + + + | +||||||
+
+ getLanguageFromFileType(fileType: string)
+ |
+ ||||||
| + + | +||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ string
+
+
+
+
+ |
+
| + + + initializeEditor + + + | +||||||
+initializeEditor(container: HTMLElement)
+ |
+ ||||||
| + + | +||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
| + + + Private + registerHandlebarsLanguage + + + | +
+
+ registerHandlebarsLanguage()
+ |
+
| + + | +
|
+
+
+ Returns :
+ void
+
+ |
+
| + + + setEditorContent + + + | +|||||||||
+setEditorContent(content: string, fileType: string)
+ |
+ |||||||||
| + + | +|||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
| + + + setOnChangeCallback + + + | +||||||
+setOnChangeCallback(callback: (value: string) => void)
+ |
+ ||||||
| + + | +||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
| + + + Private + editor + + + | +
+ Type : any
+
+ |
+
| + + | +
| + + + Private + onChangeCallback + + + | +
+ Type : unknown | null
+
+ |
+
+ Default value : null
+ |
+
| + + | +
import { Injectable } from '@angular/core';
+
+declare const monaco: any;
+
+@Injectable({
+ providedIn: 'root'
+})
+export class TemplateEditorService {
+ private editor: any;
+ private onChangeCallback: ((value: string) => void) | null = null;
+
+ initializeEditor(container: HTMLElement) {
+ // Initialize Monaco Editor
+ this.editor = monaco.editor.create(container, {
+ value: '',
+ language: 'html',
+ theme: 'vs-dark',
+ automaticLayout: true,
+ minimap: {
+ enabled: true
+ },
+ scrollBeyondLastLine: false,
+ fontSize: 14,
+ wordWrap: 'on',
+ lineNumbers: 'on',
+ roundedSelection: false,
+ scrollbar: {
+ horizontal: 'visible',
+ vertical: 'visible'
+ },
+ overviewRulerLanes: 2,
+ quickSuggestions: {
+ other: true,
+ comments: true,
+ strings: true
+ },
+ parameterHints: {
+ enabled: true
+ },
+ autoClosingBrackets: 'always',
+ autoClosingQuotes: 'always',
+ suggestOnTriggerCharacters: true,
+ acceptSuggestionOnEnter: 'on',
+ tabCompletion: 'on',
+ wordBasedSuggestions: false
+ });
+
+ // Set up change listener
+ this.editor.onDidChangeModelContent(() => {
+ if (this.onChangeCallback) {
+ this.onChangeCallback(this.editor.getValue());
+ }
+ });
+
+ // Register custom language definitions
+ this.registerHandlebarsLanguage();
+ }
+
+ setEditorContent(content: string, fileType: string) {
+ if (this.editor) {
+ const language = this.getLanguageFromFileType(fileType);
+ const model = monaco.editor.createModel(content, language);
+ this.editor.setModel(model);
+ }
+ }
+
+ setOnChangeCallback(callback: (value: string) => void) {
+ this.onChangeCallback = callback;
+ }
+
+ private getLanguageFromFileType(fileType: string): string {
+ switch (fileType) {
+ case 'hbs':
+ return 'handlebars';
+ case 'css':
+ case 'scss':
+ return 'css';
+ case 'js':
+ return 'javascript';
+ case 'ts':
+ return 'typescript';
+ default:
+ return 'html';
+ }
+ }
+
+ private registerHandlebarsLanguage() {
+ // Register Handlebars language for Monaco Editor
+ if (monaco.languages.getLanguages().find((lang: any) => lang.id === 'handlebars')) {
+ return; // Already registered
+ }
+
+ monaco.languages.register({ id: 'handlebars' });
+
+ monaco.languages.setMonarchTokensProvider('handlebars', {
+ tokenizer: {
+ root: [
+ [/\{\{\{/, { token: 'keyword', next: '@handlebars_unescaped' }],
+ [/\{\{/, { token: 'keyword', next: '@handlebars' }],
+ [/<!DOCTYPE/, 'metatag', '@doctype'],
+ [/<!--/, 'comment', '@comment'],
+ [/(<)(\w+)/, ['delimiter', { token: 'tag', next: '@tag' }]],
+ [/(<\/)(\w+)/, ['delimiter', { token: 'tag', next: '@tag' }]],
+ [/</, 'delimiter'],
+ [/[^<]+/]
+ ],
+
+ handlebars_unescaped: [
+ [/\}\}\}/, { token: 'keyword', next: '@pop' }],
+ [/[^}]+/, 'variable']
+ ],
+
+ handlebars: [
+ [/\}\}/, { token: 'keyword', next: '@pop' }],
+ [/#if|#unless|#each|#with|\/if|\/unless|\/each|\/with/, 'keyword'],
+ [/[a-zA-Z_][\w]*/, 'variable'],
+ [/[^}]+/, 'variable']
+ ],
+
+ comment: [
+ [/-->/, 'comment', '@pop'],
+ [/[^-]+/, 'comment'],
+ [/./, 'comment']
+ ],
+
+ doctype: [
+ [/[^>]+/, 'metatag.content'],
+ [/>/, 'metatag', '@pop']
+ ],
+
+ tag: [
+ [/[ \t\r\n]+/, 'white'],
+ [/(\w+)(\s*=\s*)("([^"]*)")/, ['attribute.name', 'delimiter', 'attribute.value', 'attribute.value']],
+ [/(\w+)(\s*=\s*)('([^']*)')/, ['attribute.name', 'delimiter', 'attribute.value', 'attribute.value']],
+ [/\w+/, 'attribute.name'],
+ [/>/, 'delimiter', '@pop']
+ ]
+ }
+ });
+
+ monaco.languages.setLanguageConfiguration('handlebars', {
+ comments: {
+ blockComment: ['<!--', '-->']
+ },
+ brackets: [
+ ['<', '>'],
+ ['{{', '}}'],
+ ['{{{', '}}}']
+ ],
+ autoClosingPairs: [
+ { open: '<', close: '>' },
+ { open: '{{', close: '}}' },
+ { open: '{{{', close: '}}}' },
+ { open: '"', close: '"' },
+ { open: "'", close: "'" }
+ ],
+ surroundingPairs: [
+ { open: '<', close: '>' },
+ { open: '{{', close: '}}' },
+ { open: '{{{', close: '}}}' },
+ { open: '"', close: '"' },
+ { open: "'", close: "'" }
+ ]
+ });
+ }
+
+ destroy() {
+ if (this.editor) {
+ this.editor.dispose();
+ this.editor = null;
+ }
+ }
+}
+
+ +
+ src/workspace/workspace.service.ts
+
+ Methods+ |
+
+
|
+
+constructor(prisma: PrismaService)
+ |
+ ||||||
|
+ Defined in src/workspace/workspace.service.ts:7
+ |
+ ||||||
|
+
+ Parameters :
+
+
|
+
| + + + Async + createWorkspace + + + | +||||||||||||
+
+ createWorkspace(user_id: string, input: CreateWorkspaceInput)
+ |
+ ||||||||||||
|
+ Defined in src/workspace/workspace.service.ts:28
+ |
+ ||||||||||||
|
+ Creates a new workspace with the specified user as owner and admin member. +Example :
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+ A promise that resolves to the created workspace object + + |
+
| + + + Async + delete + + + | +|||||||||
+
+ delete(workspaceId: string, userId: string)
+ |
+ |||||||||
|
+ Defined in src/workspace/workspace.service.ts:77
+ |
+ |||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + Async + findAllUserWorkspaces + + + | +||||||
+
+ findAllUserWorkspaces(user_id: string)
+ |
+ ||||||
|
+ Defined in src/workspace/workspace.service.ts:45
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + Async + findWorkspace + + + | +||||||
+
+ findWorkspace(workspace_id: string)
+ |
+ ||||||
|
+ Defined in src/workspace/workspace.service.ts:60
+ |
+ ||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
| + + + Async + updateWorkspace + + + | +|||||||||
+
+ updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput)
+ |
+ |||||||||
|
+ Defined in src/workspace/workspace.service.ts:66
+ |
+ |||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ unknown
+
+
+
+
+ |
+
import { Injectable, ForbiddenException } from '@nestjs/common';
+import { PrismaService } from '../prisma/prisma.service';
+import { CreateWorkspaceInput, UpdateWorkspaceInput } from '../graphql/graphql';
+import { Role } from '@prisma/client';
+
+@Injectable()
+export class WorkspaceService {
+ constructor(private prisma: PrismaService) {}
+
+ /**
+ * Creates a new workspace with the specified user as owner and admin member.
+ *
+ * @param user_id - The ID of the user who will own the workspace
+ * @param input - The workspace creation input containing name, description, and optional color
+ * @returns A promise that resolves to the created workspace object
+ * @throws {PrismaClientKnownRequestError} When workspace creation fails due to database constraints
+ * @throws {PrismaClientValidationError} When input validation fails
+ *
+ * @example
+ * ```typescript
+ * const workspace = await createWorkspace('user-123', {
+ * name: 'My Workspace',
+ * description: 'A workspace for my project',
+ * color: '#ff5733'
+ * });
+ * ```
+ */
+ async createWorkspace(user_id: string, input: CreateWorkspaceInput) {
+ return this.prisma.workspace.create({
+ data: {
+ name: input.name,
+ description: input.description,
+ color: input.color || '#007cefff',
+ owner_id: user_id,
+ members: {
+ create: {
+ user_id: user_id,
+ role: Role.Admin,
+ },
+ },
+ },
+ });
+ }
+
+ async findAllUserWorkspaces(user_id: string) {
+ return this.prisma.workspace.findMany({
+ where: {
+ members: {
+ some: {
+ user_id: user_id,
+ },
+ },
+ },
+ orderBy: {
+ name: 'asc',
+ },
+ });
+ }
+
+ async findWorkspace(workspace_id: string) {
+ return this.prisma.workspace.findUniqueOrThrow({
+ where: { workspace_id },
+ });
+ }
+
+ async updateWorkspace(workspace_id: string, input: UpdateWorkspaceInput) {
+ return this.prisma.workspace.update({
+ where: { workspace_id },
+ data: {
+ name: input.name ?? undefined,
+ description: input.description ?? undefined,
+ color: input.color ?? undefined,
+ },
+ });
+ }
+
+ async delete(workspaceId: string, userId: string) {
+ const workspace = await this.findWorkspace(workspaceId);
+
+ if (workspace.owner_id !== userId) {
+ throw new ForbiddenException(
+ 'Only the workspace owner can delete it',
+ );
+ }
+
+ await this.prisma.workspace.delete({
+ where: { workspace_id: workspaceId },
+ });
+
+ return { success: true, message: 'Workspace deleted' };
+ }
+}
+
+ +
+ documentation/template-playground/zip-export.service.ts
+
+ Methods+ |
+
+
|
+
| + + + Private + downloadBlob + + + | +|||||||||
+
+ downloadBlob(blob: Blob, filename: string)
+ |
+ |||||||||
| + + | +|||||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
| + + + exportTemplates + + + | +||||||
+exportTemplates(files: any[])
+ |
+ ||||||
| + + | +||||||
|
+
+
+ Parameters :
+
+
+
+ Returns :
+ void
+
+
+
+
+ |
+
| + + + Private + generateReadme + + + | +
+
+ generateReadme()
+ |
+
| + + | +
|
+
+
+ Returns :
+ string
+
+ |
+
import { Injectable } from '@angular/core';
+
+declare const JSZip: any;
+
+@Injectable({
+ providedIn: 'root'
+})
+export class ZipExportService {
+
+ exportTemplates(files: any[]) {
+ const zip = new JSZip();
+
+ // Add all template files to the ZIP
+ files.forEach(file => {
+ zip.file(file.path, file.content);
+ });
+
+ // Add a README with instructions
+ const readme = this.generateReadme();
+ zip.file('README.md', readme);
+
+ // Generate and download the ZIP file
+ zip.generateAsync({ type: 'blob' })
+ .then((content: Blob) => {
+ this.downloadBlob(content, 'compodoc-templates.zip');
+ });
+ }
+
+ private generateReadme(): string {
+ return `# Compodoc Custom Templates
+
+This ZIP file contains customized templates for Compodoc documentation generation.
+
+## Contents
+
+- **Templates** (\`.hbs\` files): Handlebars templates for generating documentation pages
+- **Styles** (\`.css\` files): Stylesheets for customizing the appearance
+- **Scripts** (\`.js\` files): JavaScript files for additional functionality
+
+## Usage
+
+1. Extract this ZIP file to a directory on your system
+2. Use the \`--templates\` flag when running Compodoc to specify the path to your custom templates:
+
+ \`\`\`bash
+ compodoc -p tsconfig.json --templates ./path/to/custom/templates/
+ \`\`\`
+
+## Template Structure
+
+- \`page.hbs\` - Main page template
+- \`partials/\` - Directory containing partial templates
+- \`styles/\` - Directory containing CSS files
+- \`js/\` - Directory containing JavaScript files
+
+## Customization Tips
+
+1. **Templates**: Use Handlebars syntax to customize the HTML structure
+2. **Styles**: Modify CSS to change colors, fonts, layout, etc.
+3. **Scripts**: Add custom JavaScript functionality
+
+## Backup
+
+Always keep a backup of your original templates before making changes.
+
+## Documentation
+
+For more information about customizing Compodoc templates, visit:
+https://compodoc.app/guides/template-customization.html
+
+Generated by Compodoc Template Playground
+`;
+ }
+
+ private downloadBlob(blob: Blob, filename: string) {
+ const url = window.URL.createObjectURL(blob);
+ const a = document.createElement('a');
+ a.href = url;
+ a.download = filename;
+ a.style.display = 'none';
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ window.URL.revokeObjectURL(url);
+ }
+}
+
+ +
+ documentation/template-playground/template-playground.component.ts
+
+ Properties+ |
+
+
|
+
| + + customFavicon + + + + + | +
+ customFavicon:
+ |
+
+ Type : string
+
+ |
+
| + Optional + | +
| + + disableConstructors + + + + + | +
+ disableConstructors:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableCoverage + + + + + | +
+ disableCoverage:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableDependencies + + + + + | +
+ disableDependencies:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableDomTree + + + + + | +
+ disableDomTree:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableFilePath + + + + + | +
+ disableFilePath:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableGraph + + + + + | +
+ disableGraph:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableInternal + + + + + | +
+ disableInternal:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableLifeCycleHooks + + + + + | +
+ disableLifeCycleHooks:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableMainGraph + + + + + | +
+ disableMainGraph:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableOverview + + + + + | +
+ disableOverview:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disablePrivate + + + + + | +
+ disablePrivate:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableProperties + + + + + | +
+ disableProperties:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableProtected + + + + + | +
+ disableProtected:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableRoutesGraph + + + + + | +
+ disableRoutesGraph:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableSearch + + + + + | +
+ disableSearch:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableSourceCode + + + + + | +
+ disableSourceCode:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableStyleTab + + + + + | +
+ disableStyleTab:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + disableTemplateTab + + + + + | +
+ disableTemplateTab:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + hideDarkModeToggle + + + + + | +
+ hideDarkModeToggle:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + hideGenerator + + + + + | +
+ hideGenerator:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
| + + includes + + + + + | +
+ includes:
+ |
+
+ Type : string
+
+ |
+
| + Optional + | +
| + + includesName + + + + + | +
+ includesName:
+ |
+
+ Type : string
+
+ |
+
| + Optional + | +
| + + minimal + + + + + | +
+ minimal:
+ |
+
+ Type : boolean
+
+ |
+
| + Optional + | +
import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { TemplateEditorService } from './template-editor.service';
+import { ZipExportService } from './zip-export.service';
+import { HbsRenderService } from './hbs-render.service';
+
+interface Template {
+ name: string;
+ path: string;
+ type: 'template' | 'partial';
+}
+
+interface Session {
+ sessionId: string;
+ success: boolean;
+ message: string;
+}
+
+interface CompoDocConfig {
+ hideGenerator?: boolean;
+ disableSourceCode?: boolean;
+ disableGraph?: boolean;
+ disableCoverage?: boolean;
+ disablePrivate?: boolean;
+ disableProtected?: boolean;
+ disableInternal?: boolean;
+ disableLifeCycleHooks?: boolean;
+ disableConstructors?: boolean;
+ disableRoutesGraph?: boolean;
+ disableSearch?: boolean;
+ disableDependencies?: boolean;
+ disableProperties?: boolean;
+ disableDomTree?: boolean;
+ disableTemplateTab?: boolean;
+ disableStyleTab?: boolean;
+ disableMainGraph?: boolean;
+ disableFilePath?: boolean;
+ disableOverview?: boolean;
+ hideDarkModeToggle?: boolean;
+ minimal?: boolean;
+ customFavicon?: string;
+ includes?: string;
+ includesName?: string;
+}
+
+@Component({
+ selector: 'template-playground-root',
+ template: `
+ <div class="template-playground">
+ <div class="template-playground-header">
+ <h2>Template Playground</h2>
+ <div class="template-playground-status">
+ <span *ngIf="sessionId" class="session-info">Session: {{sessionId.substring(0, 8)}}...</span>
+ <span *ngIf="saving" class="saving-indicator">Saving...</span>
+ <span *ngIf="lastSaved" class="last-saved">Last saved: {{lastSaved | date:'short'}}</span>
+ </div>
+ <div class="template-playground-actions">
+ <button class="btn btn-secondary" (click)="toggleConfigPanel()">⚙️ Config</button>
+ <button class="btn btn-primary" (click)="resetToDefault()">Reset to Default</button>
+ <button class="btn btn-success" (click)="exportZip()">Download Templates</button>
+ </div>
+ </div>
+
+ <!-- Configuration Panel -->
+ <div class="config-panel" [class.collapsed]="!showConfigPanel">
+ <h3>CompoDoc Configuration</h3>
+ <div class="config-options">
+ <label><input type="checkbox" [(ngModel)]="config.hideGenerator" (change)="updateConfig()"> Hide Generator</label>
+ <label><input type="checkbox" [(ngModel)]="config.hideDarkModeToggle" (change)="updateConfig()"> Hide Dark Mode Toggle</label>
+ <label><input type="checkbox" [(ngModel)]="config.minimal" (change)="updateConfig()"> Minimal Mode</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableOverview" (change)="updateConfig()"> Disable Overview</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableFilePath" (change)="updateConfig()"> Disable File Path</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableSourceCode" (change)="updateConfig()"> Disable Source Code</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableGraph" (change)="updateConfig()"> Disable Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableMainGraph" (change)="updateConfig()"> Disable Main Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableRoutesGraph" (change)="updateConfig()"> Disable Routes Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableCoverage" (change)="updateConfig()"> Disable Coverage</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableSearch" (change)="updateConfig()"> Disable Search</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableDependencies" (change)="updateConfig()"> Disable Dependencies</label>
+ <label><input type="checkbox" [(ngModel)]="config.disablePrivate" (change)="updateConfig()"> Disable Private</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableProtected" (change)="updateConfig()"> Disable Protected</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableInternal" (change)="updateConfig()"> Disable Internal</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableLifeCycleHooks" (change)="updateConfig()"> Disable Lifecycle Hooks</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableConstructors" (change)="updateConfig()"> Disable Constructors</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableProperties" (change)="updateConfig()"> Disable Properties</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableDomTree" (change)="updateConfig()"> Disable DOM Tree</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableTemplateTab" (change)="updateConfig()"> Disable Template Tab</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableStyleTab" (change)="updateConfig()"> Disable Style Tab</label>
+ </div>
+ </div>
+
+ <div class="template-playground-body">
+ <div class="template-playground-sidebar">
+ <div class="template-file-list">
+ <h3>Templates</h3>
+ <ul class="file-list">
+ <li *ngFor="let template of templates; trackBy: trackByName"
+ [class.active]="selectedFile === template"
+ (click)="selectFile(template)">
+ <i class="file-icon ion-document-text"></i>
+ {{template.name}}
+ <span class="file-type">{{template.type}}</span>
+ </li>
+ </ul>
+
+ <div *ngIf="templates.length === 0" class="loading-templates">
+ Loading templates...
+ </div>
+ </div>
+ </div>
+
+ <div class="template-playground-main">
+ <div class="template-playground-editor">
+ <div class="editor-header" *ngIf="selectedFile">
+ <h4>{{selectedFile.path}}</h4>
+ <span class="file-type-badge">{{selectedFile.type}}</span>
+ </div>
+ <div #editorContainer class="editor-container"></div>
+ </div>
+
+ <div class="template-playground-preview">
+ <div class="preview-header">
+ <h4>Live Preview</h4>
+ <button class="btn btn-sm btn-secondary" (click)="refreshPreview()">🔄 Refresh</button>
+ </div>
+ <iframe #previewFrame class="preview-frame" [src]="previewUrl"></iframe>
+ </div>
+ </div>
+ </div>
+ </div>
+ `,
+ styles: [`
+ .template-playground {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ }
+
+ .template-playground-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1rem 2rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .template-playground-status {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ font-size: 0.875rem;
+ }
+
+ .session-info {
+ color: #6c757d;
+ font-family: monospace;
+ }
+
+ .saving-indicator {
+ color: #ffc107;
+ font-weight: bold;
+ }
+
+ .last-saved {
+ color: #28a745;
+ }
+
+ .template-playground-actions {
+ display: flex;
+ gap: 0.5rem;
+ }
+
+ .config-panel {
+ background: #e9ecef;
+ padding: 1rem 2rem;
+ border-bottom: 1px solid #dee2e6;
+ transition: all 0.3s ease;
+ max-height: 200px;
+ overflow: hidden;
+ }
+
+ .config-panel.collapsed {
+ max-height: 0;
+ padding: 0 2rem;
+ }
+
+ .config-options {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 0.5rem;
+ margin-top: 0.5rem;
+ }
+
+ .config-options label {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ font-size: 0.875rem;
+ }
+
+ .template-playground-body {
+ display: flex;
+ flex: 1;
+ overflow: hidden;
+ }
+
+ .template-playground-sidebar {
+ width: 250px;
+ background: #f8f9fa;
+ border-right: 1px solid #dee2e6;
+ overflow-y: auto;
+ }
+
+ .template-file-list {
+ padding: 1rem;
+ }
+
+ .template-file-list h3 {
+ margin: 0 0 0.5rem 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ color: #495057;
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ }
+
+ .file-list {
+ list-style: none;
+ padding: 0;
+ margin: 0 0 1.5rem 0;
+ }
+
+ .file-list li {
+ display: flex;
+ align-items: center;
+ padding: 0.5rem;
+ cursor: pointer;
+ border-radius: 4px;
+ font-size: 0.875rem;
+ transition: background-color 0.15s ease;
+ }
+
+ .file-list li:hover {
+ background: #e9ecef;
+ }
+
+ .file-list li.active {
+ background: #007bff;
+ color: white;
+ }
+
+ .file-icon {
+ margin-right: 0.5rem;
+ opacity: 0.7;
+ }
+
+ .file-type {
+ margin-left: auto;
+ font-size: 0.75rem;
+ opacity: 0.7;
+ text-transform: uppercase;
+ }
+
+ .loading-templates {
+ text-align: center;
+ color: #6c757d;
+ font-style: italic;
+ padding: 2rem;
+ }
+
+ .template-playground-main {
+ flex: 1;
+ display: flex;
+ overflow: hidden;
+ }
+
+ .template-playground-editor {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ border-right: 1px solid #dee2e6;
+ }
+
+ .editor-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .editor-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .file-type-badge {
+ background: #6c757d;
+ color: white;
+ padding: 0.125rem 0.5rem;
+ border-radius: 12px;
+ font-size: 0.75rem;
+ text-transform: uppercase;
+ }
+
+ .editor-container {
+ flex: 1;
+ position: relative;
+ }
+
+ .template-playground-preview {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .preview-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .preview-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .preview-frame {
+ flex: 1;
+ border: none;
+ background: white;
+ }
+
+ .btn {
+ padding: 0.375rem 0.75rem;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+ font-size: 0.875rem;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ transition: all 0.15s ease;
+ }
+
+ .btn-primary {
+ background: #007bff;
+ border-color: #007bff;
+ color: white;
+ }
+
+ .btn-primary:hover {
+ background: #0056b3;
+ border-color: #004085;
+ }
+
+ .btn-secondary {
+ background: #6c757d;
+ border-color: #6c757d;
+ color: white;
+ }
+
+ .btn-secondary:hover {
+ background: #545b62;
+ border-color: #4e555b;
+ }
+
+ .btn-success {
+ background: #28a745;
+ border-color: #28a745;
+ color: white;
+ }
+
+ .btn-success:hover {
+ background: #1e7e34;
+ border-color: #1c7430;
+ }
+
+ .btn-sm {
+ padding: 0.25rem 0.5rem;
+ font-size: 0.75rem;
+ }
+ `]
+})
+export class TemplatePlaygroundComponent implements OnInit, OnDestroy {
+ @ViewChild('editorContainer', { static: true }) editorContainer!: ElementRef;
+ @ViewChild('previewFrame', { static: true }) previewFrame!: ElementRef;
+
+ sessionId: string = '';
+ templates: Template[] = [];
+ selectedFile: Template | null = null;
+ config: CompoDocConfig = {};
+ showConfigPanel: boolean = false;
+ saving: boolean = false;
+ lastSaved: Date | null = null;
+
+ private saveTimeout?: number;
+ private readonly SAVE_DELAY = 300; // 300ms debounce
+
+ get previewUrl(): string {
+ return this.sessionId ? `/api/session/${this.sessionId}/docs/` : '';
+ }
+
+ constructor(
+ private http: HttpClient,
+ private editorService: TemplateEditorService,
+ private zipService: ZipExportService,
+ private hbsService: HbsRenderService
+ ) {}
+
+ async ngOnInit() {
+ try {
+ await this.createSession();
+ await this.loadSessionTemplates();
+ await this.loadSessionConfig();
+ this.initializeEditor();
+ } catch (error) {
+ console.error('Error initializing template playground:', error);
+ }
+ }
+
+ ngOnDestroy() {
+ if (this.saveTimeout) {
+ clearTimeout(this.saveTimeout);
+ }
+ }
+
+ private async createSession(): Promise<void> {
+ const response = await this.http.post<Session>('/api/session/create', {}).toPromise();
+ if (response && response.success) {
+ this.sessionId = response.sessionId;
+ console.log('Session created:', this.sessionId);
+ } else {
+ throw new Error('Failed to create session');
+ }
+ }
+
+ private async loadSessionTemplates(): Promise<void> {
+ if (!this.sessionId) return;
+
+ const response = await this.http.get<{templates: Template[], success: boolean}>(`/api/session/${this.sessionId}/templates`).toPromise();
+ if (response && response.success) {
+ this.templates = response.templates;
+
+ // Auto-select the first template
+ if (this.templates.length > 0 && !this.selectedFile) {
+ this.selectFile(this.templates[0]);
+ }
+ }
+ }
+
+ private async loadSessionConfig(): Promise<void> {
+ if (!this.sessionId) return;
+
+ const response = await this.http.get<{config: CompoDocConfig, success: boolean}>(`/api/session/${this.sessionId}/config`).toPromise();
+ if (response && response.success) {
+ this.config = response.config;
+ }
+ }
+
+ initializeEditor() {
+ this.editorService.initializeEditor(this.editorContainer.nativeElement);
+
+ // Set up debounced save on content change
+ this.editorService.setOnChangeCallback((content: string) => {
+ this.scheduleAutoSave(content);
+ });
+ }
+
+ async selectFile(template: Template) {
+ this.selectedFile = template;
+
+ if (!this.sessionId) return;
+
+ try {
+ const response = await this.http.get<{content: string, success: boolean}>(`/api/session/${this.sessionId}/template/${template.path}`).toPromise();
+ if (response && response.success) {
+ this.editorService.setEditorContent(response.content, template.type === 'template' ? 'handlebars' : 'handlebars');
+ }
+ } catch (error) {
+ console.error('Error loading template:', error);
+ }
+ }
+
+ private scheduleAutoSave(content: string): void {
+ if (!this.selectedFile || !this.sessionId) return;
+
+ // Clear existing timeout
+ if (this.saveTimeout) {
+ clearTimeout(this.saveTimeout);
+ }
+
+ // Set saving indicator
+ this.saving = true;
+
+ // Schedule new save
+ this.saveTimeout = window.setTimeout(async () => {
+ try {
+ await this.saveTemplate(content);
+ this.saving = false;
+ this.lastSaved = new Date();
+ } catch (error) {
+ console.error('Error saving template:', error);
+ this.saving = false;
+ }
+ }, this.SAVE_DELAY);
+ }
+
+ private async saveTemplate(content: string): Promise<void> {
+ if (!this.selectedFile || !this.sessionId) return;
+
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/template/${this.selectedFile.path}`, {
+ content
+ }).toPromise();
+
+ if (!response || !response.success) {
+ throw new Error('Failed to save template');
+ }
+ }
+
+ async updateConfig(): Promise<void> {
+ if (!this.sessionId) return;
+
+ try {
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/config`, {
+ config: this.config
+ }).toPromise();
+
+ if (response && response.success) {
+ // Config updated, documentation will be regenerated automatically
+ }
+ } catch (error) {
+ console.error('Error updating config:', error);
+ }
+ }
+
+ toggleConfigPanel(): void {
+ this.showConfigPanel = !this.showConfigPanel;
+ }
+
+ refreshPreview(): void {
+ if (this.previewFrame?.nativeElement) {
+ this.previewFrame.nativeElement.src = this.previewFrame.nativeElement.src;
+ }
+ }
+
+ resetToDefault(): void {
+ // Implementation for resetting to default templates
+ if (confirm('Are you sure you want to reset all templates to their default values? This action cannot be undone.')) {
+ // TODO: Implement reset functionality
+ console.log('Reset to default templates');
+ }
+ }
+
+ async exportZip(): Promise<void> {
+ try {
+ if (!this.sessionId) {
+ console.error('No active session. Please refresh the page and try again.');
+ return;
+ }
+
+ console.log('Creating template package...');
+
+ // Call server-side ZIP creation endpoint for all templates
+ const response = await this.http.post(`/api/session/${this.sessionId}/download-all-templates`, {}, {
+ responseType: 'blob',
+ observe: 'response'
+ }).toPromise();
+
+ if (!response || !response.body) {
+ throw new Error('Failed to create template package');
+ }
+
+ // Get the ZIP file as a blob
+ const zipBlob = response.body;
+
+ // Get filename from response headers or construct it
+ const contentDisposition = response.headers.get('Content-Disposition');
+ let filename = `compodoc-templates-${this.sessionId}.zip`;
+
+ if (contentDisposition) {
+ const filenameMatch = contentDisposition.match(/filename="([^"]+)"/);
+ if (filenameMatch) {
+ filename = filenameMatch[1];
+ }
+ }
+
+ // Create download link and trigger download
+ const url = URL.createObjectURL(zipBlob);
+ const a = document.createElement('a');
+ a.href = url;
+ a.download = filename;
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ URL.revokeObjectURL(url);
+
+ console.log('Template package downloaded successfully!');
+ } catch (error) {
+ console.error('Error downloading template package:', error);
+ }
+ }
+
+ trackByName(index: number, item: Template): string {
+ return item.name;
+ }
+}
+
+ +
+ documentation/template-playground/template-playground.component.ts
+
+ Properties+ |
+
+
|
+
| + + message + + + + + | +
+ message:
+ |
+
+ Type : string
+
+ |
+
| + + sessionId + + + + + | +
+ sessionId:
+ |
+
+ Type : string
+
+ |
+
| + + success + + + + + | +
+ success:
+ |
+
+ Type : boolean
+
+ |
+
import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { TemplateEditorService } from './template-editor.service';
+import { ZipExportService } from './zip-export.service';
+import { HbsRenderService } from './hbs-render.service';
+
+interface Template {
+ name: string;
+ path: string;
+ type: 'template' | 'partial';
+}
+
+interface Session {
+ sessionId: string;
+ success: boolean;
+ message: string;
+}
+
+interface CompoDocConfig {
+ hideGenerator?: boolean;
+ disableSourceCode?: boolean;
+ disableGraph?: boolean;
+ disableCoverage?: boolean;
+ disablePrivate?: boolean;
+ disableProtected?: boolean;
+ disableInternal?: boolean;
+ disableLifeCycleHooks?: boolean;
+ disableConstructors?: boolean;
+ disableRoutesGraph?: boolean;
+ disableSearch?: boolean;
+ disableDependencies?: boolean;
+ disableProperties?: boolean;
+ disableDomTree?: boolean;
+ disableTemplateTab?: boolean;
+ disableStyleTab?: boolean;
+ disableMainGraph?: boolean;
+ disableFilePath?: boolean;
+ disableOverview?: boolean;
+ hideDarkModeToggle?: boolean;
+ minimal?: boolean;
+ customFavicon?: string;
+ includes?: string;
+ includesName?: string;
+}
+
+@Component({
+ selector: 'template-playground-root',
+ template: `
+ <div class="template-playground">
+ <div class="template-playground-header">
+ <h2>Template Playground</h2>
+ <div class="template-playground-status">
+ <span *ngIf="sessionId" class="session-info">Session: {{sessionId.substring(0, 8)}}...</span>
+ <span *ngIf="saving" class="saving-indicator">Saving...</span>
+ <span *ngIf="lastSaved" class="last-saved">Last saved: {{lastSaved | date:'short'}}</span>
+ </div>
+ <div class="template-playground-actions">
+ <button class="btn btn-secondary" (click)="toggleConfigPanel()">⚙️ Config</button>
+ <button class="btn btn-primary" (click)="resetToDefault()">Reset to Default</button>
+ <button class="btn btn-success" (click)="exportZip()">Download Templates</button>
+ </div>
+ </div>
+
+ <!-- Configuration Panel -->
+ <div class="config-panel" [class.collapsed]="!showConfigPanel">
+ <h3>CompoDoc Configuration</h3>
+ <div class="config-options">
+ <label><input type="checkbox" [(ngModel)]="config.hideGenerator" (change)="updateConfig()"> Hide Generator</label>
+ <label><input type="checkbox" [(ngModel)]="config.hideDarkModeToggle" (change)="updateConfig()"> Hide Dark Mode Toggle</label>
+ <label><input type="checkbox" [(ngModel)]="config.minimal" (change)="updateConfig()"> Minimal Mode</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableOverview" (change)="updateConfig()"> Disable Overview</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableFilePath" (change)="updateConfig()"> Disable File Path</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableSourceCode" (change)="updateConfig()"> Disable Source Code</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableGraph" (change)="updateConfig()"> Disable Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableMainGraph" (change)="updateConfig()"> Disable Main Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableRoutesGraph" (change)="updateConfig()"> Disable Routes Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableCoverage" (change)="updateConfig()"> Disable Coverage</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableSearch" (change)="updateConfig()"> Disable Search</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableDependencies" (change)="updateConfig()"> Disable Dependencies</label>
+ <label><input type="checkbox" [(ngModel)]="config.disablePrivate" (change)="updateConfig()"> Disable Private</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableProtected" (change)="updateConfig()"> Disable Protected</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableInternal" (change)="updateConfig()"> Disable Internal</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableLifeCycleHooks" (change)="updateConfig()"> Disable Lifecycle Hooks</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableConstructors" (change)="updateConfig()"> Disable Constructors</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableProperties" (change)="updateConfig()"> Disable Properties</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableDomTree" (change)="updateConfig()"> Disable DOM Tree</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableTemplateTab" (change)="updateConfig()"> Disable Template Tab</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableStyleTab" (change)="updateConfig()"> Disable Style Tab</label>
+ </div>
+ </div>
+
+ <div class="template-playground-body">
+ <div class="template-playground-sidebar">
+ <div class="template-file-list">
+ <h3>Templates</h3>
+ <ul class="file-list">
+ <li *ngFor="let template of templates; trackBy: trackByName"
+ [class.active]="selectedFile === template"
+ (click)="selectFile(template)">
+ <i class="file-icon ion-document-text"></i>
+ {{template.name}}
+ <span class="file-type">{{template.type}}</span>
+ </li>
+ </ul>
+
+ <div *ngIf="templates.length === 0" class="loading-templates">
+ Loading templates...
+ </div>
+ </div>
+ </div>
+
+ <div class="template-playground-main">
+ <div class="template-playground-editor">
+ <div class="editor-header" *ngIf="selectedFile">
+ <h4>{{selectedFile.path}}</h4>
+ <span class="file-type-badge">{{selectedFile.type}}</span>
+ </div>
+ <div #editorContainer class="editor-container"></div>
+ </div>
+
+ <div class="template-playground-preview">
+ <div class="preview-header">
+ <h4>Live Preview</h4>
+ <button class="btn btn-sm btn-secondary" (click)="refreshPreview()">🔄 Refresh</button>
+ </div>
+ <iframe #previewFrame class="preview-frame" [src]="previewUrl"></iframe>
+ </div>
+ </div>
+ </div>
+ </div>
+ `,
+ styles: [`
+ .template-playground {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ }
+
+ .template-playground-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1rem 2rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .template-playground-status {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ font-size: 0.875rem;
+ }
+
+ .session-info {
+ color: #6c757d;
+ font-family: monospace;
+ }
+
+ .saving-indicator {
+ color: #ffc107;
+ font-weight: bold;
+ }
+
+ .last-saved {
+ color: #28a745;
+ }
+
+ .template-playground-actions {
+ display: flex;
+ gap: 0.5rem;
+ }
+
+ .config-panel {
+ background: #e9ecef;
+ padding: 1rem 2rem;
+ border-bottom: 1px solid #dee2e6;
+ transition: all 0.3s ease;
+ max-height: 200px;
+ overflow: hidden;
+ }
+
+ .config-panel.collapsed {
+ max-height: 0;
+ padding: 0 2rem;
+ }
+
+ .config-options {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 0.5rem;
+ margin-top: 0.5rem;
+ }
+
+ .config-options label {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ font-size: 0.875rem;
+ }
+
+ .template-playground-body {
+ display: flex;
+ flex: 1;
+ overflow: hidden;
+ }
+
+ .template-playground-sidebar {
+ width: 250px;
+ background: #f8f9fa;
+ border-right: 1px solid #dee2e6;
+ overflow-y: auto;
+ }
+
+ .template-file-list {
+ padding: 1rem;
+ }
+
+ .template-file-list h3 {
+ margin: 0 0 0.5rem 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ color: #495057;
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ }
+
+ .file-list {
+ list-style: none;
+ padding: 0;
+ margin: 0 0 1.5rem 0;
+ }
+
+ .file-list li {
+ display: flex;
+ align-items: center;
+ padding: 0.5rem;
+ cursor: pointer;
+ border-radius: 4px;
+ font-size: 0.875rem;
+ transition: background-color 0.15s ease;
+ }
+
+ .file-list li:hover {
+ background: #e9ecef;
+ }
+
+ .file-list li.active {
+ background: #007bff;
+ color: white;
+ }
+
+ .file-icon {
+ margin-right: 0.5rem;
+ opacity: 0.7;
+ }
+
+ .file-type {
+ margin-left: auto;
+ font-size: 0.75rem;
+ opacity: 0.7;
+ text-transform: uppercase;
+ }
+
+ .loading-templates {
+ text-align: center;
+ color: #6c757d;
+ font-style: italic;
+ padding: 2rem;
+ }
+
+ .template-playground-main {
+ flex: 1;
+ display: flex;
+ overflow: hidden;
+ }
+
+ .template-playground-editor {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ border-right: 1px solid #dee2e6;
+ }
+
+ .editor-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .editor-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .file-type-badge {
+ background: #6c757d;
+ color: white;
+ padding: 0.125rem 0.5rem;
+ border-radius: 12px;
+ font-size: 0.75rem;
+ text-transform: uppercase;
+ }
+
+ .editor-container {
+ flex: 1;
+ position: relative;
+ }
+
+ .template-playground-preview {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .preview-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .preview-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .preview-frame {
+ flex: 1;
+ border: none;
+ background: white;
+ }
+
+ .btn {
+ padding: 0.375rem 0.75rem;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+ font-size: 0.875rem;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ transition: all 0.15s ease;
+ }
+
+ .btn-primary {
+ background: #007bff;
+ border-color: #007bff;
+ color: white;
+ }
+
+ .btn-primary:hover {
+ background: #0056b3;
+ border-color: #004085;
+ }
+
+ .btn-secondary {
+ background: #6c757d;
+ border-color: #6c757d;
+ color: white;
+ }
+
+ .btn-secondary:hover {
+ background: #545b62;
+ border-color: #4e555b;
+ }
+
+ .btn-success {
+ background: #28a745;
+ border-color: #28a745;
+ color: white;
+ }
+
+ .btn-success:hover {
+ background: #1e7e34;
+ border-color: #1c7430;
+ }
+
+ .btn-sm {
+ padding: 0.25rem 0.5rem;
+ font-size: 0.75rem;
+ }
+ `]
+})
+export class TemplatePlaygroundComponent implements OnInit, OnDestroy {
+ @ViewChild('editorContainer', { static: true }) editorContainer!: ElementRef;
+ @ViewChild('previewFrame', { static: true }) previewFrame!: ElementRef;
+
+ sessionId: string = '';
+ templates: Template[] = [];
+ selectedFile: Template | null = null;
+ config: CompoDocConfig = {};
+ showConfigPanel: boolean = false;
+ saving: boolean = false;
+ lastSaved: Date | null = null;
+
+ private saveTimeout?: number;
+ private readonly SAVE_DELAY = 300; // 300ms debounce
+
+ get previewUrl(): string {
+ return this.sessionId ? `/api/session/${this.sessionId}/docs/` : '';
+ }
+
+ constructor(
+ private http: HttpClient,
+ private editorService: TemplateEditorService,
+ private zipService: ZipExportService,
+ private hbsService: HbsRenderService
+ ) {}
+
+ async ngOnInit() {
+ try {
+ await this.createSession();
+ await this.loadSessionTemplates();
+ await this.loadSessionConfig();
+ this.initializeEditor();
+ } catch (error) {
+ console.error('Error initializing template playground:', error);
+ }
+ }
+
+ ngOnDestroy() {
+ if (this.saveTimeout) {
+ clearTimeout(this.saveTimeout);
+ }
+ }
+
+ private async createSession(): Promise<void> {
+ const response = await this.http.post<Session>('/api/session/create', {}).toPromise();
+ if (response && response.success) {
+ this.sessionId = response.sessionId;
+ console.log('Session created:', this.sessionId);
+ } else {
+ throw new Error('Failed to create session');
+ }
+ }
+
+ private async loadSessionTemplates(): Promise<void> {
+ if (!this.sessionId) return;
+
+ const response = await this.http.get<{templates: Template[], success: boolean}>(`/api/session/${this.sessionId}/templates`).toPromise();
+ if (response && response.success) {
+ this.templates = response.templates;
+
+ // Auto-select the first template
+ if (this.templates.length > 0 && !this.selectedFile) {
+ this.selectFile(this.templates[0]);
+ }
+ }
+ }
+
+ private async loadSessionConfig(): Promise<void> {
+ if (!this.sessionId) return;
+
+ const response = await this.http.get<{config: CompoDocConfig, success: boolean}>(`/api/session/${this.sessionId}/config`).toPromise();
+ if (response && response.success) {
+ this.config = response.config;
+ }
+ }
+
+ initializeEditor() {
+ this.editorService.initializeEditor(this.editorContainer.nativeElement);
+
+ // Set up debounced save on content change
+ this.editorService.setOnChangeCallback((content: string) => {
+ this.scheduleAutoSave(content);
+ });
+ }
+
+ async selectFile(template: Template) {
+ this.selectedFile = template;
+
+ if (!this.sessionId) return;
+
+ try {
+ const response = await this.http.get<{content: string, success: boolean}>(`/api/session/${this.sessionId}/template/${template.path}`).toPromise();
+ if (response && response.success) {
+ this.editorService.setEditorContent(response.content, template.type === 'template' ? 'handlebars' : 'handlebars');
+ }
+ } catch (error) {
+ console.error('Error loading template:', error);
+ }
+ }
+
+ private scheduleAutoSave(content: string): void {
+ if (!this.selectedFile || !this.sessionId) return;
+
+ // Clear existing timeout
+ if (this.saveTimeout) {
+ clearTimeout(this.saveTimeout);
+ }
+
+ // Set saving indicator
+ this.saving = true;
+
+ // Schedule new save
+ this.saveTimeout = window.setTimeout(async () => {
+ try {
+ await this.saveTemplate(content);
+ this.saving = false;
+ this.lastSaved = new Date();
+ } catch (error) {
+ console.error('Error saving template:', error);
+ this.saving = false;
+ }
+ }, this.SAVE_DELAY);
+ }
+
+ private async saveTemplate(content: string): Promise<void> {
+ if (!this.selectedFile || !this.sessionId) return;
+
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/template/${this.selectedFile.path}`, {
+ content
+ }).toPromise();
+
+ if (!response || !response.success) {
+ throw new Error('Failed to save template');
+ }
+ }
+
+ async updateConfig(): Promise<void> {
+ if (!this.sessionId) return;
+
+ try {
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/config`, {
+ config: this.config
+ }).toPromise();
+
+ if (response && response.success) {
+ // Config updated, documentation will be regenerated automatically
+ }
+ } catch (error) {
+ console.error('Error updating config:', error);
+ }
+ }
+
+ toggleConfigPanel(): void {
+ this.showConfigPanel = !this.showConfigPanel;
+ }
+
+ refreshPreview(): void {
+ if (this.previewFrame?.nativeElement) {
+ this.previewFrame.nativeElement.src = this.previewFrame.nativeElement.src;
+ }
+ }
+
+ resetToDefault(): void {
+ // Implementation for resetting to default templates
+ if (confirm('Are you sure you want to reset all templates to their default values? This action cannot be undone.')) {
+ // TODO: Implement reset functionality
+ console.log('Reset to default templates');
+ }
+ }
+
+ async exportZip(): Promise<void> {
+ try {
+ if (!this.sessionId) {
+ console.error('No active session. Please refresh the page and try again.');
+ return;
+ }
+
+ console.log('Creating template package...');
+
+ // Call server-side ZIP creation endpoint for all templates
+ const response = await this.http.post(`/api/session/${this.sessionId}/download-all-templates`, {}, {
+ responseType: 'blob',
+ observe: 'response'
+ }).toPromise();
+
+ if (!response || !response.body) {
+ throw new Error('Failed to create template package');
+ }
+
+ // Get the ZIP file as a blob
+ const zipBlob = response.body;
+
+ // Get filename from response headers or construct it
+ const contentDisposition = response.headers.get('Content-Disposition');
+ let filename = `compodoc-templates-${this.sessionId}.zip`;
+
+ if (contentDisposition) {
+ const filenameMatch = contentDisposition.match(/filename="([^"]+)"/);
+ if (filenameMatch) {
+ filename = filenameMatch[1];
+ }
+ }
+
+ // Create download link and trigger download
+ const url = URL.createObjectURL(zipBlob);
+ const a = document.createElement('a');
+ a.href = url;
+ a.download = filename;
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ URL.revokeObjectURL(url);
+
+ console.log('Template package downloaded successfully!');
+ } catch (error) {
+ console.error('Error downloading template package:', error);
+ }
+ }
+
+ trackByName(index: number, item: Template): string {
+ return item.name;
+ }
+}
+
+ +
+ documentation/template-playground/template-playground.component.ts
+
+ Properties+ |
+
| + + | +
| + + name + + + + + | +
+ name:
+ |
+
+ Type : string
+
+ |
+
| + + path + + + + + | +
+ path:
+ |
+
+ Type : string
+
+ |
+
| + + type + + + + + | +
+ type:
+ |
+
+ Type : "template" | "partial"
+
+ |
+
import { Component, OnInit, ViewChild, ElementRef, OnDestroy } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { TemplateEditorService } from './template-editor.service';
+import { ZipExportService } from './zip-export.service';
+import { HbsRenderService } from './hbs-render.service';
+
+interface Template {
+ name: string;
+ path: string;
+ type: 'template' | 'partial';
+}
+
+interface Session {
+ sessionId: string;
+ success: boolean;
+ message: string;
+}
+
+interface CompoDocConfig {
+ hideGenerator?: boolean;
+ disableSourceCode?: boolean;
+ disableGraph?: boolean;
+ disableCoverage?: boolean;
+ disablePrivate?: boolean;
+ disableProtected?: boolean;
+ disableInternal?: boolean;
+ disableLifeCycleHooks?: boolean;
+ disableConstructors?: boolean;
+ disableRoutesGraph?: boolean;
+ disableSearch?: boolean;
+ disableDependencies?: boolean;
+ disableProperties?: boolean;
+ disableDomTree?: boolean;
+ disableTemplateTab?: boolean;
+ disableStyleTab?: boolean;
+ disableMainGraph?: boolean;
+ disableFilePath?: boolean;
+ disableOverview?: boolean;
+ hideDarkModeToggle?: boolean;
+ minimal?: boolean;
+ customFavicon?: string;
+ includes?: string;
+ includesName?: string;
+}
+
+@Component({
+ selector: 'template-playground-root',
+ template: `
+ <div class="template-playground">
+ <div class="template-playground-header">
+ <h2>Template Playground</h2>
+ <div class="template-playground-status">
+ <span *ngIf="sessionId" class="session-info">Session: {{sessionId.substring(0, 8)}}...</span>
+ <span *ngIf="saving" class="saving-indicator">Saving...</span>
+ <span *ngIf="lastSaved" class="last-saved">Last saved: {{lastSaved | date:'short'}}</span>
+ </div>
+ <div class="template-playground-actions">
+ <button class="btn btn-secondary" (click)="toggleConfigPanel()">⚙️ Config</button>
+ <button class="btn btn-primary" (click)="resetToDefault()">Reset to Default</button>
+ <button class="btn btn-success" (click)="exportZip()">Download Templates</button>
+ </div>
+ </div>
+
+ <!-- Configuration Panel -->
+ <div class="config-panel" [class.collapsed]="!showConfigPanel">
+ <h3>CompoDoc Configuration</h3>
+ <div class="config-options">
+ <label><input type="checkbox" [(ngModel)]="config.hideGenerator" (change)="updateConfig()"> Hide Generator</label>
+ <label><input type="checkbox" [(ngModel)]="config.hideDarkModeToggle" (change)="updateConfig()"> Hide Dark Mode Toggle</label>
+ <label><input type="checkbox" [(ngModel)]="config.minimal" (change)="updateConfig()"> Minimal Mode</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableOverview" (change)="updateConfig()"> Disable Overview</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableFilePath" (change)="updateConfig()"> Disable File Path</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableSourceCode" (change)="updateConfig()"> Disable Source Code</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableGraph" (change)="updateConfig()"> Disable Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableMainGraph" (change)="updateConfig()"> Disable Main Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableRoutesGraph" (change)="updateConfig()"> Disable Routes Graph</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableCoverage" (change)="updateConfig()"> Disable Coverage</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableSearch" (change)="updateConfig()"> Disable Search</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableDependencies" (change)="updateConfig()"> Disable Dependencies</label>
+ <label><input type="checkbox" [(ngModel)]="config.disablePrivate" (change)="updateConfig()"> Disable Private</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableProtected" (change)="updateConfig()"> Disable Protected</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableInternal" (change)="updateConfig()"> Disable Internal</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableLifeCycleHooks" (change)="updateConfig()"> Disable Lifecycle Hooks</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableConstructors" (change)="updateConfig()"> Disable Constructors</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableProperties" (change)="updateConfig()"> Disable Properties</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableDomTree" (change)="updateConfig()"> Disable DOM Tree</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableTemplateTab" (change)="updateConfig()"> Disable Template Tab</label>
+ <label><input type="checkbox" [(ngModel)]="config.disableStyleTab" (change)="updateConfig()"> Disable Style Tab</label>
+ </div>
+ </div>
+
+ <div class="template-playground-body">
+ <div class="template-playground-sidebar">
+ <div class="template-file-list">
+ <h3>Templates</h3>
+ <ul class="file-list">
+ <li *ngFor="let template of templates; trackBy: trackByName"
+ [class.active]="selectedFile === template"
+ (click)="selectFile(template)">
+ <i class="file-icon ion-document-text"></i>
+ {{template.name}}
+ <span class="file-type">{{template.type}}</span>
+ </li>
+ </ul>
+
+ <div *ngIf="templates.length === 0" class="loading-templates">
+ Loading templates...
+ </div>
+ </div>
+ </div>
+
+ <div class="template-playground-main">
+ <div class="template-playground-editor">
+ <div class="editor-header" *ngIf="selectedFile">
+ <h4>{{selectedFile.path}}</h4>
+ <span class="file-type-badge">{{selectedFile.type}}</span>
+ </div>
+ <div #editorContainer class="editor-container"></div>
+ </div>
+
+ <div class="template-playground-preview">
+ <div class="preview-header">
+ <h4>Live Preview</h4>
+ <button class="btn btn-sm btn-secondary" (click)="refreshPreview()">🔄 Refresh</button>
+ </div>
+ <iframe #previewFrame class="preview-frame" [src]="previewUrl"></iframe>
+ </div>
+ </div>
+ </div>
+ </div>
+ `,
+ styles: [`
+ .template-playground {
+ display: flex;
+ flex-direction: column;
+ height: 100vh;
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
+ }
+
+ .template-playground-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1rem 2rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .template-playground-status {
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ font-size: 0.875rem;
+ }
+
+ .session-info {
+ color: #6c757d;
+ font-family: monospace;
+ }
+
+ .saving-indicator {
+ color: #ffc107;
+ font-weight: bold;
+ }
+
+ .last-saved {
+ color: #28a745;
+ }
+
+ .template-playground-actions {
+ display: flex;
+ gap: 0.5rem;
+ }
+
+ .config-panel {
+ background: #e9ecef;
+ padding: 1rem 2rem;
+ border-bottom: 1px solid #dee2e6;
+ transition: all 0.3s ease;
+ max-height: 200px;
+ overflow: hidden;
+ }
+
+ .config-panel.collapsed {
+ max-height: 0;
+ padding: 0 2rem;
+ }
+
+ .config-options {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: 0.5rem;
+ margin-top: 0.5rem;
+ }
+
+ .config-options label {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ font-size: 0.875rem;
+ }
+
+ .template-playground-body {
+ display: flex;
+ flex: 1;
+ overflow: hidden;
+ }
+
+ .template-playground-sidebar {
+ width: 250px;
+ background: #f8f9fa;
+ border-right: 1px solid #dee2e6;
+ overflow-y: auto;
+ }
+
+ .template-file-list {
+ padding: 1rem;
+ }
+
+ .template-file-list h3 {
+ margin: 0 0 0.5rem 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ color: #495057;
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+ }
+
+ .file-list {
+ list-style: none;
+ padding: 0;
+ margin: 0 0 1.5rem 0;
+ }
+
+ .file-list li {
+ display: flex;
+ align-items: center;
+ padding: 0.5rem;
+ cursor: pointer;
+ border-radius: 4px;
+ font-size: 0.875rem;
+ transition: background-color 0.15s ease;
+ }
+
+ .file-list li:hover {
+ background: #e9ecef;
+ }
+
+ .file-list li.active {
+ background: #007bff;
+ color: white;
+ }
+
+ .file-icon {
+ margin-right: 0.5rem;
+ opacity: 0.7;
+ }
+
+ .file-type {
+ margin-left: auto;
+ font-size: 0.75rem;
+ opacity: 0.7;
+ text-transform: uppercase;
+ }
+
+ .loading-templates {
+ text-align: center;
+ color: #6c757d;
+ font-style: italic;
+ padding: 2rem;
+ }
+
+ .template-playground-main {
+ flex: 1;
+ display: flex;
+ overflow: hidden;
+ }
+
+ .template-playground-editor {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ border-right: 1px solid #dee2e6;
+ }
+
+ .editor-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .editor-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .file-type-badge {
+ background: #6c757d;
+ color: white;
+ padding: 0.125rem 0.5rem;
+ border-radius: 12px;
+ font-size: 0.75rem;
+ text-transform: uppercase;
+ }
+
+ .editor-container {
+ flex: 1;
+ position: relative;
+ }
+
+ .template-playground-preview {
+ width: 50%;
+ display: flex;
+ flex-direction: column;
+ }
+
+ .preview-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 0.75rem 1rem;
+ background: #f8f9fa;
+ border-bottom: 1px solid #dee2e6;
+ }
+
+ .preview-header h4 {
+ margin: 0;
+ font-size: 0.875rem;
+ font-weight: 600;
+ }
+
+ .preview-frame {
+ flex: 1;
+ border: none;
+ background: white;
+ }
+
+ .btn {
+ padding: 0.375rem 0.75rem;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+ font-size: 0.875rem;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ transition: all 0.15s ease;
+ }
+
+ .btn-primary {
+ background: #007bff;
+ border-color: #007bff;
+ color: white;
+ }
+
+ .btn-primary:hover {
+ background: #0056b3;
+ border-color: #004085;
+ }
+
+ .btn-secondary {
+ background: #6c757d;
+ border-color: #6c757d;
+ color: white;
+ }
+
+ .btn-secondary:hover {
+ background: #545b62;
+ border-color: #4e555b;
+ }
+
+ .btn-success {
+ background: #28a745;
+ border-color: #28a745;
+ color: white;
+ }
+
+ .btn-success:hover {
+ background: #1e7e34;
+ border-color: #1c7430;
+ }
+
+ .btn-sm {
+ padding: 0.25rem 0.5rem;
+ font-size: 0.75rem;
+ }
+ `]
+})
+export class TemplatePlaygroundComponent implements OnInit, OnDestroy {
+ @ViewChild('editorContainer', { static: true }) editorContainer!: ElementRef;
+ @ViewChild('previewFrame', { static: true }) previewFrame!: ElementRef;
+
+ sessionId: string = '';
+ templates: Template[] = [];
+ selectedFile: Template | null = null;
+ config: CompoDocConfig = {};
+ showConfigPanel: boolean = false;
+ saving: boolean = false;
+ lastSaved: Date | null = null;
+
+ private saveTimeout?: number;
+ private readonly SAVE_DELAY = 300; // 300ms debounce
+
+ get previewUrl(): string {
+ return this.sessionId ? `/api/session/${this.sessionId}/docs/` : '';
+ }
+
+ constructor(
+ private http: HttpClient,
+ private editorService: TemplateEditorService,
+ private zipService: ZipExportService,
+ private hbsService: HbsRenderService
+ ) {}
+
+ async ngOnInit() {
+ try {
+ await this.createSession();
+ await this.loadSessionTemplates();
+ await this.loadSessionConfig();
+ this.initializeEditor();
+ } catch (error) {
+ console.error('Error initializing template playground:', error);
+ }
+ }
+
+ ngOnDestroy() {
+ if (this.saveTimeout) {
+ clearTimeout(this.saveTimeout);
+ }
+ }
+
+ private async createSession(): Promise<void> {
+ const response = await this.http.post<Session>('/api/session/create', {}).toPromise();
+ if (response && response.success) {
+ this.sessionId = response.sessionId;
+ console.log('Session created:', this.sessionId);
+ } else {
+ throw new Error('Failed to create session');
+ }
+ }
+
+ private async loadSessionTemplates(): Promise<void> {
+ if (!this.sessionId) return;
+
+ const response = await this.http.get<{templates: Template[], success: boolean}>(`/api/session/${this.sessionId}/templates`).toPromise();
+ if (response && response.success) {
+ this.templates = response.templates;
+
+ // Auto-select the first template
+ if (this.templates.length > 0 && !this.selectedFile) {
+ this.selectFile(this.templates[0]);
+ }
+ }
+ }
+
+ private async loadSessionConfig(): Promise<void> {
+ if (!this.sessionId) return;
+
+ const response = await this.http.get<{config: CompoDocConfig, success: boolean}>(`/api/session/${this.sessionId}/config`).toPromise();
+ if (response && response.success) {
+ this.config = response.config;
+ }
+ }
+
+ initializeEditor() {
+ this.editorService.initializeEditor(this.editorContainer.nativeElement);
+
+ // Set up debounced save on content change
+ this.editorService.setOnChangeCallback((content: string) => {
+ this.scheduleAutoSave(content);
+ });
+ }
+
+ async selectFile(template: Template) {
+ this.selectedFile = template;
+
+ if (!this.sessionId) return;
+
+ try {
+ const response = await this.http.get<{content: string, success: boolean}>(`/api/session/${this.sessionId}/template/${template.path}`).toPromise();
+ if (response && response.success) {
+ this.editorService.setEditorContent(response.content, template.type === 'template' ? 'handlebars' : 'handlebars');
+ }
+ } catch (error) {
+ console.error('Error loading template:', error);
+ }
+ }
+
+ private scheduleAutoSave(content: string): void {
+ if (!this.selectedFile || !this.sessionId) return;
+
+ // Clear existing timeout
+ if (this.saveTimeout) {
+ clearTimeout(this.saveTimeout);
+ }
+
+ // Set saving indicator
+ this.saving = true;
+
+ // Schedule new save
+ this.saveTimeout = window.setTimeout(async () => {
+ try {
+ await this.saveTemplate(content);
+ this.saving = false;
+ this.lastSaved = new Date();
+ } catch (error) {
+ console.error('Error saving template:', error);
+ this.saving = false;
+ }
+ }, this.SAVE_DELAY);
+ }
+
+ private async saveTemplate(content: string): Promise<void> {
+ if (!this.selectedFile || !this.sessionId) return;
+
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/template/${this.selectedFile.path}`, {
+ content
+ }).toPromise();
+
+ if (!response || !response.success) {
+ throw new Error('Failed to save template');
+ }
+ }
+
+ async updateConfig(): Promise<void> {
+ if (!this.sessionId) return;
+
+ try {
+ const response = await this.http.post<{success: boolean}>(`/api/session/${this.sessionId}/config`, {
+ config: this.config
+ }).toPromise();
+
+ if (response && response.success) {
+ // Config updated, documentation will be regenerated automatically
+ }
+ } catch (error) {
+ console.error('Error updating config:', error);
+ }
+ }
+
+ toggleConfigPanel(): void {
+ this.showConfigPanel = !this.showConfigPanel;
+ }
+
+ refreshPreview(): void {
+ if (this.previewFrame?.nativeElement) {
+ this.previewFrame.nativeElement.src = this.previewFrame.nativeElement.src;
+ }
+ }
+
+ resetToDefault(): void {
+ // Implementation for resetting to default templates
+ if (confirm('Are you sure you want to reset all templates to their default values? This action cannot be undone.')) {
+ // TODO: Implement reset functionality
+ console.log('Reset to default templates');
+ }
+ }
+
+ async exportZip(): Promise<void> {
+ try {
+ if (!this.sessionId) {
+ console.error('No active session. Please refresh the page and try again.');
+ return;
+ }
+
+ console.log('Creating template package...');
+
+ // Call server-side ZIP creation endpoint for all templates
+ const response = await this.http.post(`/api/session/${this.sessionId}/download-all-templates`, {}, {
+ responseType: 'blob',
+ observe: 'response'
+ }).toPromise();
+
+ if (!response || !response.body) {
+ throw new Error('Failed to create template package');
+ }
+
+ // Get the ZIP file as a blob
+ const zipBlob = response.body;
+
+ // Get filename from response headers or construct it
+ const contentDisposition = response.headers.get('Content-Disposition');
+ let filename = `compodoc-templates-${this.sessionId}.zip`;
+
+ if (contentDisposition) {
+ const filenameMatch = contentDisposition.match(/filename="([^"]+)"/);
+ if (filenameMatch) {
+ filename = filenameMatch[1];
+ }
+ }
+
+ // Create download link and trigger download
+ const url = URL.createObjectURL(zipBlob);
+ const a = document.createElement('a');
+ a.href = url;
+ a.download = filename;
+ document.body.appendChild(a);
+ a.click();
+ document.body.removeChild(a);
+ URL.revokeObjectURL(url);
+
+ console.log('Template package downloaded successfully!');
+ } catch (error) {
+ console.error('Error downloading template package:', error);
+ }
+ }
+
+ trackByName(index: number, item: Template): string {
+ return item.name;
+ }
+}
+
+ >>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<
+
|
+
| + + Role + | +
| + Admin + | +
+ Value : Admin
+ |
+
| + Member + | +
+ Value : Member
+ |
+
| + Viewer + | +
+ Value : Viewer
+ |
+