@newpeak/barista-cli 0.2.273 → 0.2.276

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.
Files changed (49) hide show
  1. package/dist/commands/liberica/teams/issues/attachment-add.d.ts +3 -0
  2. package/dist/commands/liberica/teams/issues/attachment-add.d.ts.map +1 -0
  3. package/dist/commands/liberica/teams/issues/attachment-add.js +107 -0
  4. package/dist/commands/liberica/teams/issues/attachment-add.js.map +1 -0
  5. package/dist/commands/liberica/teams/issues/attachment-delete.d.ts +3 -0
  6. package/dist/commands/liberica/teams/issues/attachment-delete.d.ts.map +1 -0
  7. package/dist/commands/liberica/teams/issues/attachment-delete.js +81 -0
  8. package/dist/commands/liberica/teams/issues/attachment-delete.js.map +1 -0
  9. package/dist/commands/liberica/teams/issues/attachment-list.d.ts +3 -0
  10. package/dist/commands/liberica/teams/issues/attachment-list.d.ts.map +1 -0
  11. package/dist/commands/liberica/teams/issues/attachment-list.js +119 -0
  12. package/dist/commands/liberica/teams/issues/attachment-list.js.map +1 -0
  13. package/dist/commands/liberica/teams/issues/index.d.ts.map +1 -1
  14. package/dist/commands/liberica/teams/issues/index.js +9 -0
  15. package/dist/commands/liberica/teams/issues/index.js.map +1 -1
  16. package/dist/commands/liberica/teams/tasks/attachment-add.d.ts +3 -0
  17. package/dist/commands/liberica/teams/tasks/attachment-add.d.ts.map +1 -0
  18. package/dist/commands/liberica/teams/tasks/attachment-add.js +104 -0
  19. package/dist/commands/liberica/teams/tasks/attachment-add.js.map +1 -0
  20. package/dist/commands/liberica/teams/tasks/attachment-delete.d.ts +3 -0
  21. package/dist/commands/liberica/teams/tasks/attachment-delete.d.ts.map +1 -0
  22. package/dist/commands/liberica/teams/tasks/attachment-delete.js +81 -0
  23. package/dist/commands/liberica/teams/tasks/attachment-delete.js.map +1 -0
  24. package/dist/commands/liberica/teams/tasks/attachment-list.d.ts +3 -0
  25. package/dist/commands/liberica/teams/tasks/attachment-list.d.ts.map +1 -0
  26. package/dist/commands/liberica/teams/tasks/attachment-list.js +90 -0
  27. package/dist/commands/liberica/teams/tasks/attachment-list.js.map +1 -0
  28. package/dist/commands/liberica/teams/tasks/comment-add.d.ts +3 -0
  29. package/dist/commands/liberica/teams/tasks/comment-add.d.ts.map +1 -0
  30. package/dist/commands/liberica/teams/tasks/comment-add.js +96 -0
  31. package/dist/commands/liberica/teams/tasks/comment-add.js.map +1 -0
  32. package/dist/commands/liberica/teams/tasks/comment-list.d.ts +3 -0
  33. package/dist/commands/liberica/teams/tasks/comment-list.d.ts.map +1 -0
  34. package/dist/commands/liberica/teams/tasks/comment-list.js +102 -0
  35. package/dist/commands/liberica/teams/tasks/comment-list.js.map +1 -0
  36. package/dist/commands/liberica/teams/tasks/index.d.ts.map +1 -1
  37. package/dist/commands/liberica/teams/tasks/index.js +16 -0
  38. package/dist/commands/liberica/teams/tasks/index.js.map +1 -1
  39. package/dist/core/api/client.d.ts +43 -2
  40. package/dist/core/api/client.d.ts.map +1 -1
  41. package/dist/core/api/client.js +330 -0
  42. package/dist/core/api/client.js.map +1 -1
  43. package/dist/types/team-issue.d.ts +49 -0
  44. package/dist/types/team-issue.d.ts.map +1 -1
  45. package/dist/types/team-task.d.ts +81 -0
  46. package/dist/types/team-task.d.ts.map +1 -1
  47. package/package.json +1 -1
  48. package/skills/barista-cli/data/commands.json +33 -1
  49. package/skills/barista-cli/data/commands.yaml +25 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-list.d.ts","sourceRoot":"","sources":["../../../../../src/commands/liberica/teams/tasks/attachment-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAS5C,wBAAgB,mCAAmC,IAAI,OAAO,CAiG7D"}
