@parall/cli 1.60.0 → 1.62.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.
Files changed (37) hide show
  1. package/dist/commands/agents.d.ts +9 -0
  2. package/dist/commands/agents.d.ts.map +1 -1
  3. package/dist/commands/agents.js +288 -8
  4. package/dist/commands/approvals.d.ts.map +1 -1
  5. package/dist/commands/approvals.js +19 -0
  6. package/dist/commands/chats.d.ts.map +1 -1
  7. package/dist/commands/chats.js +84 -0
  8. package/dist/commands/clip.d.ts.map +1 -1
  9. package/dist/commands/clip.js +21 -18
  10. package/dist/commands/comments.d.ts +3 -0
  11. package/dist/commands/comments.d.ts.map +1 -1
  12. package/dist/commands/comments.js +44 -1
  13. package/dist/commands/labels.d.ts +5 -0
  14. package/dist/commands/labels.d.ts.map +1 -0
  15. package/dist/commands/labels.js +114 -0
  16. package/dist/commands/messages.d.ts.map +1 -1
  17. package/dist/commands/messages.js +35 -0
  18. package/dist/commands/projects.d.ts.map +1 -1
  19. package/dist/commands/projects.js +4 -2
  20. package/dist/commands/search.d.ts +5 -0
  21. package/dist/commands/search.d.ts.map +1 -1
  22. package/dist/commands/search.js +28 -1
  23. package/dist/commands/tasks.d.ts +13 -3
  24. package/dist/commands/tasks.d.ts.map +1 -1
  25. package/dist/commands/tasks.js +214 -8
  26. package/dist/commands/triggers.d.ts +19 -0
  27. package/dist/commands/triggers.d.ts.map +1 -0
  28. package/dist/commands/{external-triggers.js → triggers.js} +96 -95
  29. package/dist/commands/wiki-comments.d.ts +6 -0
  30. package/dist/commands/wiki-comments.d.ts.map +1 -0
  31. package/dist/commands/wiki-comments.js +108 -0
  32. package/dist/commands/wiki.d.ts.map +1 -1
  33. package/dist/commands/wiki.js +2 -98
  34. package/dist/index.js +4 -2
  35. package/package.json +4 -4
  36. package/dist/commands/external-triggers.d.ts +0 -19
  37. package/dist/commands/external-triggers.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../src/commands/comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BpC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GACzB;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAMpD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QA4HvD"}
1
+ {"version":3,"file":"comments.d.ts","sourceRoot":"","sources":["../../src/commands/comments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA4BpC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GACzB;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,aAAa,EAAE,MAAM,CAAA;CAAE,CAMpD;AAED;+CAC+C;AAC/C,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,QAAQ,GAAG,UAAU,GAAG,KAAK,GAAG,SAAS,CAM3C;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QA4KvD"}
@@ -39,6 +39,16 @@ export function buildListTarget(target, opts) {
39
39
  }
40
40
  return { target_uri: uri };
41
41
  }
