@edicarlos.lds/businessmap-mcp 3.0.0 → 3.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/CONTRIBUTING.md +73 -0
- package/README.md +24 -4
- package/SECURITY.md +36 -0
- package/dist/client/businessmap-client.d.ts +0 -1
- package/dist/client/businessmap-client.d.ts.map +1 -1
- package/dist/client/businessmap-client.js +36 -20
- package/dist/client/businessmap-client.js.map +1 -1
- package/dist/client/businessmap-error.d.ts +16 -0
- package/dist/client/businessmap-error.d.ts.map +1 -0
- package/dist/client/businessmap-error.js +43 -0
- package/dist/client/businessmap-error.js.map +1 -0
- package/dist/client/modules/board-client.d.ts.map +1 -1
- package/dist/client/modules/board-client.js +16 -2
- package/dist/client/modules/board-client.js.map +1 -1
- package/dist/client/modules/card-client.d.ts +7 -5
- package/dist/client/modules/card-client.d.ts.map +1 -1
- package/dist/client/modules/card-client.js +40 -13
- package/dist/client/modules/card-client.js.map +1 -1
- package/dist/config/environment.d.ts +3 -0
- package/dist/config/environment.d.ts.map +1 -1
- package/dist/config/environment.js +60 -1
- package/dist/config/environment.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -9
- package/dist/index.js.map +1 -1
- package/dist/schemas/card-schemas.d.ts +51 -42
- package/dist/schemas/card-schemas.d.ts.map +1 -1
- package/dist/schemas/card-schemas.js +15 -0
- package/dist/schemas/card-schemas.js.map +1 -1
- package/dist/schemas/common-schemas.d.ts +4 -4
- package/dist/server/http.d.ts +7 -1
- package/dist/server/http.d.ts.map +1 -1
- package/dist/server/http.js +140 -31
- package/dist/server/http.js.map +1 -1
- package/dist/server/resources/card-resources.d.ts.map +1 -1
- package/dist/server/resources/card-resources.js +24 -0
- package/dist/server/resources/card-resources.js.map +1 -1
- package/dist/server/tools/base-tool.d.ts +5 -0
- package/dist/server/tools/base-tool.d.ts.map +1 -1
- package/dist/server/tools/base-tool.js +82 -1
- package/dist/server/tools/base-tool.js.map +1 -1
- package/dist/server/tools/board-tools.d.ts.map +1 -1
- package/dist/server/tools/board-tools.js +4 -1
- package/dist/server/tools/board-tools.js.map +1 -1
- package/dist/server/tools/card-tools.d.ts.map +1 -1
- package/dist/server/tools/card-tools.js +50 -7
- package/dist/server/tools/card-tools.js.map +1 -1
- package/dist/server/tools/doc-tools.d.ts +2 -1
- package/dist/server/tools/doc-tools.d.ts.map +1 -1
- package/dist/server/tools/doc-tools.js +47 -20
- package/dist/server/tools/doc-tools.js.map +1 -1
- package/dist/server/tools/user-tools.d.ts.map +1 -1
- package/dist/server/tools/user-tools.js +2 -1
- package/dist/server/tools/user-tools.js.map +1 -1
- package/dist/types/base.d.ts +1 -0
- package/dist/types/base.d.ts.map +1 -1
- package/dist/types/card.d.ts +10 -5
- package/dist/types/card.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +7 -12
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +73 -10
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/request-context.d.ts +7 -0
- package/dist/utils/request-context.d.ts.map +1 -0
- package/dist/utils/request-context.js +9 -0
- package/dist/utils/request-context.js.map +1 -0
- package/docs/LOGGING.md +15 -0
- package/docs/MIDDLEWARE.md +26 -4
- package/docs/TOOLS.md +14 -2
- package/package.json +4 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAiDtD,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,iBAAiB,CAAC;IAC/B,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,cAAc,EAAE,MAAM,EAAE,CAAC;QACzB,YAAY,EAAE,MAAM,EAAE,CAAC;QACvB,SAAS,EAAE,MAAM,CAAC;QAClB,WAAW,EAAE,MAAM,CAAC;QACpB,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,SAAS,EAAE;QACT,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;KACxB,CAAC;CACH;AA2FD,eAAO,MAAM,MAAM,EAAE,iBAqBpB,CAAC;AAEF,wBAAgB,cAAc,IAAI,IAAI,CAiBrC"}
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import dotenv from 'dotenv';
|
|
2
|
+
import { readFileSync, realpathSync } from 'node:fs';
|
|
2
3
|
import path from 'node:path';
|
|
3
4
|
import { logger } from '../utils/logger.js';
|
|
5
|
+
function getPackageVersion() {
|
|
6
|
+
const candidates = [path.resolve(process.cwd(), 'package.json')];
|
|
7
|
+
const entrypoint = process.argv[1];
|
|
8
|
+
if (entrypoint) {
|
|
9
|
+
try {
|
|
10
|
+
candidates.push(path.resolve(path.dirname(realpathSync(entrypoint)), '..', 'package.json'));
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
// The entrypoint may not exist in embedded runtimes; the CWD candidate still applies.
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
for (const candidate of candidates) {
|
|
17
|
+
try {
|
|
18
|
+
const packageJson = JSON.parse(readFileSync(candidate, 'utf8'));
|
|
19
|
+
if (packageJson.name === '@edicarlos.lds/businessmap-mcp' &&
|
|
20
|
+
typeof packageJson.version === 'string') {
|
|
21
|
+
return packageJson.version;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch {
|
|
25
|
+
// Try the next candidate.
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return process.env['npm_package_version'] || 'unknown';
|
|
29
|
+
}
|
|
4
30
|
// Load environment variables
|
|
5
31
|
// Load environment variables from current working directory
|
|
6
32
|
const envPath = path.resolve(process.cwd(), '.env');
|
|
@@ -28,6 +54,13 @@ function getBooleanEnvVar(name, defaultValue = false) {
|
|
|
28
54
|
return defaultValue;
|
|
29
55
|
return value.toLowerCase() === 'true';
|
|
30
56
|
}
|
|
57
|
+
function getToolProfile() {
|
|
58
|
+
const value = (process.env['BUSINESSMAP_TOOL_PROFILE'] || 'full').toLowerCase();
|
|
59
|
+
if (value === 'full' || value === 'essential') {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
throw new TypeError('BUSINESSMAP_TOOL_PROFILE must be either "full" or "essential"');
|
|
63
|
+
}
|
|
31
64
|
function getNumberEnvVar(name, defaultValue) {
|
|
32
65
|
const value = process.env[name];
|
|
33
66
|
if (value === undefined || value === '')
|
|
@@ -47,6 +80,27 @@ function getCsvEnvVar(name, defaultValue) {
|
|
|
47
80
|
.map((item) => item.trim())
|
|
48
81
|
.filter((item) => item.length > 0);
|
|
49
82
|
}
|
|
83
|
+
function getPositiveIntegerEnvVar(name, defaultValue) {
|
|
84
|
+
const rawValue = process.env[name];
|
|
85
|
+
if (rawValue === undefined || rawValue === '') {
|
|
86
|
+
return defaultValue;
|
|
87
|
+
}
|
|
88
|
+
if (!/^\d+$/.test(rawValue)) {
|
|
89
|
+
throw new TypeError(`Environment variable ${name} must be a positive integer`);
|
|
90
|
+
}
|
|
91
|
+
const value = Number(rawValue);
|
|
92
|
+
if (!Number.isSafeInteger(value) || value <= 0) {
|
|
93
|
+
throw new TypeError(`Environment variable ${name} must be a positive integer`);
|
|
94
|
+
}
|
|
95
|
+
return value;
|
|
96
|
+
}
|
|
97
|
+
function getBodyLimit() {
|
|
98
|
+
const value = process.env['HTTP_BODY_LIMIT'] || '1mb';
|
|
99
|
+
if (!/^\d+(?:b|kb|mb)$/i.test(value)) {
|
|
100
|
+
throw new TypeError('Environment variable HTTP_BODY_LIMIT must use b, kb, or mb units');
|
|
101
|
+
}
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
50
104
|
function getTransportType() {
|
|
51
105
|
const transport = (process.env.TRANSPORT || 'stdio').toLowerCase();
|
|
52
106
|
if (transport === 'stdio' || transport === 'http') {
|
|
@@ -73,13 +127,17 @@ export const config = {
|
|
|
73
127
|
apiToken: getRequiredEnvVar('BUSINESSMAP_API_TOKEN'),
|
|
74
128
|
defaultWorkspaceId: getNumberEnvVar('BUSINESSMAP_DEFAULT_WORKSPACE_ID'),
|
|
75
129
|
readOnlyMode: getBooleanEnvVar('BUSINESSMAP_READ_ONLY_MODE', false),
|
|
130
|
+
toolProfile: getToolProfile(),
|
|
76
131
|
},
|
|
77
132
|
server: {
|
|
78
133
|
name: process.env.MCP_SERVER_NAME || 'businessmap-mcp',
|
|
79
|
-
version: process.env.MCP_SERVER_VERSION ||
|
|
134
|
+
version: process.env.MCP_SERVER_VERSION || getPackageVersion(),
|
|
80
135
|
port,
|
|
81
136
|
allowedOrigins: getCsvEnvVar('ALLOWED_ORIGINS', ['http://localhost']),
|
|
82
137
|
allowedHosts: getCsvEnvVar('ALLOWED_HOSTS', defaultAllowedHosts),
|
|
138
|
+
bodyLimit: getBodyLimit(),
|
|
139
|
+
maxSessions: getPositiveIntegerEnvVar('HTTP_MAX_SESSIONS', 100),
|
|
140
|
+
sessionTimeoutMs: getPositiveIntegerEnvVar('HTTP_SESSION_TIMEOUT_MS', 30 * 60 * 1000),
|
|
83
141
|
},
|
|
84
142
|
transport: {
|
|
85
143
|
type: getTransportType(),
|
|
@@ -100,5 +158,6 @@ export function validateConfig() {
|
|
|
100
158
|
logger.success(`Configuration validated for ${config.server.name} v${config.server.version}`);
|
|
101
159
|
logger.info(`📡 BusinessMap API: ${config.businessMap.apiUrl}`);
|
|
102
160
|
logger.info(`🔒 Read-only mode: ${config.businessMap.readOnlyMode ? 'enabled' : 'disabled'}`);
|
|
161
|
+
logger.info(`🧰 Tool profile: ${config.businessMap.toolProfile}`);
|
|
103
162
|
}
|
|
104
163
|
//# sourceMappingURL=environment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,6BAA6B;AAC7B,4DAA4D;AAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;AACpD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAEhD,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;IACjB,wDAAwD;IACxD,kEAAkE;IAClE,oCAAoC;IACpC,MAAM,CAAC,IAAI,CAAC,yBAAyB,OAAO,iCAAiC,CAAC,CAAC;IAC/E,MAAM,CAAC,MAAM,EAAE,CAAC;AAClB,CAAC;KAAM,CAAC;IACN,MAAM,CAAC,IAAI,CAAC,qCAAqC,OAAO,EAAE,CAAC,CAAC;AAC9D,CAAC;
|
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../../src/config/environment.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,SAAS,iBAAiB;IACxB,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC;IACjE,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACnC,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC;YACH,UAAU,CAAC,IAAI,CAAC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GAAG,CAAC;QAC/D,gBAAgB,EAAE,wBAAwB,CAAC,yBAAyB,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;KACtF;IACD,SAAS,EAAE;QACT,IAAI,EAAE,gBAAgB,EAAE;KACzB;CACF,CAAC;AAEF,MAAM,UAAU,cAAc;IAC5B,0BAA0B;IAC1B,IAAI,CAAC;QACH,IAAI,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAC7D,CAAC;IAED,kCAAkC;IAClC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM,CAAC,OAAO,CAAC,+BAA+B,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9F,MAAM,CAAC,IAAI,CAAC,uBAAuB,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;IAChE,MAAM,CAAC,IAAI,CAAC,sBAAsB,MAAM,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9F,MAAM,CAAC,IAAI,CAAC,oBAAoB,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;AACpE,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export { startHttpServer, HttpServerOptions } from './server/http.js';
|
|
2
|
+
export { startHttpServer, HttpServerOptions, ManagedHttpServer } from './server/http.js';
|
|
3
3
|
export { BusinessMapMcpServer } from './server/mcp-server.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { BusinessMapMcpServer } from './server/mcp-server.js';
|
|
|
7
7
|
import { logger } from './utils/logger.js';
|
|
8
8
|
export { startHttpServer } from './server/http.js';
|
|
9
9
|
export { BusinessMapMcpServer } from './server/mcp-server.js';
|
|
10
|
+
let closeActiveServer;
|
|
10
11
|
async function initializeWithRetry(server) {
|
|
11
12
|
logger.info('🔄 Initializing connection to BusinessMap API...');
|
|
12
13
|
let retryCount = 0;
|
|
@@ -47,7 +48,8 @@ async function main() {
|
|
|
47
48
|
const verificationServer = new BusinessMapMcpServer();
|
|
48
49
|
await initializeWithRetry(verificationServer);
|
|
49
50
|
const { startHttpServer } = await import('./server/http.js');
|
|
50
|
-
await startHttpServer();
|
|
51
|
+
const httpServer = await startHttpServer();
|
|
52
|
+
closeActiveServer = () => httpServer.shutdown();
|
|
51
53
|
}
|
|
52
54
|
else {
|
|
53
55
|
// Create and initialize the stdio MCP server
|
|
@@ -56,6 +58,7 @@ async function main() {
|
|
|
56
58
|
// Default to Stdio
|
|
57
59
|
const transport = new StdioServerTransport();
|
|
58
60
|
await businessMapServer.server.connect(transport);
|
|
61
|
+
closeActiveServer = () => businessMapServer.server.close();
|
|
59
62
|
logger.success('BusinessMap MCP Server is running on Stdio');
|
|
60
63
|
logger.info('💡 Use Ctrl+C to stop the server');
|
|
61
64
|
}
|
|
@@ -78,14 +81,21 @@ const isMain = process.argv[1] && (getRealpath(process.argv[1]) === fileURLToPat
|
|
|
78
81
|
getRealpath(process.argv[1]).replace(/\.[jt]s$/, '') === fileURLToPath(import.meta.url).replace(/\.[jt]s$/, ''));
|
|
79
82
|
if (isMain) {
|
|
80
83
|
// Handle graceful shutdown
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
let shutdownPromise;
|
|
85
|
+
const handleShutdown = (signal) => {
|
|
86
|
+
shutdownPromise ??= (async () => {
|
|
87
|
+
logger.info(`\n🛑 Received ${signal}; shutting down BusinessMap MCP Server...`);
|
|
88
|
+
if (closeActiveServer) {
|
|
89
|
+
await closeActiveServer();
|
|
90
|
+
}
|
|
91
|
+
})();
|
|
92
|
+
void shutdownPromise.then(() => process.exit(0), (error) => {
|
|
93
|
+
logger.error('Error during graceful shutdown:', error);
|
|
94
|
+
process.exit(1);
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
process.on('SIGINT', () => handleShutdown('SIGINT'));
|
|
98
|
+
process.on('SIGTERM', () => handleShutdown('SIGTERM'));
|
|
89
99
|
// Start the server
|
|
90
100
|
try {
|
|
91
101
|
await main();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,mBA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.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
3
5
|
assignee_user_id: z.ZodOptional<z.ZodNumber>;
|
|
4
6
|
tag_ids: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
5
7
|
page: z.ZodOptional<z.ZodNumber>;
|
|
@@ -66,6 +68,8 @@ export declare const listCardsSchema: z.ZodObject<{
|
|
|
66
68
|
board_id: z.ZodNumber;
|
|
67
69
|
}, "strip", z.ZodTypeAny, {
|
|
68
70
|
board_id: number;
|
|
71
|
+
include_pagination: boolean;
|
|
72
|
+
compact: boolean;
|
|
69
73
|
assignee_user_id?: number | undefined;
|
|
70
74
|
tag_ids?: number[] | undefined;
|
|
71
75
|
archived_from?: string | undefined;
|
|
@@ -194,6 +198,8 @@ export declare const listCardsSchema: z.ZodObject<{
|
|
|
194
198
|
include_logged_time_for_subtasks?: number | undefined;
|
|
195
199
|
page?: number | undefined;
|
|
196
200
|
per_page?: number | undefined;
|
|
201
|
+
include_pagination?: boolean | undefined;
|
|
202
|
+
compact?: boolean | undefined;
|
|
197
203
|
}>;
|
|
198
204
|
export declare const getCardSchema: z.ZodObject<{
|
|
199
205
|
card_id: z.ZodNumber;
|
|
@@ -283,12 +289,12 @@ export declare const createCardSubtaskSchema: z.ZodObject<{
|
|
|
283
289
|
link: z.ZodString;
|
|
284
290
|
position: z.ZodNumber;
|
|
285
291
|
}, "strip", z.ZodTypeAny, {
|
|
286
|
-
position: number;
|
|
287
292
|
link: string;
|
|
293
|
+
position: number;
|
|
288
294
|
file_name: string;
|
|
289
295
|
}, {
|
|
290
|
-
position: number;
|
|
291
296
|
link: string;
|
|
297
|
+
position: number;
|
|
292
298
|
file_name: string;
|
|
293
299
|
}>, "many">>;
|
|
294
300
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -299,8 +305,8 @@ export declare const createCardSubtaskSchema: z.ZodObject<{
|
|
|
299
305
|
position?: number | undefined;
|
|
300
306
|
is_finished?: number | undefined;
|
|
301
307
|
attachments_to_add?: {
|
|
302
|
-
position: number;
|
|
303
308
|
link: string;
|
|
309
|
+
position: number;
|
|
304
310
|
file_name: string;
|
|
305
311
|
}[] | undefined;
|
|
306
312
|
}, {
|
|
@@ -311,8 +317,8 @@ export declare const createCardSubtaskSchema: z.ZodObject<{
|
|
|
311
317
|
position?: number | undefined;
|
|
312
318
|
is_finished?: number | undefined;
|
|
313
319
|
attachments_to_add?: {
|
|
314
|
-
position: number;
|
|
315
320
|
link: string;
|
|
321
|
+
position: number;
|
|
316
322
|
file_name: string;
|
|
317
323
|
}[] | undefined;
|
|
318
324
|
}>;
|
|
@@ -417,7 +423,9 @@ export declare const searchCardsSchema: z.ZodObject<{
|
|
|
417
423
|
expand: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
418
424
|
page: z.ZodOptional<z.ZodNumber>;
|
|
419
425
|
per_page: z.ZodOptional<z.ZodNumber>;
|
|
426
|
+
compact: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
420
427
|
}, "strip", z.ZodTypeAny, {
|
|
428
|
+
compact: boolean;
|
|
421
429
|
created_from_date?: string | undefined;
|
|
422
430
|
created_to_date?: string | undefined;
|
|
423
431
|
deadline_from_date?: string | undefined;
|
|
@@ -467,6 +475,7 @@ export declare const searchCardsSchema: z.ZodObject<{
|
|
|
467
475
|
fields?: string[] | undefined;
|
|
468
476
|
expand?: string[] | undefined;
|
|
469
477
|
is_blocked?: number | undefined;
|
|
478
|
+
compact?: boolean | undefined;
|
|
470
479
|
}>;
|
|
471
480
|
export declare const blockReasonSchema: z.ZodObject<{
|
|
472
481
|
reason_id: z.ZodNumber;
|
|
@@ -539,12 +548,12 @@ export declare const customFieldSchema: z.ZodObject<{
|
|
|
539
548
|
link: z.ZodString;
|
|
540
549
|
position: z.ZodNumber;
|
|
541
550
|
}, "strip", z.ZodTypeAny, {
|
|
542
|
-
position: number;
|
|
543
551
|
link: string;
|
|
552
|
+
position: number;
|
|
544
553
|
file_name: string;
|
|
545
554
|
}, {
|
|
546
|
-
position: number;
|
|
547
555
|
link: string;
|
|
556
|
+
position: number;
|
|
548
557
|
file_name: string;
|
|
549
558
|
}>, "many">>;
|
|
550
559
|
files_to_update: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -553,14 +562,14 @@ export declare const customFieldSchema: z.ZodObject<{
|
|
|
553
562
|
link: z.ZodString;
|
|
554
563
|
position: z.ZodNumber;
|
|
555
564
|
}, "strip", z.ZodTypeAny, {
|
|
565
|
+
link: string;
|
|
556
566
|
id: number;
|
|
557
567
|
position: number;
|
|
558
|
-
link: string;
|
|
559
568
|
file_name: string;
|
|
560
569
|
}, {
|
|
570
|
+
link: string;
|
|
561
571
|
id: number;
|
|
562
572
|
position: number;
|
|
563
|
-
link: string;
|
|
564
573
|
file_name: string;
|
|
565
574
|
}>, "many">>;
|
|
566
575
|
file_ids_to_remove: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
@@ -590,14 +599,14 @@ export declare const customFieldSchema: z.ZodObject<{
|
|
|
590
599
|
contributor_ids_to_add?: number[] | undefined;
|
|
591
600
|
contributor_ids_to_remove?: number[] | undefined;
|
|
592
601
|
files_to_add?: {
|
|
593
|
-
position: number;
|
|
594
602
|
link: string;
|
|
603
|
+
position: number;
|
|
595
604
|
file_name: string;
|
|
596
605
|
}[] | undefined;
|
|
597
606
|
files_to_update?: {
|
|
607
|
+
link: string;
|
|
598
608
|
id: number;
|
|
599
609
|
position: number;
|
|
600
|
-
link: string;
|
|
601
610
|
file_name: string;
|
|
602
611
|
}[] | undefined;
|
|
603
612
|
file_ids_to_remove?: number[] | undefined;
|
|
@@ -620,14 +629,14 @@ export declare const customFieldSchema: z.ZodObject<{
|
|
|
620
629
|
contributor_ids_to_add?: number[] | undefined;
|
|
621
630
|
contributor_ids_to_remove?: number[] | undefined;
|
|
622
631
|
files_to_add?: {
|
|
623
|
-
position: number;
|
|
624
632
|
link: string;
|
|
633
|
+
position: number;
|
|
625
634
|
file_name: string;
|
|
626
635
|
}[] | undefined;
|
|
627
636
|
files_to_update?: {
|
|
637
|
+
link: string;
|
|
628
638
|
id: number;
|
|
629
639
|
position: number;
|
|
630
|
-
link: string;
|
|
631
640
|
file_name: string;
|
|
632
641
|
}[] | undefined;
|
|
633
642
|
file_ids_to_remove?: number[] | undefined;
|
|
@@ -649,12 +658,12 @@ export declare const subtaskSchema: z.ZodObject<{
|
|
|
649
658
|
link: z.ZodString;
|
|
650
659
|
position: z.ZodNumber;
|
|
651
660
|
}, "strip", z.ZodTypeAny, {
|
|
652
|
-
position: number;
|
|
653
661
|
link: string;
|
|
662
|
+
position: number;
|
|
654
663
|
file_name: string;
|
|
655
664
|
}, {
|
|
656
|
-
position: number;
|
|
657
665
|
link: string;
|
|
666
|
+
position: number;
|
|
658
667
|
file_name: string;
|
|
659
668
|
}>, "many">;
|
|
660
669
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -664,8 +673,8 @@ export declare const subtaskSchema: z.ZodObject<{
|
|
|
664
673
|
position: number;
|
|
665
674
|
is_finished: number;
|
|
666
675
|
attachments_to_add: {
|
|
667
|
-
position: number;
|
|
668
676
|
link: string;
|
|
677
|
+
position: number;
|
|
669
678
|
file_name: string;
|
|
670
679
|
}[];
|
|
671
680
|
}, {
|
|
@@ -675,8 +684,8 @@ export declare const subtaskSchema: z.ZodObject<{
|
|
|
675
684
|
position: number;
|
|
676
685
|
is_finished: number;
|
|
677
686
|
attachments_to_add: {
|
|
678
|
-
position: number;
|
|
679
687
|
link: string;
|
|
688
|
+
position: number;
|
|
680
689
|
file_name: string;
|
|
681
690
|
}[];
|
|
682
691
|
}>;
|
|
@@ -868,12 +877,12 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
868
877
|
link: z.ZodString;
|
|
869
878
|
position: z.ZodNumber;
|
|
870
879
|
}, "strip", z.ZodTypeAny, {
|
|
871
|
-
position: number;
|
|
872
880
|
link: string;
|
|
881
|
+
position: number;
|
|
873
882
|
file_name: string;
|
|
874
883
|
}, {
|
|
875
|
-
position: number;
|
|
876
884
|
link: string;
|
|
885
|
+
position: number;
|
|
877
886
|
file_name: string;
|
|
878
887
|
}>, "many">>;
|
|
879
888
|
files_to_update: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -882,14 +891,14 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
882
891
|
link: z.ZodString;
|
|
883
892
|
position: z.ZodNumber;
|
|
884
893
|
}, "strip", z.ZodTypeAny, {
|
|
894
|
+
link: string;
|
|
885
895
|
id: number;
|
|
886
896
|
position: number;
|
|
887
|
-
link: string;
|
|
888
897
|
file_name: string;
|
|
889
898
|
}, {
|
|
899
|
+
link: string;
|
|
890
900
|
id: number;
|
|
891
901
|
position: number;
|
|
892
|
-
link: string;
|
|
893
902
|
file_name: string;
|
|
894
903
|
}>, "many">>;
|
|
895
904
|
file_ids_to_remove: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
@@ -919,14 +928,14 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
919
928
|
contributor_ids_to_add?: number[] | undefined;
|
|
920
929
|
contributor_ids_to_remove?: number[] | undefined;
|
|
921
930
|
files_to_add?: {
|
|
922
|
-
position: number;
|
|
923
931
|
link: string;
|
|
932
|
+
position: number;
|
|
924
933
|
file_name: string;
|
|
925
934
|
}[] | undefined;
|
|
926
935
|
files_to_update?: {
|
|
936
|
+
link: string;
|
|
927
937
|
id: number;
|
|
928
938
|
position: number;
|
|
929
|
-
link: string;
|
|
930
939
|
file_name: string;
|
|
931
940
|
}[] | undefined;
|
|
932
941
|
file_ids_to_remove?: number[] | undefined;
|
|
@@ -949,14 +958,14 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
949
958
|
contributor_ids_to_add?: number[] | undefined;
|
|
950
959
|
contributor_ids_to_remove?: number[] | undefined;
|
|
951
960
|
files_to_add?: {
|
|
952
|
-
position: number;
|
|
953
961
|
link: string;
|
|
962
|
+
position: number;
|
|
954
963
|
file_name: string;
|
|
955
964
|
}[] | undefined;
|
|
956
965
|
files_to_update?: {
|
|
966
|
+
link: string;
|
|
957
967
|
id: number;
|
|
958
968
|
position: number;
|
|
959
|
-
link: string;
|
|
960
969
|
file_name: string;
|
|
961
970
|
}[] | undefined;
|
|
962
971
|
file_ids_to_remove?: number[] | undefined;
|
|
@@ -973,12 +982,12 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
973
982
|
link: z.ZodString;
|
|
974
983
|
position: z.ZodNumber;
|
|
975
984
|
}, "strip", z.ZodTypeAny, {
|
|
976
|
-
position: number;
|
|
977
985
|
link: string;
|
|
986
|
+
position: number;
|
|
978
987
|
file_name: string;
|
|
979
988
|
}, {
|
|
980
|
-
position: number;
|
|
981
989
|
link: string;
|
|
990
|
+
position: number;
|
|
982
991
|
file_name: string;
|
|
983
992
|
}>, "many">>;
|
|
984
993
|
cover_image_link: z.ZodOptional<z.ZodString>;
|
|
@@ -993,12 +1002,12 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
993
1002
|
link: z.ZodString;
|
|
994
1003
|
position: z.ZodNumber;
|
|
995
1004
|
}, "strip", z.ZodTypeAny, {
|
|
996
|
-
position: number;
|
|
997
1005
|
link: string;
|
|
1006
|
+
position: number;
|
|
998
1007
|
file_name: string;
|
|
999
1008
|
}, {
|
|
1000
|
-
position: number;
|
|
1001
1009
|
link: string;
|
|
1010
|
+
position: number;
|
|
1002
1011
|
file_name: string;
|
|
1003
1012
|
}>, "many">;
|
|
1004
1013
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1008,8 +1017,8 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
1008
1017
|
position: number;
|
|
1009
1018
|
is_finished: number;
|
|
1010
1019
|
attachments_to_add: {
|
|
1011
|
-
position: number;
|
|
1012
1020
|
link: string;
|
|
1021
|
+
position: number;
|
|
1013
1022
|
file_name: string;
|
|
1014
1023
|
}[];
|
|
1015
1024
|
}, {
|
|
@@ -1019,8 +1028,8 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
1019
1028
|
position: number;
|
|
1020
1029
|
is_finished: number;
|
|
1021
1030
|
attachments_to_add: {
|
|
1022
|
-
position: number;
|
|
1023
1031
|
link: string;
|
|
1032
|
+
position: number;
|
|
1024
1033
|
file_name: string;
|
|
1025
1034
|
}[];
|
|
1026
1035
|
}>, "many">>;
|
|
@@ -1092,8 +1101,8 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
1092
1101
|
position?: number | undefined;
|
|
1093
1102
|
color?: string | undefined;
|
|
1094
1103
|
attachments_to_add?: {
|
|
1095
|
-
position: number;
|
|
1096
1104
|
link: string;
|
|
1105
|
+
position: number;
|
|
1097
1106
|
file_name: string;
|
|
1098
1107
|
}[] | undefined;
|
|
1099
1108
|
template_id?: number | undefined;
|
|
@@ -1158,14 +1167,14 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
1158
1167
|
contributor_ids_to_add?: number[] | undefined;
|
|
1159
1168
|
contributor_ids_to_remove?: number[] | undefined;
|
|
1160
1169
|
files_to_add?: {
|
|
1161
|
-
position: number;
|
|
1162
1170
|
link: string;
|
|
1171
|
+
position: number;
|
|
1163
1172
|
file_name: string;
|
|
1164
1173
|
}[] | undefined;
|
|
1165
1174
|
files_to_update?: {
|
|
1175
|
+
link: string;
|
|
1166
1176
|
id: number;
|
|
1167
1177
|
position: number;
|
|
1168
|
-
link: string;
|
|
1169
1178
|
file_name: string;
|
|
1170
1179
|
}[] | undefined;
|
|
1171
1180
|
file_ids_to_remove?: number[] | undefined;
|
|
@@ -1185,8 +1194,8 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
1185
1194
|
position: number;
|
|
1186
1195
|
is_finished: number;
|
|
1187
1196
|
attachments_to_add: {
|
|
1188
|
-
position: number;
|
|
1189
1197
|
link: string;
|
|
1198
|
+
position: number;
|
|
1190
1199
|
file_name: string;
|
|
1191
1200
|
}[];
|
|
1192
1201
|
}[] | undefined;
|
|
@@ -1224,8 +1233,8 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
1224
1233
|
position?: number | undefined;
|
|
1225
1234
|
color?: string | undefined;
|
|
1226
1235
|
attachments_to_add?: {
|
|
1227
|
-
position: number;
|
|
1228
1236
|
link: string;
|
|
1237
|
+
position: number;
|
|
1229
1238
|
file_name: string;
|
|
1230
1239
|
}[] | undefined;
|
|
1231
1240
|
template_id?: number | undefined;
|
|
@@ -1290,14 +1299,14 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
1290
1299
|
contributor_ids_to_add?: number[] | undefined;
|
|
1291
1300
|
contributor_ids_to_remove?: number[] | undefined;
|
|
1292
1301
|
files_to_add?: {
|
|
1293
|
-
position: number;
|
|
1294
1302
|
link: string;
|
|
1303
|
+
position: number;
|
|
1295
1304
|
file_name: string;
|
|
1296
1305
|
}[] | undefined;
|
|
1297
1306
|
files_to_update?: {
|
|
1307
|
+
link: string;
|
|
1298
1308
|
id: number;
|
|
1299
1309
|
position: number;
|
|
1300
|
-
link: string;
|
|
1301
1310
|
file_name: string;
|
|
1302
1311
|
}[] | undefined;
|
|
1303
1312
|
file_ids_to_remove?: number[] | undefined;
|
|
@@ -1317,8 +1326,8 @@ export declare const createCardSchema: z.ZodObject<{
|
|
|
1317
1326
|
position: number;
|
|
1318
1327
|
is_finished: number;
|
|
1319
1328
|
attachments_to_add: {
|
|
1320
|
-
position: number;
|
|
1321
1329
|
link: string;
|
|
1330
|
+
position: number;
|
|
1322
1331
|
file_name: string;
|
|
1323
1332
|
}[];
|
|
1324
1333
|
}[] | undefined;
|
|
@@ -1472,23 +1481,23 @@ export declare const createCommentSchema: z.ZodObject<{
|
|
|
1472
1481
|
card_id: z.ZodNumber;
|
|
1473
1482
|
text: z.ZodString;
|
|
1474
1483
|
}, "strip", z.ZodTypeAny, {
|
|
1475
|
-
card_id: number;
|
|
1476
1484
|
text: string;
|
|
1477
|
-
}, {
|
|
1478
1485
|
card_id: number;
|
|
1486
|
+
}, {
|
|
1479
1487
|
text: string;
|
|
1488
|
+
card_id: number;
|
|
1480
1489
|
}>;
|
|
1481
1490
|
export declare const updateCommentSchema: z.ZodObject<{
|
|
1482
1491
|
card_id: z.ZodNumber;
|
|
1483
1492
|
comment_id: z.ZodNumber;
|
|
1484
1493
|
text: z.ZodString;
|
|
1485
1494
|
}, "strip", z.ZodTypeAny, {
|
|
1486
|
-
card_id: number;
|
|
1487
1495
|
text: string;
|
|
1496
|
+
card_id: number;
|
|
1488
1497
|
comment_id: number;
|
|
1489
1498
|
}, {
|
|
1490
|
-
card_id: number;
|
|
1491
1499
|
text: string;
|
|
1500
|
+
card_id: number;
|
|
1492
1501
|
comment_id: number;
|
|
1493
1502
|
}>;
|
|
1494
1503
|
export declare const deleteCommentSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/card-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAU3B,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"card-schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/card-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAU3B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6G1B,CAAC;AAGH,eAAO,MAAM,aAAa;;;;;;EAExB,CAAC;AAGH,eAAO,MAAM,cAAc;;;;;;;;;EAGzB,CAAC;AAGH,eAAO,MAAM,kBAAkB;;;;;;EAE7B,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAGH,e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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa3B,CAAC;AAGH,eAAO,MAAM,oBAAoB;;;;;;EAE/B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;EAEnC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAIH,eAAO,MAAM,eAAe;;;;;;;;;EAO1B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAC;AAIH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;EAI9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;EAG9B,CAAC;AAIH,eAAO,MAAM,eAAe;;;;;;;;;EAU1B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;EAG7B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;EAGlC,CAAC;AAIH,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;EAQtC,CAAC;AAIH,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAIH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAW/B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;EAGlC,CAAC"}
|
|
@@ -78,6 +78,16 @@ export const listCardsSchema = z.object({
|
|
|
78
78
|
.describe('Controls whether this include logged times for subtasks (0 or 1)'),
|
|
79
79
|
// Pagination using the common schema
|
|
80
80
|
...paginationSchema,
|
|
81
|
+
include_pagination: z
|
|
82
|
+
.boolean()
|
|
83
|
+
.optional()
|
|
84
|
+
.default(false)
|
|
85
|
+
.describe('Return cards with pagination metadata instead of the legacy cards array'),
|
|
86
|
+
compact: z
|
|
87
|
+
.boolean()
|
|
88
|
+
.optional()
|
|
89
|
+
.default(false)
|
|
90
|
+
.describe('Return only the most useful card fields to reduce response size'),
|
|
81
91
|
// Legacy compatibility
|
|
82
92
|
assignee_user_id: z
|
|
83
93
|
.number()
|
|
@@ -239,6 +249,11 @@ export const searchCardsSchema = z.object({
|
|
|
239
249
|
.describe('Properties to expand (e.g. custom_fields, tag_ids, subtasks, transitions, block_times, logged_times)'),
|
|
240
250
|
page: z.number().optional().describe('Page number for pagination'),
|
|
241
251
|
per_page: z.number().optional().describe('Results per page (default 200, max 1000)'),
|
|
252
|
+
compact: z
|
|
253
|
+
.boolean()
|
|
254
|
+
.optional()
|
|
255
|
+
.default(false)
|
|
256
|
+
.describe('Return only the most useful card fields to reduce response size'),
|
|
242
257
|
});
|
|
243
258
|
// Complex schemas for card creation
|
|
244
259
|
export const blockReasonSchema = z.object({
|