exponential-sdk 1.0.1 → 1.3.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/dist/index.d.ts +765 -1
- package/dist/index.js +222 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -227,6 +227,294 @@ interface TrpcClient {
|
|
|
227
227
|
}) => Promise<unknown>;
|
|
228
228
|
};
|
|
229
229
|
};
|
|
230
|
+
actionComment: {
|
|
231
|
+
getComments: {
|
|
232
|
+
query: (input: {
|
|
233
|
+
actionId: string;
|
|
234
|
+
}) => Promise<unknown[]>;
|
|
235
|
+
};
|
|
236
|
+
addComment: {
|
|
237
|
+
mutate: (input: {
|
|
238
|
+
actionId: string;
|
|
239
|
+
content: string;
|
|
240
|
+
}) => Promise<unknown>;
|
|
241
|
+
};
|
|
242
|
+
updateComment: {
|
|
243
|
+
mutate: (input: {
|
|
244
|
+
commentId: string;
|
|
245
|
+
content: string;
|
|
246
|
+
}) => Promise<unknown>;
|
|
247
|
+
};
|
|
248
|
+
deleteComment: {
|
|
249
|
+
mutate: (input: {
|
|
250
|
+
commentId: string;
|
|
251
|
+
}) => Promise<unknown>;
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
epic: {
|
|
255
|
+
list: {
|
|
256
|
+
query: (input: {
|
|
257
|
+
workspaceId: string;
|
|
258
|
+
status?: 'OPEN' | 'IN_PROGRESS' | 'DONE' | 'CANCELLED';
|
|
259
|
+
}) => Promise<unknown[]>;
|
|
260
|
+
};
|
|
261
|
+
getById: {
|
|
262
|
+
query: (input: {
|
|
263
|
+
id: string;
|
|
264
|
+
}) => Promise<unknown>;
|
|
265
|
+
};
|
|
266
|
+
create: {
|
|
267
|
+
mutate: (input: {
|
|
268
|
+
workspaceId: string;
|
|
269
|
+
name: string;
|
|
270
|
+
description?: string;
|
|
271
|
+
priority?: 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE';
|
|
272
|
+
startDate?: Date;
|
|
273
|
+
targetDate?: Date;
|
|
274
|
+
}) => Promise<unknown>;
|
|
275
|
+
};
|
|
276
|
+
update: {
|
|
277
|
+
mutate: (input: {
|
|
278
|
+
id: string;
|
|
279
|
+
name?: string;
|
|
280
|
+
description?: string | null;
|
|
281
|
+
status?: 'OPEN' | 'IN_PROGRESS' | 'DONE' | 'CANCELLED';
|
|
282
|
+
priority?: 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE';
|
|
283
|
+
startDate?: Date | null;
|
|
284
|
+
targetDate?: Date | null;
|
|
285
|
+
}) => Promise<unknown>;
|
|
286
|
+
};
|
|
287
|
+
delete: {
|
|
288
|
+
mutate: (input: {
|
|
289
|
+
id: string;
|
|
290
|
+
}) => Promise<unknown>;
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
tag: {
|
|
294
|
+
list: {
|
|
295
|
+
query: (input?: {
|
|
296
|
+
workspaceId?: string;
|
|
297
|
+
category?: string | null;
|
|
298
|
+
}) => Promise<unknown>;
|
|
299
|
+
};
|
|
300
|
+
create: {
|
|
301
|
+
mutate: (input: {
|
|
302
|
+
workspaceId: string;
|
|
303
|
+
name: string;
|
|
304
|
+
color: string;
|
|
305
|
+
description?: string;
|
|
306
|
+
category?: string | null;
|
|
307
|
+
}) => Promise<unknown>;
|
|
308
|
+
};
|
|
309
|
+
setEntityTags: {
|
|
310
|
+
mutate: (input: {
|
|
311
|
+
entityType: 'action' | 'ticket' | 'feature' | 'epic';
|
|
312
|
+
entityId: string;
|
|
313
|
+
tagIds: string[];
|
|
314
|
+
}) => Promise<unknown>;
|
|
315
|
+
};
|
|
316
|
+
listForEntity: {
|
|
317
|
+
query: (input: {
|
|
318
|
+
entityType: 'action' | 'ticket' | 'feature' | 'epic';
|
|
319
|
+
entityId: string;
|
|
320
|
+
}) => Promise<unknown[]>;
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
product: {
|
|
324
|
+
product: {
|
|
325
|
+
list: {
|
|
326
|
+
query: (input: {
|
|
327
|
+
workspaceId: string;
|
|
328
|
+
}) => Promise<unknown[]>;
|
|
329
|
+
};
|
|
330
|
+
getById: {
|
|
331
|
+
query: (input: {
|
|
332
|
+
id: string;
|
|
333
|
+
}) => Promise<unknown>;
|
|
334
|
+
};
|
|
335
|
+
getBySlug: {
|
|
336
|
+
query: (input: {
|
|
337
|
+
workspaceId: string;
|
|
338
|
+
slug: string;
|
|
339
|
+
}) => Promise<unknown>;
|
|
340
|
+
};
|
|
341
|
+
create: {
|
|
342
|
+
mutate: (input: {
|
|
343
|
+
workspaceId: string;
|
|
344
|
+
name: string;
|
|
345
|
+
slug: string;
|
|
346
|
+
description?: string;
|
|
347
|
+
icon?: string;
|
|
348
|
+
color?: string;
|
|
349
|
+
}) => Promise<unknown>;
|
|
350
|
+
};
|
|
351
|
+
update: {
|
|
352
|
+
mutate: (input: {
|
|
353
|
+
id: string;
|
|
354
|
+
name?: string;
|
|
355
|
+
description?: string;
|
|
356
|
+
icon?: string;
|
|
357
|
+
color?: string;
|
|
358
|
+
funTicketIds?: boolean;
|
|
359
|
+
}) => Promise<unknown>;
|
|
360
|
+
};
|
|
361
|
+
delete: {
|
|
362
|
+
mutate: (input: {
|
|
363
|
+
id: string;
|
|
364
|
+
}) => Promise<unknown>;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
feature: {
|
|
368
|
+
list: {
|
|
369
|
+
query: (input: {
|
|
370
|
+
productId: string;
|
|
371
|
+
status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED';
|
|
372
|
+
}) => Promise<unknown[]>;
|
|
373
|
+
};
|
|
374
|
+
getById: {
|
|
375
|
+
query: (input: {
|
|
376
|
+
id: string;
|
|
377
|
+
}) => Promise<unknown>;
|
|
378
|
+
};
|
|
379
|
+
create: {
|
|
380
|
+
mutate: (input: {
|
|
381
|
+
productId: string;
|
|
382
|
+
name: string;
|
|
383
|
+
description?: string;
|
|
384
|
+
vision?: string;
|
|
385
|
+
status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED';
|
|
386
|
+
effort?: number;
|
|
387
|
+
priority?: number;
|
|
388
|
+
goalId?: number;
|
|
389
|
+
}) => Promise<unknown>;
|
|
390
|
+
};
|
|
391
|
+
update: {
|
|
392
|
+
mutate: (input: {
|
|
393
|
+
id: string;
|
|
394
|
+
name?: string;
|
|
395
|
+
description?: string;
|
|
396
|
+
vision?: string;
|
|
397
|
+
status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED';
|
|
398
|
+
effort?: number;
|
|
399
|
+
priority?: number;
|
|
400
|
+
goalId?: number | null;
|
|
401
|
+
}) => Promise<unknown>;
|
|
402
|
+
};
|
|
403
|
+
delete: {
|
|
404
|
+
mutate: (input: {
|
|
405
|
+
id: string;
|
|
406
|
+
}) => Promise<unknown>;
|
|
407
|
+
};
|
|
408
|
+
};
|
|
409
|
+
ticket: {
|
|
410
|
+
list: {
|
|
411
|
+
query: (input: {
|
|
412
|
+
productId: string;
|
|
413
|
+
status?: string;
|
|
414
|
+
type?: string;
|
|
415
|
+
featureId?: string;
|
|
416
|
+
epicId?: string;
|
|
417
|
+
cycleId?: string;
|
|
418
|
+
assigneeId?: string;
|
|
419
|
+
}) => Promise<unknown[]>;
|
|
420
|
+
};
|
|
421
|
+
getById: {
|
|
422
|
+
query: (input: {
|
|
423
|
+
id: string;
|
|
424
|
+
}) => Promise<unknown>;
|
|
425
|
+
};
|
|
426
|
+
create: {
|
|
427
|
+
mutate: (input: {
|
|
428
|
+
productId: string;
|
|
429
|
+
title: string;
|
|
430
|
+
body?: string;
|
|
431
|
+
type?: string;
|
|
432
|
+
status?: string;
|
|
433
|
+
priority?: number;
|
|
434
|
+
points?: number;
|
|
435
|
+
branchName?: string;
|
|
436
|
+
prUrl?: string;
|
|
437
|
+
designUrl?: string;
|
|
438
|
+
specUrl?: string;
|
|
439
|
+
links?: Record<string, string>;
|
|
440
|
+
epicId?: string;
|
|
441
|
+
featureId?: string;
|
|
442
|
+
cycleId?: string;
|
|
443
|
+
scopeId?: string;
|
|
444
|
+
assigneeId?: string;
|
|
445
|
+
templateId?: string;
|
|
446
|
+
}) => Promise<unknown>;
|
|
447
|
+
};
|
|
448
|
+
update: {
|
|
449
|
+
mutate: (input: {
|
|
450
|
+
id: string;
|
|
451
|
+
title?: string;
|
|
452
|
+
body?: string;
|
|
453
|
+
type?: string;
|
|
454
|
+
status?: string;
|
|
455
|
+
priority?: number | null;
|
|
456
|
+
points?: number | null;
|
|
457
|
+
branchName?: string | null;
|
|
458
|
+
prUrl?: string | null;
|
|
459
|
+
designUrl?: string | null;
|
|
460
|
+
specUrl?: string | null;
|
|
461
|
+
links?: Record<string, string> | null;
|
|
462
|
+
epicId?: string | null;
|
|
463
|
+
featureId?: string | null;
|
|
464
|
+
cycleId?: string | null;
|
|
465
|
+
scopeId?: string | null;
|
|
466
|
+
assigneeId?: string | null;
|
|
467
|
+
}) => Promise<unknown>;
|
|
468
|
+
};
|
|
469
|
+
delete: {
|
|
470
|
+
mutate: (input: {
|
|
471
|
+
id: string;
|
|
472
|
+
}) => Promise<unknown>;
|
|
473
|
+
};
|
|
474
|
+
search: {
|
|
475
|
+
query: (input: {
|
|
476
|
+
productId: string;
|
|
477
|
+
query?: string;
|
|
478
|
+
excludeTicketId?: string;
|
|
479
|
+
limit?: number;
|
|
480
|
+
}) => Promise<unknown[]>;
|
|
481
|
+
};
|
|
482
|
+
addDependency: {
|
|
483
|
+
mutate: (input: {
|
|
484
|
+
ticketId: string;
|
|
485
|
+
dependsOnId: string;
|
|
486
|
+
}) => Promise<unknown>;
|
|
487
|
+
};
|
|
488
|
+
removeDependency: {
|
|
489
|
+
mutate: (input: {
|
|
490
|
+
ticketId: string;
|
|
491
|
+
dependsOnId: string;
|
|
492
|
+
}) => Promise<unknown>;
|
|
493
|
+
};
|
|
494
|
+
addComment: {
|
|
495
|
+
mutate: (input: {
|
|
496
|
+
ticketId: string;
|
|
497
|
+
content: string;
|
|
498
|
+
}) => Promise<unknown>;
|
|
499
|
+
};
|
|
500
|
+
deleteComment: {
|
|
501
|
+
mutate: (input: {
|
|
502
|
+
id: string;
|
|
503
|
+
}) => Promise<unknown>;
|
|
504
|
+
};
|
|
505
|
+
linkAction: {
|
|
506
|
+
mutate: (input: {
|
|
507
|
+
ticketId: string;
|
|
508
|
+
actionId: string;
|
|
509
|
+
}) => Promise<unknown>;
|
|
510
|
+
};
|
|
511
|
+
unlinkAction: {
|
|
512
|
+
mutate: (input: {
|
|
513
|
+
actionId: string;
|
|
514
|
+
}) => Promise<unknown>;
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
};
|
|
230
518
|
}
|
|
231
519
|
declare function isTRPCError(error: unknown): error is TRPCClientError<any>;
|
|
232
520
|
|
|
@@ -360,6 +648,47 @@ declare class ActionsApi {
|
|
|
360
648
|
update(input: ActionUpdateInput): Promise<Action>;
|
|
361
649
|
}
|
|
362
650
|
|
|
651
|
+
interface CommentAuthor {
|
|
652
|
+
id: string;
|
|
653
|
+
name: string | null;
|
|
654
|
+
image: string | null;
|
|
655
|
+
}
|
|
656
|
+
interface ActionComment {
|
|
657
|
+
id: string;
|
|
658
|
+
actionId: string;
|
|
659
|
+
authorId: string;
|
|
660
|
+
content: string;
|
|
661
|
+
createdAt: Date;
|
|
662
|
+
updatedAt: Date;
|
|
663
|
+
author: CommentAuthor;
|
|
664
|
+
}
|
|
665
|
+
interface TicketComment {
|
|
666
|
+
id: string;
|
|
667
|
+
ticketId: string;
|
|
668
|
+
authorId: string;
|
|
669
|
+
content: string;
|
|
670
|
+
createdAt: Date;
|
|
671
|
+
updatedAt: Date;
|
|
672
|
+
author: CommentAuthor;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
interface ActionCommentAddInput {
|
|
676
|
+
actionId: string;
|
|
677
|
+
content: string;
|
|
678
|
+
}
|
|
679
|
+
interface ActionCommentUpdateInput {
|
|
680
|
+
commentId: string;
|
|
681
|
+
content: string;
|
|
682
|
+
}
|
|
683
|
+
declare class ActionCommentsApi {
|
|
684
|
+
private client;
|
|
685
|
+
constructor(client: TrpcClient);
|
|
686
|
+
list(actionId: string): Promise<ActionComment[]>;
|
|
687
|
+
add(input: ActionCommentAddInput): Promise<ActionComment>;
|
|
688
|
+
update(input: ActionCommentUpdateInput): Promise<ActionComment>;
|
|
689
|
+
delete(commentId: string): Promise<ActionComment>;
|
|
690
|
+
}
|
|
691
|
+
|
|
363
692
|
interface Project {
|
|
364
693
|
id: string;
|
|
365
694
|
name: string;
|
|
@@ -666,6 +995,435 @@ declare class PipelinesApi {
|
|
|
666
995
|
deleteDeal(id: string): Promise<void>;
|
|
667
996
|
}
|
|
668
997
|
|
|
998
|
+
type TicketStatus = 'BACKLOG' | 'NEEDS_REFINEMENT' | 'READY_TO_PLAN' | 'COMMITTED' | 'IN_PROGRESS' | 'BLOCKED' | 'QA' | 'DONE' | 'DEPLOYED' | 'ARCHIVED';
|
|
999
|
+
type TicketType = 'BUG' | 'FEATURE' | 'CHORE' | 'IMPROVEMENT' | 'SPIKE' | 'RESEARCH';
|
|
1000
|
+
interface TicketAssignee {
|
|
1001
|
+
id: string;
|
|
1002
|
+
name: string | null;
|
|
1003
|
+
email?: string | null;
|
|
1004
|
+
image: string | null;
|
|
1005
|
+
}
|
|
1006
|
+
interface TicketDependencyEdge {
|
|
1007
|
+
id: string;
|
|
1008
|
+
number: number | null;
|
|
1009
|
+
shortId: string | null;
|
|
1010
|
+
title: string;
|
|
1011
|
+
status: TicketStatus;
|
|
1012
|
+
priority: number | null;
|
|
1013
|
+
assignee: TicketAssignee | null;
|
|
1014
|
+
}
|
|
1015
|
+
interface Ticket {
|
|
1016
|
+
id: string;
|
|
1017
|
+
productId: string;
|
|
1018
|
+
number: number | null;
|
|
1019
|
+
shortId: string | null;
|
|
1020
|
+
title: string;
|
|
1021
|
+
body: string | null;
|
|
1022
|
+
type: TicketType;
|
|
1023
|
+
status: TicketStatus;
|
|
1024
|
+
priority: number | null;
|
|
1025
|
+
points: number | null;
|
|
1026
|
+
branchName: string | null;
|
|
1027
|
+
prUrl: string | null;
|
|
1028
|
+
designUrl: string | null;
|
|
1029
|
+
specUrl: string | null;
|
|
1030
|
+
links: Record<string, string> | null;
|
|
1031
|
+
epicId: string | null;
|
|
1032
|
+
featureId: string | null;
|
|
1033
|
+
cycleId: string | null;
|
|
1034
|
+
scopeId: string | null;
|
|
1035
|
+
assigneeId: string | null;
|
|
1036
|
+
createdById: string | null;
|
|
1037
|
+
completedAt: Date | null;
|
|
1038
|
+
createdAt: Date;
|
|
1039
|
+
updatedAt: Date;
|
|
1040
|
+
assignee?: TicketAssignee | null;
|
|
1041
|
+
feature?: {
|
|
1042
|
+
id: string;
|
|
1043
|
+
name: string;
|
|
1044
|
+
status?: string;
|
|
1045
|
+
} | null;
|
|
1046
|
+
epic?: {
|
|
1047
|
+
id: string;
|
|
1048
|
+
name: string;
|
|
1049
|
+
status?: string;
|
|
1050
|
+
} | null;
|
|
1051
|
+
cycle?: {
|
|
1052
|
+
id: string;
|
|
1053
|
+
name: string;
|
|
1054
|
+
status?: string;
|
|
1055
|
+
startDate?: Date | null;
|
|
1056
|
+
endDate?: Date | null;
|
|
1057
|
+
} | null;
|
|
1058
|
+
openBlockerCount?: number;
|
|
1059
|
+
isBlocked?: boolean;
|
|
1060
|
+
_count?: {
|
|
1061
|
+
actions?: number;
|
|
1062
|
+
comments?: number;
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
1065
|
+
interface TicketDetail extends Ticket {
|
|
1066
|
+
product?: {
|
|
1067
|
+
id: string;
|
|
1068
|
+
slug: string;
|
|
1069
|
+
workspaceId: string;
|
|
1070
|
+
name: string;
|
|
1071
|
+
funTicketIds?: boolean;
|
|
1072
|
+
};
|
|
1073
|
+
dependsOn?: TicketDependencyEdge[];
|
|
1074
|
+
requiredFor?: TicketDependencyEdge[];
|
|
1075
|
+
actions?: Array<{
|
|
1076
|
+
id: string;
|
|
1077
|
+
name: string;
|
|
1078
|
+
status: string;
|
|
1079
|
+
completedAt: Date | null;
|
|
1080
|
+
kanbanStatus: string | null;
|
|
1081
|
+
}>;
|
|
1082
|
+
comments?: Array<{
|
|
1083
|
+
id: string;
|
|
1084
|
+
content: string;
|
|
1085
|
+
createdAt: Date;
|
|
1086
|
+
updatedAt: Date;
|
|
1087
|
+
author: TicketAssignee;
|
|
1088
|
+
}>;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
interface TicketListOptions {
|
|
1092
|
+
productId: string;
|
|
1093
|
+
status?: TicketStatus;
|
|
1094
|
+
type?: TicketType;
|
|
1095
|
+
featureId?: string;
|
|
1096
|
+
epicId?: string;
|
|
1097
|
+
cycleId?: string;
|
|
1098
|
+
assigneeId?: string;
|
|
1099
|
+
}
|
|
1100
|
+
interface TicketCreateInput {
|
|
1101
|
+
productId: string;
|
|
1102
|
+
title: string;
|
|
1103
|
+
body?: string;
|
|
1104
|
+
type?: TicketType;
|
|
1105
|
+
status?: TicketStatus;
|
|
1106
|
+
/** 0–4; lower is higher priority. */
|
|
1107
|
+
priority?: number;
|
|
1108
|
+
points?: number;
|
|
1109
|
+
branchName?: string;
|
|
1110
|
+
prUrl?: string;
|
|
1111
|
+
designUrl?: string;
|
|
1112
|
+
specUrl?: string;
|
|
1113
|
+
links?: Record<string, string>;
|
|
1114
|
+
epicId?: string;
|
|
1115
|
+
featureId?: string;
|
|
1116
|
+
cycleId?: string;
|
|
1117
|
+
scopeId?: string;
|
|
1118
|
+
assigneeId?: string;
|
|
1119
|
+
templateId?: string;
|
|
1120
|
+
}
|
|
1121
|
+
interface TicketUpdateInput {
|
|
1122
|
+
id: string;
|
|
1123
|
+
title?: string;
|
|
1124
|
+
body?: string;
|
|
1125
|
+
type?: TicketType;
|
|
1126
|
+
status?: TicketStatus;
|
|
1127
|
+
priority?: number | null;
|
|
1128
|
+
points?: number | null;
|
|
1129
|
+
branchName?: string | null;
|
|
1130
|
+
prUrl?: string | null;
|
|
1131
|
+
designUrl?: string | null;
|
|
1132
|
+
specUrl?: string | null;
|
|
1133
|
+
links?: Record<string, string> | null;
|
|
1134
|
+
epicId?: string | null;
|
|
1135
|
+
featureId?: string | null;
|
|
1136
|
+
cycleId?: string | null;
|
|
1137
|
+
scopeId?: string | null;
|
|
1138
|
+
assigneeId?: string | null;
|
|
1139
|
+
}
|
|
1140
|
+
interface TicketCommentAddInput {
|
|
1141
|
+
ticketId: string;
|
|
1142
|
+
content: string;
|
|
1143
|
+
}
|
|
1144
|
+
interface TicketSearchOptions {
|
|
1145
|
+
productId: string;
|
|
1146
|
+
query?: string;
|
|
1147
|
+
excludeTicketId?: string;
|
|
1148
|
+
limit?: number;
|
|
1149
|
+
}
|
|
1150
|
+
declare class TicketsApi {
|
|
1151
|
+
private client;
|
|
1152
|
+
constructor(client: TrpcClient);
|
|
1153
|
+
list(options: TicketListOptions): Promise<Ticket[]>;
|
|
1154
|
+
get(id: string): Promise<TicketDetail>;
|
|
1155
|
+
create(input: TicketCreateInput): Promise<Ticket>;
|
|
1156
|
+
update(input: TicketUpdateInput): Promise<Ticket>;
|
|
1157
|
+
delete(id: string): Promise<{
|
|
1158
|
+
success: boolean;
|
|
1159
|
+
}>;
|
|
1160
|
+
search(options: TicketSearchOptions): Promise<TicketDependencyEdge[]>;
|
|
1161
|
+
/** Mark `ticketId` as blocked by `dependsOnId`. */
|
|
1162
|
+
addDependency(ticketId: string, dependsOnId: string): Promise<{
|
|
1163
|
+
id: string;
|
|
1164
|
+
dependsOn: TicketDependencyEdge;
|
|
1165
|
+
}>;
|
|
1166
|
+
removeDependency(ticketId: string, dependsOnId: string): Promise<{
|
|
1167
|
+
success: boolean;
|
|
1168
|
+
}>;
|
|
1169
|
+
addComment(input: TicketCommentAddInput): Promise<TicketComment>;
|
|
1170
|
+
deleteComment(id: string): Promise<{
|
|
1171
|
+
success: boolean;
|
|
1172
|
+
}>;
|
|
1173
|
+
/** Attach an existing action to a ticket. */
|
|
1174
|
+
linkAction(ticketId: string, actionId: string): Promise<Action>;
|
|
1175
|
+
/** Detach an action from whatever ticket it's linked to. */
|
|
1176
|
+
unlinkAction(actionId: string): Promise<Action>;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
interface Product {
|
|
1180
|
+
id: string;
|
|
1181
|
+
workspaceId: string;
|
|
1182
|
+
name: string;
|
|
1183
|
+
slug: string;
|
|
1184
|
+
description: string | null;
|
|
1185
|
+
icon: string | null;
|
|
1186
|
+
color: string | null;
|
|
1187
|
+
funTicketIds: boolean;
|
|
1188
|
+
ticketCounter: number;
|
|
1189
|
+
createdById: string | null;
|
|
1190
|
+
createdAt: Date;
|
|
1191
|
+
updatedAt: Date;
|
|
1192
|
+
_count?: {
|
|
1193
|
+
features?: number;
|
|
1194
|
+
tickets?: number;
|
|
1195
|
+
researches?: number;
|
|
1196
|
+
retrospectives?: number;
|
|
1197
|
+
};
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
interface ProductCreateInput {
|
|
1201
|
+
workspaceId: string;
|
|
1202
|
+
name: string;
|
|
1203
|
+
/** Kebab-case slug; must match `/^[a-z0-9-]+$/`. */
|
|
1204
|
+
slug: string;
|
|
1205
|
+
description?: string;
|
|
1206
|
+
icon?: string;
|
|
1207
|
+
color?: string;
|
|
1208
|
+
}
|
|
1209
|
+
interface ProductUpdateInput {
|
|
1210
|
+
id: string;
|
|
1211
|
+
name?: string;
|
|
1212
|
+
description?: string;
|
|
1213
|
+
icon?: string;
|
|
1214
|
+
color?: string;
|
|
1215
|
+
funTicketIds?: boolean;
|
|
1216
|
+
}
|
|
1217
|
+
declare class ProductsApi {
|
|
1218
|
+
private client;
|
|
1219
|
+
constructor(client: TrpcClient);
|
|
1220
|
+
list(workspaceId: string): Promise<Product[]>;
|
|
1221
|
+
get(id: string): Promise<Product>;
|
|
1222
|
+
getBySlug(workspaceId: string, slug: string): Promise<Product>;
|
|
1223
|
+
/**
|
|
1224
|
+
* Resolve a product reference (slug or CUID) to a full Product. Falls back
|
|
1225
|
+
* to slug lookup if the bare CUID lookup fails — callers can pass either.
|
|
1226
|
+
*/
|
|
1227
|
+
resolve(workspaceId: string, slugOrId: string): Promise<Product>;
|
|
1228
|
+
create(input: ProductCreateInput): Promise<Product>;
|
|
1229
|
+
update(input: ProductUpdateInput): Promise<Product>;
|
|
1230
|
+
delete(id: string): Promise<{
|
|
1231
|
+
success: boolean;
|
|
1232
|
+
}>;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
type FeatureStatus = 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED';
|
|
1236
|
+
type FeatureScopeStatus = 'PLANNED' | 'IN_PROGRESS' | 'SHIPPED' | 'DEPRECATED';
|
|
1237
|
+
interface FeatureScope {
|
|
1238
|
+
id: string;
|
|
1239
|
+
featureId: string;
|
|
1240
|
+
version: string;
|
|
1241
|
+
status: FeatureScopeStatus;
|
|
1242
|
+
summary: string | null;
|
|
1243
|
+
displayOrder: number;
|
|
1244
|
+
createdAt: Date;
|
|
1245
|
+
updatedAt: Date;
|
|
1246
|
+
}
|
|
1247
|
+
interface Feature {
|
|
1248
|
+
id: string;
|
|
1249
|
+
productId: string;
|
|
1250
|
+
name: string;
|
|
1251
|
+
description: string | null;
|
|
1252
|
+
vision: string | null;
|
|
1253
|
+
status: FeatureStatus;
|
|
1254
|
+
effort: number | null;
|
|
1255
|
+
priority: number | null;
|
|
1256
|
+
goalId: number | null;
|
|
1257
|
+
createdById: string | null;
|
|
1258
|
+
createdAt: Date;
|
|
1259
|
+
updatedAt: Date;
|
|
1260
|
+
goal?: {
|
|
1261
|
+
id: number;
|
|
1262
|
+
title: string;
|
|
1263
|
+
period: string | null;
|
|
1264
|
+
} | null;
|
|
1265
|
+
scopes?: FeatureScope[];
|
|
1266
|
+
_count?: {
|
|
1267
|
+
scopes?: number;
|
|
1268
|
+
userStories?: number;
|
|
1269
|
+
tickets?: number;
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
interface FeatureListOptions {
|
|
1274
|
+
productId: string;
|
|
1275
|
+
status?: FeatureStatus;
|
|
1276
|
+
}
|
|
1277
|
+
interface FeatureCreateInput {
|
|
1278
|
+
productId: string;
|
|
1279
|
+
name: string;
|
|
1280
|
+
description?: string;
|
|
1281
|
+
vision?: string;
|
|
1282
|
+
status?: FeatureStatus;
|
|
1283
|
+
effort?: number;
|
|
1284
|
+
/** 0–4; lower is higher priority. */
|
|
1285
|
+
priority?: number;
|
|
1286
|
+
goalId?: number;
|
|
1287
|
+
}
|
|
1288
|
+
interface FeatureUpdateInput {
|
|
1289
|
+
id: string;
|
|
1290
|
+
name?: string;
|
|
1291
|
+
description?: string;
|
|
1292
|
+
vision?: string;
|
|
1293
|
+
status?: FeatureStatus;
|
|
1294
|
+
effort?: number;
|
|
1295
|
+
priority?: number;
|
|
1296
|
+
goalId?: number | null;
|
|
1297
|
+
}
|
|
1298
|
+
declare class FeaturesApi {
|
|
1299
|
+
private client;
|
|
1300
|
+
constructor(client: TrpcClient);
|
|
1301
|
+
list(options: FeatureListOptions): Promise<Feature[]>;
|
|
1302
|
+
get(id: string): Promise<Feature>;
|
|
1303
|
+
create(input: FeatureCreateInput): Promise<Feature>;
|
|
1304
|
+
update(input: FeatureUpdateInput): Promise<Feature>;
|
|
1305
|
+
delete(id: string): Promise<{
|
|
1306
|
+
success: boolean;
|
|
1307
|
+
}>;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
type EpicStatus = 'OPEN' | 'IN_PROGRESS' | 'DONE' | 'CANCELLED';
|
|
1311
|
+
type EpicPriority = 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE';
|
|
1312
|
+
interface Epic {
|
|
1313
|
+
id: string;
|
|
1314
|
+
workspaceId: string;
|
|
1315
|
+
name: string;
|
|
1316
|
+
description: string | null;
|
|
1317
|
+
status: EpicStatus;
|
|
1318
|
+
priority: EpicPriority;
|
|
1319
|
+
startDate: Date | null;
|
|
1320
|
+
targetDate: Date | null;
|
|
1321
|
+
ownerId: string | null;
|
|
1322
|
+
createdAt: Date;
|
|
1323
|
+
updatedAt: Date;
|
|
1324
|
+
owner?: {
|
|
1325
|
+
id: string;
|
|
1326
|
+
name: string | null;
|
|
1327
|
+
email: string | null;
|
|
1328
|
+
image: string | null;
|
|
1329
|
+
} | null;
|
|
1330
|
+
_count?: {
|
|
1331
|
+
actions?: number;
|
|
1332
|
+
tickets?: number;
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
interface EpicListOptions {
|
|
1337
|
+
workspaceId: string;
|
|
1338
|
+
status?: EpicStatus;
|
|
1339
|
+
}
|
|
1340
|
+
interface EpicCreateInput {
|
|
1341
|
+
workspaceId: string;
|
|
1342
|
+
name: string;
|
|
1343
|
+
description?: string;
|
|
1344
|
+
priority?: EpicPriority;
|
|
1345
|
+
startDate?: Date;
|
|
1346
|
+
targetDate?: Date;
|
|
1347
|
+
}
|
|
1348
|
+
interface EpicUpdateInput {
|
|
1349
|
+
id: string;
|
|
1350
|
+
name?: string;
|
|
1351
|
+
description?: string | null;
|
|
1352
|
+
status?: EpicStatus;
|
|
1353
|
+
priority?: EpicPriority;
|
|
1354
|
+
startDate?: Date | null;
|
|
1355
|
+
targetDate?: Date | null;
|
|
1356
|
+
}
|
|
1357
|
+
declare class EpicsApi {
|
|
1358
|
+
private client;
|
|
1359
|
+
constructor(client: TrpcClient);
|
|
1360
|
+
list(options: EpicListOptions): Promise<Epic[]>;
|
|
1361
|
+
get(id: string): Promise<Epic>;
|
|
1362
|
+
create(input: EpicCreateInput): Promise<Epic>;
|
|
1363
|
+
update(input: EpicUpdateInput): Promise<Epic>;
|
|
1364
|
+
delete(id: string): Promise<{
|
|
1365
|
+
success: boolean;
|
|
1366
|
+
}>;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
type TagEntityType = 'action' | 'ticket' | 'feature' | 'epic';
|
|
1370
|
+
interface Tag {
|
|
1371
|
+
id: string;
|
|
1372
|
+
name: string;
|
|
1373
|
+
slug: string;
|
|
1374
|
+
color: string;
|
|
1375
|
+
description: string | null;
|
|
1376
|
+
category: string | null;
|
|
1377
|
+
isSystem: boolean;
|
|
1378
|
+
workspaceId: string | null;
|
|
1379
|
+
createdById: string | null;
|
|
1380
|
+
createdAt: Date;
|
|
1381
|
+
updatedAt: Date;
|
|
1382
|
+
}
|
|
1383
|
+
interface TagListResult {
|
|
1384
|
+
globalTags: Tag[];
|
|
1385
|
+
workspaceTags: Tag[];
|
|
1386
|
+
allTags: Tag[];
|
|
1387
|
+
}
|
|
1388
|
+
|
|
1389
|
+
interface LabelListOptions {
|
|
1390
|
+
workspaceId?: string;
|
|
1391
|
+
category?: string | null;
|
|
1392
|
+
}
|
|
1393
|
+
interface LabelCreateInput {
|
|
1394
|
+
workspaceId: string;
|
|
1395
|
+
name: string;
|
|
1396
|
+
color: string;
|
|
1397
|
+
description?: string;
|
|
1398
|
+
category?: string | null;
|
|
1399
|
+
}
|
|
1400
|
+
interface SetEntityTagsInput {
|
|
1401
|
+
entityType: TagEntityType;
|
|
1402
|
+
entityId: string;
|
|
1403
|
+
tagIds: string[];
|
|
1404
|
+
}
|
|
1405
|
+
interface ListForEntityInput {
|
|
1406
|
+
entityType: TagEntityType;
|
|
1407
|
+
entityId: string;
|
|
1408
|
+
}
|
|
1409
|
+
interface SetEntityTagsResult {
|
|
1410
|
+
entityType: TagEntityType;
|
|
1411
|
+
entityId: string;
|
|
1412
|
+
tags: Tag[];
|
|
1413
|
+
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Labels API. Backed by the server's `tag.*` tRPC procedures. "Label" is the
|
|
1416
|
+
* user-facing word for a Tag (specifically when `category` is null).
|
|
1417
|
+
*/
|
|
1418
|
+
declare class LabelsApi {
|
|
1419
|
+
private client;
|
|
1420
|
+
constructor(client: TrpcClient);
|
|
1421
|
+
list(options?: LabelListOptions): Promise<TagListResult>;
|
|
1422
|
+
create(input: LabelCreateInput): Promise<Tag>;
|
|
1423
|
+
setEntityTags(input: SetEntityTagsInput): Promise<SetEntityTagsResult>;
|
|
1424
|
+
listForEntity(input: ListForEntityInput): Promise<Tag[]>;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
669
1427
|
interface ExponentialConfig {
|
|
670
1428
|
apiUrl: string;
|
|
671
1429
|
token: string;
|
|
@@ -692,14 +1450,20 @@ declare class ExponentialClient {
|
|
|
692
1450
|
private config;
|
|
693
1451
|
private client;
|
|
694
1452
|
actions: ActionsApi;
|
|
1453
|
+
actionComments: ActionCommentsApi;
|
|
695
1454
|
projects: ProjectsApi;
|
|
696
1455
|
workspaces: WorkspacesApi;
|
|
697
1456
|
contacts: ContactsApi;
|
|
698
1457
|
pipelines: PipelinesApi;
|
|
1458
|
+
tickets: TicketsApi;
|
|
1459
|
+
products: ProductsApi;
|
|
1460
|
+
features: FeaturesApi;
|
|
1461
|
+
epics: EpicsApi;
|
|
1462
|
+
labels: LabelsApi;
|
|
699
1463
|
constructor(config: {
|
|
700
1464
|
token: string;
|
|
701
1465
|
apiUrl: string;
|
|
702
1466
|
});
|
|
703
1467
|
}
|
|
704
1468
|
|
|
705
|
-
export { type Action, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionsListOutput, type AddInteractionInput, type Contact, type ContactCreateInput, type ContactInteraction, type ContactListOutput, type ContactUpdateInput, type ContactsListOptions, type Deal, type DealActivity, type DealCreateInput, type DealMoveInput, type DealUpdateInput, ExponentialClient, type ExponentialConfig, type InteractionDirection, type InteractionType, type KanbanStatus, type Pipeline, type PipelineStage, type Priority, type Project, type ProjectOutput, type ProjectsListOutput, type Workspace, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
|
|
1469
|
+
export { type Action, type ActionComment, type ActionCommentAddInput, type ActionCommentUpdateInput, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionsListOutput, type AddInteractionInput, type CommentAuthor, type Contact, type ContactCreateInput, type ContactInteraction, type ContactListOutput, type ContactUpdateInput, type ContactsListOptions, type Deal, type DealActivity, type DealCreateInput, type DealMoveInput, type DealUpdateInput, type Epic, type EpicCreateInput, type EpicListOptions, type EpicPriority, type EpicStatus, type EpicUpdateInput, ExponentialClient, type ExponentialConfig, type Feature, type FeatureCreateInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type InteractionDirection, type InteractionType, type KanbanStatus, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectOutput, type ProjectsListOutput, type SetEntityTagsInput, type SetEntityTagsResult, type Tag, type TagEntityType, type TagListResult, type Ticket, type TicketAssignee, type TicketComment, type TicketCommentAddInput, type TicketCreateInput, type TicketDependencyEdge, type TicketDetail, type TicketListOptions, type TicketSearchOptions, type TicketStatus, type TicketType, type TicketUpdateInput, type Workspace, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
|
package/dist/index.js
CHANGED
|
@@ -85,6 +85,29 @@ var ActionsApi = class {
|
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
87
|
|
|
88
|
+
// src/actionComments.ts
|
|
89
|
+
var ActionCommentsApi = class {
|
|
90
|
+
constructor(client) {
|
|
91
|
+
this.client = client;
|
|
92
|
+
}
|
|
93
|
+
async list(actionId) {
|
|
94
|
+
return await this.client.actionComment.getComments.query({
|
|
95
|
+
actionId
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
async add(input) {
|
|
99
|
+
return await this.client.actionComment.addComment.mutate(input);
|
|
100
|
+
}
|
|
101
|
+
async update(input) {
|
|
102
|
+
return await this.client.actionComment.updateComment.mutate(input);
|
|
103
|
+
}
|
|
104
|
+
async delete(commentId) {
|
|
105
|
+
return await this.client.actionComment.deleteComment.mutate({
|
|
106
|
+
commentId
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
88
111
|
// src/projects.ts
|
|
89
112
|
var ProjectsApi = class {
|
|
90
113
|
constructor(client) {
|
|
@@ -168,6 +191,193 @@ var PipelinesApi = class {
|
|
|
168
191
|
}
|
|
169
192
|
};
|
|
170
193
|
|
|
194
|
+
// src/tickets.ts
|
|
195
|
+
var TicketsApi = class {
|
|
196
|
+
constructor(client) {
|
|
197
|
+
this.client = client;
|
|
198
|
+
}
|
|
199
|
+
async list(options) {
|
|
200
|
+
return await this.client.product.ticket.list.query(options);
|
|
201
|
+
}
|
|
202
|
+
async get(id) {
|
|
203
|
+
return await this.client.product.ticket.getById.query({
|
|
204
|
+
id
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
async create(input) {
|
|
208
|
+
return await this.client.product.ticket.create.mutate(input);
|
|
209
|
+
}
|
|
210
|
+
async update(input) {
|
|
211
|
+
return await this.client.product.ticket.update.mutate(input);
|
|
212
|
+
}
|
|
213
|
+
async delete(id) {
|
|
214
|
+
return await this.client.product.ticket.delete.mutate({ id });
|
|
215
|
+
}
|
|
216
|
+
async search(options) {
|
|
217
|
+
return await this.client.product.ticket.search.query(
|
|
218
|
+
options
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
/** Mark `ticketId` as blocked by `dependsOnId`. */
|
|
222
|
+
async addDependency(ticketId, dependsOnId) {
|
|
223
|
+
return await this.client.product.ticket.addDependency.mutate({
|
|
224
|
+
ticketId,
|
|
225
|
+
dependsOnId
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
async removeDependency(ticketId, dependsOnId) {
|
|
229
|
+
return await this.client.product.ticket.removeDependency.mutate({
|
|
230
|
+
ticketId,
|
|
231
|
+
dependsOnId
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
async addComment(input) {
|
|
235
|
+
return await this.client.product.ticket.addComment.mutate(
|
|
236
|
+
input
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
async deleteComment(id) {
|
|
240
|
+
return await this.client.product.ticket.deleteComment.mutate({
|
|
241
|
+
id
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
/** Attach an existing action to a ticket. */
|
|
245
|
+
async linkAction(ticketId, actionId) {
|
|
246
|
+
return await this.client.product.ticket.linkAction.mutate({
|
|
247
|
+
ticketId,
|
|
248
|
+
actionId
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/** Detach an action from whatever ticket it's linked to. */
|
|
252
|
+
async unlinkAction(actionId) {
|
|
253
|
+
return await this.client.product.ticket.unlinkAction.mutate({
|
|
254
|
+
actionId
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
// src/products.ts
|
|
260
|
+
var ProductsApi = class {
|
|
261
|
+
constructor(client) {
|
|
262
|
+
this.client = client;
|
|
263
|
+
}
|
|
264
|
+
async list(workspaceId) {
|
|
265
|
+
return await this.client.product.product.list.query({
|
|
266
|
+
workspaceId
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
async get(id) {
|
|
270
|
+
return await this.client.product.product.getById.query({ id });
|
|
271
|
+
}
|
|
272
|
+
async getBySlug(workspaceId, slug) {
|
|
273
|
+
return await this.client.product.product.getBySlug.query({
|
|
274
|
+
workspaceId,
|
|
275
|
+
slug
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Resolve a product reference (slug or CUID) to a full Product. Falls back
|
|
280
|
+
* to slug lookup if the bare CUID lookup fails — callers can pass either.
|
|
281
|
+
*/
|
|
282
|
+
async resolve(workspaceId, slugOrId) {
|
|
283
|
+
const looksLikeId = /^c[a-z0-9]{20,}$/.test(slugOrId);
|
|
284
|
+
if (looksLikeId) {
|
|
285
|
+
try {
|
|
286
|
+
return await this.get(slugOrId);
|
|
287
|
+
} catch {
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return await this.getBySlug(workspaceId, slugOrId);
|
|
291
|
+
}
|
|
292
|
+
async create(input) {
|
|
293
|
+
return await this.client.product.product.create.mutate(input);
|
|
294
|
+
}
|
|
295
|
+
async update(input) {
|
|
296
|
+
return await this.client.product.product.update.mutate(input);
|
|
297
|
+
}
|
|
298
|
+
async delete(id) {
|
|
299
|
+
return await this.client.product.product.delete.mutate({ id });
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
// src/features.ts
|
|
304
|
+
var FeaturesApi = class {
|
|
305
|
+
constructor(client) {
|
|
306
|
+
this.client = client;
|
|
307
|
+
}
|
|
308
|
+
async list(options) {
|
|
309
|
+
return await this.client.product.feature.list.query({
|
|
310
|
+
productId: options.productId,
|
|
311
|
+
status: options.status
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
async get(id) {
|
|
315
|
+
return await this.client.product.feature.getById.query({ id });
|
|
316
|
+
}
|
|
317
|
+
async create(input) {
|
|
318
|
+
return await this.client.product.feature.create.mutate(input);
|
|
319
|
+
}
|
|
320
|
+
async update(input) {
|
|
321
|
+
return await this.client.product.feature.update.mutate(input);
|
|
322
|
+
}
|
|
323
|
+
async delete(id) {
|
|
324
|
+
return await this.client.product.feature.delete.mutate({ id });
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
// src/epics.ts
|
|
329
|
+
var EpicsApi = class {
|
|
330
|
+
constructor(client) {
|
|
331
|
+
this.client = client;
|
|
332
|
+
}
|
|
333
|
+
async list(options) {
|
|
334
|
+
return await this.client.epic.list.query({
|
|
335
|
+
workspaceId: options.workspaceId,
|
|
336
|
+
status: options.status
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
async get(id) {
|
|
340
|
+
return await this.client.epic.getById.query({ id });
|
|
341
|
+
}
|
|
342
|
+
async create(input) {
|
|
343
|
+
return await this.client.epic.create.mutate(input);
|
|
344
|
+
}
|
|
345
|
+
async update(input) {
|
|
346
|
+
return await this.client.epic.update.mutate(input);
|
|
347
|
+
}
|
|
348
|
+
async delete(id) {
|
|
349
|
+
return await this.client.epic.delete.mutate({ id });
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
// src/labels.ts
|
|
354
|
+
var LabelsApi = class {
|
|
355
|
+
constructor(client) {
|
|
356
|
+
this.client = client;
|
|
357
|
+
}
|
|
358
|
+
async list(options = {}) {
|
|
359
|
+
return await this.client.tag.list.query({
|
|
360
|
+
workspaceId: options.workspaceId,
|
|
361
|
+
category: options.category
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
async create(input) {
|
|
365
|
+
return await this.client.tag.create.mutate({
|
|
366
|
+
workspaceId: input.workspaceId,
|
|
367
|
+
name: input.name,
|
|
368
|
+
color: input.color,
|
|
369
|
+
description: input.description,
|
|
370
|
+
category: input.category
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
async setEntityTags(input) {
|
|
374
|
+
return await this.client.tag.setEntityTags.mutate(input);
|
|
375
|
+
}
|
|
376
|
+
async listForEntity(input) {
|
|
377
|
+
return await this.client.tag.listForEntity.query(input);
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
|
|
171
381
|
// src/config.ts
|
|
172
382
|
import Conf from "conf";
|
|
173
383
|
var schema = {
|
|
@@ -251,17 +461,29 @@ var ExponentialClient = class {
|
|
|
251
461
|
this.config = config;
|
|
252
462
|
this.client = createClient(this.config);
|
|
253
463
|
this.actions = new ActionsApi(this.client);
|
|
464
|
+
this.actionComments = new ActionCommentsApi(this.client);
|
|
254
465
|
this.projects = new ProjectsApi(this.client);
|
|
255
466
|
this.workspaces = new WorkspacesApi(this.client);
|
|
256
467
|
this.contacts = new ContactsApi(this.client);
|
|
257
468
|
this.pipelines = new PipelinesApi(this.client);
|
|
469
|
+
this.tickets = new TicketsApi(this.client);
|
|
470
|
+
this.products = new ProductsApi(this.client);
|
|
471
|
+
this.features = new FeaturesApi(this.client);
|
|
472
|
+
this.epics = new EpicsApi(this.client);
|
|
473
|
+
this.labels = new LabelsApi(this.client);
|
|
258
474
|
}
|
|
259
475
|
client;
|
|
260
476
|
actions;
|
|
477
|
+
actionComments;
|
|
261
478
|
projects;
|
|
262
479
|
workspaces;
|
|
263
480
|
contacts;
|
|
264
481
|
pipelines;
|
|
482
|
+
tickets;
|
|
483
|
+
products;
|
|
484
|
+
features;
|
|
485
|
+
epics;
|
|
486
|
+
labels;
|
|
265
487
|
};
|
|
266
488
|
export {
|
|
267
489
|
ExponentialClient,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/client.ts","../src/actions.ts","../src/projects.ts","../src/workspaces.ts","../src/contacts.ts","../src/pipelines.ts","../src/config.ts","../src/index.ts"],"sourcesContent":["import { createTRPCClient, httpBatchLink, TRPCClientError } from '@trpc/client';\nimport superjson from 'superjson';\n\ntype ActionInput = {\n assigneeId?: string;\n};\n\ntype KanbanInput = {\n projectId?: string;\n assigneeId?: string;\n kanbanStatus?: 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'IN_REVIEW' | 'DONE' | 'CANCELLED';\n};\n\ntype TodayInput = {\n workspaceId?: string;\n};\n\ntype DateRangeInput = {\n startDate: Date;\n endDate: Date;\n workspaceId?: string;\n};\n\ntype ProjectInput = {\n include?: {\n actions?: boolean;\n };\n workspaceId?: string;\n};\n\ntype ActionStatus = 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'DELETED' | 'DRAFT';\ntype ActionKanbanStatus = 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'IN_REVIEW' | 'DONE' | 'CANCELLED';\ntype ActionPriority = 'Quick' | 'Scheduled' | '1st Priority' | '2nd Priority' | '3rd Priority' | '4th Priority' | '5th Priority' | 'Errand' | 'Remember' | 'Watch' | 'Someday Maybe';\n\ntype ActionCreateInput = {\n name: string;\n description?: string;\n projectId?: string;\n workspaceId?: string;\n dueDate?: Date;\n scheduledStart?: Date;\n scheduledEnd?: Date;\n duration?: number;\n priority?: ActionPriority;\n status?: ActionStatus;\n epicId?: string;\n effortEstimate?: number;\n blockedByIds?: string[];\n};\n\ntype ActionUpdateInput = {\n id: string;\n name?: string;\n description?: string;\n projectId?: string;\n workspaceId?: string | null;\n dueDate?: Date | null;\n scheduledStart?: Date | null;\n scheduledEnd?: Date | null;\n duration?: number | null;\n priority?: ActionPriority;\n status?: ActionStatus;\n kanbanStatus?: ActionKanbanStatus;\n epicId?: string | null;\n effortEstimate?: number | null;\n blockedByIds?: string[];\n};\n\nexport interface TrpcClient {\n action: {\n getAll: { query: (input?: ActionInput) => Promise<unknown[]> };\n getKanbanActions: { query: (input?: KanbanInput) => Promise<unknown[]> };\n getToday: { query: (input?: TodayInput) => Promise<unknown[]> };\n getByDateRange: { query: (input: DateRangeInput) => Promise<unknown[]> };\n getProjectActions: { query: (input: { projectId: string; assigneeId?: string }) => Promise<unknown[]> };\n create: { mutate: (input: ActionCreateInput) => Promise<unknown> };\n update: { mutate: (input: ActionUpdateInput) => Promise<unknown> };\n };\n project: {\n getAll: { query: (input?: ProjectInput) => Promise<unknown[]> };\n };\n workspace: {\n list: { query: () => Promise<unknown[]> };\n };\n crmApi: {\n contactList: { query: (input: { workspaceId: string; search?: string; tags?: string[]; organizationId?: string; limit?: number; cursor?: string }) => Promise<unknown> };\n contactGet: { query: (input: { id: string; includeInteractions?: boolean }) => Promise<unknown> };\n contactCreate: { mutate: (input: { workspaceId: string; firstName?: string; lastName?: string; email?: string | null; phone?: string; linkedIn?: string; telegram?: string; twitter?: string; github?: string; bluesky?: string; about?: string; profileType?: string; skills?: string[]; tags?: string[]; organizationId?: string }) => Promise<unknown> };\n contactUpdate: { mutate: (input: { id: string; firstName?: string; lastName?: string; email?: string | null; phone?: string | null; linkedIn?: string | null; telegram?: string | null; twitter?: string | null; github?: string | null; bluesky?: string | null; about?: string; profileType?: string; skills?: string[]; tags?: string[]; organizationId?: string | null }) => Promise<unknown> };\n contactDelete: { mutate: (input: { id: string }) => Promise<unknown> };\n contactAddInteraction: { mutate: (input: { contactId: string; type: string; direction: string; subject?: string; notes?: string; metadata?: unknown }) => Promise<unknown> };\n pipelineGet: { query: (input: { workspaceId: string }) => Promise<unknown> };\n pipelineGetStages: { query: (input: { workspaceId: string }) => Promise<unknown[]> };\n dealList: { query: (input: { workspaceId: string }) => Promise<unknown[]> };\n dealGet: { query: (input: { id: string }) => Promise<unknown> };\n dealCreate: { mutate: (input: { workspaceId: string; stageId: string; title: string; description?: string; value?: number; currency?: string; probability?: number; expectedCloseDate?: Date; contactId?: string; organizationId?: string; assignedToId?: string }) => Promise<unknown> };\n dealUpdate: { mutate: (input: { id: string; title?: string; description?: string | null; value?: number | null; currency?: string; probability?: number | null; expectedCloseDate?: Date | null; contactId?: string | null; organizationId?: string | null; assignedToId?: string | null }) => Promise<unknown> };\n dealMove: { mutate: (input: { id: string; stageId: string; stageOrder: number }) => Promise<unknown> };\n dealDelete: { mutate: (input: { id: string }) => Promise<unknown> };\n };\n}\n\nexport function createClient(config: { token: string; apiUrl: string }): TrpcClient {\n const apiUrl = config.apiUrl.replace(/\\/+$/, '');\n\n return createTRPCClient<any>({\n links: [\n httpBatchLink({\n url: `${apiUrl}/api/trpc`,\n headers() {\n return {\n Authorization: `Bearer ${config.token}`,\n };\n },\n transformer: superjson,\n }),\n ],\n }) as unknown as TrpcClient;\n}\n\nexport function isTRPCError(error: unknown): error is TRPCClientError<any> {\n return error instanceof TRPCClientError;\n}\n\nexport { TRPCClientError };\n","import type { TrpcClient } from './client.js';\nimport type { Action, KanbanStatus, Priority } from './types/action.js';\n\nexport interface ActionsListOptions {\n projectId?: string;\n status?: KanbanStatus;\n assigneeId?: string;\n}\n\nexport interface ActionsKanbanOptions {\n projectId?: string;\n status?: KanbanStatus;\n assigneeId?: string;\n}\n\nexport type ActionStatus = 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'DELETED' | 'DRAFT';\n\nexport interface ActionCreateInput {\n name: string;\n description?: string;\n projectId?: string;\n workspaceId?: string;\n dueDate?: Date;\n scheduledStart?: Date;\n scheduledEnd?: Date;\n duration?: number;\n priority?: Priority;\n status?: ActionStatus;\n epicId?: string;\n effortEstimate?: number;\n blockedByIds?: string[];\n}\n\nexport interface ActionUpdateInput {\n id: string;\n name?: string;\n description?: string;\n projectId?: string;\n workspaceId?: string | null;\n dueDate?: Date | null;\n scheduledStart?: Date | null;\n scheduledEnd?: Date | null;\n duration?: number | null;\n priority?: Priority;\n status?: ActionStatus;\n kanbanStatus?: KanbanStatus;\n epicId?: string | null;\n effortEstimate?: number | null;\n blockedByIds?: string[];\n}\n\nexport class ActionsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ActionsListOptions = {}): Promise<Action[]> {\n const { projectId, status, assigneeId } = options;\n let actions: Action[];\n\n if (projectId) {\n actions = await this.client.action.getProjectActions.query({\n projectId,\n assigneeId,\n }) as Action[];\n } else if (status) {\n actions = await this.client.action.getKanbanActions.query({\n kanbanStatus: status,\n assigneeId,\n }) as Action[];\n } else {\n actions = await this.client.action.getAll.query({\n assigneeId,\n }) as Action[];\n }\n\n // Match CLI behavior: hide completed/cancelled unless status specified\n if (!status) {\n actions = actions.filter(action =>\n action.status !== 'COMPLETED' &&\n action.status !== 'CANCELLED' &&\n action.kanbanStatus !== 'DONE' &&\n action.kanbanStatus !== 'CANCELLED'\n );\n }\n\n return actions;\n }\n\n async getToday(workspaceId?: string): Promise<Action[]> {\n return await this.client.action.getToday.query({\n workspaceId,\n }) as Action[];\n }\n\n async getByDateRange(start: Date, end: Date, workspaceId?: string): Promise<Action[]> {\n return await this.client.action.getByDateRange.query({\n startDate: start,\n endDate: end,\n workspaceId,\n }) as Action[];\n }\n\n async getKanban(options: ActionsKanbanOptions = {}): Promise<Action[]> {\n const { projectId, status, assigneeId } = options;\n\n return await this.client.action.getKanbanActions.query({\n projectId,\n kanbanStatus: status,\n assigneeId,\n }) as Action[];\n }\n\n async getProjectActions(projectId: string, assigneeId?: string): Promise<Action[]> {\n return await this.client.action.getProjectActions.query({\n projectId,\n assigneeId,\n }) as Action[];\n }\n\n async create(input: ActionCreateInput): Promise<Action> {\n return await this.client.action.create.mutate(input) as Action;\n }\n\n async update(input: ActionUpdateInput): Promise<Action> {\n return await this.client.action.update.mutate(input) as Action;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Project } from './types/project.js';\n\nexport interface ProjectsListOptions {\n workspaceId?: string;\n includeActions?: boolean;\n}\n\nexport class ProjectsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ProjectsListOptions = {}): Promise<Project[]> {\n const { workspaceId, includeActions } = options;\n\n return await this.client.project.getAll.query({\n workspaceId,\n include: includeActions ? { actions: true } : undefined,\n }) as Project[];\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Workspace } from './types/workspace.js';\n\nexport class WorkspacesApi {\n constructor(private client: TrpcClient) {}\n\n async list(): Promise<Workspace[]> {\n return await this.client.workspace.list.query() as Workspace[];\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Contact, ContactInteraction, ContactListOutput, InteractionType, InteractionDirection } from './types/contact.js';\n\nexport interface ContactsListOptions {\n workspaceId: string;\n search?: string;\n tags?: string[];\n organizationId?: string;\n limit?: number;\n cursor?: string;\n}\n\nexport interface ContactCreateInput {\n workspaceId: string;\n firstName?: string;\n lastName?: string;\n email?: string | null;\n phone?: string;\n linkedIn?: string;\n telegram?: string;\n twitter?: string;\n github?: string;\n bluesky?: string;\n about?: string;\n profileType?: string;\n skills?: string[];\n tags?: string[];\n organizationId?: string;\n}\n\nexport interface ContactUpdateInput {\n id: string;\n firstName?: string;\n lastName?: string;\n email?: string | null;\n phone?: string | null;\n linkedIn?: string | null;\n telegram?: string | null;\n twitter?: string | null;\n github?: string | null;\n bluesky?: string | null;\n about?: string;\n profileType?: string;\n skills?: string[];\n tags?: string[];\n organizationId?: string | null;\n}\n\nexport interface AddInteractionInput {\n contactId: string;\n type: InteractionType;\n direction: InteractionDirection;\n subject?: string;\n notes?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport class ContactsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ContactsListOptions): Promise<ContactListOutput> {\n return await this.client.crmApi.contactList.query(options) as ContactListOutput;\n }\n\n async get(id: string, options?: { includeInteractions?: boolean }): Promise<Contact> {\n return await this.client.crmApi.contactGet.query({\n id,\n includeInteractions: options?.includeInteractions,\n }) as Contact;\n }\n\n async create(input: ContactCreateInput): Promise<Contact> {\n return await this.client.crmApi.contactCreate.mutate(input) as Contact;\n }\n\n async update(input: ContactUpdateInput): Promise<Contact> {\n return await this.client.crmApi.contactUpdate.mutate(input) as Contact;\n }\n\n async delete(id: string): Promise<void> {\n await this.client.crmApi.contactDelete.mutate({ id });\n }\n\n async addInteraction(input: AddInteractionInput): Promise<ContactInteraction> {\n return await this.client.crmApi.contactAddInteraction.mutate(input) as ContactInteraction;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Pipeline, PipelineStage, Deal } from './types/pipeline.js';\n\nexport interface DealCreateInput {\n workspaceId: string;\n stageId: string;\n title: string;\n description?: string;\n value?: number;\n currency?: string;\n probability?: number;\n expectedCloseDate?: Date;\n contactId?: string;\n organizationId?: string;\n assignedToId?: string;\n}\n\nexport interface DealUpdateInput {\n id: string;\n title?: string;\n description?: string | null;\n value?: number | null;\n currency?: string;\n probability?: number | null;\n expectedCloseDate?: Date | null;\n contactId?: string | null;\n organizationId?: string | null;\n assignedToId?: string | null;\n}\n\nexport interface DealMoveInput {\n id: string;\n stageId: string;\n stageOrder: number;\n}\n\nexport class PipelinesApi {\n constructor(private client: TrpcClient) {}\n\n async get(workspaceId: string): Promise<Pipeline | null> {\n return await this.client.crmApi.pipelineGet.query({ workspaceId }) as Pipeline | null;\n }\n\n async getStages(workspaceId: string): Promise<PipelineStage[]> {\n return await this.client.crmApi.pipelineGetStages.query({ workspaceId }) as PipelineStage[];\n }\n\n async listDeals(workspaceId: string): Promise<Deal[]> {\n return await this.client.crmApi.dealList.query({ workspaceId }) as Deal[];\n }\n\n async getDeal(id: string): Promise<Deal> {\n return await this.client.crmApi.dealGet.query({ id }) as Deal;\n }\n\n async createDeal(input: DealCreateInput): Promise<Deal> {\n return await this.client.crmApi.dealCreate.mutate(input) as Deal;\n }\n\n async updateDeal(input: DealUpdateInput): Promise<Deal> {\n return await this.client.crmApi.dealUpdate.mutate(input) as Deal;\n }\n\n async moveDeal(input: DealMoveInput): Promise<Deal> {\n return await this.client.crmApi.dealMove.mutate(input) as Deal;\n }\n\n async deleteDeal(id: string): Promise<void> {\n await this.client.crmApi.dealDelete.mutate({ id });\n }\n}\n","import Conf from 'conf';\n\nexport interface ExponentialConfig {\n apiUrl: string;\n token: string;\n tokenExpiry?: string;\n defaultWorkspaceId?: string;\n defaultWorkspaceSlug?: string;\n}\n\nconst schema = {\n apiUrl: {\n type: 'string' as const,\n default: '',\n },\n token: {\n type: 'string' as const,\n default: '',\n },\n tokenExpiry: {\n type: 'string' as const,\n default: '',\n },\n defaultWorkspaceId: {\n type: 'string' as const,\n default: '',\n },\n defaultWorkspaceSlug: {\n type: 'string' as const,\n default: '',\n },\n};\n\nfunction createStore(projectName: string) {\n return new Conf<ExponentialConfig>({\n projectName,\n schema,\n });\n}\n\nfunction readConfig(store: Conf<ExponentialConfig>): ExponentialConfig {\n return {\n apiUrl: store.get('apiUrl'),\n token: store.get('token'),\n tokenExpiry: store.get('tokenExpiry'),\n defaultWorkspaceId: store.get('defaultWorkspaceId'),\n defaultWorkspaceSlug: store.get('defaultWorkspaceSlug'),\n };\n}\n\nfunction writeConfig(store: Conf<ExponentialConfig>, values: Partial<ExponentialConfig>): void {\n if (values.apiUrl !== undefined) store.set('apiUrl', values.apiUrl);\n if (values.token !== undefined) store.set('token', values.token);\n if (values.tokenExpiry !== undefined) store.set('tokenExpiry', values.tokenExpiry);\n if (values.defaultWorkspaceId !== undefined) store.set('defaultWorkspaceId', values.defaultWorkspaceId);\n if (values.defaultWorkspaceSlug !== undefined) store.set('defaultWorkspaceSlug', values.defaultWorkspaceSlug);\n}\n\nconst defaultStore = createStore('exponential-sdk');\n\nexport function createConfigStore(options?: { projectName?: string }) {\n const store = createStore(options?.projectName ?? 'exponential-sdk');\n\n return {\n loadConfig: () => readConfig(store),\n saveConfig: (values: Partial<ExponentialConfig>) => writeConfig(store, values),\n clearConfig: () => store.clear(),\n isAuthenticated: () => {\n const cfg = readConfig(store);\n return Boolean(cfg.token && cfg.apiUrl);\n },\n getConfigPath: () => store.path,\n };\n}\n\nexport function loadConfig(): ExponentialConfig {\n return readConfig(defaultStore);\n}\n\nexport function saveConfig(values: Partial<ExponentialConfig>): void {\n writeConfig(defaultStore, values);\n}\n\nexport function clearConfig(): void {\n defaultStore.clear();\n}\n\nexport function isAuthenticated(): boolean {\n const cfg = readConfig(defaultStore);\n return Boolean(cfg.token && cfg.apiUrl);\n}\n\nexport function getConfigPath(): string {\n return defaultStore.path;\n}\n","import { createClient, isTRPCError, TRPCClientError, type TrpcClient } from './client.js';\nimport { ActionsApi } from './actions.js';\nimport { ProjectsApi } from './projects.js';\nimport { WorkspacesApi } from './workspaces.js';\nimport { ContactsApi } from './contacts.js';\nimport { PipelinesApi } from './pipelines.js';\n\nexport class ExponentialClient {\n private client: TrpcClient;\n actions: ActionsApi;\n projects: ProjectsApi;\n workspaces: WorkspacesApi;\n contacts: ContactsApi;\n pipelines: PipelinesApi;\n\n constructor(private config: { token: string; apiUrl: string }) {\n this.client = createClient(this.config);\n this.actions = new ActionsApi(this.client);\n this.projects = new ProjectsApi(this.client);\n this.workspaces = new WorkspacesApi(this.client);\n this.contacts = new ContactsApi(this.client);\n this.pipelines = new PipelinesApi(this.client);\n }\n}\n\nexport {\n createConfigStore,\n loadConfig,\n saveConfig,\n clearConfig,\n isAuthenticated,\n getConfigPath,\n} from './config.js';\n\nexport type { ExponentialConfig } from './config.js';\nexport type {\n Action,\n ActionOutput,\n ActionsListOutput,\n KanbanStatus,\n Priority,\n} from './types/action.js';\nexport type {\n ActionCreateInput,\n ActionUpdateInput,\n ActionStatus,\n} from './actions.js';\nexport type { Project, ProjectOutput, ProjectsListOutput } from './types/project.js';\nexport type { Workspace, WorkspaceOutput, WorkspacesListOutput } from './types/workspace.js';\nexport type {\n Contact,\n ContactInteraction,\n ContactListOutput,\n InteractionType,\n InteractionDirection,\n} from './types/contact.js';\nexport type {\n ContactCreateInput,\n ContactUpdateInput,\n AddInteractionInput,\n ContactsListOptions,\n} from './contacts.js';\nexport type {\n Pipeline,\n PipelineStage,\n Deal,\n DealActivity,\n} from './types/pipeline.js';\nexport type {\n DealCreateInput,\n DealUpdateInput,\n DealMoveInput,\n} from './pipelines.js';\nexport { isTRPCError, TRPCClientError };\n"],"mappings":";AAAA,SAAS,kBAAkB,eAAe,uBAAuB;AACjE,OAAO,eAAe;AAqGf,SAAS,aAAa,QAAuD;AAClF,QAAM,SAAS,OAAO,OAAO,QAAQ,QAAQ,EAAE;AAE/C,SAAO,iBAAsB;AAAA,IAC3B,OAAO;AAAA,MACL,cAAc;AAAA,QACZ,KAAK,GAAG,MAAM;AAAA,QACd,UAAU;AACR,iBAAO;AAAA,YACL,eAAe,UAAU,OAAO,KAAK;AAAA,UACvC;AAAA,QACF;AAAA,QACA,aAAa;AAAA,MACf,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;AAEO,SAAS,YAAY,OAA+C;AACzE,SAAO,iBAAiB;AAC1B;;;ACvEO,IAAM,aAAN,MAAiB;AAAA,EACtB,YAAoB,QAAoB;AAApB;AAAA,EAAqB;AAAA,EAEzC,MAAM,KAAK,UAA8B,CAAC,GAAsB;AAC9D,UAAM,EAAE,WAAW,QAAQ,WAAW,IAAI;AAC1C,QAAI;AAEJ,QAAI,WAAW;AACb,gBAAU,MAAM,KAAK,OAAO,OAAO,kBAAkB,MAAM;AAAA,QACzD;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,WAAW,QAAQ;AACjB,gBAAU,MAA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AM;AACrB;AAEO,SAAS,kBAA2B;AACzC,QAAM,MAAM,WAAW,YAAY;AACnC,SAAO,QAAQ,IAAI,SAAS,IAAI,MAAM;AACxC;AAEO,SAAS,gBAAwB;AACtC,SAAO,aAAa;AACtB;;;ACvFO,IAAM,oBAAN,MAAwB;AAAA,EAQ7B,YAAoB,QAA2C;AAA3C;AAClB,SAAK,SAAS,aAAa,KAAK,MAAM;AACtC,SAAK,UAAU,IAAI,WAAW,KAAK,MAAM;AACzC,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,SAAK,aAAa,IAAI,cAAc,KAAK,MAAM;AAC/C,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,SAAK,YAAY,IAAI,aAAa,KAAK,MAAM;AAAA,EAC/C;AAAA,EAdQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAUF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/client.ts","../src/actions.ts","../src/actionComments.ts","../src/projects.ts","../src/workspaces.ts","../src/contacts.ts","../src/pipelines.ts","../src/tickets.ts","../src/products.ts","../src/features.ts","../src/epics.ts","../src/labels.ts","../src/config.ts","../src/index.ts"],"sourcesContent":["import { createTRPCClient, httpBatchLink, TRPCClientError } from '@trpc/client';\nimport superjson from 'superjson';\n\ntype ActionInput = {\n assigneeId?: string;\n};\n\ntype KanbanInput = {\n projectId?: string;\n assigneeId?: string;\n kanbanStatus?: 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'IN_REVIEW' | 'DONE' | 'CANCELLED';\n};\n\ntype TodayInput = {\n workspaceId?: string;\n};\n\ntype DateRangeInput = {\n startDate: Date;\n endDate: Date;\n workspaceId?: string;\n};\n\ntype ProjectInput = {\n include?: {\n actions?: boolean;\n };\n workspaceId?: string;\n};\n\ntype ActionStatus = 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'DELETED' | 'DRAFT';\ntype ActionKanbanStatus = 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'IN_REVIEW' | 'DONE' | 'CANCELLED';\ntype ActionPriority = 'Quick' | 'Scheduled' | '1st Priority' | '2nd Priority' | '3rd Priority' | '4th Priority' | '5th Priority' | 'Errand' | 'Remember' | 'Watch' | 'Someday Maybe';\n\ntype ActionCreateInput = {\n name: string;\n description?: string;\n projectId?: string;\n workspaceId?: string;\n dueDate?: Date;\n scheduledStart?: Date;\n scheduledEnd?: Date;\n duration?: number;\n priority?: ActionPriority;\n status?: ActionStatus;\n epicId?: string;\n effortEstimate?: number;\n blockedByIds?: string[];\n};\n\ntype ActionUpdateInput = {\n id: string;\n name?: string;\n description?: string;\n projectId?: string;\n workspaceId?: string | null;\n dueDate?: Date | null;\n scheduledStart?: Date | null;\n scheduledEnd?: Date | null;\n duration?: number | null;\n priority?: ActionPriority;\n status?: ActionStatus;\n kanbanStatus?: ActionKanbanStatus;\n epicId?: string | null;\n effortEstimate?: number | null;\n blockedByIds?: string[];\n};\n\nexport interface TrpcClient {\n action: {\n getAll: { query: (input?: ActionInput) => Promise<unknown[]> };\n getKanbanActions: { query: (input?: KanbanInput) => Promise<unknown[]> };\n getToday: { query: (input?: TodayInput) => Promise<unknown[]> };\n getByDateRange: { query: (input: DateRangeInput) => Promise<unknown[]> };\n getProjectActions: { query: (input: { projectId: string; assigneeId?: string }) => Promise<unknown[]> };\n create: { mutate: (input: ActionCreateInput) => Promise<unknown> };\n update: { mutate: (input: ActionUpdateInput) => Promise<unknown> };\n };\n project: {\n getAll: { query: (input?: ProjectInput) => Promise<unknown[]> };\n };\n workspace: {\n list: { query: () => Promise<unknown[]> };\n };\n crmApi: {\n contactList: { query: (input: { workspaceId: string; search?: string; tags?: string[]; organizationId?: string; limit?: number; cursor?: string }) => Promise<unknown> };\n contactGet: { query: (input: { id: string; includeInteractions?: boolean }) => Promise<unknown> };\n contactCreate: { mutate: (input: { workspaceId: string; firstName?: string; lastName?: string; email?: string | null; phone?: string; linkedIn?: string; telegram?: string; twitter?: string; github?: string; bluesky?: string; about?: string; profileType?: string; skills?: string[]; tags?: string[]; organizationId?: string }) => Promise<unknown> };\n contactUpdate: { mutate: (input: { id: string; firstName?: string; lastName?: string; email?: string | null; phone?: string | null; linkedIn?: string | null; telegram?: string | null; twitter?: string | null; github?: string | null; bluesky?: string | null; about?: string; profileType?: string; skills?: string[]; tags?: string[]; organizationId?: string | null }) => Promise<unknown> };\n contactDelete: { mutate: (input: { id: string }) => Promise<unknown> };\n contactAddInteraction: { mutate: (input: { contactId: string; type: string; direction: string; subject?: string; notes?: string; metadata?: unknown }) => Promise<unknown> };\n pipelineGet: { query: (input: { workspaceId: string }) => Promise<unknown> };\n pipelineGetStages: { query: (input: { workspaceId: string }) => Promise<unknown[]> };\n dealList: { query: (input: { workspaceId: string }) => Promise<unknown[]> };\n dealGet: { query: (input: { id: string }) => Promise<unknown> };\n dealCreate: { mutate: (input: { workspaceId: string; stageId: string; title: string; description?: string; value?: number; currency?: string; probability?: number; expectedCloseDate?: Date; contactId?: string; organizationId?: string; assignedToId?: string }) => Promise<unknown> };\n dealUpdate: { mutate: (input: { id: string; title?: string; description?: string | null; value?: number | null; currency?: string; probability?: number | null; expectedCloseDate?: Date | null; contactId?: string | null; organizationId?: string | null; assignedToId?: string | null }) => Promise<unknown> };\n dealMove: { mutate: (input: { id: string; stageId: string; stageOrder: number }) => Promise<unknown> };\n dealDelete: { mutate: (input: { id: string }) => Promise<unknown> };\n };\n actionComment: {\n getComments: { query: (input: { actionId: string }) => Promise<unknown[]> };\n addComment: { mutate: (input: { actionId: string; content: string }) => Promise<unknown> };\n updateComment: { mutate: (input: { commentId: string; content: string }) => Promise<unknown> };\n deleteComment: { mutate: (input: { commentId: string }) => Promise<unknown> };\n };\n epic: {\n list: { query: (input: { workspaceId: string; status?: 'OPEN' | 'IN_PROGRESS' | 'DONE' | 'CANCELLED' }) => Promise<unknown[]> };\n getById: { query: (input: { id: string }) => Promise<unknown> };\n create: { mutate: (input: { workspaceId: string; name: string; description?: string; priority?: 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE'; startDate?: Date; targetDate?: Date }) => Promise<unknown> };\n update: { mutate: (input: { id: string; name?: string; description?: string | null; status?: 'OPEN' | 'IN_PROGRESS' | 'DONE' | 'CANCELLED'; priority?: 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE'; startDate?: Date | null; targetDate?: Date | null }) => Promise<unknown> };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n };\n tag: {\n list: { query: (input?: { workspaceId?: string; category?: string | null }) => Promise<unknown> };\n create: { mutate: (input: { workspaceId: string; name: string; color: string; description?: string; category?: string | null }) => Promise<unknown> };\n setEntityTags: { mutate: (input: { entityType: 'action' | 'ticket' | 'feature' | 'epic'; entityId: string; tagIds: string[] }) => Promise<unknown> };\n listForEntity: { query: (input: { entityType: 'action' | 'ticket' | 'feature' | 'epic'; entityId: string }) => Promise<unknown[]> };\n };\n product: {\n product: {\n list: { query: (input: { workspaceId: string }) => Promise<unknown[]> };\n getById: { query: (input: { id: string }) => Promise<unknown> };\n getBySlug: { query: (input: { workspaceId: string; slug: string }) => Promise<unknown> };\n create: { mutate: (input: { workspaceId: string; name: string; slug: string; description?: string; icon?: string; color?: string }) => Promise<unknown> };\n update: { mutate: (input: { id: string; name?: string; description?: string; icon?: string; color?: string; funTicketIds?: boolean }) => Promise<unknown> };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n };\n feature: {\n list: { query: (input: { productId: string; status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED' }) => Promise<unknown[]> };\n getById: { query: (input: { id: string }) => Promise<unknown> };\n create: { mutate: (input: { productId: string; name: string; description?: string; vision?: string; status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED'; effort?: number; priority?: number; goalId?: number }) => Promise<unknown> };\n update: { mutate: (input: { id: string; name?: string; description?: string; vision?: string; status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED'; effort?: number; priority?: number; goalId?: number | null }) => Promise<unknown> };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n };\n ticket: {\n list: { query: (input: { productId: string; status?: string; type?: string; featureId?: string; epicId?: string; cycleId?: string; assigneeId?: string }) => Promise<unknown[]> };\n getById: { query: (input: { id: string }) => Promise<unknown> };\n create: { mutate: (input: { productId: string; title: string; body?: string; type?: string; status?: string; priority?: number; points?: number; branchName?: string; prUrl?: string; designUrl?: string; specUrl?: string; links?: Record<string, string>; epicId?: string; featureId?: string; cycleId?: string; scopeId?: string; assigneeId?: string; templateId?: string }) => Promise<unknown> };\n update: { mutate: (input: { id: string; title?: string; body?: string; type?: string; status?: string; priority?: number | null; points?: number | null; branchName?: string | null; prUrl?: string | null; designUrl?: string | null; specUrl?: string | null; links?: Record<string, string> | null; epicId?: string | null; featureId?: string | null; cycleId?: string | null; scopeId?: string | null; assigneeId?: string | null }) => Promise<unknown> };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n search: { query: (input: { productId: string; query?: string; excludeTicketId?: string; limit?: number }) => Promise<unknown[]> };\n addDependency: { mutate: (input: { ticketId: string; dependsOnId: string }) => Promise<unknown> };\n removeDependency: { mutate: (input: { ticketId: string; dependsOnId: string }) => Promise<unknown> };\n addComment: { mutate: (input: { ticketId: string; content: string }) => Promise<unknown> };\n deleteComment: { mutate: (input: { id: string }) => Promise<unknown> };\n linkAction: { mutate: (input: { ticketId: string; actionId: string }) => Promise<unknown> };\n unlinkAction: { mutate: (input: { actionId: string }) => Promise<unknown> };\n };\n };\n}\n\nexport function createClient(config: { token: string; apiUrl: string }): TrpcClient {\n const apiUrl = config.apiUrl.replace(/\\/+$/, '');\n\n return createTRPCClient<any>({\n links: [\n httpBatchLink({\n url: `${apiUrl}/api/trpc`,\n headers() {\n return {\n Authorization: `Bearer ${config.token}`,\n };\n },\n transformer: superjson,\n }),\n ],\n }) as unknown as TrpcClient;\n}\n\nexport function isTRPCError(error: unknown): error is TRPCClientError<any> {\n return error instanceof TRPCClientError;\n}\n\nexport { TRPCClientError };\n","import type { TrpcClient } from './client.js';\nimport type { Action, KanbanStatus, Priority } from './types/action.js';\n\nexport interface ActionsListOptions {\n projectId?: string;\n status?: KanbanStatus;\n assigneeId?: string;\n}\n\nexport interface ActionsKanbanOptions {\n projectId?: string;\n status?: KanbanStatus;\n assigneeId?: string;\n}\n\nexport type ActionStatus = 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'DELETED' | 'DRAFT';\n\nexport interface ActionCreateInput {\n name: string;\n description?: string;\n projectId?: string;\n workspaceId?: string;\n dueDate?: Date;\n scheduledStart?: Date;\n scheduledEnd?: Date;\n duration?: number;\n priority?: Priority;\n status?: ActionStatus;\n epicId?: string;\n effortEstimate?: number;\n blockedByIds?: string[];\n}\n\nexport interface ActionUpdateInput {\n id: string;\n name?: string;\n description?: string;\n projectId?: string;\n workspaceId?: string | null;\n dueDate?: Date | null;\n scheduledStart?: Date | null;\n scheduledEnd?: Date | null;\n duration?: number | null;\n priority?: Priority;\n status?: ActionStatus;\n kanbanStatus?: KanbanStatus;\n epicId?: string | null;\n effortEstimate?: number | null;\n blockedByIds?: string[];\n}\n\nexport class ActionsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ActionsListOptions = {}): Promise<Action[]> {\n const { projectId, status, assigneeId } = options;\n let actions: Action[];\n\n if (projectId) {\n actions = await this.client.action.getProjectActions.query({\n projectId,\n assigneeId,\n }) as Action[];\n } else if (status) {\n actions = await this.client.action.getKanbanActions.query({\n kanbanStatus: status,\n assigneeId,\n }) as Action[];\n } else {\n actions = await this.client.action.getAll.query({\n assigneeId,\n }) as Action[];\n }\n\n // Match CLI behavior: hide completed/cancelled unless status specified\n if (!status) {\n actions = actions.filter(action =>\n action.status !== 'COMPLETED' &&\n action.status !== 'CANCELLED' &&\n action.kanbanStatus !== 'DONE' &&\n action.kanbanStatus !== 'CANCELLED'\n );\n }\n\n return actions;\n }\n\n async getToday(workspaceId?: string): Promise<Action[]> {\n return await this.client.action.getToday.query({\n workspaceId,\n }) as Action[];\n }\n\n async getByDateRange(start: Date, end: Date, workspaceId?: string): Promise<Action[]> {\n return await this.client.action.getByDateRange.query({\n startDate: start,\n endDate: end,\n workspaceId,\n }) as Action[];\n }\n\n async getKanban(options: ActionsKanbanOptions = {}): Promise<Action[]> {\n const { projectId, status, assigneeId } = options;\n\n return await this.client.action.getKanbanActions.query({\n projectId,\n kanbanStatus: status,\n assigneeId,\n }) as Action[];\n }\n\n async getProjectActions(projectId: string, assigneeId?: string): Promise<Action[]> {\n return await this.client.action.getProjectActions.query({\n projectId,\n assigneeId,\n }) as Action[];\n }\n\n async create(input: ActionCreateInput): Promise<Action> {\n return await this.client.action.create.mutate(input) as Action;\n }\n\n async update(input: ActionUpdateInput): Promise<Action> {\n return await this.client.action.update.mutate(input) as Action;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { ActionComment } from './types/comment.js';\n\nexport interface ActionCommentAddInput {\n actionId: string;\n content: string;\n}\n\nexport interface ActionCommentUpdateInput {\n commentId: string;\n content: string;\n}\n\nexport class ActionCommentsApi {\n constructor(private client: TrpcClient) {}\n\n async list(actionId: string): Promise<ActionComment[]> {\n return await this.client.actionComment.getComments.query({\n actionId,\n }) as ActionComment[];\n }\n\n async add(input: ActionCommentAddInput): Promise<ActionComment> {\n return await this.client.actionComment.addComment.mutate(input) as ActionComment;\n }\n\n async update(input: ActionCommentUpdateInput): Promise<ActionComment> {\n return await this.client.actionComment.updateComment.mutate(input) as ActionComment;\n }\n\n async delete(commentId: string): Promise<ActionComment> {\n return await this.client.actionComment.deleteComment.mutate({\n commentId,\n }) as ActionComment;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Project } from './types/project.js';\n\nexport interface ProjectsListOptions {\n workspaceId?: string;\n includeActions?: boolean;\n}\n\nexport class ProjectsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ProjectsListOptions = {}): Promise<Project[]> {\n const { workspaceId, includeActions } = options;\n\n return await this.client.project.getAll.query({\n workspaceId,\n include: includeActions ? { actions: true } : undefined,\n }) as Project[];\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Workspace } from './types/workspace.js';\n\nexport class WorkspacesApi {\n constructor(private client: TrpcClient) {}\n\n async list(): Promise<Workspace[]> {\n return await this.client.workspace.list.query() as Workspace[];\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Contact, ContactInteraction, ContactListOutput, InteractionType, InteractionDirection } from './types/contact.js';\n\nexport interface ContactsListOptions {\n workspaceId: string;\n search?: string;\n tags?: string[];\n organizationId?: string;\n limit?: number;\n cursor?: string;\n}\n\nexport interface ContactCreateInput {\n workspaceId: string;\n firstName?: string;\n lastName?: string;\n email?: string | null;\n phone?: string;\n linkedIn?: string;\n telegram?: string;\n twitter?: string;\n github?: string;\n bluesky?: string;\n about?: string;\n profileType?: string;\n skills?: string[];\n tags?: string[];\n organizationId?: string;\n}\n\nexport interface ContactUpdateInput {\n id: string;\n firstName?: string;\n lastName?: string;\n email?: string | null;\n phone?: string | null;\n linkedIn?: string | null;\n telegram?: string | null;\n twitter?: string | null;\n github?: string | null;\n bluesky?: string | null;\n about?: string;\n profileType?: string;\n skills?: string[];\n tags?: string[];\n organizationId?: string | null;\n}\n\nexport interface AddInteractionInput {\n contactId: string;\n type: InteractionType;\n direction: InteractionDirection;\n subject?: string;\n notes?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport class ContactsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ContactsListOptions): Promise<ContactListOutput> {\n return await this.client.crmApi.contactList.query(options) as ContactListOutput;\n }\n\n async get(id: string, options?: { includeInteractions?: boolean }): Promise<Contact> {\n return await this.client.crmApi.contactGet.query({\n id,\n includeInteractions: options?.includeInteractions,\n }) as Contact;\n }\n\n async create(input: ContactCreateInput): Promise<Contact> {\n return await this.client.crmApi.contactCreate.mutate(input) as Contact;\n }\n\n async update(input: ContactUpdateInput): Promise<Contact> {\n return await this.client.crmApi.contactUpdate.mutate(input) as Contact;\n }\n\n async delete(id: string): Promise<void> {\n await this.client.crmApi.contactDelete.mutate({ id });\n }\n\n async addInteraction(input: AddInteractionInput): Promise<ContactInteraction> {\n return await this.client.crmApi.contactAddInteraction.mutate(input) as ContactInteraction;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Pipeline, PipelineStage, Deal } from './types/pipeline.js';\n\nexport interface DealCreateInput {\n workspaceId: string;\n stageId: string;\n title: string;\n description?: string;\n value?: number;\n currency?: string;\n probability?: number;\n expectedCloseDate?: Date;\n contactId?: string;\n organizationId?: string;\n assignedToId?: string;\n}\n\nexport interface DealUpdateInput {\n id: string;\n title?: string;\n description?: string | null;\n value?: number | null;\n currency?: string;\n probability?: number | null;\n expectedCloseDate?: Date | null;\n contactId?: string | null;\n organizationId?: string | null;\n assignedToId?: string | null;\n}\n\nexport interface DealMoveInput {\n id: string;\n stageId: string;\n stageOrder: number;\n}\n\nexport class PipelinesApi {\n constructor(private client: TrpcClient) {}\n\n async get(workspaceId: string): Promise<Pipeline | null> {\n return await this.client.crmApi.pipelineGet.query({ workspaceId }) as Pipeline | null;\n }\n\n async getStages(workspaceId: string): Promise<PipelineStage[]> {\n return await this.client.crmApi.pipelineGetStages.query({ workspaceId }) as PipelineStage[];\n }\n\n async listDeals(workspaceId: string): Promise<Deal[]> {\n return await this.client.crmApi.dealList.query({ workspaceId }) as Deal[];\n }\n\n async getDeal(id: string): Promise<Deal> {\n return await this.client.crmApi.dealGet.query({ id }) as Deal;\n }\n\n async createDeal(input: DealCreateInput): Promise<Deal> {\n return await this.client.crmApi.dealCreate.mutate(input) as Deal;\n }\n\n async updateDeal(input: DealUpdateInput): Promise<Deal> {\n return await this.client.crmApi.dealUpdate.mutate(input) as Deal;\n }\n\n async moveDeal(input: DealMoveInput): Promise<Deal> {\n return await this.client.crmApi.dealMove.mutate(input) as Deal;\n }\n\n async deleteDeal(id: string): Promise<void> {\n await this.client.crmApi.dealDelete.mutate({ id });\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { TicketComment } from './types/comment.js';\nimport type {\n Ticket,\n TicketDetail,\n TicketDependencyEdge,\n TicketStatus,\n TicketType,\n} from './types/ticket.js';\nimport type { Action } from './types/action.js';\n\nexport interface TicketListOptions {\n productId: string;\n status?: TicketStatus;\n type?: TicketType;\n featureId?: string;\n epicId?: string;\n cycleId?: string;\n assigneeId?: string;\n}\n\nexport interface TicketCreateInput {\n productId: string;\n title: string;\n body?: string;\n type?: TicketType;\n status?: TicketStatus;\n /** 0–4; lower is higher priority. */\n priority?: number;\n points?: number;\n branchName?: string;\n prUrl?: string;\n designUrl?: string;\n specUrl?: string;\n links?: Record<string, string>;\n epicId?: string;\n featureId?: string;\n cycleId?: string;\n scopeId?: string;\n assigneeId?: string;\n templateId?: string;\n}\n\nexport interface TicketUpdateInput {\n id: string;\n title?: string;\n body?: string;\n type?: TicketType;\n status?: TicketStatus;\n priority?: number | null;\n points?: number | null;\n branchName?: string | null;\n prUrl?: string | null;\n designUrl?: string | null;\n specUrl?: string | null;\n links?: Record<string, string> | null;\n epicId?: string | null;\n featureId?: string | null;\n cycleId?: string | null;\n scopeId?: string | null;\n assigneeId?: string | null;\n}\n\nexport interface TicketCommentAddInput {\n ticketId: string;\n content: string;\n}\n\nexport interface TicketSearchOptions {\n productId: string;\n query?: string;\n excludeTicketId?: string;\n limit?: number;\n}\n\nexport class TicketsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: TicketListOptions): Promise<Ticket[]> {\n return await this.client.product.ticket.list.query(options) as Ticket[];\n }\n\n async get(id: string): Promise<TicketDetail> {\n return await this.client.product.ticket.getById.query({\n id,\n }) as TicketDetail;\n }\n\n async create(input: TicketCreateInput): Promise<Ticket> {\n return await this.client.product.ticket.create.mutate(input) as Ticket;\n }\n\n async update(input: TicketUpdateInput): Promise<Ticket> {\n return await this.client.product.ticket.update.mutate(input) as Ticket;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.product.ticket.delete.mutate({ id }) as {\n success: boolean;\n };\n }\n\n async search(options: TicketSearchOptions): Promise<TicketDependencyEdge[]> {\n return await this.client.product.ticket.search.query(\n options,\n ) as TicketDependencyEdge[];\n }\n\n /** Mark `ticketId` as blocked by `dependsOnId`. */\n async addDependency(\n ticketId: string,\n dependsOnId: string,\n ): Promise<{ id: string; dependsOn: TicketDependencyEdge }> {\n return await this.client.product.ticket.addDependency.mutate({\n ticketId,\n dependsOnId,\n }) as { id: string; dependsOn: TicketDependencyEdge };\n }\n\n async removeDependency(\n ticketId: string,\n dependsOnId: string,\n ): Promise<{ success: boolean }> {\n return await this.client.product.ticket.removeDependency.mutate({\n ticketId,\n dependsOnId,\n }) as { success: boolean };\n }\n\n async addComment(input: TicketCommentAddInput): Promise<TicketComment> {\n return await this.client.product.ticket.addComment.mutate(\n input,\n ) as TicketComment;\n }\n\n async deleteComment(id: string): Promise<{ success: boolean }> {\n return await this.client.product.ticket.deleteComment.mutate({\n id,\n }) as { success: boolean };\n }\n\n /** Attach an existing action to a ticket. */\n async linkAction(ticketId: string, actionId: string): Promise<Action> {\n return await this.client.product.ticket.linkAction.mutate({\n ticketId,\n actionId,\n }) as Action;\n }\n\n /** Detach an action from whatever ticket it's linked to. */\n async unlinkAction(actionId: string): Promise<Action> {\n return await this.client.product.ticket.unlinkAction.mutate({\n actionId,\n }) as Action;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Product } from './types/product.js';\n\nexport interface ProductCreateInput {\n workspaceId: string;\n name: string;\n /** Kebab-case slug; must match `/^[a-z0-9-]+$/`. */\n slug: string;\n description?: string;\n icon?: string;\n color?: string;\n}\n\nexport interface ProductUpdateInput {\n id: string;\n name?: string;\n description?: string;\n icon?: string;\n color?: string;\n funTicketIds?: boolean;\n}\n\nexport class ProductsApi {\n constructor(private client: TrpcClient) {}\n\n async list(workspaceId: string): Promise<Product[]> {\n return await this.client.product.product.list.query({\n workspaceId,\n }) as Product[];\n }\n\n async get(id: string): Promise<Product> {\n return await this.client.product.product.getById.query({ id }) as Product;\n }\n\n async getBySlug(workspaceId: string, slug: string): Promise<Product> {\n return await this.client.product.product.getBySlug.query({\n workspaceId,\n slug,\n }) as Product;\n }\n\n /**\n * Resolve a product reference (slug or CUID) to a full Product. Falls back\n * to slug lookup if the bare CUID lookup fails — callers can pass either.\n */\n async resolve(workspaceId: string, slugOrId: string): Promise<Product> {\n // Heuristic: CUIDs from Prisma start with 'c' and are 25 chars; otherwise\n // try slug first. We try both to stay forgiving.\n const looksLikeId = /^c[a-z0-9]{20,}$/.test(slugOrId);\n if (looksLikeId) {\n try {\n return await this.get(slugOrId);\n } catch {\n // fall through to slug\n }\n }\n return await this.getBySlug(workspaceId, slugOrId);\n }\n\n async create(input: ProductCreateInput): Promise<Product> {\n return await this.client.product.product.create.mutate(input) as Product;\n }\n\n async update(input: ProductUpdateInput): Promise<Product> {\n return await this.client.product.product.update.mutate(input) as Product;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.product.product.delete.mutate({ id }) as {\n success: boolean;\n };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Feature, FeatureStatus } from './types/feature.js';\n\nexport interface FeatureListOptions {\n productId: string;\n status?: FeatureStatus;\n}\n\nexport interface FeatureCreateInput {\n productId: string;\n name: string;\n description?: string;\n vision?: string;\n status?: FeatureStatus;\n effort?: number;\n /** 0–4; lower is higher priority. */\n priority?: number;\n goalId?: number;\n}\n\nexport interface FeatureUpdateInput {\n id: string;\n name?: string;\n description?: string;\n vision?: string;\n status?: FeatureStatus;\n effort?: number;\n priority?: number;\n goalId?: number | null;\n}\n\nexport class FeaturesApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: FeatureListOptions): Promise<Feature[]> {\n return await this.client.product.feature.list.query({\n productId: options.productId,\n status: options.status,\n }) as Feature[];\n }\n\n async get(id: string): Promise<Feature> {\n return await this.client.product.feature.getById.query({ id }) as Feature;\n }\n\n async create(input: FeatureCreateInput): Promise<Feature> {\n return await this.client.product.feature.create.mutate(input) as Feature;\n }\n\n async update(input: FeatureUpdateInput): Promise<Feature> {\n return await this.client.product.feature.update.mutate(input) as Feature;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.product.feature.delete.mutate({ id }) as {\n success: boolean;\n };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Epic, EpicPriority, EpicStatus } from './types/epic.js';\n\nexport interface EpicListOptions {\n workspaceId: string;\n status?: EpicStatus;\n}\n\nexport interface EpicCreateInput {\n workspaceId: string;\n name: string;\n description?: string;\n priority?: EpicPriority;\n startDate?: Date;\n targetDate?: Date;\n}\n\nexport interface EpicUpdateInput {\n id: string;\n name?: string;\n description?: string | null;\n status?: EpicStatus;\n priority?: EpicPriority;\n startDate?: Date | null;\n targetDate?: Date | null;\n}\n\nexport class EpicsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: EpicListOptions): Promise<Epic[]> {\n return await this.client.epic.list.query({\n workspaceId: options.workspaceId,\n status: options.status,\n }) as Epic[];\n }\n\n async get(id: string): Promise<Epic> {\n return await this.client.epic.getById.query({ id }) as Epic;\n }\n\n async create(input: EpicCreateInput): Promise<Epic> {\n return await this.client.epic.create.mutate(input) as Epic;\n }\n\n async update(input: EpicUpdateInput): Promise<Epic> {\n return await this.client.epic.update.mutate(input) as Epic;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.epic.delete.mutate({ id }) as {\n success: boolean;\n };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Tag, TagEntityType, TagListResult } from './types/tag.js';\n\nexport interface LabelListOptions {\n workspaceId?: string;\n category?: string | null;\n}\n\nexport interface LabelCreateInput {\n workspaceId: string;\n name: string;\n color: string;\n description?: string;\n category?: string | null;\n}\n\nexport interface SetEntityTagsInput {\n entityType: TagEntityType;\n entityId: string;\n tagIds: string[];\n}\n\nexport interface ListForEntityInput {\n entityType: TagEntityType;\n entityId: string;\n}\n\nexport interface SetEntityTagsResult {\n entityType: TagEntityType;\n entityId: string;\n tags: Tag[];\n}\n\n/**\n * Labels API. Backed by the server's `tag.*` tRPC procedures. \"Label\" is the\n * user-facing word for a Tag (specifically when `category` is null).\n */\nexport class LabelsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: LabelListOptions = {}): Promise<TagListResult> {\n return (await this.client.tag.list.query({\n workspaceId: options.workspaceId,\n category: options.category,\n })) as TagListResult;\n }\n\n async create(input: LabelCreateInput): Promise<Tag> {\n return (await this.client.tag.create.mutate({\n workspaceId: input.workspaceId,\n name: input.name,\n color: input.color,\n description: input.description,\n category: input.category,\n })) as Tag;\n }\n\n async setEntityTags(input: SetEntityTagsInput): Promise<SetEntityTagsResult> {\n return (await this.client.tag.setEntityTags.mutate(input)) as SetEntityTagsResult;\n }\n\n async listForEntity(input: ListForEntityInput): Promise<Tag[]> {\n return (await this.client.tag.listForEntity.query(input)) as Tag[];\n }\n}\n","import Conf from 'conf';\n\nexport interface ExponentialConfig {\n apiUrl: string;\n token: string;\n tokenExpiry?: string;\n defaultWorkspaceId?: string;\n defaultWorkspaceSlug?: string;\n}\n\nconst schema = {\n apiUrl: {\n type: 'string' as const,\n default: '',\n },\n token: {\n type: 'string' as const,\n default: '',\n },\n tokenExpiry: {\n type: 'string' as const,\n default: '',\n },\n defaultWorkspaceId: {\n type: 'string' as const,\n default: '',\n },\n defaultWorkspaceSlug: {\n type: 'string' as const,\n default: '',\n },\n};\n\nfunction createStore(projectName: string) {\n return new Conf<ExponentialConfig>({\n projectName,\n schema,\n });\n}\n\nfunction readConfig(store: Conf<ExponentialConfig>): ExponentialConfig {\n return {\n apiUrl: store.get('apiUrl'),\n token: store.get('token'),\n tokenExpiry: store.get('tokenExpiry'),\n defaultWorkspaceId: store.get('defaultWorkspaceId'),\n defaultWorkspaceSlug: store.get('defaultWorkspaceSlug'),\n };\n}\n\nfunction writeConfig(store: Conf<ExponentialConfig>, values: Partial<ExponentialConfig>): void {\n if (values.apiUrl !== undefined) store.set('apiUrl', values.apiUrl);\n if (values.token !== undefined) store.set('token', values.token);\n if (values.tokenExpiry !== undefined) store.set('tokenExpiry', values.tokenExpiry);\n if (values.defaultWorkspaceId !== undefined) store.set('defaultWorkspaceId', values.defaultWorkspaceId);\n if (values.defaultWorkspaceSlug !== undefined) store.set('defaultWorkspaceSlug', values.defaultWorkspaceSlug);\n}\n\nconst defaultStore = createStore('exponential-sdk');\n\nexport function createConfigStore(options?: { projectName?: string }) {\n const store = createStore(options?.projectName ?? 'exponential-sdk');\n\n return {\n loadConfig: () => readConfig(store),\n saveConfig: (values: Partial<ExponentialConfig>) => writeConfig(store, values),\n clearConfig: () => store.clear(),\n isAuthenticated: () => {\n const cfg = readConfig(store);\n return Boolean(cfg.token && cfg.apiUrl);\n },\n getConfigPath: () => store.path,\n };\n}\n\nexport function loadConfig(): ExponentialConfig {\n return readConfig(defaultStore);\n}\n\nexport function saveConfig(values: Partial<ExponentialConfig>): void {\n writeConfig(defaultStore, values);\n}\n\nexport function clearConfig(): void {\n defaultStore.clear();\n}\n\nexport function isAuthenticated(): boolean {\n const cfg = readConfig(defaultStore);\n return Boolean(cfg.token && cfg.apiUrl);\n}\n\nexport function getConfigPath(): string {\n return defaultStore.path;\n}\n","import { createClient, isTRPCError, TRPCClientError, type TrpcClient } from './client.js';\nimport { ActionsApi } from './actions.js';\nimport { ActionCommentsApi } from './actionComments.js';\nimport { ProjectsApi } from './projects.js';\nimport { WorkspacesApi } from './workspaces.js';\nimport { ContactsApi } from './contacts.js';\nimport { PipelinesApi } from './pipelines.js';\nimport { TicketsApi } from './tickets.js';\nimport { ProductsApi } from './products.js';\nimport { FeaturesApi } from './features.js';\nimport { EpicsApi } from './epics.js';\nimport { LabelsApi } from './labels.js';\n\nexport class ExponentialClient {\n private client: TrpcClient;\n actions: ActionsApi;\n actionComments: ActionCommentsApi;\n projects: ProjectsApi;\n workspaces: WorkspacesApi;\n contacts: ContactsApi;\n pipelines: PipelinesApi;\n tickets: TicketsApi;\n products: ProductsApi;\n features: FeaturesApi;\n epics: EpicsApi;\n labels: LabelsApi;\n\n constructor(private config: { token: string; apiUrl: string }) {\n this.client = createClient(this.config);\n this.actions = new ActionsApi(this.client);\n this.actionComments = new ActionCommentsApi(this.client);\n this.projects = new ProjectsApi(this.client);\n this.workspaces = new WorkspacesApi(this.client);\n this.contacts = new ContactsApi(this.client);\n this.pipelines = new PipelinesApi(this.client);\n this.tickets = new TicketsApi(this.client);\n this.products = new ProductsApi(this.client);\n this.features = new FeaturesApi(this.client);\n this.epics = new EpicsApi(this.client);\n this.labels = new LabelsApi(this.client);\n }\n}\n\nexport {\n createConfigStore,\n loadConfig,\n saveConfig,\n clearConfig,\n isAuthenticated,\n getConfigPath,\n} from './config.js';\n\nexport type { ExponentialConfig } from './config.js';\nexport type {\n Action,\n ActionOutput,\n ActionsListOutput,\n KanbanStatus,\n Priority,\n} from './types/action.js';\nexport type {\n ActionCreateInput,\n ActionUpdateInput,\n ActionStatus,\n} from './actions.js';\nexport type { Project, ProjectOutput, ProjectsListOutput } from './types/project.js';\nexport type { Workspace, WorkspaceOutput, WorkspacesListOutput } from './types/workspace.js';\nexport type {\n Contact,\n ContactInteraction,\n ContactListOutput,\n InteractionType,\n InteractionDirection,\n} from './types/contact.js';\nexport type {\n ContactCreateInput,\n ContactUpdateInput,\n AddInteractionInput,\n ContactsListOptions,\n} from './contacts.js';\nexport type {\n Pipeline,\n PipelineStage,\n Deal,\n DealActivity,\n} from './types/pipeline.js';\nexport type {\n DealCreateInput,\n DealUpdateInput,\n DealMoveInput,\n} from './pipelines.js';\nexport type {\n ActionComment,\n TicketComment,\n CommentAuthor,\n} from './types/comment.js';\nexport type {\n ActionCommentAddInput,\n ActionCommentUpdateInput,\n} from './actionComments.js';\nexport type { Product } from './types/product.js';\nexport type { ProductCreateInput, ProductUpdateInput } from './products.js';\nexport type {\n Feature,\n FeatureScope,\n FeatureScopeStatus,\n FeatureStatus,\n} from './types/feature.js';\nexport type {\n FeatureCreateInput,\n FeatureUpdateInput,\n FeatureListOptions,\n} from './features.js';\nexport type {\n Ticket,\n TicketDetail,\n TicketAssignee,\n TicketDependencyEdge,\n TicketStatus,\n TicketType,\n} from './types/ticket.js';\nexport type {\n TicketListOptions,\n TicketCreateInput,\n TicketUpdateInput,\n TicketCommentAddInput,\n TicketSearchOptions,\n} from './tickets.js';\nexport type { Epic, EpicStatus, EpicPriority } from './types/epic.js';\nexport type {\n EpicCreateInput,\n EpicUpdateInput,\n EpicListOptions,\n} from './epics.js';\nexport type { Tag, TagEntityType, TagListResult } from './types/tag.js';\nexport type {\n LabelListOptions,\n LabelCreateInput,\n SetEntityTagsInput,\n ListForEntityInput,\n SetEntityTagsResult,\n} from './labels.js';\nexport { isTRPCError, TRPCClientError };\n"],"mappings":";AAAA,SAAS,kBAAkB,eAAe,uBAAuB;AACjE,OAAO,eAAe;AAuJf,SAAS,aAAa,QAAuD;AAClF,QAAM,SAAS,OAAO,OAAO,QAAQ,QAAQ,EAAE;AAE/C,SAAO,iBAAsB;AAAA,IAC3B,OAAO;AAAA,MACL,cAAc;AAAA,QACZ,KAAK,GAAG,MAAM;AAAA,QACd,UAAU;AACR,iBAAO;AAAA,YACL,eAAe,UAAU,OAAO,KAAK;AAAA,UACvC;AAAA,QACF;AAAA,QACA,aAAa;AAAA,MACf,CAAC;AAAA,IACH;AAAA,EACF,CAAC;AACH;AAEO,SAAS,YAAY,OAA+C;AACzE,SAAO,iBAAiB;AAC1B;;;ACzHO,IAAM,aAAN,MAAiB;AAAA,EACtB,YAAoB,QAAoB;AAApB;AAAA,EAAqB;AAAA,EAEzC,MAAM,KAAK,UAA8B,CAAC,GAAsB;AAC9D,UAAM,EAAE,WAAW,QAAQ,WAAW,IAAI;AAC1C,QAAI;AAEJ,QAAI,WAAW;AACb,gBAAU,MAAM,KAAK,OAAO,OAAO,kBAAkB,MAAM;AAAA,QACzD;AAAA,QACA;AAAA,MACF,CAAC;AAAA,IACH,WAAW,QAAQ;AACjB,gBAAU,MAAM,KAAK,OAAO,OAAO,iBAAiB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