42
+ /** Strict command grammar for --resolution; the server stays authoritative
43
+ * for filter semantics. Exported for tests. */
44
+ export function resolveResolutionFlag(value) {
45
+ if (value === undefined)
46
+ return undefined;
47
+ if (value !== 'active' && value !== 'resolved' && value !== 'all') {
48
+ throw new Error('--resolution must be "active", "resolved", or "all"');
49
+ }
50
+ return value;
51
+ }
42
52
  /**
43
53
  * Generic, target-agnostic comment commands over `POST/GET/PATCH/DELETE
44
54
  * /comments`. Unlike `parall tasks comments` (task-only) and `parall wiki
@@ -57,7 +67,8 @@ export function registerCommentCommands(program) {
57
67
  .requiredOption('--target <uri>', 'Target prll:// URI (task / wiki page / changeset / inline anchor)')
58
68
  .option('--body <text>', BODY_OPTION_DESC)
59
69
  .option('--body-file <path>', BODY_FILE_OPTION_DESC)
60
- .option('--parent <id>', 'Parent comment ID (task comments only — threaded reply)')
70
+ .option('--parent <id>', 'Root comment ID — post as a threaded reply under it (works on any target type)')
71
+ .option('--quote <text>', 'Exact target text the comment anchors to (required for inline text-anchor targets)')
61
72
  .action(async (opts) => {
62
73
  try {
63
74
  // Grammar first: a body-flag error is a parameter error even when
@@ -66,6 +77,7 @@ export function registerCommentCommands(program) {
66
77
  const { client, orgId } = resolveCredentials();
67
78
  const result = await client.createComment(orgId, {
68
79
  target_uri: normalizeTarget(opts.target),
80
+ target_quote: opts.quote,
69
81
  body,
70
82
  parent_id: opts.parent ? stripPrllScheme(opts.parent) : undefined,
71
83
  });
@@ -88,13 +100,16 @@ export function registerCommentCommands(program) {
88
100
  .option('--cursor <cursor>', 'Pagination cursor')
89
101
  .option('--order <order>', 'Sort order (asc or desc)')
90
102
  .option('--exact', 'Match the target URI exactly (exclude inline anchored comments)')
103
+ .option('--resolution <state>', 'Filter by thread resolution state: active, resolved, or all')
91
104
  .action(async (opts) => {
92
105
  try {
106
+ const resolution = resolveResolutionFlag(opts.resolution);
93
107
  const { client, orgId } = resolveCredentials();
94
108
  const params = stripUndefined({
95
109
  limit: Number(opts.limit),
96
110
  cursor: opts.cursor,
97
111
  order: opts.order,
112
+ resolution,
98
113
  });
99
114
  const result = await client.getComments(orgId, {
100
115
  ...buildListTarget(opts.target, { exact: opts.exact }),
@@ -153,4 +168,32 @@ export function registerCommentCommands(program) {
153
168
  printError(err);
154
169
  }
155
170
  });
171
+ comments
172
+ .command('resolve')
173
+ .description('Resolve a comment thread (pass the root comment ID) — done handling its feedback')
174
+ .argument('<commentId>', 'Root comment ID')
175
+ .action(async (commentId) => {
176
+ try {
177
+ const { client, orgId } = resolveCredentials();
178
+ const result = await client.resolveComment(orgId, stripPrllScheme(commentId));
179
+ printJson(result);
180
+ }
181
+ catch (err) {
182
+ printError(err);
183
+ }
184
+ });
185
+ comments
186
+ .command('reopen')
187
+ .description('Reopen a resolved comment thread (required before replying into it)')
188
+ .argument('<commentId>', 'Root comment ID')
189
+ .action(async (commentId) => {
190
+ try {
191
+ const { client, orgId } = resolveCredentials();
192
+ const result = await client.reopenComment(orgId, stripPrllScheme(commentId));
193
+ printJson(result);
194
+ }
195
+ catch (err) {
196
+ printError(err);
197
+ }
198
+ });
156
199
  }
@@ -0,0 +1,5 @@
1
+ import { Command } from 'commander';
2
+ /** Org-wide task label catalog. Attaching/detaching labels on a task lives
3
+ * under `parall tasks labels` and `parall tasks update --label-ids`. */
4
+ export declare function registerLabelCommands(program: Command): void;
5
+ //# sourceMappingURL=labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/commands/labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCpC;wEACwE;AACxE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,QAkFrD"}
@@ -0,0 +1,114 @@
1
+ import { resolveCredentials } from '../lib/client.js';
2
+ import { printError, printJson, printRefHint, stripPrllScheme } from '../lib/output.js';
3
+ const LABEL_COLORS = [
4
+ 'default',
5
+ 'red',
6
+ 'green',
7
+ 'yellow',
8
+ 'blue',
9
+ 'lilac',
10
+ 'orange',
11
+ 'magenta',
12
+ 'sand',
13
+ 'fuchsia',
14
+ 'lime',
15
+ 'cerulean',
16
+ 'teal',
17
+ ];
18
+ const _labelColorsExhaustive = true;
19
+ void _labelColorsExhaustive;
20
+ function resolveColorFlag(value) {
21
+ if (value === undefined)
22
+ return undefined;
23
+ if (!LABEL_COLORS.includes(value)) {
24
+ throw new Error(`--color must be one of: ${LABEL_COLORS.join(', ')}`);
25
+ }
26
+ return value;
27
+ }
28
+ /** Org-wide task label catalog. Attaching/detaching labels on a task lives
29
+ * under `parall tasks labels` and `parall tasks update --label-ids`. */
30
+ export function registerLabelCommands(program) {
31
+ const labels = program
32
+ .command('labels')
33
+ .description('Manage the org task-label catalog (attach to tasks via "parall tasks labels")');
34
+ labels
35
+ .command('list')
36
+ .description('List all labels in the organization')
37
+ .action(async () => {
38
+ try {
39
+ const { client, orgId } = resolveCredentials();
40
+ const result = await client.getLabels(orgId);
41
+ printJson(result);
42
+ }
43
+ catch (err) {
44
+ printError(err);
45
+ }
46
+ });
47
+ labels
48
+ .command('create')
49
+ .description('Create a label')
50
+ .requiredOption('--name <name>', 'Label name')
51
+ .option('--color <color>', `Label color: ${LABEL_COLORS.join(', ')}`)
52
+ .option('--description <text>', 'Label description')
53
+ .action(async (opts) => {
54
+ try {
55
+ const data = { name: opts.name };
56
+ const color = resolveColorFlag(opts.color);
57
+ if (color !== undefined)
58
+ data.color = color;
59
+ if (opts.description !== undefined)
60
+ data.description = opts.description;
61
+ const { client, orgId } = resolveCredentials();
62
+ const result = await client.createLabel(orgId, data);
63
+ printJson(result);
64
+ printRefHint(result.id);
65
+ }
66
+ catch (err) {
67
+ printError(err);
68
+ }
69
+ });
70
+ labels
71
+ .command('update')
72
+ .description('Update a label')
73
+ .argument('<labelId>', 'Label ID')
74
+ .option('--name <name>', 'Label name')
75
+ .option('--color <color>', `Label color: ${LABEL_COLORS.join(', ')}`)
76
+ .option('--description <text>', 'Label description, or "none" to clear it')
77
+ .action(async (labelId, opts) => {
78
+ try {
79
+ const data = {};
80
+ if (opts.name !== undefined)
81
+ data.name = opts.name;
82
+ const color = resolveColorFlag(opts.color);
83
+ if (color !== undefined)
84
+ data.color = color;
85
+ if (opts.description !== undefined) {
86
+ data.description = opts.description === 'none' ? null : opts.description;
87
+ }
88
+ if (Object.keys(data).length === 0) {
89
+ printError(new Error('No fields to update. Provide at least one option.'));
90
+ return;
91
+ }
92
+ const { client, orgId } = resolveCredentials();
93
+ const result = await client.updateLabel(orgId, stripPrllScheme(labelId), data);
94
+ printJson(result);
95
+ }
96
+ catch (err) {
97
+ printError(err);
98
+ }
99
+ });
100
+ labels
101
+ .command('delete')
102
+ .description('Delete a label (detaches it from every task)')
103
+ .argument('<labelId>', 'Label ID')
104
+ .action(async (labelId) => {
105
+ try {
106
+ const { client, orgId } = resolveCredentials();
107
+ await client.deleteLabel(orgId, stripPrllScheme(labelId));
108
+ printJson({ ok: true });
109
+ }
110
+ catch (err) {
111
+ printError(err);
112
+ }
113
+ });
114
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/commands/messages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5C,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GACtD;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CASzC;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAkSvD"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/commands/messages.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBzC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5C,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GACtD;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CASzC;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAuUvD"}
@@ -96,6 +96,41 @@ export function registerMessageCommands(program) {
96
96
  printError(err);
97
97
  }
