exponential-sdk 1.0.0 → 1.2.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 CHANGED
@@ -23,6 +23,41 @@ type ProjectInput = {
23
23
  };
24
24
  workspaceId?: string;
25
25
  };
26
+ type ActionStatus$1 = 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'DELETED' | 'DRAFT';
27
+ type ActionKanbanStatus = 'BACKLOG' | 'TODO' | 'IN_PROGRESS' | 'IN_REVIEW' | 'DONE' | 'CANCELLED';
28
+ type ActionPriority = 'Quick' | 'Scheduled' | '1st Priority' | '2nd Priority' | '3rd Priority' | '4th Priority' | '5th Priority' | 'Errand' | 'Remember' | 'Watch' | 'Someday Maybe';
29
+ type ActionCreateInput$1 = {
30
+ name: string;
31
+ description?: string;
32
+ projectId?: string;
33
+ workspaceId?: string;
34
+ dueDate?: Date;
35
+ scheduledStart?: Date;
36
+ scheduledEnd?: Date;
37
+ duration?: number;
38
+ priority?: ActionPriority;
39
+ status?: ActionStatus$1;
40
+ epicId?: string;
41
+ effortEstimate?: number;
42
+ blockedByIds?: string[];
43
+ };
44
+ type ActionUpdateInput$1 = {
45
+ id: string;
46
+ name?: string;
47
+ description?: string;
48
+ projectId?: string;
49
+ workspaceId?: string | null;
50
+ dueDate?: Date | null;
51
+ scheduledStart?: Date | null;
52
+ scheduledEnd?: Date | null;
53
+ duration?: number | null;
54
+ priority?: ActionPriority;
55
+ status?: ActionStatus$1;
56
+ kanbanStatus?: ActionKanbanStatus;
57
+ epicId?: string | null;
58
+ effortEstimate?: number | null;
59
+ blockedByIds?: string[];
60
+ };
26
61
  interface TrpcClient {
27
62
  action: {
28
63
  getAll: {
@@ -43,6 +78,12 @@ interface TrpcClient {
43
78
  assigneeId?: string;
44
79
  }) => Promise<unknown[]>;
45
80
  };
81
+ create: {
82
+ mutate: (input: ActionCreateInput$1) => Promise<unknown>;
83
+ };
84
+ update: {
85
+ mutate: (input: ActionUpdateInput$1) => Promise<unknown>;
86
+ };
46
87
  };