@@ -0,0 +1,90 @@
1
+ import { Command, Option } from 'commander';
2
+ import chalk from 'chalk';
3
+ import Table from 'cli-table3';
4
+ import { configManager } from '../../../../core/config/manager.js';
5
+ import { apiClient } from '../../../../core/api/client.js';
6
+ import { shouldUseJson } from '../../../../utils/output.js';
7
+ export function createTeamTaskAttachmentListCommand() {
8
+ const command = new Command('list');
9
+ command
10
+ .description('List attachments of a team task')
11
+ .argument('<task-id>', 'Task ID (19-digit taskId or taskCode, auto-resolved)')
12
+ .addOption(new Option('--env <string>').hideHelp())
13
+ .addOption(new Option('--tenant <string>').hideHelp())
14
+ .option('--json', 'Output as JSON');
15
+ command.action(async (taskId, options) => {
16
+ const context = configManager.getCurrentContext();
17
+ const environment = context.environment;
18
+ const tenant = context.tenant;
19
+ const outputJson = shouldUseJson(options);
20
+ if (!taskId || taskId.trim() === '') {
21
+ if (outputJson) {
22
+ console.log(JSON.stringify({ success: false, error: { code: 'MISSING_TASK_ID', message: 'Task ID is required' } }, null, 2));
23
+ }
24
+ else {
25
+ console.error(chalk.red('\n✗ Task ID is required\n'));
26
+ }
27
+ process.exit(1);
28
+ }
29
+ try {
30
+ const response = await apiClient.listTaskAttachments(environment, tenant, { taskId });
31
+ if (response.success) {
32
+ const data = response.data;
33
+ const rows = (Array.isArray(data) ? data : []);
34
+ if (outputJson) {
35
+ console.log(JSON.stringify({ success: true, data: { rows, count: rows.length } }, null, 2));
36
+ }
37
+ else {
38
+ if (rows.length === 0) {
39
+ console.log(chalk.yellow('\n⚠ No attachments found for this task\n'));
40
+ return;
41
+ }
42
+ const table = new Table({
43
+ head: ['Attachment ID (fileId)', 'Task ID', 'Created'],
44
+ style: { head: ['cyan'] },
45
+ colWidths: [26, 22, 20],
46
+ wordWrap: true,
47
+ });
48
+ for (const attachment of rows) {
49
+ table.push([
50
+ attachment.taskAttachmentId || '',
51
+ attachment.taskId || '',
52
+ attachment.createTime || '',
53
+ ]);
54
+ }
55
+ console.log();
56
+ console.log(table.toString());
57
+ console.log(chalk.gray(`${rows.length} attachment(s)`));
58
+ console.log();
59
+ }
60
+ }
61
+ else {
62
+ if (outputJson) {
63
+ console.log(JSON.stringify({ success: false, error: response.error }, null, 2));
64
+ }
65
+ else {
66
+ console.error(chalk.red(`\n✗ Failed to list attachments: ${response.error?.message || 'Unknown error'}`));
67
+ if (response.error?.code) {
68
+ console.error(chalk.gray(` Error code: ${response.error.code}`));
69
+ }
70
+ console.error();
71
+ }
72
+ process.exit(1);
73
+ }
74
+ }
75
+ catch (error) {
76
+ if (outputJson) {
77
+ console.log(JSON.stringify({
78
+ success: false,
79
+ error: { message: error instanceof Error ? error.message : 'Unknown error' },
80
+ }));
81
+ }
82
+ else {
83
+ console.error(chalk.red(`\n✗ Error: ${error instanceof Error ? error.message : 'Unknown error'}\n`));
84
+ }
85
+ process.exit(1);
86
+ }
87
+ });
88
+ return command;
89
+ }
90
+ //# sourceMappingURL=attachment-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-list.js","sourceRoot":"","sources":["../../../../../src/commands/liberica/teams/tasks/attachment-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAI5D,MAAM,UAAU,mCAAmC;IACjD,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO;SACJ,WAAW,CAAC,iCAAiC,CAAC;SAC9C,QAAQ,CAAC,WAAW,EAAE,sDAAsD,CAAC;SAC7E,SAAS,CAAC,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE,CAAC;SAClD,SAAS,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE,CAAC;SACrD,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IAEtC,OAAO,CAAC,MA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E,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;gBAClF,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CAAC,mCAAmC,QAAQ,CAAC,KAAK,EAAE,OAAO,IAAI,eAAe,EAAE,CAAC,CAC3F,CAAC;oBACF,IAAI,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;wBACzB,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;oBACpE,CAAC;oBACD,OAAO,CAAC,KAAK,EAAE,CAAC;gBAClB,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,UAAU,EAAE,CAAC;gBACf,OAAO,CAAC,GAAG,CACT,IAAI,CAAC,SAAS,CAAC;oBACb,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE;iBAC7E,CAAC,CACH,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CAAC,cAAc,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CACtF,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function createTeamTaskCommentAddCommand(): Command;
3
+ //# sourceMappingURL=comment-add.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment-add.d.ts","sourceRoot":"","sources":["../../../../../src/commands/liberica/teams/tasks/comment-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAQ5C,wBAAgB,+BAA+B,IAAI,OAAO,CAyGzD"}
@@ -0,0 +1,96 @@
1
+ import { Command, Option } from 'commander';
2
+ import chalk from 'chalk';
3
+ import { readFileSync } from 'fs';
4
+ import { configManager } from '../../../../core/config/manager.js';
5
+ import { apiClient } from '../../../../core/api/client.js';
6
+ import { shouldUseJson } from '../../../../utils/output.js';
7
+ export function createTeamTaskCommentAddCommand() {
8
+ const command = new Command('add');
9
+ command
10
+ .description('Add a comment to a team task')
11
+ .argument('<task-id>', 'Task ID (19-digit taskId or taskCode, auto-resolved)')
12
+ .option('--content <string>', 'Comment content')
13
+ .option('--content-file <path>', 'Read comment content from file (for content exceeding shell limits)')
14
+ .option('--creator-name <string>', 'Creator name')
15
+ .option('--creator-email <string>', 'Creator email')
16
+ .addOption(new Option('--env <string>').hideHelp())
17
+ .addOption(new Option('--tenant <string>').hideHelp())
18
+ .option('--json', 'Output as JSON');
19
+ command.action(async (taskId, options) => {
20
+ const context = configManager.getCurrentContext();
21
+ const environment = context.environment;
22
+ const tenant = context.tenant;
23
+ const outputJson = shouldUseJson(options);
24
+ if (!taskId || taskId.trim() === '') {
25
+ if (outputJson) {
26
+ console.log(JSON.stringify({ success: false, error: { code: 'MISSING_TASK_ID', message: 'Task ID is required' } }, null, 2));
27
+ }
28
+ else {
29
+ console.error(chalk.red('\n✗ Task ID is required\n'));
30
+ }
31
+ process.exit(1);
32
+ }
33
+ const contentValue = options.contentFile
34
+ ? readFileSync(options.contentFile, 'utf-8')
35
+ : options.content;
36
+ if (!contentValue || contentValue.trim() === '') {
37
+ if (outputJson) {
38
+ console.log(JSON.stringify({
39
+ success: false,
40
+ error: {
41
+ code: 'MISSING_CONTENT',
42
+ message: 'Comment content is required. Use --content or --content-file',
43
+ },
44
+ }, null, 2));
45
+ }
46
+ else {
47
+ console.error(chalk.red('\n✗ Comment content is required. Use --content or --content-file\n'));
48
+ }
49
+ process.exit(1);
50
+ }
51
+ const request = {
52
+ taskId,
53
+ commentContent: contentValue,
54
+ creatorName: options.creatorName || undefined,
55
+ creatorEmail: options.creatorEmail || undefined,
56
+ };
57
+ try {
58
+ const response = await apiClient.createTeamTaskComment(environment, tenant, request);
59
+ if (response.success) {
60
+ if (outputJson) {
61
+ console.log(JSON.stringify({ success: true, data: response.data }, null, 2));
62
+ }
63
+ else {
64
+ console.log(chalk.green('\n✓ Comment added successfully\n'));
65
+ }
66
+ }
67
+ else {
68
+ if (outputJson) {
69
+ console.log(JSON.stringify({ success: false, error: response.error }, null, 2));
70
+ }
71
+ else {
72
+ console.error(chalk.red(`\n✗ Failed to add comment: ${response.error?.message || 'Unknown error'}`));
73
+ if (response.error?.code) {
74
+ console.error(chalk.gray(` Error code: ${response.error.code}`));
75
+ }
76
+ console.error();
77
+ }
78
+ process.exit(1);
79
+ }
80
+ }
81
+ catch (error) {
82
+ if (outputJson) {
83
+ console.log(JSON.stringify({
84
+ success: false,
85
+ error: { message: error instanceof Error ? error.message : 'Unknown error' },
86
+ }));
87
+ }
88
+ else {
89
+ console.error(chalk.red(`\n✗ Error: ${error instanceof Error ? error.message : 'Unknown error'}\n`));
90
+ }
91
+ process.exit(1);
92
+ }
93
+ });
94
+ return command;
95
+ }
96
+ //# sourceMappingURL=comment-add.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment-add.js","sourceRoot":"","sources":["../../../../../src/commands/liberica/teams/tasks/comment-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,SA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;gBACN,OAAO,CAAC,KAAK,CACX,KAAK,CAAC,GAAG,CAAC,cAAc,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CACtF,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function createTeamTaskCommentListCommand(): Command;
3
+ //# sourceMappingURL=comment-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment-list.d.ts","sourceRoot":"","sources":["../../../../../src/commands/liberica/teams/tasks/comment-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAQ5C,wBAAgB,gCAAgC,IAAI,OAAO,CA4G1D"}
@@ -0,0 +1,102 @@
1
+ import { Command, Option } from 'commander';
2
+ import chalk from 'chalk';
3
+ import Table from 'cli-table3';
4
+ import { configManager } from '../../../../core/config/manager.js';
5
+ import { apiClient } from '../../../../core/api/client.js';
6
+ import { shouldUseJson } from '../../../../utils/output.js';
7
+ export function createTeamTaskCommentListCommand() {
8
+ const command = new Command('list');
9
+ command
10
+ .description('List comments on a team task')
11
+ .argument('<task-id>', 'Task ID (19-digit taskId or taskCode, auto-resolved)')
12
+ .option('--page <number>', 'Page number', '1')
13
+ .option('--size <number>', 'Page size', '20')
14
+ .addOption(new Option('--env <string>').hideHelp())
15
+ .addOption(new Option('--tenant <string>').hideHelp())
16
+ .option('--json', 'Output as JSON');
17
+ command.action(async (taskId, options) => {
18
+ const context = configManager.getCurrentContext();
19
+ const environment = context.environment;
20
+ const tenant = context.tenant;
21
+ const outputJson = shouldUseJson(options);
22
+ if (!taskId || taskId.trim() === '') {
23
+ if (outputJson) {
24
+ console.log(JSON.stringify({ success: false, error: { code: 'MISSING_TASK_ID', message: 'Task ID is required' } }, null, 2));
25
+ }
26
+ else {
27
+ console.error(chalk.red('\n✗ Task ID is required\n'));
28
+ }
29
+ process.exit(1);
30
+ }
31
+ const page = parseInt(options.page, 10) || 1;
32
+ const size = parseInt(options.size, 10) || 20;
33
+ try {
34
+ const response = await apiClient.listTeamTaskComments(environment, tenant, {
35
+ taskId,
36
+ pageNo: page,
37
+ pageSize: size,
38
+ });
39
+ if (response.success) {
40
+ const data = response.data;
41
+ const rows = (data?.rows || data?.items || []);
42
+ const pagination = data?.pagination;
43
+ if (outputJson) {
44
+ console.log(JSON.stringify({ success: true, data: { rows, pagination } }, null, 2));
45
+ }
46
+ else {
47
+ if (rows.length === 0) {
48
+ console.log(chalk.yellow('\n⚠ No comments found for this task\n'));
49
+ return;
50
+ }
51
+ const table = new Table({
52
+ head: ['ID', 'Creator', 'Content', 'Created'],
53
+ style: { head: ['cyan'] },
54
+ colWidths: [12, 20, 50, 20],
55
+ wordWrap: true,
56
+ });
57
+ for (const comment of rows) {
58
+ table.push([
59
+ comment.teamTaskCommentId || '',
60
+ comment.creatorName || '',
61
+ (comment.commentContent || '').substring(0, 100),
62
+ comment.createTime || '',
63
+ ]);
64
+ }
65
+ console.log();
66
+ console.log(table.toString());
67
+ if (pagination) {
68
+ console.log(chalk.gray(`Page ${pagination.pageNo || page} of ${pagination.totalPage || '?'} (${pagination.totalRows || rows.length} total)`));
69
+ }
70
+ console.log();
71
+ }
72
+ }
73
+ else {
74
+ if (outputJson) {
75
+ console.log(JSON.stringify({ success: false, error: response.error }, null, 2));
76
+ }
77
+ else {
78
+ console.error(chalk.red(`\n✗ Failed to list comments: ${response.error?.message || 'Unknown error'}`));
79
+ if (response.error?.code) {
80
+ console.error(chalk.gray(` Error code: ${response.error.code}`));
81
+ }
82
+ console.error();
83
+ }
84
+ process.exit(1);
85
+ }
86
+ }
87
+ catch (error) {
88
+ if (outputJson) {
89
+ console.log(JSON.stringify({
90
+ success: false,
91
+ error: { message: error instanceof Error ? error.message : 'Unknown error' },
92
+ }));
93
+ }
94
+ else {
95
+ console.error(chalk.red(`\n✗ Error: ${error instanceof Error ? error.message : 'Unknown error'}\n`));
96
+ }
97
+ process.exit(1);
98
+ }
99
+ });
100
+ return command;
101
+ }
102
+ //# sourceMappingURL=comment-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comment-list.js","sourceRoot":"","sources":["../../../../../src/commands/liberica/teams/tasks/comment-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,MAAM,UAAU,gCAAgC;IAC9C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACpC,OAAO;SACJ,WAAW,CAAC,8BAA8B,CAAC;SAC3C,QAAQ,CAAC,WAAW,EAAE,sDAAsD,CAAC;SAC7E,MAAM,CAAC,iBAAiB,EAAE,aAAa,EAAE,GAAG,CAAC;SAC7C,MAAM,CAAC,iBAAiB,EAAE,WAAW,EAAE,IAAI,CAAC;SAC5C,SAAS,CAAC,IAAI,MAAM,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE,CAAC;SAClD,SAAS,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC,QAAQ,EAAE,CAAC;SACrD,MAAM,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;IAEtC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,MAAc,EAAE,OAAgC,EAAE,EAAE;QACxE,MAAM,OAAO,GAAG,aAAa,CAAC,iBAAiB,EAAE,CAAC;QACl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AC,cAAc,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CACtF,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/liberica/teams/tasks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,wBAAgB,sBAAsB,IAAI,OAAO,CAWhD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/liberica/teams/tasks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,wBAAgB,sBAAsB,IAAI,OAAO,CAwBhD"}
@@ -4,6 +4,11 @@ import { createTeamTaskGetCommand } from './get.js';
4
4
  import { createTeamTaskCreateCommand } from './create.js';