98
98
  });
99
+ messages
100
+ .command('edit')
101
+ .description('Edit a message you authored (replaces its full text; recipients see an edit signal)')
102
+ .argument('<messageId>', 'Message ID')
103
+ .option('--text <text>', TEXT_OPTION_DESC)
104
+ .option('--text-file <path>', TEXT_FILE_OPTION_DESC)
105
+ .action(async (messageId, opts) => {
106
+ try {
107
+ const text = resolveMessageText(opts);
108
+ if (!text) {
109
+ printError(new Error('Provide --text or --text-file'));
110
+ return;
111
+ }
112
+ const { client } = resolveCredentials();
113
+ const result = await client.editMessage(stripPrllScheme(messageId), { text });
114
+ printJson(result);
115
+ }
116
+ catch (err) {
117
+ printError(err);
118
+ }
119
+ });
120
+ messages
121
+ .command('delete')
122
+ .description('Delete a message you authored')
123
+ .argument('<messageId>', 'Message ID')
124
+ .action(async (messageId) => {
125
+ try {
126
+ const { client } = resolveCredentials();
127
+ await client.deleteMessage(stripPrllScheme(messageId));
128
+ printJson({ ok: true });
129
+ }
130
+ catch (err) {
131
+ printError(err);
132
+ }
133
+ });
99
134
  messages