47
88
  project: {
48
89
  getAll: {
@@ -54,6 +95,396 @@ interface TrpcClient {
54
95
  query: () => Promise<unknown[]>;
55
96
  };
56
97
  };
98
+ crmApi: {
99
+ contactList: {
100
+ query: (input: {
101
+ workspaceId: string;
102
+ search?: string;
103
+ tags?: string[];
104
+ organizationId?: string;
105
+ limit?: number;
106
+ cursor?: string;
107
+ }) => Promise<unknown>;
108
+ };
109
+ contactGet: {
110
+ query: (input: {
111
+ id: string;
112
+ includeInteractions?: boolean;
113
+ }) => Promise<unknown>;
114
+ };
115
+ contactCreate: {
116
+ mutate: (input: {
117
+ workspaceId: string;
118
+ firstName?: string;
119
+ lastName?: string;
120
+ email?: string | null;
121
+ phone?: string;
122
+ linkedIn?: string;
123
+ telegram?: string;
124
+ twitter?: string;
125
+ github?: string;
126
+ bluesky?: string;
127
+ about?: string;
128
+ profileType?: string;
129
+ skills?: string[];
130
+ tags?: string[];
131
+ organizationId?: string;
132
+ }) => Promise<unknown>;
133
+ };
134
+ contactUpdate: {
135
+ mutate: (input: {
136
+ id: string;
137
+ firstName?: string;
138
+ lastName?: string;
139
+ email?: string | null;
140
+ phone?: string | null;
141
+ linkedIn?: string | null;
142
+ telegram?: string | null;
143
+ twitter?: string | null;
144
+ github?: string | null;
145
+ bluesky?: string | null;
146
+ about?: string;
147
+ profileType?: string;
148
+ skills?: string[];
149
+ tags?: string[];
150
+ organizationId?: string | null;
151
+ }) => Promise<unknown>;
152
+ };
153
+ contactDelete: {
154
+ mutate: (input: {
155
+ id: string;
156
+ }) => Promise<unknown>;
157
+ };
158
+ contactAddInteraction: {
159
+ mutate: (input: {
160
+ contactId: string;
161
+ type: string;
162
+ direction: string;
163
+ subject?: string;
164
+ notes?: string;
165
+ metadata?: unknown;
166
+ }) => Promise<unknown>;
167
+ };
168
+ pipelineGet: {
169
+ query: (input: {
170
+ workspaceId: string;
171
+ }) => Promise<unknown>;
172
+ };
173
+ pipelineGetStages: {
174
+ query: (input: {
175
+ workspaceId: string;
176
+ }) => Promise<unknown[]>;
177
+ };
178
+ dealList: {
179
+ query: (input: {
180
+ workspaceId: string;
181
+ }) => Promise<unknown[]>;
182
+ };
183
+ dealGet: {
184
+ query: (input: {
185
+ id: string;
186
+ }) => Promise<unknown>;
187
+ };
188
+ dealCreate: {
189
+ mutate: (input: {
190
+ workspaceId: string;
191
+ stageId: string;
192
+ title: string;
193
+ description?: string;
194
+ value?: number;
195
+ currency?: string;
196
+ probability?: number;
197
+ expectedCloseDate?: Date;
198
+ contactId?: string;
199
+ organizationId?: string;
200
+ assignedToId?: string;
201
+ }) => Promise<unknown>;
202
+ };
203
+ dealUpdate: {
204
+ mutate: (input: {
205
+ id: string;
206
+ title?: string;
207
+ description?: string | null;
208
+ value?: number | null;
209
+ currency?: string;
210
+ probability?: number | null;
211
+ expectedCloseDate?: Date | null;
212
+ contactId?: string | null;
213
+ organizationId?: string | null;
214
+ assignedToId?: string | null;
215
+ }) => Promise<unknown>;
216
+ };
217
+ dealMove: {
218
+ mutate: (input: {
219
+ id: string;
220
+ stageId: string;
221
+ stageOrder: number;
222
+ }) => Promise<unknown>;
223
+ };
224
+ dealDelete: {
225
+ mutate: (input: {
226
+ id: string;
227
+ }) => Promise<unknown>;
228
+ };
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
+ product: {
294
+ product: {
295
+ list: {
296
+ query: (input: {
297
+ workspaceId: string;
298
+ }) => Promise<unknown[]>;
299
+ };
300
+ getById: {
301
+ query: (input: {
302
+ id: string;
303
+ }) => Promise<unknown>;
304
+ };
305
+ getBySlug: {
306
+ query: (input: {
307
+ workspaceId: string;
308
+ slug: string;
309
+ }) => Promise<unknown>;
310
+ };
311
+ create: {
312
+ mutate: (input: {
313
+ workspaceId: string;
314
+ name: string;
315
+ slug: string;
316
+ description?: string;
317
+ icon?: string;
318
+ color?: string;
319
+ }) => Promise<unknown>;
320
+ };
321
+ update: {
322
+ mutate: (input: {
323
+ id: string;
324
+ name?: string;
325
+ description?: string;
326
+ icon?: string;
327
+ color?: string;
328
+ funTicketIds?: boolean;
329
+ }) => Promise<unknown>;
330
+ };
331
+ delete: {
332
+ mutate: (input: {
333
+ id: string;
334
+ }) => Promise<unknown>;
335
+ };
336
+ };
337
+ feature: {
338
+ list: {
339
+ query: (input: {
340
+ productId: string;
341
+ status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED';
342
+ }) => Promise<unknown[]>;
343
+ };
344
+ getById: {
345
+ query: (input: {
346
+ id: string;
347
+ }) => Promise<unknown>;
348
+ };
349
+ create: {
350
+ mutate: (input: {
351
+ productId: string;
352
+ name: string;
353
+ description?: string;
354
+ vision?: string;
355
+ status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED';
356
+ effort?: number;
357
+ priority?: number;
358
+ goalId?: number;
359
+ }) => Promise<unknown>;
360
+ };
361
+ update: {
362
+ mutate: (input: {
363
+ id: string;
364
+ name?: string;
365
+ description?: string;
366
+ vision?: string;
367
+ status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED';
368
+ effort?: number;
369
+ priority?: number;
370
+ goalId?: number | null;
371
+ }) => Promise<unknown>;
372
+ };
373
+ delete: {
374
+ mutate: (input: {
375
+ id: string;
376
+ }) => Promise<unknown>;
377
+ };
378
+ };
379
+ ticket: {
380
+ list: {
381
+ query: (input: {
382
+ productId: string;
383
+ status?: string;
384
+ type?: string;
385
+ featureId?: string;
386
+ epicId?: string;
387
+ cycleId?: string;
388
+ assigneeId?: string;
389
+ }) => Promise<unknown[]>;
390
+ };
391
+ getById: {
392
+ query: (input: {
393
+ id: string;
394
+ }) => Promise<unknown>;
395
+ };
396
+ create: {
397
+ mutate: (input: {
398
+ productId: string;
399
+ title: string;
400
+ body?: string;
401
+ type?: string;
402
+ status?: string;
403
+ priority?: number;
404
+ points?: number;
405
+ branchName?: string;
406
+ prUrl?: string;
407
+ designUrl?: string;
408
+ specUrl?: string;
409
+ links?: Record<string, string>;
410
+ epicId?: string;
411
+ featureId?: string;
412
+ cycleId?: string;
413
+ scopeId?: string;
414
+ assigneeId?: string;
415
+ templateId?: string;
416
+ }) => Promise<unknown>;
417
+ };
418
+ update: {
419
+ mutate: (input: {
420
+ id: string;
421
+ title?: string;
422
+ body?: string;
423
+ type?: string;
424
+ status?: string;
425
+ priority?: number | null;
426
+ points?: number | null;
427
+ branchName?: string | null;
428
+ prUrl?: string | null;
429
+ designUrl?: string | null;
430
+ specUrl?: string | null;
431
+ links?: Record<string, string> | null;
432
+ epicId?: string | null;
433
+ featureId?: string | null;
434
+ cycleId?: string | null;
435
+ scopeId?: string | null;
436
+ assigneeId?: string | null;
437
+ }) => Promise<unknown>;
438
+ };
439
+ delete: {
440
+ mutate: (input: {
441
+ id: string;
442
+ }) => Promise<unknown>;
443
+ };
444
+ search: {
445
+ query: (input: {
446
+ productId: string;
447
+ query?: string;
448
+ excludeTicketId?: string;
449
+ limit?: number;
450
+ }) => Promise<unknown[]>;
451
+ };
452
+ addDependency: {
453
+ mutate: (input: {
454
+ ticketId: string;
455
+ dependsOnId: string;
456
+ }) => Promise<unknown>;
457
+ };
458
+ removeDependency: {
459
+ mutate: (input: {
460
+ ticketId: string;
461
+ dependsOnId: string;
462
+ }) => Promise<unknown>;
463
+ };
464
+ addComment: {
465
+ mutate: (input: {
466
+ ticketId: string;
467
+ content: string;
468
+ }) => Promise<unknown>;
469
+ };
470
+ deleteComment: {
471
+ mutate: (input: {
472
+ id: string;
473
+ }) => Promise<unknown>;
474
+ };
475
+ linkAction: {
476
+ mutate: (input: {
477
+ ticketId: string;
478
+ actionId: string;
479
+ }) => Promise<unknown>;
480
+ };
481
+ unlinkAction: {
482
+ mutate: (input: {
483
+ actionId: string;
484
+ }) => Promise<unknown>;
485
+ };
486
+ };
487
+ };
57
488
  }
58
489
  declare function isTRPCError(error: unknown): error is TRPCClientError<any>;
59
490
 
@@ -142,6 +573,39 @@ interface ActionsKanbanOptions {
142
573
  status?: KanbanStatus;
143
574
  assigneeId?: string;
144
575
  }
576
+ type ActionStatus = 'ACTIVE' | 'COMPLETED' | 'CANCELLED' | 'DELETED' | 'DRAFT';
577
+ interface ActionCreateInput {
578
+ name: string;
579
+ description?: string;
580
+ projectId?: string;
581
+ workspaceId?: string;
582
+ dueDate?: Date;
583
+ scheduledStart?: Date;
584
+ scheduledEnd?: Date;
585
+ duration?: number;
586
+ priority?: Priority;
587
+ status?: ActionStatus;
588
+ epicId?: string;
589
+ effortEstimate?: number;
590
+ blockedByIds?: string[];
591
+ }
592
+ interface ActionUpdateInput {
593
+ id: string;
594
+ name?: string;
595
+ description?: string;
596
+ projectId?: string;
597
+ workspaceId?: string | null;
598
+ dueDate?: Date | null;
599
+ scheduledStart?: Date | null;
600
+ scheduledEnd?: Date | null;
601
+ duration?: number | null;
602
+ priority?: Priority;
603
+ status?: ActionStatus;
604
+ kanbanStatus?: KanbanStatus;
605
+ epicId?: string | null;
606
+ effortEstimate?: number | null;
607
+ blockedByIds?: string[];
608
+ }
145
609
  declare class ActionsApi {
146
610
  private client;
147
611
  constructor(client: TrpcClient);
@@ -150,6 +614,49 @@ declare class ActionsApi {
150
614
  getByDateRange(start: Date, end: Date, workspaceId?: string): Promise<Action[]>;
151
615
  getKanban(options?: ActionsKanbanOptions): Promise<Action[]>;
152
616
  getProjectActions(projectId: string, assigneeId?: string): Promise<Action[]>;
617
+ create(input: ActionCreateInput): Promise<Action>;
618
+ update(input: ActionUpdateInput): Promise<Action>;
619
+ }
620
+
621
+ interface CommentAuthor {
622
+ id: string;
623
+ name: string | null;
624
+ image: string | null;
625
+ }
626
+ interface ActionComment {
627
+ id: string;
628
+ actionId: string;
629
+ authorId: string;
630
+ content: string;
631
+ createdAt: Date;
632
+ updatedAt: Date;
633
+ author: CommentAuthor;
634
+ }
635
+ interface TicketComment {
636
+ id: string;
637
+ ticketId: string;
638
+ authorId: string;
639
+ content: string;
640
+ createdAt: Date;
641
+ updatedAt: Date;
642
+ author: CommentAuthor;
643
+ }
644
+
645
+ interface ActionCommentAddInput {
646
+ actionId: string;
647
+ content: string;
648
+ }
649
+ interface ActionCommentUpdateInput {
650
+ commentId: string;
651
+ content: string;
652
+ }
653
+ declare class ActionCommentsApi {
654
+ private client;
655
+ constructor(client: TrpcClient);
656
+ list(actionId: string): Promise<ActionComment[]>;
657
+ add(input: ActionCommentAddInput): Promise<ActionComment>;
658
+ update(input: ActionCommentUpdateInput): Promise<ActionComment>;
659
+ delete(commentId: string): Promise<ActionComment>;
153
660
  }
154
661
 
155
662
  interface Project {
@@ -219,6 +726,616 @@ declare class WorkspacesApi {
219
726
  list(): Promise<Workspace[]>;
220
727
  }
221
728
 
729
+ type InteractionType = 'EMAIL' | 'TELEGRAM' | 'PHONE_CALL' | 'MEETING' | 'NOTE' | 'LINKEDIN' | 'OTHER';
730
+ type InteractionDirection = 'INBOUND' | 'OUTBOUND';
731
+ interface Contact {
732
+ id: string;
733
+ workspaceId: string;
734
+ firstName: string | null;
735
+ lastName: string | null;
736
+ email: string | null;
737
+ phone: string | null;
738
+ linkedIn: string | null;
739
+ telegram: string | null;
740
+ twitter: string | null;
741
+ github: string | null;
742
+ bluesky: string | null;
743
+ about: string | null;
744
+ profileType: string | null;
745
+ skills: string[];
746
+ tags: string[];
747
+ organizationId: string | null;
748
+ connectionScore: number | null;
749
+ lastInteractionAt: Date | null;
750
+ lastInteractionType: string | null;
751
+ importSource: string | null;
752
+ createdAt: Date;
753
+ updatedAt: Date;
754
+ organization?: {
755
+ id: string;
756
+ name: string;
757
+ workspaceId: string;
758
+ websiteUrl: string | null;
759
+ logoUrl: string | null;
760
+ description: string | null;
761
+ industry: string | null;
762
+ size: string | null;
763
+ } | null;
764
+ createdBy?: {
765
+ id: string;
766
+ name: string | null;
767
+ email: string | null;
768
+ image: string | null;
769
+ } | null;
770
+ }
771
+ interface ContactInteraction {
772
+ id: string;
773
+ contactId: string;
774
+ workspaceId: string;
775
+ userId: string | null;
776
+ type: string;
777
+ direction: string;
778
+ subject: string | null;
779
+ notes: string | null;
780
+ metadata: unknown;
781
+ occurredAt: Date;
782
+ createdAt: Date;
783
+ }
784
+ interface ContactListOutput {
785
+ contacts: Contact[];
786
+ nextCursor?: string;
787
+ }
788
+
789
+ interface ContactsListOptions {
790
+ workspaceId: string;
791
+ search?: string;
792
+ tags?: string[];
793
+ organizationId?: string;
794
+ limit?: number;
795
+ cursor?: string;
796
+ }
797
+ interface ContactCreateInput {
798
+ workspaceId: string;
799
+ firstName?: string;
800
+ lastName?: string;
801
+ email?: string | null;
802
+ phone?: string;
803
+ linkedIn?: string;
804
+ telegram?: string;
805
+ twitter?: string;
806
+ github?: string;
807
+ bluesky?: string;
808
+ about?: string;
809
+ profileType?: string;
810
+ skills?: string[];
811
+ tags?: string[];
812
+ organizationId?: string;
813
+ }
814
+ interface ContactUpdateInput {
815
+ id: string;
816
+ firstName?: string;
817
+ lastName?: string;
818
+ email?: string | null;
819
+ phone?: string | null;
820
+ linkedIn?: string | null;
821
+ telegram?: string | null;
822
+ twitter?: string | null;
823
+ github?: string | null;
824
+ bluesky?: string | null;
825
+ about?: string;
826
+ profileType?: string;
827
+ skills?: string[];
828
+ tags?: string[];
829
+ organizationId?: string | null;
830
+ }
831
+ interface AddInteractionInput {
832
+ contactId: string;
833
+ type: InteractionType;
834
+ direction: InteractionDirection;
835
+ subject?: string;
836
+ notes?: string;
837
+ metadata?: Record<string, unknown>;
838
+ }
839
+ declare class ContactsApi {
840
+ private client;
841
+ constructor(client: TrpcClient);
842
+ list(options: ContactsListOptions): Promise<ContactListOutput>;
843
+ get(id: string, options?: {
844
+ includeInteractions?: boolean;
845
+ }): Promise<Contact>;
846
+ create(input: ContactCreateInput): Promise<Contact>;
847
+ update(input: ContactUpdateInput): Promise<Contact>;
848
+ delete(id: string): Promise<void>;
849
+ addInteraction(input: AddInteractionInput): Promise<ContactInteraction>;
850
+ }
851
+
852
+ interface PipelineStage {
853
+ id: string;
854
+ projectId: string;
855
+ name: string;
856
+ color: string;
857
+ order: number;
858
+ type: string;
859
+ createdAt: Date;
860
+ updatedAt: Date;
861
+ _count?: {
862
+ deals: number;
863
+ };
864
+ }
865
+ interface Pipeline {
866
+ id: string;
867
+ name: string;
868
+ workspaceId: string | null;
869
+ status: string | null;
870
+ pipelineStages: PipelineStage[];
871
+ }
872
+ interface Deal {
873
+ id: string;
874
+ projectId: string;
875
+ stageId: string;
876
+ title: string;
877
+ description: string | null;
878
+ value: number | null;
879
+ currency: string;
880
+ probability: number | null;
881
+ expectedCloseDate: Date | null;
882
+ closedAt: Date | null;
883
+ stageOrder: number;
884
+ contactId: string | null;
885
+ organizationId: string | null;
886
+ workspaceId: string;
887
+ createdById: string;
888
+ assignedToId: string | null;
889
+ createdAt: Date;
890
+ updatedAt: Date;
891
+ stage?: PipelineStage;
892
+ contact?: {
893
+ id: string;
894
+ firstName: string | null;
895
+ lastName: string | null;
896
+ organizationId?: string | null;
897
+ } | null;
898
+ organization?: {
899
+ id: string;
900
+ name: string;
901
+ } | null;
902
+ assignedTo?: {
903
+ id: string;
904
+ name: string | null;
905
+ image: string | null;
906
+ email?: string | null;
907
+ } | null;
908
+ activities?: DealActivity[];
909
+ }
910
+ interface DealActivity {
911
+ id: string;
912
+ dealId: string;
913
+ userId: string | null;
914
+ type: string;
915
+ content: string | null;
916
+ metadata: unknown;
917
+ createdAt: Date;
918
+ user?: {
919
+ id: string;
920
+ name: string | null;
921
+ image: string | null;
922
+ } | null;
923
+ }
924
+
925
+ interface DealCreateInput {
926
+ workspaceId: string;
927
+ stageId: string;
928
+ title: string;
929
+ description?: string;
930
+ value?: number;
931
+ currency?: string;
932
+ probability?: number;
933
+ expectedCloseDate?: Date;
934
+ contactId?: string;
935
+ organizationId?: string;
936
+ assignedToId?: string;
937
+ }
938
+ interface DealUpdateInput {
939
+ id: string;
940
+ title?: string;
941
+ description?: string | null;
942
+ value?: number | null;
943
+ currency?: string;
944
+ probability?: number | null;
945
+ expectedCloseDate?: Date | null;
946
+ contactId?: string | null;
947
+ organizationId?: string | null;
948
+ assignedToId?: string | null;
949
+ }
950
+ interface DealMoveInput {
951
+ id: string;
952
+ stageId: string;
953
+ stageOrder: number;
954
+ }
955
+ declare class PipelinesApi {
956
+ private client;
957
+ constructor(client: TrpcClient);
958
+ get(workspaceId: string): Promise<Pipeline | null>;
959
+ getStages(workspaceId: string): Promise<PipelineStage[]>;
960
+ listDeals(workspaceId: string): Promise<Deal[]>;
961
+ getDeal(id: string): Promise<Deal>;
962
+ createDeal(input: DealCreateInput): Promise<Deal>;
963
+ updateDeal(input: DealUpdateInput): Promise<Deal>;
964
+ moveDeal(input: DealMoveInput): Promise<Deal>;
965
+ deleteDeal(id: string): Promise<void>;
966
+ }
967
+
968
+ type TicketStatus = 'BACKLOG' | 'NEEDS_REFINEMENT' | 'READY_TO_PLAN' | 'COMMITTED' | 'IN_PROGRESS' | 'BLOCKED' | 'QA' | 'DONE' | 'DEPLOYED' | 'ARCHIVED';
969
+ type TicketType = 'BUG' | 'FEATURE' | 'CHORE' | 'IMPROVEMENT' | 'SPIKE' | 'RESEARCH';
970
+ interface TicketAssignee {
971
+ id: string;
972
+ name: string | null;
973
+ email?: string | null;
974
+ image: string | null;
975
+ }
976
+ interface TicketDependencyEdge {
977
+ id: string;
978
+ number: number | null;
979
+ shortId: string | null;
980
+ title: string;
981
+ status: TicketStatus;
982
+ priority: number | null;
983
+ assignee: TicketAssignee | null;
984
+ }
985
+ interface Ticket {
986
+ id: string;
987
+ productId: string;
988
+ number: number | null;
989
+ shortId: string | null;
990
+ title: string;
991
+ body: string | null;
992
+ type: TicketType;
993
+ status: TicketStatus;
994
+ priority: number | null;
995
+ points: number | null;
996
+ branchName: string | null;
997
+ prUrl: string | null;
998
+ designUrl: string | null;
999
+ specUrl: string | null;
1000
+ links: Record<string, string> | null;
1001
+ epicId: string | null;
1002
+ featureId: string | null;
1003
+ cycleId: string | null;
1004
+ scopeId: string | null;
1005
+ assigneeId: string | null;
1006
+ createdById: string | null;
1007
+ completedAt: Date | null;
1008
+ createdAt: Date;
1009
+ updatedAt: Date;
1010
+ assignee?: TicketAssignee | null;
1011
+ feature?: {
1012
+ id: string;
1013
+ name: string;
1014
+ status?: string;
1015
+ } | null;
1016
+ epic?: {
1017
+ id: string;
1018
+ name: string;
1019
+ status?: string;
1020
+ } | null;
1021
+ cycle?: {
1022
+ id: string;
1023
+ name: string;
1024
+ status?: string;
1025
+ startDate?: Date | null;
1026
+ endDate?: Date | null;
1027
+ } | null;
1028
+ openBlockerCount?: number;
1029
+ isBlocked?: boolean;
1030
+ _count?: {
1031
+ actions?: number;
1032
+ comments?: number;
1033
+ };
1034
+ }
1035
+ interface TicketDetail extends Ticket {
1036
+ product?: {
1037
+ id: string;
1038
+ slug: string;
1039
+ workspaceId: string;
1040
+ name: string;
1041
+ funTicketIds?: boolean;
1042
+ };
1043
+ dependsOn?: TicketDependencyEdge[];
1044
+ requiredFor?: TicketDependencyEdge[];
1045
+ actions?: Array<{
1046
+ id: string;
1047
+ name: string;
1048
+ status: string;
1049
+ completedAt: Date | null;
1050
+ kanbanStatus: string | null;
1051
+ }>;
1052
+ comments?: Array<{
1053
+ id: string;
1054
+ content: string;
1055
+ createdAt: Date;
1056
+ updatedAt: Date;
1057
+ author: TicketAssignee;
1058
+ }>;
1059
+ }
1060
+
1061
+ interface TicketListOptions {
1062
+ productId: string;
1063
+ status?: TicketStatus;
1064
+ type?: TicketType;
1065
+ featureId?: string;
1066
+ epicId?: string;
1067
+ cycleId?: string;
1068
+ assigneeId?: string;
1069
+ }
1070
+ interface TicketCreateInput {
1071
+ productId: string;
1072
+ title: string;
1073
+ body?: string;
1074
+ type?: TicketType;
1075
+ status?: TicketStatus;
1076
+ /** 0–4; lower is higher priority. */
1077
+ priority?: number;
1078
+ points?: number;
1079
+ branchName?: string;
1080
+ prUrl?: string;
1081
+ designUrl?: string;
1082
+ specUrl?: string;
1083
+ links?: Record<string, string>;
1084
+ epicId?: string;
1085
+ featureId?: string;
1086
+ cycleId?: string;
1087
+ scopeId?: string;
1088
+ assigneeId?: string;
1089
+ templateId?: string;
1090
+ }
1091
+ interface TicketUpdateInput {
1092
+ id: string;
1093
+ title?: string;
1094
+ body?: string;
1095
+ type?: TicketType;
1096
+ status?: TicketStatus;
1097
+ priority?: number | null;
1098
+ points?: number | null;
1099
+ branchName?: string | null;
1100
+ prUrl?: string | null;
1101
+ designUrl?: string | null;
1102
+ specUrl?: string | null;
1103
+ links?: Record<string, string> | null;
1104
+ epicId?: string | null;
1105
+ featureId?: string | null;
1106
+ cycleId?: string | null;
1107
+ scopeId?: string | null;
1108
+ assigneeId?: string | null;
1109
+ }
1110
+ interface TicketCommentAddInput {
1111
+ ticketId: string;
1112
+ content: string;
1113
+ }
1114
+ interface TicketSearchOptions {
1115
+ productId: string;
1116
+ query?: string;
1117
+ excludeTicketId?: string;
1118
+ limit?: number;
1119
+ }
1120
+ declare class TicketsApi {
1121
+ private client;
1122
+ constructor(client: TrpcClient);
1123
+ list(options: TicketListOptions): Promise<Ticket[]>;
1124
+ get(id: string): Promise<TicketDetail>;
1125
+ create(input: TicketCreateInput): Promise<Ticket>;
1126
+ update(input: TicketUpdateInput): Promise<Ticket>;
1127
+ delete(id: string): Promise<{
1128
+ success: boolean;
1129
+ }>;
1130
+ search(options: TicketSearchOptions): Promise<TicketDependencyEdge[]>;
1131
+ /** Mark `ticketId` as blocked by `dependsOnId`. */
1132
+ addDependency(ticketId: string, dependsOnId: string): Promise<{
1133
+ id: string;
1134
+ dependsOn: TicketDependencyEdge;
1135
+ }>;
1136
+ removeDependency(ticketId: string, dependsOnId: string): Promise<{
1137
+ success: boolean;
1138
+ }>;
1139
+ addComment(input: TicketCommentAddInput): Promise<TicketComment>;
1140
+ deleteComment(id: string): Promise<{
1141
+ success: boolean;
1142
+ }>;
1143
+ /** Attach an existing action to a ticket. */
1144
+ linkAction(ticketId: string, actionId: string): Promise<Action>;
1145
+ /** Detach an action from whatever ticket it's linked to. */
1146
+ unlinkAction(actionId: string): Promise<Action>;
1147
+ }
1148
+
1149
+ interface Product {
1150
+ id: string;
1151
+ workspaceId: string;
1152
+ name: string;
1153
+ slug: string;
1154
+ description: string | null;
1155
+ icon: string | null;
1156
+ color: string | null;
1157
+ funTicketIds: boolean;
1158
+ ticketCounter: number;
1159
+ createdById: string | null;
1160
+ createdAt: Date;
1161
+ updatedAt: Date;
1162
+ _count?: {
1163
+ features?: number;
1164
+ tickets?: number;
1165
+ researches?: number;
1166
+ retrospectives?: number;
1167
+ };
1168
+ }
1169
+
1170
+ interface ProductCreateInput {
1171
+ workspaceId: string;
1172
+ name: string;
1173
+ /** Kebab-case slug; must match `/^[a-z0-9-]+$/`. */
1174
+ slug: string;
1175
+ description?: string;
1176
+ icon?: string;
1177
+ color?: string;
1178
+ }
1179
+ interface ProductUpdateInput {
1180
+ id: string;
1181
+ name?: string;
1182
+ description?: string;
1183
+ icon?: string;
1184
+ color?: string;
1185
+ funTicketIds?: boolean;
1186
+ }
1187
+ declare class ProductsApi {
1188
+ private client;
1189
+ constructor(client: TrpcClient);
1190
+ list(workspaceId: string): Promise<Product[]>;
1191
+ get(id: string): Promise<Product>;
1192
+ getBySlug(workspaceId: string, slug: string): Promise<Product>;
1193
+ /**
1194
+ * Resolve a product reference (slug or CUID) to a full Product. Falls back
1195
+ * to slug lookup if the bare CUID lookup fails — callers can pass either.
1196
+ */
1197
+ resolve(workspaceId: string, slugOrId: string): Promise<Product>;
1198
+ create(input: ProductCreateInput): Promise<Product>;
1199
+ update(input: ProductUpdateInput): Promise<Product>;
1200
+ delete(id: string): Promise<{
1201
+ success: boolean;
1202
+ }>;
1203
+ }
1204
+
1205
+ type FeatureStatus = 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'ARCHIVED';
1206
+ type FeatureScopeStatus = 'PLANNED' | 'IN_PROGRESS' | 'SHIPPED' | 'DEPRECATED';
1207
+ interface FeatureScope {
1208
+ id: string;
1209
+ featureId: string;
1210
+ version: string;
1211
+ status: FeatureScopeStatus;
1212
+ summary: string | null;
1213
+ displayOrder: number;
1214
+ createdAt: Date;
1215
+ updatedAt: Date;
1216
+ }
1217
+ interface Feature {
1218
+ id: string;
1219
+ productId: string;
1220
+ name: string;
1221
+ description: string | null;
1222
+ vision: string | null;
1223
+ status: FeatureStatus;
1224
+ effort: number | null;
1225
+ priority: number | null;
1226
+ goalId: number | null;
1227
+ createdById: string | null;
1228
+ createdAt: Date;
1229
+ updatedAt: Date;
1230
+ goal?: {
1231
+ id: number;
1232
+ title: string;
1233
+ period: string | null;
1234
+ } | null;
1235
+ scopes?: FeatureScope[];
1236
+ _count?: {
1237
+ scopes?: number;
1238
+ userStories?: number;
1239
+ tickets?: number;
1240
+ };
1241
+ }
1242
+
1243
+ interface FeatureListOptions {
1244
+ productId: string;
1245
+ status?: FeatureStatus;
1246
+ }
1247
+ interface FeatureCreateInput {
1248
+ productId: string;
1249
+ name: string;
1250
+ description?: string;
1251
+ vision?: string;
1252
+ status?: FeatureStatus;
1253
+ effort?: number;
1254
+ /** 0–4; lower is higher priority. */
1255
+ priority?: number;
1256
+ goalId?: number;
1257
+ }
1258
+ interface FeatureUpdateInput {
1259
+ id: string;
1260
+ name?: string;
1261
+ description?: string;
1262
+ vision?: string;
1263
+ status?: FeatureStatus;
1264
+ effort?: number;
1265
+ priority?: number;
1266
+ goalId?: number | null;
1267
+ }
1268
+ declare class FeaturesApi {
1269
+ private client;
1270
+ constructor(client: TrpcClient);
1271
+ list(options: FeatureListOptions): Promise<Feature[]>;
1272
+ get(id: string): Promise<Feature>;
1273
+ create(input: FeatureCreateInput): Promise<Feature>;
1274
+ update(input: FeatureUpdateInput): Promise<Feature>;
1275
+ delete(id: string): Promise<{
1276
+ success: boolean;
1277
+ }>;
1278
+ }
1279
+
1280
+ type EpicStatus = 'OPEN' | 'IN_PROGRESS' | 'DONE' | 'CANCELLED';
1281
+ type EpicPriority = 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE';
1282
+ interface Epic {
1283
+ id: string;
1284
+ workspaceId: string;
1285
+ name: string;
1286
+ description: string | null;
1287
+ status: EpicStatus;
1288
+ priority: EpicPriority;
1289
+ startDate: Date | null;
1290
+ targetDate: Date | null;
1291
+ ownerId: string | null;
1292
+ createdAt: Date;
1293
+ updatedAt: Date;
1294
+ owner?: {
1295
+ id: string;
1296
+ name: string | null;
1297
+ email: string | null;
1298
+ image: string | null;
1299
+ } | null;
1300
+ _count?: {
1301
+ actions?: number;
1302
+ tickets?: number;
1303
+ };
1304
+ }
1305
+
1306
+ interface EpicListOptions {
1307
+ workspaceId: string;
1308
+ status?: EpicStatus;
1309
+ }
1310
+ interface EpicCreateInput {
1311
+ workspaceId: string;
1312
+ name: string;
1313
+ description?: string;
1314
+ priority?: EpicPriority;
1315
+ startDate?: Date;
1316
+ targetDate?: Date;
1317
+ }
1318
+ interface EpicUpdateInput {
1319
+ id: string;
1320
+ name?: string;
1321
+ description?: string | null;
1322
+ status?: EpicStatus;
1323
+ priority?: EpicPriority;
1324
+ startDate?: Date | null;
1325
+ targetDate?: Date | null;
1326
+ }
1327
+ declare class EpicsApi {
1328
+ private client;
1329
+ constructor(client: TrpcClient);
1330
+ list(options: EpicListOptions): Promise<Epic[]>;
1331
+ get(id: string): Promise<Epic>;
1332
+ create(input: EpicCreateInput): Promise<Epic>;
1333
+ update(input: EpicUpdateInput): Promise<Epic>;
1334
+ delete(id: string): Promise<{
1335
+ success: boolean;
1336
+ }>;
1337
+ }
1338
+
222
1339
  interface ExponentialConfig {
223
1340
  apiUrl: string;
224
1341
  token: string;
@@ -245,12 +1362,19 @@ declare class ExponentialClient {
245
1362
  private config;
246
1363
  private client;
247
1364
  actions: ActionsApi;
1365
+ actionComments: ActionCommentsApi;
248
1366
  projects: ProjectsApi;
249
1367
  workspaces: WorkspacesApi;
1368
+ contacts: ContactsApi;
1369
+ pipelines: PipelinesApi;
1370
+ tickets: TicketsApi;
1371
+ products: ProductsApi;
1372
+ features: FeaturesApi;
1373
+ epics: EpicsApi;
250
1374
  constructor(config: {
251
1375
  token: string;
252
1376
  apiUrl: string;
253
1377
  });
254
1378
  }
255
1379
 
256
- export { type Action, type ActionOutput, type ActionsListOutput, ExponentialClient, type ExponentialConfig, type KanbanStatus, type Priority, type Project, type ProjectOutput, type ProjectsListOutput, type Workspace, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
1380
+ 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 Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectOutput, type ProjectsListOutput, 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 };