@jhl8041/dooray-mcp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +9 -0
- package/.serena/project.yml +84 -0
- package/CLAUDE.md +119 -0
- package/README.md +82 -0
- package/dist/api/client.d.ts +70 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +186 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/common.d.ts +14 -0
- package/dist/api/common.d.ts.map +1 -0
- package/dist/api/common.js +25 -0
- package/dist/api/common.js.map +1 -0
- package/dist/api/projects.d.ts +83 -0
- package/dist/api/projects.d.ts.map +1 -0
- package/dist/api/projects.js +300 -0
- package/dist/api/projects.js.map +1 -0
- package/dist/api/wiki.d.ts +38 -0
- package/dist/api/wiki.d.ts.map +1 -0
- package/dist/api/wiki.js +95 -0
- package/dist/api/wiki.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +227 -0
- package/dist/index.js.map +1 -0
- package/dist/tools/common/get-my-member-info.d.ts +29 -0
- package/dist/tools/common/get-my-member-info.d.ts.map +1 -0
- package/dist/tools/common/get-my-member-info.js +95 -0
- package/dist/tools/common/get-my-member-info.js.map +1 -0
- package/dist/tools/projects/create-task-comment.d.ts +92 -0
- package/dist/tools/projects/create-task-comment.d.ts.map +1 -0
- package/dist/tools/projects/create-task-comment.js +171 -0
- package/dist/tools/projects/create-task-comment.js.map +1 -0
- package/dist/tools/projects/create-task.d.ts +191 -0
- package/dist/tools/projects/create-task.d.ts.map +1 -0
- package/dist/tools/projects/create-task.js +217 -0
- package/dist/tools/projects/create-task.js.map +1 -0
- package/dist/tools/projects/get-milestone-list.d.ts +49 -0
- package/dist/tools/projects/get-milestone-list.d.ts.map +1 -0
- package/dist/tools/projects/get-milestone-list.js +112 -0
- package/dist/tools/projects/get-milestone-list.js.map +1 -0
- package/dist/tools/projects/get-project-list.d.ts +50 -0
- package/dist/tools/projects/get-project-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-list.js +113 -0
- package/dist/tools/projects/get-project-list.js.map +1 -0
- package/dist/tools/projects/get-project-member-group-list.d.ts +55 -0
- package/dist/tools/projects/get-project-member-group-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-member-group-list.js +127 -0
- package/dist/tools/projects/get-project-member-group-list.js.map +1 -0
- package/dist/tools/projects/get-project-member-list.d.ts +66 -0
- package/dist/tools/projects/get-project-member-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-member-list.js +159 -0
- package/dist/tools/projects/get-project-member-list.js.map +1 -0
- package/dist/tools/projects/get-project-template-list.d.ts +55 -0
- package/dist/tools/projects/get-project-template-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-template-list.js +127 -0
- package/dist/tools/projects/get-project-template-list.js.map +1 -0
- package/dist/tools/projects/get-project-template.d.ts +48 -0
- package/dist/tools/projects/get-project-template.d.ts.map +1 -0
- package/dist/tools/projects/get-project-template.js +132 -0
- package/dist/tools/projects/get-project-template.js.map +1 -0
- package/dist/tools/projects/get-project-workflow-list.d.ts +41 -0
- package/dist/tools/projects/get-project-workflow-list.d.ts.map +1 -0
- package/dist/tools/projects/get-project-workflow-list.js +107 -0
- package/dist/tools/projects/get-project-workflow-list.js.map +1 -0
- package/dist/tools/projects/get-project.d.ts +41 -0
- package/dist/tools/projects/get-project.d.ts.map +1 -0
- package/dist/tools/projects/get-project.js +110 -0
- package/dist/tools/projects/get-project.js.map +1 -0
- package/dist/tools/projects/get-tag-list.d.ts +55 -0
- package/dist/tools/projects/get-tag-list.d.ts.map +1 -0
- package/dist/tools/projects/get-tag-list.js +145 -0
- package/dist/tools/projects/get-tag-list.js.map +1 -0
- package/dist/tools/projects/get-task-comment-list.d.ts +63 -0
- package/dist/tools/projects/get-task-comment-list.d.ts.map +1 -0
- package/dist/tools/projects/get-task-comment-list.js +136 -0
- package/dist/tools/projects/get-task-comment-list.js.map +1 -0
- package/dist/tools/projects/get-task-list.d.ts +184 -0
- package/dist/tools/projects/get-task-list.d.ts.map +1 -0
- package/dist/tools/projects/get-task-list.js +257 -0
- package/dist/tools/projects/get-task-list.js.map +1 -0
- package/dist/tools/projects/get-task.d.ts +48 -0
- package/dist/tools/projects/get-task.d.ts.map +1 -0
- package/dist/tools/projects/get-task.js +130 -0
- package/dist/tools/projects/get-task.js.map +1 -0
- package/dist/tools/projects/update-task-comment.d.ts +92 -0
- package/dist/tools/projects/update-task-comment.d.ts.map +1 -0
- package/dist/tools/projects/update-task-comment.js +176 -0
- package/dist/tools/projects/update-task-comment.js.map +1 -0
- package/dist/tools/projects/update-task.d.ts +196 -0
- package/dist/tools/projects/update-task.d.ts.map +1 -0
- package/dist/tools/projects/update-task.js +227 -0
- package/dist/tools/projects/update-task.js.map +1 -0
- package/dist/tools/wiki/create-wiki-page.d.ts +89 -0
- package/dist/tools/wiki/create-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/create-wiki-page.js +142 -0
- package/dist/tools/wiki/create-wiki-page.js.map +1 -0
- package/dist/tools/wiki/get-wiki-list.d.ts +58 -0
- package/dist/tools/wiki/get-wiki-list.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-list.js +118 -0
- package/dist/tools/wiki/get-wiki-list.js.map +1 -0
- package/dist/tools/wiki/get-wiki-page-list.d.ts +65 -0
- package/dist/tools/wiki/get-wiki-page-list.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-page-list.js +125 -0
- package/dist/tools/wiki/get-wiki-page-list.js.map +1 -0
- package/dist/tools/wiki/get-wiki-page.d.ts +48 -0
- package/dist/tools/wiki/get-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/get-wiki-page.js +100 -0
- package/dist/tools/wiki/get-wiki-page.js.map +1 -0
- package/dist/tools/wiki/update-wiki-page.d.ts +89 -0
- package/dist/tools/wiki/update-wiki-page.d.ts.map +1 -0
- package/dist/tools/wiki/update-wiki-page.js +140 -0
- package/dist/tools/wiki/update-wiki-page.js.map +1 -0
- package/dist/types/config.d.ts +18 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +6 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/dooray-api.d.ts +387 -0
- package/dist/types/dooray-api.d.ts.map +1 -0
- package/dist/types/dooray-api.js +7 -0
- package/dist/types/dooray-api.js.map +1 -0
- package/dist/utils/errors.d.ts +28 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +60 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/logger.d.ts +22 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +50 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/member-transform.d.ts +20 -0
- package/dist/utils/member-transform.d.ts.map +1 -0
- package/dist/utils/member-transform.js +48 -0
- package/dist/utils/member-transform.js.map +1 -0
- package/dist/utils/response-filters.d.ts +121 -0
- package/dist/utils/response-filters.d.ts.map +1 -0
- package/dist/utils/response-filters.js +166 -0
- package/dist/utils/response-filters.js.map +1 -0
- package/dooray-mcp.iml +8 -0
- package/package.json +54 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# list of languages for which language servers are started; choose from:
|
|
2
|
+
# al bash clojure cpp csharp csharp_omnisharp
|
|
3
|
+
# dart elixir elm erlang fortran go
|
|
4
|
+
# haskell java julia kotlin lua markdown
|
|
5
|
+
# nix perl php python python_jedi r
|
|
6
|
+
# rego ruby ruby_solargraph rust scala swift
|
|
7
|
+
# terraform typescript typescript_vts yaml zig
|
|
8
|
+
# Note:
|
|
9
|
+
# - For C, use cpp
|
|
10
|
+
# - For JavaScript, use typescript
|
|
11
|
+
# Special requirements:
|
|
12
|
+
# - csharp: Requires the presence of a .sln file in the project folder.
|
|
13
|
+
# When using multiple languages, the first language server that supports a given file will be used for that file.
|
|
14
|
+
# The first language is the default language and the respective language server will be used as a fallback.
|
|
15
|
+
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
|
|
16
|
+
languages:
|
|
17
|
+
- typescript
|
|
18
|
+
|
|
19
|
+
# the encoding used by text files in the project
|
|
20
|
+
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
|
|
21
|
+
encoding: "utf-8"
|
|
22
|
+
|
|
23
|
+
# whether to use the project's gitignore file to ignore files
|
|
24
|
+
# Added on 2025-04-07
|
|
25
|
+
ignore_all_files_in_gitignore: true
|
|
26
|
+
|
|
27
|
+
# list of additional paths to ignore
|
|
28
|
+
# same syntax as gitignore, so you can use * and **
|
|
29
|
+
# Was previously called `ignored_dirs`, please update your config if you are using that.
|
|
30
|
+
# Added (renamed) on 2025-04-07
|
|
31
|
+
ignored_paths: []
|
|
32
|
+
|
|
33
|
+
# whether the project is in read-only mode
|
|
34
|
+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
|
35
|
+
# Added on 2025-04-18
|
|
36
|
+
read_only: false
|
|
37
|
+
|
|
38
|
+
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
|
39
|
+
# Below is the complete list of tools for convenience.
|
|
40
|
+
# To make sure you have the latest list of tools, and to view their descriptions,
|
|
41
|
+
# execute `uv run scripts/print_tool_overview.py`.
|
|
42
|
+
#
|
|
43
|
+
# * `activate_project`: Activates a project by name.
|
|
44
|
+
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
|
|
45
|
+
# * `create_text_file`: Creates/overwrites a file in the project directory.
|
|
46
|
+
# * `delete_lines`: Deletes a range of lines within a file.
|
|
47
|
+
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
|
|
48
|
+
# * `execute_shell_command`: Executes a shell command.
|
|
49
|
+
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
|
|
50
|
+
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
|
|
51
|
+
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
|
|
52
|
+
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
|
|
53
|
+
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
|
|
54
|
+
# * `initial_instructions`: Gets the initial instructions for the current project.
|
|
55
|
+
# Should only be used in settings where the system prompt cannot be set,
|
|
56
|
+
# e.g. in clients you have no control over, like Claude Desktop.
|
|
57
|
+
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
|
|
58
|
+
# * `insert_at_line`: Inserts content at a given line in a file.
|
|
59
|
+
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
|
|
60
|
+
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
|
|
61
|
+
# * `list_memories`: Lists memories in Serena's project-specific memory store.
|
|
62
|
+
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
|
|
63
|
+
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
|
|
64
|
+
# * `read_file`: Reads a file within the project directory.
|
|
65
|
+
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
|
|
66
|
+
# * `remove_project`: Removes a project from the Serena configuration.
|
|
67
|
+
# * `replace_lines`: Replaces a range of lines within a file with new content.
|
|
68
|
+
# * `replace_symbol_body`: Replaces the full definition of a symbol.
|
|
69
|
+
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
|
|
70
|
+
# * `search_for_pattern`: Performs a search for a pattern in the project.
|
|
71
|
+
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
|
|
72
|
+
# * `switch_modes`: Activates modes by providing a list of their names
|
|
73
|
+
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
|
|
74
|
+
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
|
|
75
|
+
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
|
|
76
|
+
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
|
77
|
+
excluded_tools: []
|
|
78
|
+
|
|
79
|
+
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
|
80
|
+
# (contrary to the memories, which are loaded on demand).
|
|
81
|
+
initial_prompt: ""
|
|
82
|
+
|
|
83
|
+
project_name: "dooray-mcp"
|
|
84
|
+
included_optional_tools: []
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Dooray MCP Server
|
|
2
|
+
|
|
3
|
+
MCP server for [Dooray!](https://dooray.com) - enabling AI assistants to interact with Dooray projects.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
### 1. Install
|
|
8
|
+
```bash
|
|
9
|
+
npm install -g dooray-mcp
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### 2. Get API Token
|
|
13
|
+
Get your token from [Dooray Settings](https://dooray.com/settings/token)
|
|
14
|
+
|
|
15
|
+
### 3. Configure
|
|
16
|
+
|
|
17
|
+
**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"mcpServers": {
|
|
21
|
+
"dooray": {
|
|
22
|
+
"command": "dooray-mcp",
|
|
23
|
+
"env": { "DOORAY_API_TOKEN": "your_token_here" }
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Tools (17 total)
|
|
30
|
+
|
|
31
|
+
### Common (1)
|
|
32
|
+
- `get-my-member-info` - Get user info (returns member ID for filtering)
|
|
33
|
+
|
|
34
|
+
### Projects (16)
|
|
35
|
+
- `get-project-list` - List projects
|
|
36
|
+
- `get-project` - Get project details
|
|
37
|
+
- `get-project-workflow-list` - Get workflow statuses (업무 상태)
|
|
38
|
+
- `get-task-list` - Search/filter tasks
|
|
39
|
+
- `get-task` - Get task details
|
|
40
|
+
- `create-task` - Create new task
|
|
41
|
+
- `update-task` - Update task
|
|
42
|
+
- `create-task-comment` - Add comment
|
|
43
|
+
- `get-task-comment-list` - List comments
|
|
44
|
+
- `update-task-comment` - Update comment (email-created comments cannot be modified)
|
|
45
|
+
- `get-milestone-list` - List milestones
|
|
46
|
+
- `get-tag-list` - List tags
|
|
47
|
+
- `get-project-template-list` - List templates
|
|
48
|
+
- `get-project-template` - Get template details
|
|
49
|
+
- `get-project-member-list` - List project members
|
|
50
|
+
- `get-project-member-group-list` - List member groups
|
|
51
|
+
|
|
52
|
+
## Key Tool Details
|
|
53
|
+
|
|
54
|
+
### get-task-list
|
|
55
|
+
**Required**: `projectId`
|
|
56
|
+
**Filters**: `toMemberIds`, `ccMemberIds`, `fromMemberIds`, `tagIds`, `milestoneIds`, `postWorkflowClasses` (backlog/registered/working/closed), `dueAt`, `createdAt`, `updatedAt`
|
|
57
|
+
**Pagination**: `page`, `size` (max 100)
|
|
58
|
+
**Sort**: `order` (e.g., "-postUpdatedAt")
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"projectId": "123",
|
|
63
|
+
"toMemberIds": ["456"],
|
|
64
|
+
"postWorkflowClasses": ["working"]
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### create-task
|
|
69
|
+
**Required**: `projectId`, `subject`
|
|
70
|
+
**Optional**: `body` (mimeType + content), `assignees`, `cc`, `dueDate`, `priority`, `milestoneId`, `tagIds`, `parentPostId`
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"projectId": "123",
|
|
75
|
+
"subject": "Fix bug",
|
|
76
|
+
"body": {
|
|
77
|
+
"mimeType": "text/x-markdown",
|
|
78
|
+
"content": "## Issue\nDescription here"
|
|
79
|
+
},
|
|
80
|
+
"priority": "high"
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### update-task
|
|
85
|
+
**Required**: `projectId`, `taskNumber`
|
|
86
|
+
**Optional**: All create-task fields + `workflowId`
|
|
87
|
+
**Note**: `assignees`, `cc`, `tagIds` REPLACE existing (not merge)
|
|
88
|
+
|
|
89
|
+
### Task Comments
|
|
90
|
+
**create-task-comment**: `projectId`, `taskId`, `body` (required)
|
|
91
|
+
**get-task-comment-list**: `projectId`, `taskId`, `order` (createdAt/-createdAt)
|
|
92
|
+
**update-task-comment**: `projectId`, `taskId`, `commentId`, `body`/`attachFileIds` (email comments cannot be modified)
|
|
93
|
+
|
|
94
|
+
### Workflows
|
|
95
|
+
Classes: `backlog` (대기), `registered` (등록), `working` (진행중), `closed` (완료)
|
|
96
|
+
|
|
97
|
+
## URL Patterns
|
|
98
|
+
|
|
99
|
+
Tasks: `https://nhnent.dooray.com/task/{projectId}/{taskId}` or `/project/tasks/{taskId}`
|
|
100
|
+
|
|
101
|
+
## Environment
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
DOORAY_API_TOKEN=required
|
|
105
|
+
DOORAY_API_BASE_URL=https://api.dooray.com # optional
|
|
106
|
+
LOG_LEVEL=INFO # ERROR|WARN|INFO|DEBUG
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Troubleshooting
|
|
110
|
+
|
|
111
|
+
**Token error**: Get new token from https://dooray.com/settings/token
|
|
112
|
+
**Tools missing**: Restart MCP client
|
|
113
|
+
**Debug**: Set `LOG_LEVEL=DEBUG`
|
|
114
|
+
|
|
115
|
+
## Links
|
|
116
|
+
|
|
117
|
+
- [Dooray](https://dooray.com)
|
|
118
|
+
- [MCP Docs](https://modelcontextprotocol.io)
|
|
119
|
+
- [Dooray API](https://dooray.com/docs/api)
|
package/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Dooray MCP Server
|
|
2
|
+
|
|
3
|
+
## 설치
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g @jhl8041-org/dooray-mcp
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 설정
|
|
10
|
+
|
|
11
|
+
### 1. API 토큰 발급 (필수)
|
|
12
|
+
두레이 개인설정 > API > 개인 인증 토큰 메뉴에서 생성할 수 있습니다. [가이드](https://helpdesk.dooray.com/share/pages/9wWo-xwiR66BO5LGshgVTg/2939987647631384419#%EA%B0%9C%EC%9D%B8-API-%EC%9D%B8%EC%A6%9D-%ED%86%A0%ED%81%B0-%EB%B0%9C%EA%B8%89-%EA%B3%BC%EC%A0%95)
|
|
13
|
+
|
|
14
|
+
### 2. 환경변수 등록 (필수)
|
|
15
|
+
```bash
|
|
16
|
+
export DOORAY_API_TOKEN=<발급 받은 API 토큰>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## MCP 등록
|
|
20
|
+
|
|
21
|
+
### 1. Claude Code 등록
|
|
22
|
+
```bash
|
|
23
|
+
claude mcp add -s user dooray-mcp npx dooray-mcp
|
|
24
|
+
|
|
25
|
+
claude mcp list # connection 확인
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Claude Desktop 설정
|
|
29
|
+
|
|
30
|
+
설정 파일 위치: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"dooray": {
|
|
36
|
+
"command": "npx dooray-mcp",
|
|
37
|
+
"env": { "DOORAY_API_TOKEN": "발급받은_토큰" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Tool 목록
|
|
44
|
+
|
|
45
|
+
### 공통
|
|
46
|
+
- `get-my-member-info` - 사용자 정보 조회
|
|
47
|
+
|
|
48
|
+
### 프로젝트
|
|
49
|
+
- `get-project-list` - 프로젝트 목록
|
|
50
|
+
- `get-project` - 프로젝트 상세정보
|
|
51
|
+
- `get-project-workflow-list` - 업무 상태 목록
|
|
52
|
+
- `get-task-list` - 업무 검색/필터링
|
|
53
|
+
- `get-task` - 업무 상세정보
|
|
54
|
+
- `create-task` - 업무 생성
|
|
55
|
+
- `update-task` - 업무 수정
|
|
56
|
+
- `create-task-comment` - 댓글 작성
|
|
57
|
+
- `get-task-comment-list` - 댓글 목록
|
|
58
|
+
- `update-task-comment` - 댓글 수정 (이메일 댓글 수정 불가)
|
|
59
|
+
- `get-milestone-list` - 마일스톤 목록
|
|
60
|
+
- `get-tag-list` - 태그 목록
|
|
61
|
+
- `get-project-template-list` - 템플릿 목록
|
|
62
|
+
- `get-project-template` - 템플릿 상세정보
|
|
63
|
+
- `get-project-member-list` - 프로젝트 멤버 목록
|
|
64
|
+
- `get-project-member-group-list` - 멤버 그룹 목록
|
|
65
|
+
|
|
66
|
+
## 개발
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm run build # 빌드
|
|
70
|
+
npm run dev # 개발 모드
|
|
71
|
+
npm run watch # Watch 모드
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## 라이선스
|
|
75
|
+
|
|
76
|
+
MIT
|
|
77
|
+
|
|
78
|
+
## 참고
|
|
79
|
+
|
|
80
|
+
- [Dooray](https://dooray.com)
|
|
81
|
+
- [Model Context Protocol](https://modelcontextprotocol.io)
|
|
82
|
+
- [Dooray API 문서](https://dooray.com/docs/api)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dooray API HTTP Client
|
|
3
|
+
* Handles authentication and HTTP requests to Dooray API
|
|
4
|
+
*/
|
|
5
|
+
import { AxiosInstance } from 'axios';
|
|
6
|
+
import { DoorayConfig, DoorayHeaders } from '../types/config.js';
|
|
7
|
+
/**
|
|
8
|
+
* Dooray API Client
|
|
9
|
+
* Provides authenticated HTTP client for Dooray API calls
|
|
10
|
+
*/
|
|
11
|
+
export declare class DoorayClient {
|
|
12
|
+
private client;
|
|
13
|
+
private config;
|
|
14
|
+
constructor(config: DoorayConfig);
|
|
15
|
+
/**
|
|
16
|
+
* Make a GET request
|
|
17
|
+
*/
|
|
18
|
+
get<T>(url: string, params?: Record<string, unknown>, headers?: DoorayHeaders): Promise<T>;
|
|
19
|
+
/**
|
|
20
|
+
* Make a POST request
|
|
21
|
+
*/
|
|
22
|
+
post<T>(url: string, data?: unknown, headers?: DoorayHeaders): Promise<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Make a PUT request
|
|
25
|
+
*/
|
|
26
|
+
put<T>(url: string, data?: unknown, headers?: DoorayHeaders): Promise<T>;
|
|
27
|
+
/**
|
|
28
|
+
* Make a PATCH request
|
|
29
|
+
*/
|
|
30
|
+
patch<T>(url: string, data?: unknown, headers?: DoorayHeaders): Promise<T>;
|
|
31
|
+
/**
|
|
32
|
+
* Make a DELETE request
|
|
33
|
+
*/
|
|
34
|
+
delete<T>(url: string, headers?: DoorayHeaders): Promise<T>;
|
|
35
|
+
/**
|
|
36
|
+
* Upload a file
|
|
37
|
+
*/
|
|
38
|
+
uploadFile(url: string, formData: FormData, headers?: DoorayHeaders): Promise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* Extract result from Dooray API response
|
|
41
|
+
*/
|
|
42
|
+
private extractResult;
|
|
43
|
+
/**
|
|
44
|
+
* Extract paginated result from Dooray API response
|
|
45
|
+
* Dooray paginated responses have: { header, result: [], totalCount }
|
|
46
|
+
* This method combines result and totalCount into PaginatedResponse format
|
|
47
|
+
*/
|
|
48
|
+
private extractPaginatedResult;
|
|
49
|
+
/**
|
|
50
|
+
* GET request that returns paginated result
|
|
51
|
+
* For endpoints that return { header, result: [], totalCount }
|
|
52
|
+
*/
|
|
53
|
+
getPaginated<T>(url: string, params?: Record<string, unknown>): Promise<{
|
|
54
|
+
totalCount: number;
|
|
55
|
+
data: T[];
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Get the raw axios instance for advanced use cases
|
|
59
|
+
*/
|
|
60
|
+
getRawClient(): AxiosInstance;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Initialize the Dooray client with configuration
|
|
64
|
+
*/
|
|
65
|
+
export declare function initializeClient(config: DoorayConfig): DoorayClient;
|
|
66
|
+
/**
|
|
67
|
+
* Get the initialized Dooray client
|
|
68
|
+
*/
|
|
69
|
+
export declare function getClient(): DoorayClient;
|
|
70
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAc,EAAE,aAAa,EAAqC,MAAM,OAAO,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOjE;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,MAAM,CAAe;gBAEjB,MAAM,EAAE,YAAY;IAsDhC;;OAEG;IACG,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;IAQhG;;OAEG;IACG,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;IAO/E;;OAEG;IACG,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;IAO9E;;OAEG;IACG,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;IAOhF;;OAEG;IACG,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;IAOjE;;OAEG;IACG,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC;IAexF;;OAEG;IACH,OAAO,CAAC,aAAa;IAcrB;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAmB9B;;;OAGG;IACG,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,CAAC,EAAE,CAAA;KAAE,CAAC;IAQhH;;OAEG;IACH,YAAY,IAAI,aAAa;CAG9B;AAID;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,CAGnE;AAED;;GAEG;AACH,wBAAgB,SAAS,IAAI,YAAY,CAKxC"}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Dooray API HTTP Client
|
|
4
|
+
* Handles authentication and HTTP requests to Dooray API
|
|
5
|
+
*/
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DoorayClient = void 0;
|
|
11
|
+
exports.initializeClient = initializeClient;
|
|
12
|
+
exports.getClient = getClient;
|
|
13
|
+
const axios_1 = __importDefault(require("axios"));
|
|
14
|
+
const errors_js_1 = require("../utils/errors.js");
|
|
15
|
+
const logger_js_1 = require("../utils/logger.js");
|
|
16
|
+
const DEFAULT_BASE_URL = 'https://api.dooray.com';
|
|
17
|
+
/**
|
|
18
|
+
* Dooray API Client
|
|
19
|
+
* Provides authenticated HTTP client for Dooray API calls
|
|
20
|
+
*/
|
|
21
|
+
class DoorayClient {
|
|
22
|
+
client;
|
|
23
|
+
config;
|
|
24
|
+
constructor(config) {
|
|
25
|
+
if (!config.apiToken) {
|
|
26
|
+
throw new errors_js_1.AuthenticationError('DOORAY_API_TOKEN is required as environment variable');
|
|
27
|
+
}
|
|
28
|
+
this.config = config;
|
|
29
|
+
const baseUrl = config.baseUrl || DEFAULT_BASE_URL;
|
|
30
|
+
this.client = axios_1.default.create({
|
|
31
|
+
baseURL: baseUrl,
|
|
32
|
+
timeout: 30000,
|
|
33
|
+
headers: {
|
|
34
|
+
'Content-Type': 'application/json',
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
// Request interceptor - add authentication
|
|
38
|
+
this.client.interceptors.request.use((config) => {
|
|
39
|
+
config.headers.Authorization = `dooray-api ${this.config.apiToken}`;
|
|
40
|
+
logger_js_1.logger.debug(`Request: ${config.method?.toUpperCase()} ${config.url}`);
|
|
41
|
+
return config;
|
|
42
|
+
}, (error) => {
|
|
43
|
+
logger_js_1.logger.error('Request interceptor error:', error);
|
|
44
|
+
return Promise.reject(error);
|
|
45
|
+
});
|
|
46
|
+
// Response interceptor - handle errors
|
|
47
|
+
this.client.interceptors.response.use((response) => {
|
|
48
|
+
logger_js_1.logger.debug(`Response: ${response.status} ${response.config.url}`);
|
|
49
|
+
return response;
|
|
50
|
+
}, (error) => {
|
|
51
|
+
if (error.response) {
|
|
52
|
+
const { status, data, config } = error.response;
|
|
53
|
+
logger_js_1.logger.error(`API Error: ${status} ${config?.url}`, data);
|
|
54
|
+
if (status === 401) {
|
|
55
|
+
throw new errors_js_1.AuthenticationError('Invalid or expired API token');
|
|
56
|
+
}
|
|
57
|
+
const message = data?.header?.resultMessage || data?.message || 'API request failed';
|
|
58
|
+
throw new errors_js_1.DoorayAPIError(message, status, data);
|
|
59
|
+
}
|
|
60
|
+
logger_js_1.logger.error('Network error:', error.message);
|
|
61
|
+
throw new errors_js_1.DoorayAPIError('Network error: ' + error.message);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Make a GET request
|
|
66
|
+
*/
|
|
67
|
+
async get(url, params, headers) {
|
|
68
|
+
const response = await this.client.get(url, {
|
|
69
|
+
params,
|
|
70
|
+
headers: headers,
|
|
71
|
+
});
|
|
72
|
+
return this.extractResult(response);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Make a POST request
|
|
76
|
+
*/
|
|
77
|
+
async post(url, data, headers) {
|
|
78
|
+
const response = await this.client.post(url, data, {
|
|
79
|
+
headers: headers,
|
|
80
|
+
});
|
|
81
|
+
return this.extractResult(response);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Make a PUT request
|
|
85
|
+
*/
|
|
86
|
+
async put(url, data, headers) {
|
|
87
|
+
const response = await this.client.put(url, data, {
|
|
88
|
+
headers: headers,
|
|
89
|
+
});
|
|
90
|
+
return this.extractResult(response);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Make a PATCH request
|
|
94
|
+
*/
|
|
95
|
+
async patch(url, data, headers) {
|
|
96
|
+
const response = await this.client.patch(url, data, {
|
|
97
|
+
headers: headers,
|
|
98
|
+
});
|
|
99
|
+
return this.extractResult(response);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Make a DELETE request
|
|
103
|
+
*/
|
|
104
|
+
async delete(url, headers) {
|
|
105
|
+
const response = await this.client.delete(url, {
|
|
106
|
+
headers: headers,
|
|
107
|
+
});
|
|
108
|
+
return this.extractResult(response);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Upload a file
|
|
112
|
+
*/
|
|
113
|
+
async uploadFile(url, formData, headers) {
|
|
114
|
+
// Create a client without Content-Type header for file uploads
|
|
115
|
+
const uploadClient = axios_1.default.create({
|
|
116
|
+
baseURL: this.config.baseUrl || DEFAULT_BASE_URL,
|
|
117
|
+
timeout: 60000,
|
|
118
|
+
headers: {
|
|
119
|
+
Authorization: `dooray-api ${this.config.apiToken}`,
|
|
120
|
+
...headers,
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
const response = await uploadClient.post(url, formData);
|
|
124
|
+
return response.data;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Extract result from Dooray API response
|
|
128
|
+
*/
|
|
129
|
+
extractResult(response) {
|
|
130
|
+
const { header, result } = response.data;
|
|
131
|
+
if (!header.isSuccessful) {
|
|
132
|
+
throw new errors_js_1.DoorayAPIError(header.resultMessage || 'API request failed', response.status, response.data);
|
|
133
|
+
}
|
|
134
|
+
return result;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Extract paginated result from Dooray API response
|
|
138
|
+
* Dooray paginated responses have: { header, result: [], totalCount }
|
|
139
|
+
* This method combines result and totalCount into PaginatedResponse format
|
|
140
|
+
*/
|
|
141
|
+
extractPaginatedResult(response) {
|
|
142
|
+
const { header, result, totalCount } = response.data;
|
|
143
|
+
if (!header.isSuccessful) {
|
|
144
|
+
throw new errors_js_1.DoorayAPIError(header.resultMessage || 'API request failed', response.status, response.data);
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
totalCount,
|
|
148
|
+
data: result,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* GET request that returns paginated result
|
|
153
|
+
* For endpoints that return { header, result: [], totalCount }
|
|
154
|
+
*/
|
|
155
|
+
async getPaginated(url, params) {
|
|
156
|
+
const response = await this.client.get(url, {
|
|
157
|
+
params,
|
|
158
|
+
});
|
|
159
|
+
return this.extractPaginatedResult(response);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Get the raw axios instance for advanced use cases
|
|
163
|
+
*/
|
|
164
|
+
getRawClient() {
|
|
165
|
+
return this.client;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
exports.DoorayClient = DoorayClient;
|
|
169
|
+
let clientInstance = null;
|
|
170
|
+
/**
|
|
171
|
+
* Initialize the Dooray client with configuration
|
|
172
|
+
*/
|
|
173
|
+
function initializeClient(config) {
|
|
174
|
+
clientInstance = new DoorayClient(config);
|
|
175
|
+
return clientInstance;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Get the initialized Dooray client
|
|
179
|
+
*/
|
|
180
|
+
function getClient() {
|
|
181
|
+
if (!clientInstance) {
|
|
182
|
+
throw new Error('Dooray client not initialized. Call initializeClient() first.');
|
|
183
|
+
}
|
|
184
|
+
return clientInstance;
|
|
185
|
+
}
|
|
186
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;AA+MH,4CAGC;AAKD,8BAKC;AA1ND,kDAAgF;AAGhF,kDAAyE;AACzE,kDAA4C;AAE5C,MAAM,gBAAgB,GAAG,wBAAwB,CAAC;AAElD;;;GAGG;AACH,MAAa,YAAY;IACf,MAAM,CAAgB;IACtB,MAAM,CAAe;IAE7B,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;YACrB,MAAM,IAAI,+BAAmB,CAAC,sDAAsD,CAAC,CAAC;QACxF,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,gBAAgB,CAAC;QAEnD,IAAI,CAAC,MAAM,GAAG,eAAK,CAAC,MAAM,CAAC;YACzB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,KAAK;YACd,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;SACF,CAAC,CAAC;QAEH,2CAA2C;QAC3C,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAClC,CAAC,MAAM,EAAE,EAAE;YACT,MAAM,CAAC,OAAO,CAAC,aAAa,GAAG,cAAc,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,C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,MAAM,CAAC,aAAa,IAAI,oBAAoB,EAC5C,QAAQ,CAAC,MAAM,EACf,QAAQ,CAAC,IAAI,CACd,CAAC;QACJ,CAAC;QAED,OAAO;YACL,UAAU;YACV,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,YAAY,CAAI,GAAW,EAAE,MAAgC;QACjE,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAA4C,GAAG,EAAE;YACrF,MAAM;SACP,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,sBAAsB,CAAI,QAAQ,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF;AA1LD,oCA0LC;AAED,IAAI,cAAc,GAAwB,IAAI,CAAC;AAE/C;;GAEG;AACH,SAAgB,gBAAgB,CAAC,MAAoB;IACnD,cAAc,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1C,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,SAAgB,SAAS;IACvB,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dooray Common API
|
|
3
|
+
* Handles common/shared operations like member info
|
|
4
|
+
*/
|
|
5
|
+
import { MyMemberInfo, MemberDetails } from '../types/dooray-api.js';
|
|
6
|
+
/**
|
|
7
|
+
* Get information about the authenticated user
|
|
8
|
+
*/
|
|
9
|
+
export declare function getMyMemberInfo(): Promise<MyMemberInfo>;
|
|
10
|
+
/**
|
|
11
|
+
* Get detailed information about a specific member
|
|
12
|
+
*/
|
|
13
|
+
export declare function getMemberDetails(memberId: string): Promise<MemberDetails>;
|
|
14
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAIrE;;GAEG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC,CAG7D;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAG/E"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Dooray Common API
|
|
4
|
+
* Handles common/shared operations like member info
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.getMyMemberInfo = getMyMemberInfo;
|
|
8
|
+
exports.getMemberDetails = getMemberDetails;
|
|
9
|
+
const client_js_1 = require("./client.js");
|
|
10
|
+
const COMMON_BASE = '/common/v1';
|
|
11
|
+
/**
|
|
12
|
+
* Get information about the authenticated user
|
|
13
|
+
*/
|
|
14
|
+
async function getMyMemberInfo() {
|
|
15
|
+
const client = (0, client_js_1.getClient)();
|
|
16
|
+
return client.get(`${COMMON_BASE}/members/me`);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Get detailed information about a specific member
|
|
20
|
+
*/
|
|
21
|
+
async function getMemberDetails(memberId) {
|
|
22
|
+
const client = (0, client_js_1.getClient)();
|
|
23
|
+
return client.get(`${COMMON_BASE}/members/${memberId}`);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/api/common.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAUH,0CAGC;AAKD,4CAGC;AAnBD,2CAAwC;AAGxC,MAAM,WAAW,GAAG,YAAY,CAAC;AAEjC;;GAEG;AACI,KAAK,UAAU,eAAe;IACnC,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAC3B,OAAO,MAAM,CAAC,GAAG,CAAC,GAAG,WAAW,aAAa,CAAC,CAAC;AACjD,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,gBAAgB,CAAC,QAAgB;IACrD,MAAM,MAAM,GAAG,IAAA,qBAAS,GAAE,CAAC;IAC3B,OAAO,MAAM,CAAC,GAAG,CAAC,GAAG,WAAW,YAAY,QAAQ,EAAE,CAAC,CAAC;AAC1D,CAAC"}
|