100
135
  .command('send')
101
136
  .description('Send a message to a chat (text, file, or both)')
@@ -1 +1 @@
1
- {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/commands/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QAyOvD"}
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/commands/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,QA0OvD"}
@@ -34,14 +34,16 @@ export function registerProjectCommands(program) {
34
34
  .command('create')
35
35
  .description('Create a new project')
36
36
  .requiredOption('--name <name>', 'Project name')
37
- .requiredOption('--key <key>', 'Project key')
37
+ .option('--key <key>', 'Project key (omit to auto-generate a unique key from the name)')
38
38
  .option('--description <text>', 'Project description')
39
39
  .option('--visibility <visibility>', VISIBILITY_HELP)
40
40
  .option('--color <hex>', 'Project color (hex)')
41
41
  .action(async (opts) => {
42
42
  try {
43
43
  const { client, orgId } = resolveCredentials();
44
- const data = { name: opts.name, key: opts.key };
44
+ const data = { name: opts.name };
45
+ if (opts.key !== undefined)
46
+ data.key = opts.key;
45
47
  if (opts.description !== undefined)
46
48
  data.description = opts.description;
47
49
  if (opts.visibility !== undefined)
@@ -11,8 +11,13 @@ export interface SearchOpts {
11
11
  types?: string;
12
12
  channel?: string;
13
13
  limit?: string;
14
+ offset?: string;
14
15
  wikiType?: string;
15
16
  since?: string;
17
+ from?: string;
18
+ order?: string;
19
+ /** Commander --no-collapse: defaults true, false when the flag is passed. */
20
+ collapse?: boolean;
16
21
  }
17
22
  /** Build the SDK search params from the positional query + CLI flags. */
18
23
  export declare function buildSearchParams(query: string, opts: SearchOpts): SearchParams;
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASrE;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,YAAY,CAY/E;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,QA4BtD"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmBpC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASrE;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,yEAAyE;AACzE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,YAAY,CA+B/E;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,QAkCtD"}
@@ -44,10 +44,31 @@ export function buildSearchParams(query, opts) {
44
44
  const limit = parsePositiveInt(opts.limit);
45
45
  if (limit !== undefined)
46
46
  params.limit = limit;
47
+ // Unlike --limit (silent fallback to the server default is harmless), a
48
+ // dropped --offset would silently serve page 1 as if it were page N — an
49
+ // explicit but invalid value must be a local grammar error.
50
+ if (opts.offset !== undefined) {
51
+ const t = opts.offset.trim();
52
+ const offset = /^\d+$/.test(t) ? Number(t) : Number.NaN;
53
+ if (!Number.isInteger(offset)) {
54
+ throw new Error('--offset must be a non-negative integer');
55
+ }
56
+ params.offset = offset;
57
+ }
47
58
  if (opts.wikiType !== undefined)
48
59
  params.wiki_type = opts.wikiType;
49
60
  if (opts.since !== undefined)
50
61
  params.since = opts.since;
62
+ if (opts.from !== undefined)
63
+ params.from = stripPrllScheme(opts.from);
64
+ if (opts.order !== undefined) {
65
+ if (opts.order !== 'relevance' && opts.order !== 'recent') {
66
+ throw new Error('--order must be "relevance" or "recent"');
67
+ }
68
+ params.order = opts.order;
69
+ }
70
+ if (opts.collapse === false)
71
+ params.collapse_by_chat = false;
51
72
  return params;
52
73
  }
53
74
  export function registerSearchCommands(program) {
@@ -58,12 +79,18 @@ export function registerSearchCommands(program) {
58
79
  .option('--types <list>', 'Comma-separated entity types: m[essage], t[ask], w[iki], c[omment] (default: all)')
59
80
  .option('--channel <chatId>', 'Narrow MESSAGE results to one chat — tasks/wiki unaffected (prll://cht_… or cht_…)')
60
81
  .option('--limit <n>', 'Max results per entity type (server caps at 50)')
82
+ .option('--offset <n>', 'Result offset per entity type — page with --limit')
61
83
  .option('--wiki-type <type>', 'Narrow wiki results to a frontmatter document type')
62
84
  .option('--since <date>', 'Only messages/tasks at or after this time (RFC3339 or YYYY-MM-DD); not applied to wiki')
85
+ .option('--from <userId>', 'Only messages sent by this user (usr_… or prll://usr_…)')
86
+ .option('--order <order>', 'Result order: relevance (default) or recent (newest first)')
87
+ .option('--no-collapse', 'Return every message match instead of one per chat')
63
88
  .action(async (query, opts) => {
64
89
  try {
90
+ // Grammar first: option errors surface before credential resolution.
91
+ const params = buildSearchParams(query, opts);
65
92
  const { client, orgId } = resolveCredentials();
66
- const result = await client.search(orgId, buildSearchParams(query, opts));
93
+ const result = await client.search(orgId, params);
67
94
  printJson(result);
68
95
  }
69
96
  catch (err) {
@@ -1,5 +1,11 @@
1
- import type { UpdateTaskRequest } from '@parall/sdk';
1
+ import type { TaskRelationTargetType, UpdateTaskRequest } from '@parall/sdk';
2
2
  import { Command } from 'commander';
3
+ /** Relation target grammar: the target_type is inferred from the ID prefix so
4
+ * the agent passes one ID instead of a (type, id) pair. Exported for tests. */
5
+ export declare function resolveRelationTarget(raw: string): {
6
+ target_type: TaskRelationTargetType;
7
+ target_id: string;
8
+ };
3
9
  export declare function buildCreateTaskData(opts: {
4
10
  title: string;
5
11
  description?: string;
@@ -12,6 +18,7 @@ export declare function buildCreateTaskData(opts: {
12
18
  sourceChatId?: string;
13
19
  dueDate?: string;
14
20
  plannedStart?: string;
21
+ labelIds?: string;
15
22
  }): Partial<{
16
23
  title: string;
17
24
  description: string | undefined;
@@ -23,6 +30,7 @@ export declare function buildCreateTaskData(opts: {
23
30
  source_chat_id: string | undefined;
24
31
  planned_start_date: string | undefined;
25
32
  due_date: string | undefined;
33
+ label_ids: string[] | undefined;
26
34
  }>;
27
35
  export declare function buildUpdateTaskData(opts: {
28
36
  title?: string;
@@ -36,17 +44,19 @@ export declare function buildUpdateTaskData(opts: {
36
44
  placement?: string;
37
45
  dueDate?: string;
38
46
  plannedStart?: string;
47
+ labelIds?: string;
39
48
  }): Partial<{
40
49
  title: string | undefined;
41
50
  status: UpdateTaskRequest["status"];
42
51
  priority: UpdateTaskRequest["priority"];
43
- assignee_id: string | undefined;
52
+ assignee_id: string | null | undefined;
44
53
  description: string | undefined;
45
- parent_id: string | undefined;
54
+ parent_id: string | null | undefined;
46
55
  sort_order: number | undefined;
47
56
  placement: "end" | undefined;
48
57
  planned_start_date: string | null | undefined;
49
58
  due_date: string | null | undefined;
59
+ label_ids: string[] | null | undefined;
50
60
  }>;
51
61
  export declare function registerTaskCommands(program: Command): void;
52
62
  //# sourceM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