exponential-sdk 1.9.0 → 1.10.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
@@ -78,6 +78,12 @@ interface TrpcClient {
78
78
  getToday: {
79
79
  query: (input?: TodayInput) => Promise<unknown[]>;
80
80
  };
81
+ getTodaysActions: {
82
+ query: (input?: TodayInput) => Promise<unknown>;
83
+ };
84
+ getOverdueTriage: {
85
+ query: (input?: TodayInput) => Promise<unknown>;
86
+ };
81
87
  getByDateRange: {
82
88
  query: (input: DateRangeInput) => Promise<unknown[]>;
83
89
  };
@@ -93,6 +99,17 @@ interface TrpcClient {
93
99
  update: {
94
100
  mutate: (input: ActionUpdateInput$1) => Promise<unknown>;
95
101
  };
102
+ bulkReschedule: {
103
+ mutate: (input: {
104
+ actionIds: string[];
105
+ dueDate: Date | null;
106
+ }) => Promise<unknown>;
107
+ };
108
+ bulkDefer: {
109
+ mutate: (input: {
110
+ actionIds: string[];
111
+ }) => Promise<unknown>;
112
+ };
96
113
  };
97
114
  project: {
98
115
  getAll: {
@@ -806,11 +823,103 @@ interface ActionUpdateInput {
806
823
  effortEstimate?: number | null;
807
824
  blockedByIds?: string[];
808
825
  }
826
+ /** One action as returned inside a {@link TodaysActions} group. */
827
+ interface TodaysActionRow {
828
+ id: string;
829
+ name: string;
830
+ status: string;
831
+ scheduledStart: Date | null;
832
+ dueDate: Date | null;
833
+ projectName: string | null;
834
+ workspaceName: string | null;
835
+ }
836
+ interface TodaysActionsGroup {
837
+ /** Total in this group — may exceed `actions.length`, which is capped at 50. */
838
+ count: number;
839
+ actions: TodaysActionRow[];
840
+ }
841
+ interface TodaysActions {
842
+ overdue: TodaysActionsGroup;
843
+ today: TodaysActionsGroup;
844
+ inbox: TodaysActionsGroup;
845
+ }
846
+ interface OverdueTriageRow extends Omit<TodaysActionRow, 'status' | 'workspaceName'> {
847
+ priority: string | null;
848
+ daysOverdue: number;
849
+ }
850
+ interface OverdueCohort {
851
+ /** The exact instant every member is stamped with. */
852
+ stampedAt: Date;
853
+ daysOverdue: number;
854
+ count: number;
855
+ projectNames: string[];
856
+ actionIds: string[];
857
+ actions: OverdueTriageRow[];
858
+ }
859
+ interface OverdueTriage {
860
+ totalOverdue: number;
861
+ /** How many of `totalOverdue` sit inside a cohort. */
862
+ cohortCount: number;
863
+ cohorts: OverdueCohort[];
864
+ /** Individually-dated overdue actions — real debt, worth reading one by one. */
865
+ loose: OverdueTriageRow[];
866
+ }
809
867
  declare class ActionsApi {
810
868
  private client;
811
869
  constructor(client: TrpcClient);
812
870
  list(options?: ActionsListOptions): Promise<Action[]>;
871
+ /**
872
+ * Actions whose `dueDate` falls today.
873
+ *
874
+ * Note this is a **narrow** slice: it excludes overdue actions, and excludes
875
+ * anything scheduled for today that carries no due date. If you want "what
876
+ * is on my plate", use {@link getTodaysActions} instead — this method will
877
+ * happily report a quiet day on top of a large overdue pile.
878
+ */
813
879
  getToday(workspaceId?: string): Promise<Action[]>;
880
+ /**
881
+ * What is actually on the user's plate: the `/today` page's own partition,
882
+ * pre-split into `overdue` / `today` / `inbox`.
883
+ *
884
+ * Prefer this over {@link getToday} for anything that reasons about the
885
+ * user's day. `getToday` is a due-date-only slice that omits the overdue
886
+ * pile entirely — on a real account that can mean returning 6 actions while
887
+ * 40 sit overdue. This method uses the server-shared partition, so it agrees
888
+ * with what the user is looking at by construction.
889
+ *
890
+ * Cross-workspace by default. Each group is capped at 50 rows; `count` is the
891
+ * true total.
892
+ */
893
+ getTodaysActions(workspaceId?: string): Promise<TodaysActions>;
894
+ /**
895
+ * Why the overdue pile is the size it is.
896
+ *
897
+ * Splits overdue actions into **cohorts** — groups sharing one exact
898
+ * timestamp, the fingerprint of a bulk write like a generated project plan —
899
+ * and **loose** individually-dated debt. Cohort members were almost certainly
900
+ * never individually due, so the honest disposition is {@link bulkDefer},
901
+ * not another {@link bulkReschedule} that re-inflicts the pile tomorrow.
902
+ */
903
+ getOverdueTriage(workspaceId?: string): Promise<OverdueTriage>;
904
+ /**
905
+ * Move actions to a new do-date (`scheduledStart`), pushing `dueDate` forward
906
+ * only where it would otherwise fall before it. Pass `null` to clear both —
907
+ * though {@link bulkDefer} says that more clearly.
908
+ */
909
+ bulkReschedule(actionIds: string[], dueDate: Date | null): Promise<{
910
+ count: number;
911
+ actionIds: string[];
912
+ }>;
913
+ /**
914
+ * Amnesty: clear the dates so actions fall back to their project backlog
915
+ * untimed. For work that was never really due on the date it carries —
916
+ * typically an overdue cohort. Kanban status is untouched.
917
+ */
918
+ bulkDefer(actionIds: string[]): Promise<{
919
+ count: number;
920
+ actionIds: string[];
921
+ message: string;
922
+ }>;
814
923
  getByDateRange(start: Date, end: Date, workspaceId?: string): Promise<Action[]>;
815
924
  getKanban(options?: ActionsKanbanOptions): Promise<Action[]>;
816
925
  getProjectActions(projectId: string, assigneeId?: string): Promise<Action[]>;
@@ -2012,4 +2121,4 @@ declare class ExponentialClient {
2012
2121
  });
2013
2122
  }
2014
2123
 
2015
- export { type Action, type ActionComment, type ActionCommentAddInput, type ActionCommentUpdateInput, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionsListOutput, type AddInteractionInput, type Area, type AreaCreateInput, type AreaListOptions, 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 EnrichContactResult, type Epic, type EpicCreateInput, type EpicListOptions, type EpicPriority, type EpicStatus, type EpicUpdateInput, ExponentialClient, type ExponentialConfig, type Feature, type FeatureCreateInput, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type GlobalSearchOptions, type GlobalSearchOutput, type InteractionDirection, type InteractionType, type KanbanStatus, type KnowledgePage, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type PageCreateInput, type PageListOptions, type PageUpdateInput, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectOutput, type ProjectsListOutput, type Requirement, type RequirementCreateInput, type RequirementKind, type RequirementListOptions, type ScopeCreateInput, type ScopeListOptions, type ScopeUpdateInput, type SearchResult, type SearchResultType, type SearchResultWorkspace, 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 UserStory, type UserStoryCreateInput, type UserStoryListOptions, type UserStoryUpdateInput, type Workspace, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
2124
+ export { type Action, type ActionComment, type ActionCommentAddInput, type ActionCommentUpdateInput, type ActionCreateInput, type ActionOutput, type ActionStatus, type ActionUpdateInput, type ActionsListOutput, type AddInteractionInput, type Area, type AreaCreateInput, type AreaListOptions, 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 EnrichContactResult, type Epic, type EpicCreateInput, type EpicListOptions, type EpicPriority, type EpicStatus, type EpicUpdateInput, ExponentialClient, type ExponentialConfig, type Feature, type FeatureCreateInput, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type GlobalSearchOptions, type GlobalSearchOutput, type InteractionDirection, type InteractionType, type KanbanStatus, type KnowledgePage, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type OverdueCohort, type OverdueTriage, type OverdueTriageRow, type PageCreateInput, type PageListOptions, type PageUpdateInput, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectOutput, type ProjectsListOutput, type Requirement, type RequirementCreateInput, type RequirementKind, type RequirementListOptions, type ScopeCreateInput, type ScopeListOptions, type ScopeUpdateInput, type SearchResult, type SearchResultType, type SearchResultWorkspace, 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 TodaysActionRow, type TodaysActions, type TodaysActionsGroup, type UserStory, type UserStoryCreateInput, type UserStoryListOptions, type UserStoryUpdateInput, type Workspace, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
package/dist/index.js CHANGED
@@ -51,11 +51,72 @@ var ActionsApi = class {
51
51
  }
52
52
  return actions;
53
53
  }
54
+ /**
55
+ * Actions whose `dueDate` falls today.
56
+ *
57
+ * Note this is a **narrow** slice: it excludes overdue actions, and excludes
58
+ * anything scheduled for today that carries no due date. If you want "what
59
+ * is on my plate", use {@link getTodaysActions} instead — this method will
60
+ * happily report a quiet day on top of a large overdue pile.
61
+ */
54
62
  async getToday(workspaceId) {
55
63
  return await this.client.action.getToday.query({
56
64
  workspaceId
57
65
  });
58
66
  }
67
+ /**
68
+ * What is actually on the user's plate: the `/today` page's own partition,
69
+ * pre-split into `overdue` / `today` / `inbox`.
70
+ *
71
+ * Prefer this over {@link getToday} for anything that reasons about the
72
+ * user's day. `getToday` is a due-date-only slice that omits the overdue
73
+ * pile entirely — on a real account that can mean returning 6 actions while
74
+ * 40 sit overdue. This method uses the server-shared partition, so it agrees
75
+ * with what the user is looking at by construction.
76
+ *
77
+ * Cross-workspace by default. Each group is capped at 50 rows; `count` is the
78
+ * true total.
79
+ */
80
+ async getTodaysActions(workspaceId) {
81
+ return await this.client.action.getTodaysActions.query({
82
+ workspaceId
83
+ });
84
+ }
85
+ /**
86
+ * Why the overdue pile is the size it is.
87
+ *
88
+ * Splits overdue actions into **cohorts** — groups sharing one exact
89
+ * timestamp, the fingerprint of a bulk write like a generated project plan —
90
+ * and **loose** individually-dated debt. Cohort members were almost certainly
91
+ * never individually due, so the honest disposition is {@link bulkDefer},
92
+ * not another {@link bulkReschedule} that re-inflicts the pile tomorrow.
93
+ */
94
+ async getOverdueTriage(workspaceId) {
95
+ return await this.client.action.getOverdueTriage.query({
96
+ workspaceId
97
+ });
98
+ }
99
+ /**
100
+ * Move actions to a new do-date (`scheduledStart`), pushing `dueDate` forward
101
+ * only where it would otherwise fall before it. Pass `null` to clear both —
102
+ * though {@link bulkDefer} says that more clearly.
103
+ */
104
+ async bulkReschedule(actionIds, dueDate) {
105
+ return await this.client.action.bulkReschedule.mutate({
106
+ actionIds,
107
+ dueDate
108
+ });
109
+ }
110
+ /**
111
+ * Amnesty: clear the dates so actions fall back to their project backlog
112
+ * untimed. For work that was never really due on the date it carries —
113
+ * typically an overdue cohort. Kanban status is untouched.
114
+ */
115
+ async bulkDefer(actionIds) {
116
+ return await this.client.action.bulkDefer.mutate({
117
+ actionIds
118
+ });
119
+ }
59
120
  async getByDateRange(start, end, workspaceId) {
60
121
  return await this.client.action.getByDateRange.query({
61
122
  startDate: start,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/client.ts","../src/actions.ts","../src/actionComments.ts","../src/projects.ts","../src/workspaces.ts","../src/contacts.ts","../src/organizations.ts","../src/pipelines.ts","../src/tickets.ts","../src/products.ts","../src/features.ts","../src/userStories.ts","../src/epics.ts","../src/labels.ts","../src/areas.ts","../src/pages.ts","../src/requirements.ts","../src/scopes.ts","../src/search.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 search: {\n global: {\n query: (input: { query: string; workspaceId?: string; limit?: number }) => Promise<unknown>;\n };\n };\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; organizationName?: 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; organizationName?: string }) => 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 contactEnrich: { mutate: (input: { contactId: string }) => Promise<unknown> };\n organizationList: { query: (input: { workspaceId: string; search?: string; industry?: string; limit?: number; cursor?: string }) => Promise<unknown> };\n organizationGet: { query: (input: { id: string }) => Promise<unknown> };\n organizationCreate: { mutate: (input: { workspaceId: string; name: string; websiteUrl?: string | null; logoUrl?: string | null; description?: string; industry?: string; size?: string }) => 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 page: {\n list: { query: (input: { workspaceId: string; projectId?: string; search?: string }) => Promise<unknown[]> };\n get: { query: (input: { id: string }) => Promise<unknown> };\n create: { mutate: (input: { workspaceId: string; projectId?: string | null; title?: string; body?: string; includeInSearch?: boolean }) => Promise<unknown> };\n update: { mutate: (input: { id: string; title?: string; projectId?: string | null; includeInSearch?: boolean; body?: 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' | 'DEPRECATED' | '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' | 'DEPRECATED' | 'ARCHIVED'; effort?: number; priority?: number; goalId?: number; areaId?: string }) => Promise<unknown> };\n update: { mutate: (input: { id: string; name?: string; description?: string; vision?: string; status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'DEPRECATED' | 'ARCHIVED'; effort?: number; priority?: number; goalId?: number | null; areaId?: string | null }) => Promise<unknown> };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n addUserStory: { mutate: (input: { featureId: string; scopeId?: string; asA?: string; iWant?: string; soThat?: string; acceptanceCriteria?: string }) => Promise<unknown> };\n updateUserStory: { mutate: (input: { id: string; scopeId?: string | null; asA?: string; iWant?: string; soThat?: string; acceptanceCriteria?: string }) => Promise<unknown> };\n deleteUserStory: { mutate: (input: { id: string }) => Promise<unknown> };\n addScope: { mutate: (input: { featureId: string; version: string; description: string; status?: 'PLANNED' | 'IN_PROGRESS' | 'SHIPPED' | 'DEPRECATED'; shippedAt?: Date }) => Promise<unknown> };\n updateScope: { mutate: (input: { id: string; version?: string; description?: string; status?: 'PLANNED' | 'IN_PROGRESS' | 'SHIPPED' | 'DEPRECATED'; shippedAt?: Date | null; displayOrder?: number }) => Promise<unknown> };\n deleteScope: { mutate: (input: { id: string }) => Promise<unknown> };\n addRequirement: { mutate: (input: { featureId: string; scopeId?: string; statement: string; kind?: 'FUNCTIONAL' | 'NON_FUNCTIONAL' | 'CONSTRAINT' }) => Promise<unknown> };\n setRequirementChecked: { mutate: (input: { id: string; checked: boolean }) => Promise<unknown> };\n deleteRequirement: { mutate: (input: { id: string }) => Promise<unknown> };\n linkPage: { mutate: (input: { featureId: string; pageId: string; scopeId?: string }) => Promise<unknown> };\n unlinkPage: { mutate: (input: { featureId: string; pageId: string }) => Promise<unknown> };\n listAreas: { query: (input: { productId: string }) => Promise<unknown[]> };\n createArea: { mutate: (input: { productId: string; name: string; description?: string }) => Promise<unknown> };\n };\n ticket: {\n list: { query: (input: { productId?: string; status?: string; type?: string; featureId?: string; epicId?: string; cycleId?: string; assigneeId?: string; prUrl?: string; branchName?: 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 /** Link (or find-or-create) an organization by name. Ignored when organizationId is set. */\n organizationName?: 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 /** Link (or find-or-create) an organization by name. Ignored when organizationId is set. */\n organizationName?: string;\n}\n\nexport interface EnrichContactResult {\n enqueued: boolean;\n /** The enrichment job id — the newly created one, or the in-flight one that blocked it. */\n enrichmentId?: string;\n /** Why nothing was enqueued (only set when `enqueued` is false). */\n reason?: 'auto-enrich-disabled' | 'already-in-flight';\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 /**\n * Enqueue a web-search enrichment job for an existing contact. This is an\n * explicit action, so it runs regardless of the workspace's auto-enrich\n * setting; the enrich-pending-contacts cron drains the job into the\n * enrichment agent. Idempotent — a contact with a job already in flight is\n * not re-queued.\n */\n async enrich(id: string): Promise<EnrichContactResult> {\n return await this.client.crmApi.contactEnrich.mutate({ contactId: id }) as EnrichContactResult;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Organization, OrganizationListOutput, OrganizationSize } from './types/organization.js';\n\nexport interface OrganizationsListOptions {\n workspaceId: string;\n search?: string;\n industry?: string;\n limit?: number;\n cursor?: string;\n}\n\nexport interface OrganizationCreateInput {\n workspaceId: string;\n name: string;\n websiteUrl?: string | null;\n logoUrl?: string | null;\n description?: string;\n industry?: string;\n size?: OrganizationSize;\n}\n\nexport class OrganizationsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: OrganizationsListOptions): Promise<OrganizationListOutput> {\n return await this.client.crmApi.organizationList.query(options) as OrganizationListOutput;\n }\n\n async get(id: string): Promise<Organization> {\n return await this.client.crmApi.organizationGet.query({ id }) as Organization;\n }\n\n async create(input: OrganizationCreateInput): Promise<Organization> {\n return await this.client.crmApi.organizationCreate.mutate(input) as Organization;\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 /**\n * Required for product-scoped queries. Optional when `prUrl` or `branchName`\n * is supplied — those filters are workspace-global (a PR URL or branch name\n * uniquely identifies a Ticket across all products in the workspace), so the\n * server resolves scope from the caller's auth context instead.\n */\n productId?: string;\n status?: TicketStatus;\n type?: TicketType;\n featureId?: string;\n epicId?: string;\n cycleId?: string;\n assigneeId?: string;\n /** Workspace-scoped lookup by `Ticket.prUrl` (exact match). */\n prUrl?: string;\n /** Workspace-scoped lookup by `Ticket.branchName` (exact match). */\n branchName?: 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 /** Area (per-product bucket) to file the feature under. */\n areaId?: string;\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 areaId?: string | null;\n}\n\nexport interface FeatureLinkPageInput {\n featureId: string;\n pageId: string;\n /** Pin the linked page to one of the feature's scopes. */\n scopeId?: string;\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 /** Link a Knowledge page (PRD, spec, research) to a feature. */\n async linkPage(input: FeatureLinkPageInput): Promise<unknown> {\n return await this.client.product.feature.linkPage.mutate(input);\n }\n\n async unlinkPage(featureId: string, pageId: string): Promise<{ success: boolean }> {\n return await this.client.product.feature.unlinkPage.mutate({\n featureId,\n pageId,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Feature } from './types/feature.js';\nimport type { UserStory } from './types/userStory.js';\n\nexport interface UserStoryListOptions {\n featureId: string;\n}\n\nexport interface UserStoryCreateInput {\n featureId: string;\n asA?: string;\n iWant?: string;\n soThat?: string;\n acceptanceCriteria?: string;\n scopeId?: string;\n}\n\nexport interface UserStoryUpdateInput {\n id: string;\n asA?: string;\n iWant?: string;\n soThat?: string;\n acceptanceCriteria?: string;\n scopeId?: string | null;\n}\n\n/**\n * Native, structured user stories on a feature (As a / I want / So that).\n *\n * Mirrors the existing `FeaturesApi` shape and the `client.product.feature.*`\n * call style. `list` derives from the feature's `getById` payload, which\n * already includes `userStories` ordered by `displayOrder` — there is no\n * dedicated list procedure.\n */\nexport class UserStoriesApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: UserStoryListOptions): Promise<UserStory[]> {\n const feature = await this.client.product.feature.getById.query({\n id: options.featureId,\n }) as Feature & { userStories?: UserStory[] };\n return feature.userStories ?? [];\n }\n\n async create(input: UserStoryCreateInput): Promise<UserStory> {\n return await this.client.product.feature.addUserStory.mutate(\n input,\n ) as UserStory;\n }\n\n async update(input: UserStoryUpdateInput): Promise<UserStory> {\n return await this.client.product.feature.updateUserStory.mutate(\n input,\n ) as UserStory;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.product.feature.deleteUserStory.mutate({\n id,\n }) as { success: boolean };\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 type { TrpcClient } from './client.js';\n\nexport interface Area {\n id: string;\n productId: string;\n name: string;\n description: string | null;\n displayOrder: number;\n createdAt: Date;\n updatedAt: Date;\n _count?: {\n features?: number;\n };\n}\n\nexport interface AreaListOptions {\n productId: string;\n}\n\nexport interface AreaCreateInput {\n productId: string;\n name: string;\n description?: string;\n}\n\n/**\n * Areas: per-product buckets a feature is filed under (exactly one or none).\n */\nexport class AreasApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: AreaListOptions): Promise<Area[]> {\n return await this.client.product.feature.listAreas.query(options) as Area[];\n }\n\n async create(input: AreaCreateInput): Promise<Area> {\n return await this.client.product.feature.createArea.mutate(input) as Area;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { KnowledgePage } from './types/page.js';\n\nexport interface PageListOptions {\n workspaceId: string;\n projectId?: string;\n search?: string;\n}\n\nexport interface PageCreateInput {\n workspaceId: string;\n projectId?: string | null;\n title?: string;\n /** Markdown body. Indexed for search when non-empty. */\n body?: string;\n includeInSearch?: boolean;\n}\n\nexport interface PageUpdateInput {\n id: string;\n title?: string;\n projectId?: string | null;\n includeInSearch?: boolean;\n /**\n * Markdown body. Sending `body` without a rich-text doc is a\n * Markdown-source write: the server treats the Markdown as canonical and\n * the editor re-derives its rich document on next open.\n */\n body?: string;\n}\n\n/**\n * Knowledge pages (PRDs, research, technical specs). Workspace-scoped\n * documents; link one to a feature via `FeaturesApi.linkPage`.\n */\nexport class PagesApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: PageListOptions): Promise<KnowledgePage[]> {\n return await this.client.page.list.query(options) as KnowledgePage[];\n }\n\n async get(id: string): Promise<KnowledgePage> {\n return await this.client.page.get.query({ id }) as KnowledgePage;\n }\n\n async create(input: PageCreateInput): Promise<KnowledgePage> {\n return await this.client.page.create.mutate(input) as KnowledgePage;\n }\n\n async update(input: PageUpdateInput): Promise<KnowledgePage> {\n return await this.client.page.update.mutate(input) as KnowledgePage;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Feature } from './types/feature.js';\nimport type { Requirement, RequirementKind } from './types/requirement.js';\n\nexport interface RequirementListOptions {\n featureId: string;\n /** Only requirements pinned to this scope. */\n scopeId?: string;\n}\n\nexport interface RequirementCreateInput {\n featureId: string;\n /** Pin the requirement to one of the feature's scopes. */\n scopeId?: string;\n /** One EARS-style \"shall\" statement. */\n statement: string;\n kind?: RequirementKind;\n}\n\n/**\n * Requirements on a feature (EARS-style \"shall\" statements, checkable\n * met/unmet). Replaces user stories as the requirements mechanism.\n *\n * Mirrors the `UserStoriesApi` shape: `list` derives from the feature's\n * `getById` payload, which includes `requirements` ordered by\n * `displayOrder` - there is no dedicated list procedure.\n */\nexport class RequirementsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: RequirementListOptions): Promise<Requirement[]> {\n const feature = await this.client.product.feature.getById.query({\n id: options.featureId,\n }) as Feature & { requirements?: Requirement[] };\n const requirements = feature.requirements ?? [];\n return options.scopeId\n ? requirements.filter((r) => r.scopeId === options.scopeId)\n : requirements;\n }\n\n async create(input: RequirementCreateInput): Promise<Requirement> {\n return await this.client.product.feature.addRequirement.mutate(\n input,\n ) as Requirement;\n }\n\n /** Mark a requirement met (true) or unmet (false). */\n async setChecked(id: string, checked: boolean): Promise<Requirement> {\n return await this.client.product.feature.setRequirementChecked.mutate({\n id,\n checked,\n }) as Requirement;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.product.feature.deleteRequirement.mutate({\n id,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Feature, FeatureScope, FeatureScopeStatus } from './types/feature.js';\n\nexport interface ScopeListOptions {\n featureId: string;\n}\n\nexport interface ScopeCreateInput {\n featureId: string;\n /** Short label for the increment, e.g. \"V1\" or \"V2: auto-sync\". */\n version: string;\n description: string;\n status?: FeatureScopeStatus;\n shippedAt?: Date;\n}\n\nexport interface ScopeUpdateInput {\n id: string;\n version?: string;\n description?: string;\n status?: FeatureScopeStatus;\n shippedAt?: Date | null;\n displayOrder?: number;\n}\n\n/**\n * Feature scopes: shippable increments of a feature (\"V1\", \"V2\"), each with\n * its own lifecycle. Setting a scope SHIPPED stamps `shippedAt` server-side\n * and rolls the feature's status up (any live scope makes the feature Live).\n *\n * Mirrors the `UserStoriesApi` shape: `list` derives from the feature's\n * `getById` payload, which includes `scopes` ordered by `displayOrder` -\n * there is no dedicated list procedure.\n */\nexport class ScopesApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ScopeListOptions): Promise<FeatureScope[]> {\n const feature = await this.client.product.feature.getById.query({\n id: options.featureId,\n }) as Feature & { scopes?: FeatureScope[] };\n return feature.scopes ?? [];\n }\n\n async create(input: ScopeCreateInput): Promise<FeatureScope> {\n return await this.client.product.feature.addScope.mutate(\n input,\n ) as FeatureScope;\n }\n\n async update(input: ScopeUpdateInput): Promise<FeatureScope> {\n return await this.client.product.feature.updateScope.mutate(\n input,\n ) as FeatureScope;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.product.feature.deleteScope.mutate({\n id,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { GlobalSearchOptions, GlobalSearchOutput } from './types/search.js';\n\nexport class SearchApi {\n constructor(private client: TrpcClient) {}\n\n /**\n * Global text search across the entities the caller can access — the same\n * coverage as the app's Cmd+K palette (projects, actions, goals,\n * workspaces, and other entity types as the API grows).\n */\n async global(options: GlobalSearchOptions): Promise<GlobalSearchOutput> {\n return (await this.client.search.global.query(options)) as GlobalSearchOutput;\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 { OrganizationsApi } from './organizations.js';\nimport { PipelinesApi } from './pipelines.js';\nimport { TicketsApi } from './tickets.js';\nimport { ProductsApi } from './products.js';\nimport { FeaturesApi } from './features.js';\nimport { UserStoriesApi } from './userStories.js';\nimport { EpicsApi } from './epics.js';\nimport { LabelsApi } from './labels.js';\nimport { AreasApi } from './areas.js';\nimport { PagesApi } from './pages.js';\nimport { RequirementsApi } from './requirements.js';\nimport { ScopesApi } from './scopes.js';\nimport { SearchApi } from './search.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 organizations: OrganizationsApi;\n pipelines: PipelinesApi;\n tickets: TicketsApi;\n products: ProductsApi;\n features: FeaturesApi;\n userStories: UserStoriesApi;\n epics: EpicsApi;\n labels: LabelsApi;\n areas: AreasApi;\n pages: PagesApi;\n requirements: RequirementsApi;\n scopes: ScopesApi;\n search: SearchApi;\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.organizations = new OrganizationsApi(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.userStories = new UserStoriesApi(this.client);\n this.epics = new EpicsApi(this.client);\n this.labels = new LabelsApi(this.client);\n this.areas = new AreasApi(this.client);\n this.pages = new PagesApi(this.client);\n this.requirements = new RequirementsApi(this.client);\n this.scopes = new ScopesApi(this.client);\n this.search = new SearchApi(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 EnrichContactResult,\n} from './contacts.js';\nexport type {\n Organization,\n OrganizationListOutput,\n OrganizationSize,\n} from './types/organization.js';\nexport type {\n OrganizationCreateInput,\n OrganizationsListOptions,\n} from './organizations.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 FeatureLinkPageInput,\n} from './features.js';\nexport type { Area, AreaListOptions, AreaCreateInput } from './areas.js';\nexport type { KnowledgePage } from './types/page.js';\nexport type {\n PageListOptions,\n PageCreateInput,\n PageUpdateInput,\n} from './pages.js';\nexport type { Requirement, RequirementKind } from './types/requirement.js';\nexport type {\n RequirementListOptions,\n RequirementCreateInput,\n} from './requirements.js';\nexport type {\n ScopeListOptions,\n ScopeCreateInput,\n ScopeUpdateInput,\n} from './scopes.js';\nexport type { UserStory } from './types/userStory.js';\nexport type {\n UserStoryCreateInput,\n UserStoryUpdateInput,\n UserStoryListOptions,\n} from './userStories.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 {\n SearchResult,\n SearchResultType,\n SearchResultWorkspace,\n GlobalSearchOptions,\n GlobalSearchOutput,\n} from './types/search.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;AAmLf,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;;;ACrJO,IAAM,aAAN,MAAiB;AAAA,EACtB,YAAoB,QAAoB;AAApB;AAAA,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AK,UAAU,IAAI,WAAW,KAAK,MAAM;AACzC,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,SAAK,cAAc,IAAI,eAAe,KAAK,MAAM;AACjD,SAAK,QAAQ,IAAI,SAAS,KAAK,MAAM;AACrC,SAAK,SAAS,IAAI,UAAU,KAAK,MAAM;AACvC,SAAK,QAAQ,IAAI,SAAS,KAAK,MAAM;AACrC,SAAK,QAAQ,IAAI,SAAS,KAAK,MAAM;AACrC,SAAK,eAAe,IAAI,gBAAgB,KAAK,MAAM;AACnD,SAAK,SAAS,IAAI,UAAU,KAAK,MAAM;AACvC,SAAK,SAAS,IAAI,UAAU,KAAK,MAAM;AAAA,EACzC;AAAA,EAxCQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAuBF;","names":[]}
1
+ {"version":3,"sources":["../src/client.ts","../src/actions.ts","../src/actionComments.ts","../src/projects.ts","../src/workspaces.ts","../src/contacts.ts","../src/organizations.ts","../src/pipelines.ts","../src/tickets.ts","../src/products.ts","../src/features.ts","../src/userStories.ts","../src/epics.ts","../src/labels.ts","../src/areas.ts","../src/pages.ts","../src/requirements.ts","../src/scopes.ts","../src/search.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 search: {\n global: {\n query: (input: { query: string; workspaceId?: string; limit?: number }) => Promise<unknown>;\n };\n };\n action: {\n getAll: { query: (input?: ActionInput) => Promise<unknown[]> };\n getKanbanActions: { query: (input?: KanbanInput) => Promise<unknown[]> };\n getToday: { query: (input?: TodayInput) => Promise<unknown[]> };\n getTodaysActions: { query: (input?: TodayInput) => Promise<unknown> };\n getOverdueTriage: { 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 bulkReschedule: { mutate: (input: { actionIds: string[]; dueDate: Date | null }) => Promise<unknown> };\n bulkDefer: { mutate: (input: { actionIds: string[] }) => 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; organizationName?: 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; organizationName?: string }) => 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 contactEnrich: { mutate: (input: { contactId: string }) => Promise<unknown> };\n organizationList: { query: (input: { workspaceId: string; search?: string; industry?: string; limit?: number; cursor?: string }) => Promise<unknown> };\n organizationGet: { query: (input: { id: string }) => Promise<unknown> };\n organizationCreate: { mutate: (input: { workspaceId: string; name: string; websiteUrl?: string | null; logoUrl?: string | null; description?: string; industry?: string; size?: string }) => 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 page: {\n list: { query: (input: { workspaceId: string; projectId?: string; search?: string }) => Promise<unknown[]> };\n get: { query: (input: { id: string }) => Promise<unknown> };\n create: { mutate: (input: { workspaceId: string; projectId?: string | null; title?: string; body?: string; includeInSearch?: boolean }) => Promise<unknown> };\n update: { mutate: (input: { id: string; title?: string; projectId?: string | null; includeInSearch?: boolean; body?: 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' | 'DEPRECATED' | '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' | 'DEPRECATED' | 'ARCHIVED'; effort?: number; priority?: number; goalId?: number; areaId?: string }) => Promise<unknown> };\n update: { mutate: (input: { id: string; name?: string; description?: string; vision?: string; status?: 'IDEA' | 'DEFINED' | 'IN_PROGRESS' | 'SHIPPED' | 'DEPRECATED' | 'ARCHIVED'; effort?: number; priority?: number; goalId?: number | null; areaId?: string | null }) => Promise<unknown> };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n addUserStory: { mutate: (input: { featureId: string; scopeId?: string; asA?: string; iWant?: string; soThat?: string; acceptanceCriteria?: string }) => Promise<unknown> };\n updateUserStory: { mutate: (input: { id: string; scopeId?: string | null; asA?: string; iWant?: string; soThat?: string; acceptanceCriteria?: string }) => Promise<unknown> };\n deleteUserStory: { mutate: (input: { id: string }) => Promise<unknown> };\n addScope: { mutate: (input: { featureId: string; version: string; description: string; status?: 'PLANNED' | 'IN_PROGRESS' | 'SHIPPED' | 'DEPRECATED'; shippedAt?: Date }) => Promise<unknown> };\n updateScope: { mutate: (input: { id: string; version?: string; description?: string; status?: 'PLANNED' | 'IN_PROGRESS' | 'SHIPPED' | 'DEPRECATED'; shippedAt?: Date | null; displayOrder?: number }) => Promise<unknown> };\n deleteScope: { mutate: (input: { id: string }) => Promise<unknown> };\n addRequirement: { mutate: (input: { featureId: string; scopeId?: string; statement: string; kind?: 'FUNCTIONAL' | 'NON_FUNCTIONAL' | 'CONSTRAINT' }) => Promise<unknown> };\n setRequirementChecked: { mutate: (input: { id: string; checked: boolean }) => Promise<unknown> };\n deleteRequirement: { mutate: (input: { id: string }) => Promise<unknown> };\n linkPage: { mutate: (input: { featureId: string; pageId: string; scopeId?: string }) => Promise<unknown> };\n unlinkPage: { mutate: (input: { featureId: string; pageId: string }) => Promise<unknown> };\n listAreas: { query: (input: { productId: string }) => Promise<unknown[]> };\n createArea: { mutate: (input: { productId: string; name: string; description?: string }) => Promise<unknown> };\n };\n ticket: {\n list: { query: (input: { productId?: string; status?: string; type?: string; featureId?: string; epicId?: string; cycleId?: string; assigneeId?: string; prUrl?: string; branchName?: 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\n/** One action as returned inside a {@link TodaysActions} group. */\nexport interface TodaysActionRow {\n id: string;\n name: string;\n status: string;\n scheduledStart: Date | null;\n dueDate: Date | null;\n projectName: string | null;\n workspaceName: string | null;\n}\n\nexport interface TodaysActionsGroup {\n /** Total in this group — may exceed `actions.length`, which is capped at 50. */\n count: number;\n actions: TodaysActionRow[];\n}\n\nexport interface TodaysActions {\n overdue: TodaysActionsGroup;\n today: TodaysActionsGroup;\n inbox: TodaysActionsGroup;\n}\n\nexport interface OverdueTriageRow extends Omit<TodaysActionRow, 'status' | 'workspaceName'> {\n priority: string | null;\n daysOverdue: number;\n}\n\nexport interface OverdueCohort {\n /** The exact instant every member is stamped with. */\n stampedAt: Date;\n daysOverdue: number;\n count: number;\n projectNames: string[];\n actionIds: string[];\n actions: OverdueTriageRow[];\n}\n\nexport interface OverdueTriage {\n totalOverdue: number;\n /** How many of `totalOverdue` sit inside a cohort. */\n cohortCount: number;\n cohorts: OverdueCohort[];\n /** Individually-dated overdue actions — real debt, worth reading one by one. */\n loose: OverdueTriageRow[];\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 /**\n * Actions whose `dueDate` falls today.\n *\n * Note this is a **narrow** slice: it excludes overdue actions, and excludes\n * anything scheduled for today that carries no due date. If you want \"what\n * is on my plate\", use {@link getTodaysActions} instead — this method will\n * happily report a quiet day on top of a large overdue pile.\n */\n async getToday(workspaceId?: string): Promise<Action[]> {\n return await this.client.action.getToday.query({\n workspaceId,\n }) as Action[];\n }\n\n /**\n * What is actually on the user's plate: the `/today` page's own partition,\n * pre-split into `overdue` / `today` / `inbox`.\n *\n * Prefer this over {@link getToday} for anything that reasons about the\n * user's day. `getToday` is a due-date-only slice that omits the overdue\n * pile entirely — on a real account that can mean returning 6 actions while\n * 40 sit overdue. This method uses the server-shared partition, so it agrees\n * with what the user is looking at by construction.\n *\n * Cross-workspace by default. Each group is capped at 50 rows; `count` is the\n * true total.\n */\n async getTodaysActions(workspaceId?: string): Promise<TodaysActions> {\n return await this.client.action.getTodaysActions.query({\n workspaceId,\n }) as TodaysActions;\n }\n\n /**\n * Why the overdue pile is the size it is.\n *\n * Splits overdue actions into **cohorts** — groups sharing one exact\n * timestamp, the fingerprint of a bulk write like a generated project plan —\n * and **loose** individually-dated debt. Cohort members were almost certainly\n * never individually due, so the honest disposition is {@link bulkDefer},\n * not another {@link bulkReschedule} that re-inflicts the pile tomorrow.\n */\n async getOverdueTriage(workspaceId?: string): Promise<OverdueTriage> {\n return await this.client.action.getOverdueTriage.query({\n workspaceId,\n }) as OverdueTriage;\n }\n\n /**\n * Move actions to a new do-date (`scheduledStart`), pushing `dueDate` forward\n * only where it would otherwise fall before it. Pass `null` to clear both —\n * though {@link bulkDefer} says that more clearly.\n */\n async bulkReschedule(actionIds: string[], dueDate: Date | null): Promise<{ count: number; actionIds: string[] }> {\n return await this.client.action.bulkReschedule.mutate({\n actionIds,\n dueDate,\n }) as { count: number; actionIds: string[] };\n }\n\n /**\n * Amnesty: clear the dates so actions fall back to their project backlog\n * untimed. For work that was never really due on the date it carries —\n * typically an overdue cohort. Kanban status is untouched.\n */\n async bulkDefer(actionIds: string[]): Promise<{ count: number; actionIds: string[]; message: string }> {\n return await this.client.action.bulkDefer.mutate({\n actionIds,\n }) as { count: number; actionIds: string[]; message: string };\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 /** Link (or find-or-create) an organization by name. Ignored when organizationId is set. */\n organizationName?: 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 /** Link (or find-or-create) an organization by name. Ignored when organizationId is set. */\n organizationName?: string;\n}\n\nexport interface EnrichContactResult {\n enqueued: boolean;\n /** The enrichment job id — the newly created one, or the in-flight one that blocked it. */\n enrichmentId?: string;\n /** Why nothing was enqueued (only set when `enqueued` is false). */\n reason?: 'auto-enrich-disabled' | 'already-in-flight';\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 /**\n * Enqueue a web-search enrichment job for an existing contact. This is an\n * explicit action, so it runs regardless of the workspace's auto-enrich\n * setting; the enrich-pending-contacts cron drains the job into the\n * enrichment agent. Idempotent — a contact with a job already in flight is\n * not re-queued.\n */\n async enrich(id: string): Promise<EnrichContactResult> {\n return await this.client.crmApi.contactEnrich.mutate({ contactId: id }) as EnrichContactResult;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Organization, OrganizationListOutput, OrganizationSize } from './types/organization.js';\n\nexport interface OrganizationsListOptions {\n workspaceId: string;\n search?: string;\n industry?: string;\n limit?: number;\n cursor?: string;\n}\n\nexport interface OrganizationCreateInput {\n workspaceId: string;\n name: string;\n websiteUrl?: string | null;\n logoUrl?: string | null;\n description?: string;\n industry?: string;\n size?: OrganizationSize;\n}\n\nexport class OrganizationsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: OrganizationsListOptions): Promise<OrganizationListOutput> {\n return await this.client.crmApi.organizationList.query(options) as OrganizationListOutput;\n }\n\n async get(id: string): Promise<Organization> {\n return await this.client.crmApi.organizationGet.query({ id }) as Organization;\n }\n\n async create(input: OrganizationCreateInput): Promise<Organization> {\n return await this.client.crmApi.organizationCreate.mutate(input) as Organization;\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 /**\n * Required for product-scoped queries. Optional when `prUrl` or `branchName`\n * is supplied — those filters are workspace-global (a PR URL or branch name\n * uniquely identifies a Ticket across all products in the workspace), so the\n * server resolves scope from the caller's auth context instead.\n */\n productId?: string;\n status?: TicketStatus;\n type?: TicketType;\n featureId?: string;\n epicId?: string;\n cycleId?: string;\n assigneeId?: string;\n /** Workspace-scoped lookup by `Ticket.prUrl` (exact match). */\n prUrl?: string;\n /** Workspace-scoped lookup by `Ticket.branchName` (exact match). */\n branchName?: 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 /** Area (per-product bucket) to file the feature under. */\n areaId?: string;\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 areaId?: string | null;\n}\n\nexport interface FeatureLinkPageInput {\n featureId: string;\n pageId: string;\n /** Pin the linked page to one of the feature's scopes. */\n scopeId?: string;\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 /** Link a Knowledge page (PRD, spec, research) to a feature. */\n async linkPage(input: FeatureLinkPageInput): Promise<unknown> {\n return await this.client.product.feature.linkPage.mutate(input);\n }\n\n async unlinkPage(featureId: string, pageId: string): Promise<{ success: boolean }> {\n return await this.client.product.feature.unlinkPage.mutate({\n featureId,\n pageId,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Feature } from './types/feature.js';\nimport type { UserStory } from './types/userStory.js';\n\nexport interface UserStoryListOptions {\n featureId: string;\n}\n\nexport interface UserStoryCreateInput {\n featureId: string;\n asA?: string;\n iWant?: string;\n soThat?: string;\n acceptanceCriteria?: string;\n scopeId?: string;\n}\n\nexport interface UserStoryUpdateInput {\n id: string;\n asA?: string;\n iWant?: string;\n soThat?: string;\n acceptanceCriteria?: string;\n scopeId?: string | null;\n}\n\n/**\n * Native, structured user stories on a feature (As a / I want / So that).\n *\n * Mirrors the existing `FeaturesApi` shape and the `client.product.feature.*`\n * call style. `list` derives from the feature's `getById` payload, which\n * already includes `userStories` ordered by `displayOrder` — there is no\n * dedicated list procedure.\n */\nexport class UserStoriesApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: UserStoryListOptions): Promise<UserStory[]> {\n const feature = await this.client.product.feature.getById.query({\n id: options.featureId,\n }) as Feature & { userStories?: UserStory[] };\n return feature.userStories ?? [];\n }\n\n async create(input: UserStoryCreateInput): Promise<UserStory> {\n return await this.client.product.feature.addUserStory.mutate(\n input,\n ) as UserStory;\n }\n\n async update(input: UserStoryUpdateInput): Promise<UserStory> {\n return await this.client.product.feature.updateUserStory.mutate(\n input,\n ) as UserStory;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.product.feature.deleteUserStory.mutate({\n id,\n }) as { success: boolean };\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 type { TrpcClient } from './client.js';\n\nexport interface Area {\n id: string;\n productId: string;\n name: string;\n description: string | null;\n displayOrder: number;\n createdAt: Date;\n updatedAt: Date;\n _count?: {\n features?: number;\n };\n}\n\nexport interface AreaListOptions {\n productId: string;\n}\n\nexport interface AreaCreateInput {\n productId: string;\n name: string;\n description?: string;\n}\n\n/**\n * Areas: per-product buckets a feature is filed under (exactly one or none).\n */\nexport class AreasApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: AreaListOptions): Promise<Area[]> {\n return await this.client.product.feature.listAreas.query(options) as Area[];\n }\n\n async create(input: AreaCreateInput): Promise<Area> {\n return await this.client.product.feature.createArea.mutate(input) as Area;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { KnowledgePage } from './types/page.js';\n\nexport interface PageListOptions {\n workspaceId: string;\n projectId?: string;\n search?: string;\n}\n\nexport interface PageCreateInput {\n workspaceId: string;\n projectId?: string | null;\n title?: string;\n /** Markdown body. Indexed for search when non-empty. */\n body?: string;\n includeInSearch?: boolean;\n}\n\nexport interface PageUpdateInput {\n id: string;\n title?: string;\n projectId?: string | null;\n includeInSearch?: boolean;\n /**\n * Markdown body. Sending `body` without a rich-text doc is a\n * Markdown-source write: the server treats the Markdown as canonical and\n * the editor re-derives its rich document on next open.\n */\n body?: string;\n}\n\n/**\n * Knowledge pages (PRDs, research, technical specs). Workspace-scoped\n * documents; link one to a feature via `FeaturesApi.linkPage`.\n */\nexport class PagesApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: PageListOptions): Promise<KnowledgePage[]> {\n return await this.client.page.list.query(options) as KnowledgePage[];\n }\n\n async get(id: string): Promise<KnowledgePage> {\n return await this.client.page.get.query({ id }) as KnowledgePage;\n }\n\n async create(input: PageCreateInput): Promise<KnowledgePage> {\n return await this.client.page.create.mutate(input) as KnowledgePage;\n }\n\n async update(input: PageUpdateInput): Promise<KnowledgePage> {\n return await this.client.page.update.mutate(input) as KnowledgePage;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Feature } from './types/feature.js';\nimport type { Requirement, RequirementKind } from './types/requirement.js';\n\nexport interface RequirementListOptions {\n featureId: string;\n /** Only requirements pinned to this scope. */\n scopeId?: string;\n}\n\nexport interface RequirementCreateInput {\n featureId: string;\n /** Pin the requirement to one of the feature's scopes. */\n scopeId?: string;\n /** One EARS-style \"shall\" statement. */\n statement: string;\n kind?: RequirementKind;\n}\n\n/**\n * Requirements on a feature (EARS-style \"shall\" statements, checkable\n * met/unmet). Replaces user stories as the requirements mechanism.\n *\n * Mirrors the `UserStoriesApi` shape: `list` derives from the feature's\n * `getById` payload, which includes `requirements` ordered by\n * `displayOrder` - there is no dedicated list procedure.\n */\nexport class RequirementsApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: RequirementListOptions): Promise<Requirement[]> {\n const feature = await this.client.product.feature.getById.query({\n id: options.featureId,\n }) as Feature & { requirements?: Requirement[] };\n const requirements = feature.requirements ?? [];\n return options.scopeId\n ? requirements.filter((r) => r.scopeId === options.scopeId)\n : requirements;\n }\n\n async create(input: RequirementCreateInput): Promise<Requirement> {\n return await this.client.product.feature.addRequirement.mutate(\n input,\n ) as Requirement;\n }\n\n /** Mark a requirement met (true) or unmet (false). */\n async setChecked(id: string, checked: boolean): Promise<Requirement> {\n return await this.client.product.feature.setRequirementChecked.mutate({\n id,\n checked,\n }) as Requirement;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.product.feature.deleteRequirement.mutate({\n id,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Feature, FeatureScope, FeatureScopeStatus } from './types/feature.js';\n\nexport interface ScopeListOptions {\n featureId: string;\n}\n\nexport interface ScopeCreateInput {\n featureId: string;\n /** Short label for the increment, e.g. \"V1\" or \"V2: auto-sync\". */\n version: string;\n description: string;\n status?: FeatureScopeStatus;\n shippedAt?: Date;\n}\n\nexport interface ScopeUpdateInput {\n id: string;\n version?: string;\n description?: string;\n status?: FeatureScopeStatus;\n shippedAt?: Date | null;\n displayOrder?: number;\n}\n\n/**\n * Feature scopes: shippable increments of a feature (\"V1\", \"V2\"), each with\n * its own lifecycle. Setting a scope SHIPPED stamps `shippedAt` server-side\n * and rolls the feature's status up (any live scope makes the feature Live).\n *\n * Mirrors the `UserStoriesApi` shape: `list` derives from the feature's\n * `getById` payload, which includes `scopes` ordered by `displayOrder` -\n * there is no dedicated list procedure.\n */\nexport class ScopesApi {\n constructor(private client: TrpcClient) {}\n\n async list(options: ScopeListOptions): Promise<FeatureScope[]> {\n const feature = await this.client.product.feature.getById.query({\n id: options.featureId,\n }) as Feature & { scopes?: FeatureScope[] };\n return feature.scopes ?? [];\n }\n\n async create(input: ScopeCreateInput): Promise<FeatureScope> {\n return await this.client.product.feature.addScope.mutate(\n input,\n ) as FeatureScope;\n }\n\n async update(input: ScopeUpdateInput): Promise<FeatureScope> {\n return await this.client.product.feature.updateScope.mutate(\n input,\n ) as FeatureScope;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.product.feature.deleteScope.mutate({\n id,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { GlobalSearchOptions, GlobalSearchOutput } from './types/search.js';\n\nexport class SearchApi {\n constructor(private client: TrpcClient) {}\n\n /**\n * Global text search across the entities the caller can access — the same\n * coverage as the app's Cmd+K palette (projects, actions, goals,\n * workspaces, and other entity types as the API grows).\n */\n async global(options: GlobalSearchOptions): Promise<GlobalSearchOutput> {\n return (await this.client.search.global.query(options)) as GlobalSearchOutput;\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 { OrganizationsApi } from './organizations.js';\nimport { PipelinesApi } from './pipelines.js';\nimport { TicketsApi } from './tickets.js';\nimport { ProductsApi } from './products.js';\nimport { FeaturesApi } from './features.js';\nimport { UserStoriesApi } from './userStories.js';\nimport { EpicsApi } from './epics.js';\nimport { LabelsApi } from './labels.js';\nimport { AreasApi } from './areas.js';\nimport { PagesApi } from './pages.js';\nimport { RequirementsApi } from './requirements.js';\nimport { ScopesApi } from './scopes.js';\nimport { SearchApi } from './search.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 organizations: OrganizationsApi;\n pipelines: PipelinesApi;\n tickets: TicketsApi;\n products: ProductsApi;\n features: FeaturesApi;\n userStories: UserStoriesApi;\n epics: EpicsApi;\n labels: LabelsApi;\n areas: AreasApi;\n pages: PagesApi;\n requirements: RequirementsApi;\n scopes: ScopesApi;\n search: SearchApi;\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.organizations = new OrganizationsApi(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.userStories = new UserStoriesApi(this.client);\n this.epics = new EpicsApi(this.client);\n this.labels = new LabelsApi(this.client);\n this.areas = new AreasApi(this.client);\n this.pages = new PagesApi(this.client);\n this.requirements = new RequirementsApi(this.client);\n this.scopes = new ScopesApi(this.client);\n this.search = new SearchApi(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 TodaysActions,\n TodaysActionsGroup,\n TodaysActionRow,\n OverdueTriage,\n OverdueCohort,\n OverdueTriageRow,\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 EnrichContactResult,\n} from './contacts.js';\nexport type {\n Organization,\n OrganizationListOutput,\n OrganizationSize,\n} from './types/organization.js';\nexport type {\n OrganizationCreateInput,\n OrganizationsListOptions,\n} from './organizations.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 FeatureLinkPageInput,\n} from './features.js';\nexport type { Area, AreaListOptions, AreaCreateInput } from './areas.js';\nexport type { KnowledgePage } from './types/page.js';\nexport type {\n PageListOptions,\n PageCreateInput,\n PageUpdateInput,\n} from './pages.js';\nexport type { Requirement, RequirementKind } from './types/requirement.js';\nexport type {\n RequirementListOptions,\n RequirementCreateInput,\n} from './requirements.js';\nexport type {\n ScopeListOptions,\n ScopeCreateInput,\n ScopeUpdateInput,\n} from './scopes.js';\nexport type { UserStory } from './types/userStory.js';\nexport type {\n UserStoryCreateInput,\n UserStoryUpdateInput,\n UserStoryListOptions,\n} from './userStories.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 {\n SearchResult,\n SearchResultType,\n SearchResultWorkspace,\n GlobalSearchOptions,\n GlobalSearchOutput,\n} from './types/search.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;AAuLf,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;;;AC1GO,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,MAAM;AAAA,QACxD,cAAc;AAAA,QACd;AAAA,MACF,CAAC;AAAA,IACH,OAAO;AACL,gBAAU,MAAM,KAAK,OAAO,OAAO,OAAO,MAAM;AAAA,QAC9C;AAAA,MACF,CAAC;AAAA,IACH;AAGA,QAAI,CAAC,QAAQ;AACX,gBAAU,QAAQ;AAAA,QAAO,YACv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AAK,MAAM;AACvD,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,SAAK,aAAa,IAAI,cAAc,KAAK,MAAM;AAC/C,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,SAAK,gBAAgB,IAAI,iBAAiB,KAAK,MAAM;AACrD,SAAK,YAAY,IAAI,aAAa,KAAK,MAAM;AAC7C,SAAK,UAAU,IAAI,WAAW,KAAK,MAAM;AACzC,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,SAAK,cAAc,IAAI,eAAe,KAAK,MAAM;AACjD,SAAK,QAAQ,IAAI,SAAS,KAAK,MAAM;AACrC,SAAK,SAAS,IAAI,UAAU,KAAK,MAAM;AACvC,SAAK,QAAQ,IAAI,SAAS,KAAK,MAAM;AACrC,SAAK,QAAQ,IAAI,SAAS,KAAK,MAAM;AACrC,SAAK,eAAe,IAAI,gBAAgB,KAAK,MAAM;AACnD,SAAK,SAAS,IAAI,UAAU,KAAK,MAAM;AACvC,SAAK,SAAS,IAAI,UAAU,KAAK,MAAM;AAAA,EACzC;AAAA,EAxCQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAuBF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exponential-sdk",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "SDK for interacting with the Exponential API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",