5
5
  import { createTeamTaskUpdateCommand } from './update.js';
6
6
  import { createTeamTaskDeleteCommand } from './delete.js';
7
+ import { createTeamTaskCommentAddCommand } from './comment-add.js';
8
+ import { createTeamTaskCommentListCommand } from './comment-list.js';
9
+ import { createTeamTaskAttachmentAddCommand } from './attachment-add.js';
10
+ import { createTeamTaskAttachmentListCommand } from './attachment-list.js';
11
+ import { createTeamTaskAttachmentDeleteCommand } from './attachment-delete.js';
7
12
  export function createTeamTasksCommand() {
8
13
  const tasksCommand = new Command('tasks');
9
14
  tasksCommand.description('Manage team tasks');
@@ -12,6 +17,17 @@ export function createTeamTasksCommand() {
12
17
  tasksCommand.addCommand(createTeamTaskCreateCommand());
13
18
  tasksCommand.addCommand(createTeamTaskUpdateCommand());
14
19
  tasksCommand.addCommand(createTeamTaskDeleteCommand());
20
+ const commentCommand = new Command('comment');
21
+ commentCommand.description('Manage task comments');
22
+ commentCommand.addCommand(createTeamTaskCommentAddCommand());
23
+ commentCommand.addCommand(createTeamTaskCommentListCommand());
24
+ tasksCommand.addCommand(commentCommand);
25
+ const attachmentCommand = new Command('attachment');
26
+ attachmentCommand.description('Manage task attachments');
27
+ attachmentCommand.addCommand(createTeamTaskAttachmentAddCommand());
28
+ attachmentCommand.addCommand(createTeamTaskAttachmentListCommand());
29
+ attachmentCommand.addCommand(createTeamTaskAttachmentDeleteCommand());
30
+ tasksCommand.addCommand(attachmentCommand);
15
31
  return tasksCommand;
16
32
  }
17
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/commands/liberica/teams/tasks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,UAAU,sBAAsB;IACpC,MAAM,YAAY,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1C,YAAY,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;IAE9C,YAAY,CAAC,UAAU,CAAC,yBAAyB,EAAE,CAAC,CAAC;IACrD,YAAY,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAC,CAAC;IACpD,YAAY,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,CAAC;IACvD,YAAY,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,CAAC;IACvD,YAAY,CAAC,UAAU,CAAC,2BAA2B,EAAE,CAAC,CAAC;IAEvD,OAAO,YA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UAAU,CAAC,+BAA+B,EAAE,CAAC,CAAC;IAC7D,cAAc,CAAC,UAAU,CAAC,gCAAgC,EAAE,CAAC,CAAC;IAC9D,YAAY,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;IAExC,MAAM,iBAAiB,GAAG,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC;IACpD,iBAAiB,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC;IACzD,iBAAiB,CAAC,UAAU,CAAC,kCAAkC,EAAE,CAAC,CAAC;IACnE,iBAAiB,CAAC,UAAU,CAAC,mCAAmC,EAAE,CAAC,CAAC;IACpE,iBAAiB,CAAC,UAAU,CAAC,qCAAqC,EAAE,CAAC,CAAC;IACtE,YAAY,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC;IAE3C,OAAO,YAAY,CAAC;AACtB,CAAC"}
@@ -22,12 +22,12 @@ import { CalendarQueryParams, CalendarApiResponse, CalendarSetRequest } from '..
22
22
  import { MouldEntityQueryParams, MouldEntitySetStatusRequest, MouldEntityApiResponse } from '../../types/mould.js';
23
23
  import { MouldEntityRegFormRequest, MouldEntityRegFormApiResponse } from '../../types/mould-stock-in.js';
24
24
  import { MouldEntityStockOutFormRequest, MouldEntityStockOutFormApiResponse } from '../../types/mould-stock-out.js';
25
- import { TeamIssueQueryParams, TeamIssueApiResponse, CreateTeamIssueRequest, UpdateTeamIssueRequest, BatchEditTeamIssueRequest, CreateTeamIssueCommentRequest, TeamIssueCommentQueryParams, TeamIssueCommentApiResponse } from '../../types/team-issue.js';
25
+ import { TeamIssueQueryParams, TeamIssueApiResponse, CreateTeamIssueRequest, UpdateTeamIssueRequest, BatchEditTeamIssueRequest, CreateTeamIssueCommentRequest, TeamIssueCommentQueryParams, TeamIssueCommentApiResponse, AddTeamIssueAttachmentRequest, DeleteTeamIssueAttachmentRequest, TeamIssueAttachmentQueryParams, TeamIssueAttachmentApiResponse } from '../../types/team-issue.js';
26
26
  import { IssueReportRequest, IssueReportApiResponse, IssueListApiResponse, IssueTrackApiResponse, ValidateProjectApiResponse, IssueCloseRequest, IssueCloseApiResponse, IssueReopenRequest, IssueReopenApiResponse } from '../../types/issue-report.js';
27
27
  import { TeamWorkLogQueryParams, TeamWorkLogApiResponse, CreateTeamWorkLogRequest, UpdateTeamWorkLogRequest } from '../../types/team-work-log.js';
28
28
  import { TeamProjectQueryParams, TeamProjectApiResponse, CreateTeamProjectRequest, UpdateTeamProjectRequest } from '../../types/team-project.js';
29
29
  import { ProjectCodeQueryParams, ProjectCodeApiResponse, CreateProjectCodeRequest, UpdateProjectCodeRequest } from '../../types/team-project-code.js';
30
- import { TeamTaskQueryParams, TeamTaskApiResponse, CreateTeamTaskRequest, UpdateTeamTaskRequest } from '../../types/team-task.js';
30
+ import { TeamTaskQueryParams, TeamTaskApiResponse, CreateTeamTaskRequest, UpdateTeamTaskRequest, TeamTaskCommentApiResponse, CreateTeamTaskCommentRequest, TeamTaskCommentQueryParams, TeamTaskAttachmentApiResponse, AddTeamTaskAttachmentRequest, DeleteTeamTaskAttachmentRequest, TeamTaskAttachmentQueryParams } from '../../types/team-task.js';
31
31
  import { SendEmailRequest, EmailApiResponse } from '../../types/email.js';
32
32
  import { TestCaseQueryParams, TestCaseApiResponse, CreateTestCaseRequest, UpdateTestCaseRequest, BatchDeleteTestCaseRequest, TestProjectQueryParams, TestProjectApiResponse, CreateTestProjectRequest, UpdateTestProjectRequest, TestSuiteQueryParams, TestSuiteApiResponse, CreateTestSuiteRequest, UpdateTestSuiteRequest, TestRunQueryParams, TestRunApiResponse, CreateTestRunRequest, UpdateTestRunRequest, TestExecutionQueryParams, TestExecutionApiResponse, CreateTestExecutionRequest, UpdateTestExecutionRequest, TestCaseVersionQueryParams, TestCaseVersionApiResponse, FlakyTestQueryParams, FlakyTestApiResponse, SuiteRunSummaryQueryParams, SuiteRunSummaryApiResponse, CreateSuiteRunSummaryRequest, UpdateSuiteRunSummaryRequest, BatchDeleteSuiteRunSummaryRequest } from '../../types/test-case.js';
33
33
  import { CreateTransferInFormRequest, UpdateTransferInFormRequest, TransferInFormQueryParams, TransferInFormApiResponse } from '../../types/transfer-in-form.js';
@@ -380,6 +380,47 @@ export declare const apiClient: {
380
380
  deleteTeamIssue(environment: Environment, tenant: string, teamIssueId: string): Promise<TeamIssueApiResponse>;
381
381
  createTeamIssueComment(environment: Environment, tenant: string, data: CreateTeamIssueCommentRequest): Promise<TeamIssueCommentApiResponse>;
382
382
  listTeamIssueComments(environment: Environment, tenant: string, params: TeamIssueCommentQueryParams): Promise<TeamIssueCommentApiResponse>;
383
+ /**
384
+ * Add a single attachment (file) to a team issue.
385
+ *
386
+ * Body is `{ issueId, teamIssueAttachmentId, commentId? }` — the deployed backend's
387
+ * `TeamIssueAttachmentServiceImpl.add()` persists `teamIssueAttachmentId` as the row
388
+ * primary key (= sys_file_info.file_id). `teamIssueAttachmentIdList` is accepted by
389
+ * the DTO but ignored by the add endpoint, so callers must invoke this once per file.
390
+ */
391
+ addTeamIssueAttachment(environment: Environment, tenant: string, data: AddTeamIssueAttachmentRequest): Promise<TeamIssueAttachmentApiResponse>;
392
+ listTeamIssueAttachments(environment: Environment, tenant: string, params: TeamIssueAttachmentQueryParams): Promise<TeamIssueAttachmentApiResponse>;
393
+ deleteTeamIssueAttachment(environment: Environment, tenant: string, data: DeleteTeamIssueAttachmentRequest): Promise<TeamIssueAttachmentApiResponse>;
394
+ /**
395
+ * Resolve a team task reference to the 19-digit taskId.
396
+ * 19-digit snowflake id is passed through; otherwise the input is treated as a
397
+ * taskCode and reverse-looked-up via the page endpoint (tenant isolated).
398
+ */
399
+ resolveTeamTaskReference(environment: Environment, tenant: string, ref: string): Promise<{
400
+ success: true;
401
+ taskId: string;
402
+ } | {
403
+ success: false;
404
+ error: {
405
+ code: string;
406
+ message: string;
407
+ };
408
+ }>;
409
+ createTeamTaskComment(environment: Environment, tenant: string, data: CreateTeamTaskCommentRequest): Promise<TeamTaskCommentApiResponse>;
410
+ listTeamTaskComments(environment: Environment, tenant: string, params: TeamTaskCommentQueryParams): Promise<TeamTaskCommentApiResponse>;
411
+ deleteTeamTaskComment(environment: Environment, tenant: string, teamTaskCommentId: string): Promise<TeamTaskCommentApiResponse>;
412
+ /**
413
+ * Add a single attachment (file) to a team task.
414
+ *
415
+ * Body is `{ taskId, taskAttachmentId }` — the deployed backend's
416
+ * `TeamTaskAttachmentServiceImpl.add()` persists `taskAttachmentId` as the row
417
+ * primary key (= sys_file_info.file_id). `taskAttachmentIdList` is accepted by
418
+ * the DTO but ignored by the add endpoint (would create a random snowflake id
419
+ * and lose the file association), so callers must invoke this once per file.
420
+ */
421
+ addTaskAttachment(environment: Environment, tenant: string, data: AddTeamTaskAttachmentRequest): Promise<TeamTaskAttachmentApiResponse>;
422
+ listTaskAttachments(environment: Environment, tenant: string, params: TeamTaskAttachmentQueryParams): Promise<TeamTaskAttachmentApiResponse>;
423
+ deleteTaskAttachment(environment: Environment, tenant: string, data: DeleteTeamTaskAttachmentRequest): Promise<TeamTaskAttachmentApiResponse>;
383
424
  listTeamTasks(environment: Environment, tenant: string, params: TeamTaskQueryParams): Promise<TeamTaskApiResponse>;
384
425
  getTeamTask(environment: Environment, tenant: string, teamTaskId: string): Promise<TeamTaskApiResponse>;
385
426
  createTeamTask(environment: Environment, tenant: string, data: CreateTeamTaskRequest): Promise<TeamTaskApiResponse>;