exponential-sdk 1.13.0 → 1.15.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
@@ -153,7 +153,58 @@ type ActionUpdateInput$1 = {
153
153
  effortEstimate?: number | null;
154
154
  blockedByIds?: string[];
155
155
  };
156
+ type MeetingParticipantPersonInput = {
157
+ userId?: string;
158
+ contactId?: string;
159
+ email?: string;
160
+ name?: string;
161
+ };
162
+ type MeetingCreateProcedureInput = {
163
+ title: string;
164
+ transcription: string;
165
+ description?: string;
166
+ notes?: string;
167
+ meetingDate?: Date;
168
+ projectId?: string;
169
+ workspaceId?: string;
170
+ participants?: MeetingParticipantPersonInput[];
171
+ };
172
+ type MeetingUpdateDetailsProcedureInput = {
173
+ id: string;
174
+ description?: string;
175
+ notes?: string;
176
+ summary?: string;
177
+ transcription?: string;
178
+ workspaceId?: string | null;
179
+ meetingDate?: Date | null;
180
+ };
156
181
  interface TrpcClient {
182
+ transcription: {
183
+ getAllTranscriptions: {
184
+ query: (input?: {
185
+ includeArchived?: boolean;
186
+ workspaceId?: string;
187
+ meetingType?: 'all' | 'mine' | 'one_on_one' | 'customer' | 'internal';
188
+ }) => Promise<unknown[]>;
189
+ };
190
+ getById: {
191
+ query: (input: {
192
+ id: string;
193
+ }) => Promise<unknown>;
194
+ };
195
+ createManualTranscription: {
196
+ mutate: (input: MeetingCreateProcedureInput) => Promise<unknown>;
197
+ };
198
+ updateDetails: {
199
+ mutate: (input: MeetingUpdateDetailsProcedureInput) => Promise<unknown>;
200
+ };
201
+ updateTitle: {
202
+ mutate: (input: {
203
+ id: string;
204
+ title: string;
205
+ }) => Promise<unknown>;
206
+ };
207
+ };
157
208
  search: {
158
209
  global: {
159
210
  query: (input: {
@@ -2823,6 +2874,34 @@ interface FeatureScope {
2823
2874
  createdAt: Date;
2824
2875
  updatedAt: Date;
2825
2876
  }
2877
+ /**
2878
+ * One Feature→Key result execution edge (ADR-0050), as returned on a feature.
2879
+ *
2880
+ * The nesting mirrors the join row it comes from, so the key result sits under
2881
+ * `.keyResult` rather than being flattened. `assignedAt` is only present on the
2882
+ * richer `features.get()` read.
2883
+ */
2884
+ interface FeatureKeyResultLink {
2885
+ /** When the link was made. Absent on the lean `features.list()` shape. */
2886
+ assignedAt?: Date;
2887
+ keyResult: {
2888
+ id: string;
2889
+ title: string;
2890
+ period: string;
2891
+ /** The objective the key result hangs off — an integer, unlike its own cuid. */
2892
+ goalId: number;
2893
+ /** Progress fields below are `features.get()` only, absent from `list()`. */
2894
+ status?: KeyResultStatus;
2895
+ currentValue?: number;
2896
+ targetValue?: number;
2897
+ unit?: KeyResultUnit;
2898
+ unitLabel?: string | null;
2899
+ goal?: {
2900
+ id: number;
2901
+ title: string;
2902
+ } | null;
2903
+ };
2904
+ }
2826
2905
  interface Feature {
2827
2906
  id: string;
2828
2907
  productId: string;
@@ -2842,6 +2921,24 @@ interface Feature {
2842
2921
  title: string;
2843
2922
  period: string | null;
2844
2923
  } | null;
2924
+ /**
2925
+ * The key results this feature is executing (ADR-0050) — the answer to
2926
+ * "which numbers does this move".
2927
+ *
2928
+ * Distinct from {@link Feature.goal}, which is the coarser *Objective*
2929
+ * alignment: the objective a feature serves versus the specific key results
2930
+ * it moves. The two are allowed to disagree, so neither substitutes for the
2931
+ * other.
2932
+ *
2933
+ * Write this edge from the key result side with
2934
+ * {@link KeyResultsApi.linkFeature} — there is no feature-side link call.
2935
+ *
2936
+ * `list()` returns the lean shape (`id` / `title` / `period` / `goalId`), so
2937
+ * a per-feature key result column costs one call; `get()` additionally
2938
+ * carries each key result's progress values. Absent against servers older
2939
+ * than the readback change.
2940
+ */
2941
+ keyResultLinks?: FeatureKeyResultLink[];
2845
2942
  scopes?: FeatureScope[];
2846
2943
  _count?: {
2847
2944
  scopes?: number;
@@ -3099,6 +3196,141 @@ declare class AreasApi {
3099
3196
  create(input: AreaCreateInput): Promise<Area>;
3100
3197
  }
3101
3198
 
3199
+ interface MeetingWorkspaceRef {
3200
+ id: string;
3201
+ name: string;
3202
+ slug: string;
3203
+ }
3204
+ interface MeetingProjectRef {
3205
+ id: string;
3206
+ name: string;
3207
+ slug?: string;
3208
+ }
3209
+ interface MeetingSourceIntegration {
3210
+ id: string;
3211
+ provider: string;
3212
+ name: string | null;
3213
+ }
3214
+ /** Attendee row from the calendar invite / manual entry, not transcript speakers. */
3215
+ interface MeetingParticipant {
3216
+ id: string;
3217
+ email: string;
3218
+ name: string | null;
3219
+ /** Present on `get` responses. */
3220
+ speakerLabel?: string | null;
3221
+ /** Present on `get` responses. */
3222
+ isHost?: boolean;
3223
+ userId?: string | null;
3224
+ contactId?: string | null;
3225
+ }
3226
+ interface MeetingActionSummary {
3227
+ id: string;
3228
+ name: string;
3229
+ status: string;
3230
+ priority: string;
3231
+ }
3232
+ interface Meeting {
3233
+ id: string;
3234
+ sessionId: string;
3235
+ title: string | null;
3236
+ description: string | null;
3237
+ /** Free-form meeting notes (Markdown). */
3238
+ notes: string | null;
3239
+ /** AI-generated summary. */
3240
+ summary: string | null;
3241
+ /** Raw transcript text — can be very large. */
3242
+ transcription: string | null;
3243
+ /** When the meeting actually occurred (createdAt is when the row landed). */
3244
+ meetingDate: Date | null;
3245
+ createdAt: Date;
3246
+ updatedAt: Date;
3247
+ userId: string | null;
3248
+ projectId: string | null;
3249
+ workspaceId: string | null;
3250
+ archivedAt: Date | null;
3251
+ durationSeconds?: number | null;
3252
+ participantCount?: number | null;
3253
+ videoUrl?: string | null;
3254
+ project?: MeetingProjectRef | null;
3255
+ /** Present on `get` responses. */
3256
+ workspace?: MeetingWorkspaceRef | null;
3257
+ sourceIntegration?: MeetingSourceIntegration | null;
3258
+ participants?: MeetingParticipant[];
3259
+ actions?: MeetingActionSummary[];
3260
+ }
3261
+
3262
+ type MeetingTypeFilter = 'all' | 'mine' | 'one_on_one' | 'customer' | 'internal';
3263
+ interface MeetingListOptions {
3264
+ workspaceId?: string;
3265
+ includeArchived?: boolean;
3266
+ /**
3267
+ * - `mine`: caller owns the meeting or is a participant
3268
+ * - `one_on_one`: exactly two participants
3269
+ * - `customer` / `internal`: always empty until meeting tagging ships
3270
+ */
3271
+ meetingType?: MeetingTypeFilter;
3272
+ }
3273
+ /** A member (userId), an existing CRM contact (contactId), or a name/email. */
3274
+ interface MeetingParticipantInput {
3275
+ userId?: string;
3276
+ contactId?: string;
3277
+ email?: string;
3278
+ name?: string;
3279
+ }
3280
+ interface MeetingCreateInput {
3281
+ title: string;
3282
+ /** Raw transcript text — required by the server, min 1 character. */
3283
+ transcription: string;
3284
+ description?: string;
3285
+ notes?: string;
3286
+ meetingDate?: Date;
3287
+ /** A project-linked meeting inherits its project's workspace. */
3288
+ projectId?: string;
3289
+ workspaceId?: string;
3290
+ participants?: MeetingParticipantInput[];
3291
+ }
3292
+ interface MeetingUpdateInput {
3293
+ id: string;
3294
+ title?: string;
3295
+ description?: string;
3296
+ notes?: string;
3297
+ summary?: string;
3298
+ transcription?: string;
3299
+ meetingDate?: Date | null;
3300
+ workspaceId?: string | null;
3301
+ }
3302
+ /**
3303
+ * Meetings (transcription sessions): recorded/imported meetings and manually
3304
+ * created ones, each carrying `notes`, an AI `summary`, and the raw
3305
+ * `transcription`.
3306
+ */
3307
+ declare class MeetingsApi {
3308
+ private client;
3309
+ constructor(client: TrpcClient);
3310
+ /**
3311
+ * List meetings visible to the caller (owner, participant, project access,
3312
+ * or workspace membership). Rows include full `notes`/`summary`/
3313
+ * `transcription` bodies, so expect large payloads.
3314
+ */
3315
+ list(options?: MeetingListOptions): Promise<Meeting[]>;
3316
+ get(id: string): Promise<Meeting>;
3317
+ create(input: MeetingCreateInput): Promise<Meeting>;
3318
+ /**
3319
+ * Partial update — only the keys present are written. The server splits
3320
+ * title from the other fields, so a title change is a second mutation.
3321
+ */
3322
+ update(input: MeetingUpdateInput): Promise<Meeting>;
3323
+ /** The meeting-notes body alone (null when none have been written). */
3324
+ getNotes(id: string): Promise<string | null>;
3325
+ /** Replace the meeting's notes. */
3326
+ setNotes(id: string, notes: string): Promise<Meeting>;
3327
+ /**
3328
+ * Append a block to the meeting's notes (separated by a blank line),
3329
+ * creating them if none exist. Read-modify-write, not atomic.
3330
+ */
3331
+ appendNotes(id: string, text: string): Promise<Meeting>;
3332
+ }
3333
+
3102
3334
  interface KnowledgePage {
3103
3335
  id: string;
3104
3336
  workspaceId: string;
@@ -3336,6 +3568,7 @@ declare class ExponentialClient {
3336
3568
  epics: EpicsApi;
3337
3569
  labels: LabelsApi;
3338
3570
  areas: AreasApi;
3571
+ meetings: MeetingsApi;
3339
3572
  pages: PagesApi;
3340
3573
  requirements: RequirementsApi;
3341
3574
  scopes: ScopesApi;
@@ -3346,4 +3579,4 @@ declare class ExponentialClient {
3346
3579
  });
3347
3580
  }
3348
3581
 
3349
- 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 FeatureComment, type FeatureCommentCreateInput, type FeatureCommentReplyInput, type FeatureCommentThreadInput, type FeatureCommentUpdateInput, type FeatureCreateInput, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type GlobalSearchOptions, type GlobalSearchOutput, type Goal, type GoalChildSummary, type GoalComment, type GoalCommentAddInput, type GoalCommentUpdateInput, type GoalCreateInput, type GoalHealth, type GoalKeyResultSummary, type GoalLifeDomain, type GoalListOptions, type GoalPeriod, type GoalProjectSummary, type GoalSetParentInput, type GoalSetStatusInput, type GoalStats, type GoalStatsOptions, type GoalStatus, type GoalTreeNode, type GoalTreeOptions, type GoalUpdateInput, type GoalUserSummary, type GoalWritableStatus, type InteractionDirection, type InteractionType, type KanbanStatus, type KeyResult, type KeyResultByObjectiveOptions, type KeyResultCheckIn, type KeyResultCheckInInput, type KeyResultCreateInput, type KeyResultFeatureLink, type KeyResultListOptions, type KeyResultProjectLink, type KeyResultStatus, type KeyResultUnit, type KeyResultUpdateInput, type KnowledgePage, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type ObjectiveWithKeyResults, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type OverdueCohort, type OverdueTriage, type OverdueTriageRow, type PageComment, type PageCommentCreateInput, type PageCommentUpdateInput, type PageCreateInput, type PageListOptions, type PageUpdateInput, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectDetail, type ProjectKeyResultLink, type ProjectOutput, type ProjectPriority, type ProjectStatus, type ProjectUpdateInput, type ProjectsListOptions, 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 TicketCommentUpdateInput, 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 WorkspaceMember, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
3582
+ 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 FeatureComment, type FeatureCommentCreateInput, type FeatureCommentReplyInput, type FeatureCommentThreadInput, type FeatureCommentUpdateInput, type FeatureCreateInput, type FeatureKeyResultLink, type FeatureLinkPageInput, type FeatureListOptions, type FeatureScope, type FeatureScopeStatus, type FeatureStatus, type FeatureUpdateInput, type GlobalSearchOptions, type GlobalSearchOutput, type Goal, type GoalChildSummary, type GoalComment, type GoalCommentAddInput, type GoalCommentUpdateInput, type GoalCreateInput, type GoalHealth, type GoalKeyResultSummary, type GoalLifeDomain, type GoalListOptions, type GoalPeriod, type GoalProjectSummary, type GoalSetParentInput, type GoalSetStatusInput, type GoalStats, type GoalStatsOptions, type GoalStatus, type GoalTreeNode, type GoalTreeOptions, type GoalUpdateInput, type GoalUserSummary, type GoalWritableStatus, type InteractionDirection, type InteractionType, type KanbanStatus, type KeyResult, type KeyResultByObjectiveOptions, type KeyResultCheckIn, type KeyResultCheckInInput, type KeyResultCreateInput, type KeyResultFeatureLink, type KeyResultListOptions, type KeyResultProjectLink, type KeyResultStatus, type KeyResultUnit, type KeyResultUpdateInput, type KnowledgePage, type LabelCreateInput, type LabelListOptions, type ListForEntityInput, type Meeting, type MeetingActionSummary, type MeetingCreateInput, type MeetingListOptions, type MeetingParticipant, type MeetingParticipantInput, type MeetingProjectRef, type MeetingSourceIntegration, type MeetingTypeFilter, type MeetingUpdateInput, type MeetingWorkspaceRef, type ObjectiveWithKeyResults, type Organization, type OrganizationCreateInput, type OrganizationListOutput, type OrganizationSize, type OrganizationsListOptions, type OverdueCohort, type OverdueTriage, type OverdueTriageRow, type PageComment, type PageCommentCreateInput, type PageCommentUpdateInput, type PageCreateInput, type PageListOptions, type PageUpdateInput, type Pipeline, type PipelineStage, type Priority, type Product, type ProductCreateInput, type ProductUpdateInput, type Project, type ProjectDetail, type ProjectKeyResultLink, type ProjectOutput, type ProjectPriority, type ProjectStatus, type ProjectUpdateInput, type ProjectsListOptions, 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 TicketCommentUpdateInput, 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 WorkspaceMember, type WorkspaceOutput, type WorkspacesListOutput, clearConfig, createConfigStore, getConfigPath, isAuthenticated, isTRPCError, loadConfig, saveConfig };
package/dist/index.js CHANGED
@@ -854,6 +854,76 @@ var AreasApi = class {
854
854
  }
855
855
  };
856
856
 
857
+ // src/meetings.ts
858
+ var MeetingsApi = class {
859
+ constructor(client) {
860
+ this.client = client;
861
+ }
862
+ /**
863
+ * List meetings visible to the caller (owner, participant, project access,
864
+ * or workspace membership). Rows include full `notes`/`summary`/
865
+ * `transcription` bodies, so expect large payloads.
866
+ */
867
+ async list(options = {}) {
868
+ return await this.client.transcription.getAllTranscriptions.query(
869
+ options
870
+ );
871
+ }
872
+ async get(id) {
873
+ return await this.client.transcription.getById.query({ id });
874
+ }
875
+ async create(input) {
876
+ return await this.client.transcription.createManualTranscription.mutate(
877
+ input
878
+ );
879
+ }
880
+ /**
881
+ * Partial update — only the keys present are written. The server splits
882
+ * title from the other fields, so a title change is a second mutation.
883
+ */
884
+ async update(input) {
885
+ const { id, title, ...details } = input;
886
+ const hasDetails = Object.values(details).some((v) => v !== void 0);
887
+ if (title === void 0 && !hasDetails) {
888
+ throw new Error("MeetingsApi.update: nothing to update");
889
+ }
890
+ let result;
891
+ if (title !== void 0) {
892
+ result = await this.client.transcription.updateTitle.mutate({
893
+ id,
894
+ title
895
+ });
896
+ }
897
+ if (hasDetails) {
898
+ result = await this.client.transcription.updateDetails.mutate({
899
+ id,
900
+ ...details
901
+ });
902
+ }
903
+ return result;
904
+ }
905
+ /** The meeting-notes body alone (null when none have been written). */
906
+ async getNotes(id) {
907
+ const meeting = await this.get(id);
908
+ return meeting.notes ?? null;
909
+ }
910
+ /** Replace the meeting's notes. */
911
+ async setNotes(id, notes) {
912
+ return await this.update({ id, notes });
913
+ }
914
+ /**
915
+ * Append a block to the meeting's notes (separated by a blank line),
916
+ * creating them if none exist. Read-modify-write, not atomic.
917
+ */
918
+ async appendNotes(id, text) {
919
+ const existing = await this.getNotes(id);
920
+ const notes = existing?.trim() ? `${existing.replace(/\s+$/, "")}
921
+
922
+ ${text}` : text;
923
+ return await this.update({ id, notes });
924
+ }
925
+ };
926
+
857
927
  // src/pages.ts
858
928
  var PagesApi = class {
859
929
  constructor(client) {
@@ -1048,6 +1118,7 @@ var ExponentialClient = class {
1048
1118
  this.epics = new EpicsApi(this.client);
1049
1119
  this.labels = new LabelsApi(this.client);
1050
1120
  this.areas = new AreasApi(this.client);
1121
+ this.meetings = new MeetingsApi(this.client);
1051
1122
  this.pages = new PagesApi(this.client);
1052
1123
  this.requirements = new RequirementsApi(this.client);
1053
1124
  this.scopes = new ScopesApi(this.client);
@@ -1074,6 +1145,7 @@ var ExponentialClient = class {
1074
1145
  epics;
1075
1146
  labels;
1076
1147
  areas;
1148
+ meetings;
1077
1149
  pages;
1078
1150
  requirements;
1079
1151
  scopes;
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/client.ts","../src/actions.ts","../src/actionComments.ts","../src/featureComments.ts","../src/pageComments.ts","../src/goalComments.ts","../src/goals.ts","../src/keyResults.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\n/**\n * `project.update` as the server declares it: `name`, `status` and `priority`\n * are REQUIRED on every call, the rest are optional and only written when\n * present. `ProjectsApi.update` fills the required three from the current\n * project so callers can still pass a partial.\n */\ntype ProjectUpdateApiInput = {\n id: string;\n name: string;\n status: 'ACTIVE' | 'ON_HOLD' | 'COMPLETED' | 'CANCELLED';\n priority: 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE';\n description?: string;\n productId?: string | null;\n workspaceId?: string | null;\n driId?: string | null;\n goalIds?: string[];\n outcomeIds?: string[];\n keyResultIds?: string[];\n lifeDomainIds?: number[];\n reviewDate?: Date | null;\n nextActionDate?: Date | null;\n startDate?: Date | null;\n endDate?: Date | null;\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\n// ── Goals (objectives) and key results ──────────────────────────────────────\n// Objectives are `Goal` rows with INTEGER ids; key results are `KeyResult` rows\n// with cuid ids. `period` is a free-form string (\"Q3-2026\", \"Annual-2026\").\n\ntype GoalStatusInput = 'planned' | 'active' | 'completed' | 'archived';\n/** Reads and `updateGoalStatus` also accept `on-hold`; `updateGoal` does not. */\ntype GoalQueryStatusInput = GoalStatusInput | 'on-hold';\n\ntype GoalCreateProcedureInput = {\n title: string;\n description?: string;\n whyThisGoal?: string;\n notes?: string;\n dueDate?: Date;\n period?: string;\n status?: GoalStatusInput;\n lifeDomainId?: number;\n projectId?: string;\n outcomeIds?: string[];\n driUserId?: string;\n workspaceId?: string;\n parentGoalId?: number;\n icon?: string | null;\n iconColor?: string | null;\n};\n\ntype GoalUpdateProcedureInput = {\n id: number;\n title?: string;\n description?: string | null;\n whyThisGoal?: string | null;\n notes?: string | null;\n dueDate?: Date | null;\n period?: string | null;\n status?: GoalStatusInput;\n lifeDomainId?: number | null;\n projectId?: string | null;\n projectIds?: string[];\n outcomeIds?: string[];\n driUserId?: string | null;\n workspaceId?: string | null;\n parentGoalId?: number | null;\n displayOrder?: number;\n icon?: string | null;\n iconColor?: string | null;\n};\n\ntype KeyResultStatusInput =\n | 'not-started'\n | 'on-track'\n | 'at-risk'\n | 'off-track'\n | 'achieved';\n\ntype KeyResultUnitInput = 'percent' | 'count' | 'currency' | 'hours' | 'custom';\n\ntype KeyResultCreateProcedureInput = {\n goalId: number;\n title: string;\n description?: string;\n targetValue: number;\n startValue?: number;\n currentValue?: number;\n unit?: KeyResultUnitInput;\n unitLabel?: string;\n period: string;\n periodStart?: Date;\n periodEnd?: Date;\n driUserId?: string;\n workspaceId?: string;\n};\n\ntype KeyResultUpdateProcedureInput = {\n id: string;\n title?: string;\n description?: string;\n targetValue?: number;\n currentValue?: number;\n startValue?: number;\n unit?: KeyResultUnitInput;\n unitLabel?: string;\n status?: KeyResultStatusInput;\n confidence?: number;\n driUserId?: string;\n goalId?: number;\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 getById: { query: (input: { id: string }) => Promise<unknown> };\n update: { mutate: (input: ProjectUpdateApiInput) => Promise<unknown> };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n };\n workspace: {\n list: { query: () => Promise<unknown[]> };\n listMembers: { query: (input: { workspaceId: string }) => Promise<unknown[]> };\n };\n goal: {\n getById: { query: (input: { id: number }) => Promise<unknown> };\n getAllMyGoals: {\n query: (input?: {\n workspaceId?: string;\n period?: string;\n status?: GoalQueryStatusInput;\n }) => Promise<unknown[]>;\n };\n getGoalTree: {\n query: (input?: {\n workspaceId?: string;\n status?: GoalQueryStatusInput;\n }) => Promise<unknown[]>;\n };\n getProjectGoals: { query: (input: { projectId: string }) => Promise<unknown[]> };\n createGoal: { mutate: (input: GoalCreateProcedureInput) => Promise<unknown> };\n /**\n * Partial update — only the keys present are written, and an explicit null\n * clears. Every nullable field is therefore `T | null | undefined`.\n */\n updateGoal: { mutate: (input: GoalUpdateProcedureInput) => Promise<unknown> };\n /** Status-only write; the only path that accepts `on-hold`. */\n updateGoalStatus: {\n mutate: (input: { id: number; status: GoalQueryStatusInput }) => Promise<unknown>;\n };\n /** Single-column re-parent; validates no-self / no-cycle / depth-5. */\n setParent: {\n mutate: (input: { id: number; parentGoalId: number | null }) => Promise<unknown>;\n };\n deleteGoal: { mutate: (input: { id: number }) => Promise<unknown> };\n };\n // Mounted at `okr`, but this is the KEY RESULT router — objectives live on\n // `goal` above. Key results are cuid-keyed; the `goalId` linking them to an\n // objective is an integer.\n okr: {\n getAll: {\n query: (input?: {\n workspaceId?: string;\n goalId?: number;\n period?: string;\n status?: KeyResultStatusInput;\n onlyMine?: boolean;\n }) => Promise<unknown[]>;\n };\n getByObjective: {\n query: (input: {\n workspaceId?: string;\n period?: string;\n includePairedPeriod?: boolean;\n onlyMine?: boolean;\n }) => Promise<unknown[]>;\n };\n getById: { query: (input: { id: string }) => Promise<unknown> };\n getByIds: { query: (input: { ids: string[] }) => Promise<unknown[]> };\n create: { mutate: (input: KeyResultCreateProcedureInput) => Promise<unknown> };\n update: { mutate: (input: KeyResultUpdateProcedureInput) => Promise<unknown> };\n checkIn: {\n mutate: (input: {\n keyResultId: string;\n newValue: number;\n notes?: string;\n }) => Promise<unknown>;\n };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n linkProject: {\n mutate: (input: { keyResultId: string; projectId: string }) => Promise<unknown>;\n };\n unlinkProject: {\n mutate: (input: { keyResultId: string; projectId: string }) => Promise<unknown>;\n };\n linkFeature: {\n mutate: (input: { keyResultId: string; featureId: string }) => Promise<unknown>;\n };\n unlinkFeature: {\n mutate: (input: { keyResultId: string; featureId: string }) => Promise<unknown>;\n };\n getPeriods: { query: () => Promise<unknown[]> };\n getStats: {\n query: (input: { workspaceId?: string; period?: string }) => Promise<unknown>;\n };\n };\n goalComment: {\n getComments: { query: (input: { goalId: number }) => Promise<unknown[]> };\n addComment: { mutate: (input: { goalId: number; content: string; parentUpdateId?: string }) => Promise<unknown> };\n updateComment: { mutate: (input: { commentId: string; content: string }) => Promise<unknown> };\n deleteComment: { mutate: (input: { commentId: string }) => Promise<unknown> };\n };\n pageComment: {\n list: { query: (input: { pageId: string }) => Promise<unknown[]> };\n create: { mutate: (input: { pageId: string; body: string }) => Promise<unknown> };\n update: { mutate: (input: { commentId: string; body: string }) => Promise<unknown> };\n delete: { mutate: (input: { commentId: string }) => 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 featureComment: {\n list: { query: (input: { featureId: string }) => Promise<unknown[]> };\n create: { mutate: (input: { featureId: string; scopeId?: string; threadId?: string; body: string; quotedText?: string }) => Promise<unknown> };\n reply: { mutate: (input: { parentId: string; body: string }) => Promise<unknown> };\n update: { mutate: (input: { commentId: string; body: string }) => Promise<unknown> };\n delete: { mutate: (input: { commentId: string }) => Promise<unknown> };\n resolve: { mutate: (input: { featureId: string; threadId: string }) => Promise<unknown> };\n unresolve: { mutate: (input: { featureId: string; threadId: 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 updateComment: { mutate: (input: { id: 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 { FeatureComment } from './types/comment.js';\n\nexport interface FeatureCommentCreateInput {\n featureId: string;\n /** Attach to a scope's activity feed instead of the feature's own feed. */\n scopeId?: string;\n /** Anchor to a span of the PRD body. Omit for a doc-level comment. */\n threadId?: string;\n /** Markdown. Mention members with `@[Name](userId)` — see `workspaces.listMembers()`. */\n body: string;\n quotedText?: string;\n}\n\nexport interface FeatureCommentReplyInput {\n parentId: string;\n body: string;\n}\n\nexport interface FeatureCommentUpdateInput {\n commentId: string;\n body: string;\n}\n\nexport interface FeatureCommentThreadInput {\n featureId: string;\n threadId: string;\n}\n\n/**\n * Discussion on a Feature (PRD). Any workspace member can read and comment;\n * editing and deleting are author-only.\n *\n * Mentions are `@[Display Name](userId)` in the body — that markup is what\n * triggers a notification. `workspaces.listMembers()` returns a ready-made\n * `mentionSyntax` per member so callers never have to build it by hand.\n */\nexport class FeatureCommentsApi {\n constructor(private client: TrpcClient) {}\n\n async list(featureId: string): Promise<FeatureComment[]> {\n return await this.client.product.featureComment.list.query({\n featureId,\n }) as FeatureComment[];\n }\n\n async create(input: FeatureCommentCreateInput): Promise<FeatureComment> {\n return await this.client.product.featureComment.create.mutate(\n input,\n ) as FeatureComment;\n }\n\n /** Reply to an existing comment. Replies to replies still hang off the root. */\n async reply(input: FeatureCommentReplyInput): Promise<FeatureComment> {\n return await this.client.product.featureComment.reply.mutate(\n input,\n ) as FeatureComment;\n }\n\n async update(input: FeatureCommentUpdateInput): Promise<FeatureComment> {\n return await this.client.product.featureComment.update.mutate(\n input,\n ) as FeatureComment;\n }\n\n async delete(commentId: string): Promise<{ success: boolean }> {\n return await this.client.product.featureComment.delete.mutate({\n commentId,\n }) as { success: boolean };\n }\n\n /** Mark an anchored thread resolved. Only anchored threads have a threadId. */\n async resolve(input: FeatureCommentThreadInput): Promise<{ success: boolean }> {\n return await this.client.product.featureComment.resolve.mutate(\n input,\n ) as { success: boolean };\n }\n\n async unresolve(input: FeatureCommentThreadInput): Promise<{ success: boolean }> {\n return await this.client.product.featureComment.unresolve.mutate(\n input,\n ) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { PageComment } from './types/comment.js';\n\nexport interface PageCommentCreateInput {\n pageId: string;\n /** Markdown. Mention members with `@[Name](userId)` — see `workspaces.listMembers()`. */\n body: string;\n}\n\nexport interface PageCommentUpdateInput {\n commentId: string;\n body: string;\n}\n\n/**\n * Discussion on a Knowledge Page — a flat, doc-level feed under the page body.\n * View access is the commenting gate: anyone the page is shared with can join\n * the thread. Editing and deleting are author-only.\n */\nexport class PageCommentsApi {\n constructor(private client: TrpcClient) {}\n\n async list(pageId: string): Promise<PageComment[]> {\n return await this.client.pageComment.list.query({ pageId }) as PageComment[];\n }\n\n async create(input: PageCommentCreateInput): Promise<PageComment> {\n return await this.client.pageComment.create.mutate(input) as PageComment;\n }\n\n async update(input: PageCommentUpdateInput): Promise<PageComment> {\n return await this.client.pageComment.update.mutate(input) as PageComment;\n }\n\n async delete(commentId: string): Promise<{ success: boolean }> {\n return await this.client.pageComment.delete.mutate({\n commentId,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { GoalComment } from './types/comment.js';\n\nexport interface GoalCommentAddInput {\n goalId: number;\n /** Markdown. Mention members with `@[Name](userId)` — see `workspaces.listMembers()`. */\n content: string;\n /** Thread this comment under a specific goal update rather than the goal itself. */\n parentUpdateId?: string;\n}\n\nexport interface GoalCommentUpdateInput {\n commentId: string;\n content: string;\n}\n\n/**\n * Discussion on a Goal/Objective. Note `goalId` is numeric — goals use integer\n * ids, unlike the cuid-keyed product entities.\n */\nexport class GoalCommentsApi {\n constructor(private client: TrpcClient) {}\n\n async list(goalId: number): Promise<GoalComment[]> {\n return await this.client.goalComment.getComments.query({\n goalId,\n }) as GoalComment[];\n }\n\n async add(input: GoalCommentAddInput): Promise<GoalComment> {\n return await this.client.goalComment.addComment.mutate(input) as GoalComment;\n }\n\n async update(input: GoalCommentUpdateInput): Promise<GoalComment> {\n return await this.client.goalComment.updateComment.mutate(\n input,\n ) as GoalComment;\n }\n\n async delete(commentId: string): Promise<{ success: boolean }> {\n return await this.client.goalComment.deleteComment.mutate({\n commentId,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { KeyResultsApi } from './keyResults.js';\nimport type {\n Goal,\n GoalPeriod,\n GoalStats,\n GoalStatus,\n GoalTreeNode,\n GoalWritableStatus,\n} from './types/goal.js';\n\nexport interface GoalListOptions {\n /**\n * Scope to a workspace. With it the list is workspace-**wide** — every\n * member's objectives, not just yours. Without it you get your own.\n */\n workspaceId?: string;\n /** Free-form period string, e.g. `\"Q3-2026\"` or `\"Annual-2026\"`. */\n period?: string;\n status?: GoalStatus;\n}\n\nexport interface GoalTreeOptions {\n workspaceId?: string;\n status?: GoalStatus;\n}\n\nexport interface GoalCreateInput {\n title: string;\n description?: string;\n whyThisGoal?: string;\n notes?: string;\n dueDate?: Date;\n period?: string;\n status?: GoalWritableStatus;\n lifeDomainId?: number;\n /** Link the objective to one project on creation. */\n projectId?: string;\n outcomeIds?: string[];\n driUserId?: string;\n workspaceId?: string;\n /** Nest under a parent objective. Max nesting depth is 5. */\n parentGoalId?: number;\n icon?: string | null;\n iconColor?: string | null;\n}\n\n/**\n * A **partial** update: omit a field and it is left untouched, pass an explicit\n * `null` to clear it. Nothing you don't name is written.\n *\n * Prefer {@link GoalsApi.setStatus} for a status change and\n * {@link GoalsApi.setParent} for a re-parent — both write exactly one column.\n */\nexport interface GoalUpdateInput {\n id: number;\n title?: string;\n description?: string | null;\n whyThisGoal?: string | null;\n notes?: string | null;\n dueDate?: Date | null;\n period?: string | null;\n status?: GoalWritableStatus;\n lifeDomainId?: number | null;\n /** Replace the project links with this one project; `null` clears them. */\n projectId?: string | null;\n /** Replace the project links wholesale; `[]` clears them. */\n projectIds?: string[];\n outcomeIds?: string[];\n driUserId?: string | null;\n workspaceId?: string | null;\n parentGoalId?: number | null;\n displayOrder?: number;\n icon?: string | null;\n iconColor?: string | null;\n}\n\nexport interface GoalSetStatusInput {\n id: number;\n /** `on-hold` is accepted here and only here. */\n status: GoalStatus;\n}\n\nexport interface GoalSetParentInput {\n id: number;\n /** `null` detaches the objective from its parent. */\n parentGoalId: number | null;\n}\n\nexport interface GoalStatsOptions {\n workspaceId?: string;\n period?: string;\n}\n\n/**\n * Objectives (`Goal`) — the qualitative half of an OKR, keyed by **integer** id.\n * Their measurable key results hang off {@link KeyResultsApi}, reachable here as\n * `goals.keyResults`.\n *\n * On writes: `update()` is a partial update, but `setStatus()` and `setParent()`\n * each write a single column and are the right call whenever that is all you\n * mean to change — closing a quarter or re-parenting a cascade should never risk\n * a collateral write.\n */\nexport class GoalsApi {\n constructor(\n private client: TrpcClient,\n /** Key results for these objectives. Same instance as `client.keyResults`. */\n public keyResults: KeyResultsApi,\n ) {}\n\n /**\n * List objectives. Pass `workspaceId` for the workspace-wide list (every\n * member's), omit it for your own. Includes each objective's linked\n * `projects`, which is the join that maps day-to-day work back to an OKR:\n * every action carries a `projectId`.\n *\n * `period` and `status` are sent to the server *and* re-applied here. The\n * server grew those filters recently; against an instance that predates them\n * zod strips the unknown keys and hands back **every** objective — a filter\n * that silently matches everything is worse than one that errors. Re-applying\n * is a no-op once the server has done the work. Same reasoning as the\n * client-side `branchName`/`prUrl` filters in `tickets.ts`.\n */\n async list(options: GoalListOptions = {}): Promise<Goal[]> {\n const goals = await this.client.goal.getAllMyGoals.query(options) as Goal[];\n return goals.filter(\n (g) =>\n (options.period === undefined || g.period === options.period) &&\n (options.status === undefined || g.status === options.status),\n );\n }\n\n /**\n * The same objectives nested parent → child (up to 5 levels), each with its\n * projects and key results. One call for the whole annual → quarterly cascade.\n */\n async tree(options: GoalTreeOptions = {}): Promise<GoalTreeNode[]> {\n return await this.client.goal.getGoalTree.query(\n options,\n ) as GoalTreeNode[];\n }\n\n async get(id: number): Promise<Goal> {\n return await this.client.goal.getById.query({ id }) as Goal;\n }\n\n /** Objectives linked to a given project. */\n async listByProject(projectId: string): Promise<Goal[]> {\n return await this.client.goal.getProjectGoals.query({ projectId }) as Goal[];\n }\n\n async create(input: GoalCreateInput): Promise<Goal> {\n return await this.client.goal.createGoal.mutate(input) as Goal;\n }\n\n /**\n * Partial update — see {@link GoalUpdateInput}. Fields you omit are left\n * alone; pass an explicit `null` to clear one.\n */\n async update(input: GoalUpdateInput): Promise<Goal> {\n return await this.client.goal.updateGoal.mutate(input) as Goal;\n }\n\n /**\n * Status-only write. Never touches another field, and is the only path that\n * accepts `on-hold`. Moving an objective to `completed` also records a\n * workspace milestone.\n */\n async setStatus(input: GoalSetStatusInput): Promise<Goal> {\n return await this.client.goal.updateGoalStatus.mutate(input) as Goal;\n }\n\n /**\n * Re-parent an objective, or detach it with `parentGoalId: null`. Writes only\n * `parentGoalId`, and validates the no-self / no-cycle / depth-5 rules.\n */\n async setParent(input: GoalSetParentInput): Promise<Goal> {\n return await this.client.goal.setParent.mutate(input) as Goal;\n }\n\n async delete(id: number): Promise<Goal> {\n return await this.client.goal.deleteGoal.mutate({ id }) as Goal;\n }\n\n /** The conventional period strings (quarters, halves, annual) for this year and next. */\n async periods(): Promise<GoalPeriod[]> {\n return await this.client.okr.getPeriods.query() as GoalPeriod[];\n }\n\n /** Aggregate objective/key-result counts and average progress. */\n async stats(options: GoalStatsOptions = {}): Promise<GoalStats> {\n return await this.client.okr.getStats.query(options) as GoalStats;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type {\n KeyResult,\n KeyResultCheckIn,\n KeyResultStatus,\n KeyResultUnit,\n ObjectiveWithKeyResults,\n} from './types/keyResult.js';\n\nexport interface KeyResultListOptions {\n /**\n * Scope to a workspace. With it the list is workspace-**wide** — every\n * member's key results, not just yours. Without it you get your own.\n */\n workspaceId?: string;\n /** Objective id — an integer, unlike the key result's own cuid. */\n goalId?: number;\n period?: string;\n status?: KeyResultStatus;\n /** Narrow a workspace-scoped list back to the key results you own. */\n onlyMine?: boolean;\n}\n\nexport interface KeyResultByObjectiveOptions {\n workspaceId?: string;\n period?: string;\n /** Also include the period's parent annual period (Q3-2026 → Annual-2026). */\n includePairedPeriod?: boolean;\n onlyMine?: boolean;\n}\n\nexport interface KeyResultCreateInput {\n /** Objective (integer id) the key result hangs off. */\n goalId: number;\n title: string;\n targetValue: number;\n /** Free-form, e.g. `\"Q3-2026\"`. */\n period: string;\n description?: string;\n startValue?: number;\n currentValue?: number;\n unit?: KeyResultUnit;\n unitLabel?: string;\n driUserId?: string;\n /**\n * Omit to inherit the objective's workspace — {@link KeyResultsApi.create}\n * resolves it before writing. Pass one explicitly only to override.\n */\n workspaceId?: string;\n}\n\nexport interface KeyResultUpdateInput {\n /** cuid. */\n id: string;\n title?: string;\n description?: string;\n targetValue?: number;\n currentValue?: number;\n startValue?: number;\n unit?: KeyResultUnit;\n unitLabel?: string;\n status?: KeyResultStatus;\n /** 0–100. */\n confidence?: number;\n driUserId?: string;\n /** Move the key result to a different objective. */\n goalId?: number;\n}\n\nexport interface KeyResultCheckInInput {\n /** cuid. */\n id: string;\n /** The new current value. */\n value: number;\n note?: string;\n}\n\n/**\n * Key results — the measurable half of an OKR.\n *\n * Reachable both as `client.keyResults` and as `client.goals.keyResults`; they\n * are the same instance. Every id here is a **cuid string**, while the `goalId`\n * that ties a key result to its objective is an **integer**. The tRPC router\n * behind these calls is mounted at `okr`, which is the key-result router — not\n * an objective router. Objectives live on {@link GoalsApi}.\n */\nexport class KeyResultsApi {\n constructor(private client: TrpcClient) {}\n\n /**\n * List key results. Pass `workspaceId` for the workspace-wide list (every\n * member's), omit it for your own.\n *\n * ⚠️ Workspace scoping here depends on a server-side fix to `okr.getAll`,\n * which previously accepted a `workspaceId` while still filtering on the\n * caller's `userId` — so against an older instance this returns only your own\n * key results, or `[]`, rather than the workspace's. Unlike the filters in\n * `goals.list()` that cannot be repaired here: the other members' rows never\n * reach the client. {@link KeyResultsApi.byObjective} is workspace-correct on\n * every server version and is the safer read when that matters.\n */\n async list(options: KeyResultListOptions = {}): Promise<KeyResult[]> {\n return await this.client.okr.getAll.query(options) as KeyResult[];\n }\n\n /**\n * Objectives with their key results nested — the richest OKR read, and the\n * one to reach for when rendering \"here is the quarter\".\n */\n async byObjective(\n options: KeyResultByObjectiveOptions = {},\n ): Promise<ObjectiveWithKeyResults[]> {\n return await this.client.okr.getByObjective.query(\n options,\n ) as ObjectiveWithKeyResults[];\n }\n\n async get(id: string): Promise<KeyResult> {\n return await this.client.okr.getById.query({ id }) as KeyResult;\n }\n\n /**\n * Create a key result on an objective.\n *\n * When `workspaceId` is omitted it is resolved from the objective first,\n * rather than left to the server. `okr.create` writes the input through as-is\n * on older instances, so an absent workspace persists as `null` — and a key\n * result with no workspace is invisible to every workspace-scoped read and\n * unwritable by teammates once owner-OR-member authz applies. That is the\n * same orphaning that has already cost a goal; one extra read on a mutation\n * is a cheap way not to repeat it.\n */\n async create(input: KeyResultCreateInput): Promise<KeyResult> {\n let workspaceId = input.workspaceId;\n if (workspaceId === undefined) {\n const goal = await this.client.goal.getById.query({\n id: input.goalId,\n }) as { workspaceId: string | null };\n workspaceId = goal.workspaceId ?? undefined;\n }\n return await this.client.okr.create.mutate({\n ...input,\n workspaceId,\n }) as KeyResult;\n }\n\n async update(input: KeyResultUpdateInput): Promise<KeyResult> {\n return await this.client.okr.update.mutate(input) as KeyResult;\n }\n\n /**\n * Record a progress check-in. The server derives the new status from where\n * `value` lands between `startValue` and `targetValue`, so a check-in both\n * moves the number and re-colours the key result.\n */\n async checkIn(input: KeyResultCheckInInput): Promise<KeyResultCheckIn> {\n return await this.client.okr.checkIn.mutate({\n keyResultId: input.id,\n newValue: input.value,\n notes: input.note,\n }) as KeyResultCheckIn;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.okr.delete.mutate({ id }) as { success: boolean };\n }\n\n /** Link a project to a key result as executing work. Idempotent. */\n async linkProject(input: {\n keyResultId: string;\n projectId: string;\n }): Promise<{ success: boolean }> {\n return await this.client.okr.linkProject.mutate(input) as {\n success: boolean;\n };\n }\n\n async unlinkProject(input: {\n keyResultId: string;\n projectId: string;\n }): Promise<{ success: boolean }> {\n return await this.client.okr.unlinkProject.mutate(input) as {\n success: boolean;\n };\n }\n\n /**\n * Link a feature to a key result as executing work. Idempotent. The feature's\n * product must live in the key result's workspace. A feature with no\n * objective alignment inherits the key result's objective; one that already\n * has an objective is never overwritten.\n */\n async linkFeature(input: {\n keyResultId: string;\n featureId: string;\n }): Promise<{ success: boolean }> {\n return await this.client.okr.linkFeature.mutate(input) as {\n success: boolean;\n };\n }\n\n /** Removes only the link row — never the feature's objective alignment. */\n async unlinkFeature(input: {\n keyResultId: string;\n featureId: string;\n }): Promise<{ success: boolean }> {\n return await this.client.okr.unlinkFeature.mutate(input) as {\n success: boolean;\n };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type {\n Project,\n ProjectDetail,\n ProjectPriority,\n ProjectStatus,\n} from './types/project.js';\n\nexport interface ProjectsListOptions {\n workspaceId?: string;\n includeActions?: boolean;\n}\n\n/**\n * A **partial** update. Omit a field and it is left untouched.\n *\n * `name`, `status` and `priority` are required by the server on every call, so\n * {@link ProjectsApi.update} reads the project first and sends the current\n * values for whichever of the three you leave out — the same read-before-write\n * that keeps `goals.update()` from clobbering. Everything else here is written\n * only when present.\n */\nexport interface ProjectUpdateInput {\n id: string;\n name?: string;\n /** The server has no way to clear a description — pass `''` to blank it. */\n description?: string;\n status?: ProjectStatus;\n priority?: ProjectPriority;\n /** `null` unlinks the product. */\n productId?: string | null;\n /** `null` makes the project personal. */\n workspaceId?: string | null;\n /** Directly responsible individual; `null` clears it. */\n driId?: string | null;\n /**\n * Replace the objective links. Integer goal ids passed as strings — the\n * server parses them. An empty array is a **no-op**, not a clear; the server\n * only writes this when the array is non-empty.\n */\n goalIds?: string[];\n outcomeIds?: string[];\n /** Replace the key-result links wholesale; `[]` clears them. */\n keyResultIds?: string[];\n lifeDomainIds?: number[];\n reviewDate?: Date | null;\n nextActionDate?: Date | null;\n startDate?: Date | null;\n endDate?: Date | null;\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 /**\n * Fetch one project with its relations — actions, linked objectives and key\n * results, DRI, team. Accepts a cuid, a slug, or the compound `slug-cuid`\n * form that appears in app URLs.\n *\n * The list read carries none of the OKR edges, so this is the only way to\n * answer \"what is this project driving?\".\n */\n async get(idOrSlug: string): Promise<ProjectDetail> {\n return await this.client.project.getById.query({\n id: idOrSlug,\n }) as ProjectDetail;\n }\n\n /**\n * Partial update — see {@link ProjectUpdateInput}. Costs one extra read when\n * `name`, `status` or `priority` is omitted, because the server requires all\n * three.\n */\n async update(input: ProjectUpdateInput): Promise<Project> {\n const { id, name, status, priority, ...rest } = input;\n\n let resolvedName = name;\n let resolvedStatus = status;\n let resolvedPriority = priority;\n\n if (\n resolvedName === undefined ||\n resolvedStatus === undefined ||\n resolvedPriority === undefined\n ) {\n const current = await this.get(id);\n resolvedName ??= current.name;\n resolvedStatus ??= (current.status as ProjectStatus | null) ?? 'ACTIVE';\n resolvedPriority ??=\n (current.priority as ProjectPriority | null) ?? 'NONE';\n }\n\n return await this.client.project.update.mutate({\n id,\n name: resolvedName,\n status: resolvedStatus,\n priority: resolvedPriority,\n ...rest,\n }) as Project;\n }\n\n /** Deletes the project and its actions. There is no undo. */\n async delete(id: string): Promise<Project> {\n return await this.client.project.delete.mutate({ id }) as Project;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Workspace, WorkspaceMember } 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 /**\n * Everyone who belongs to a workspace — direct members plus anyone with\n * access through a linked team. This is the lookup that makes mentions\n * possible from outside the app: match a name or email here, then drop the\n * row's `mentionSyntax` into a comment body.\n */\n async listMembers(workspaceId: string): Promise<WorkspaceMember[]> {\n return await this.client.workspace.listMembers.query({\n workspaceId,\n }) as WorkspaceMember[];\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 * Always required. `product.ticket.list` is product-scoped on the server —\n * there is no workspace-wide ticket query. To search several products, call\n * `list` once per product and merge the results.\n */\n productId: string;\n status?: TicketStatus;\n type?: TicketType;\n featureId?: string;\n epicId?: string;\n cycleId?: string;\n assigneeId?: string;\n /**\n * Filter by `Ticket.prUrl` (exact match).\n *\n * Applied **client-side**, after the product-scoped fetch — the server's\n * `list` input schema has no `prUrl` field. See the note on {@link\n * TicketsApi.list}.\n */\n prUrl?: string;\n /**\n * Filter by `Ticket.branchName` (exact match).\n *\n * Applied **client-side**, after the product-scoped fetch — the server's\n * `list` input schema has no `branchName` field. See the note on {@link\n * TicketsApi.list}.\n */\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 TicketCommentUpdateInput {\n id: 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 /**\n * List tickets in one product.\n *\n * `prUrl` and `branchName` are filtered here rather than on the server. The\n * `product.ticket.list` tRPC input schema accepts neither, and zod strips\n * unknown keys, so forwarding them was silently a no-op: a lookup by a branch\n * that matched nothing came back as *every ticket in the product*. Filtering\n * locally makes them mean what they say. Move them server-side once\n * `product.ticket.list` grows the matching input fields.\n */\n async list(options: TicketListOptions): Promise<Ticket[]> {\n const { prUrl, branchName, ...serverQuery } = options;\n const tickets = await this.client.product.ticket.list.query(\n serverQuery,\n ) as Ticket[];\n\n return tickets.filter((t) =>\n (prUrl === undefined || t.prUrl === prUrl) &&\n (branchName === undefined || t.branchName === branchName)\n );\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 updateComment(input: TicketCommentUpdateInput): Promise<TicketComment> {\n return await this.client.product.ticket.updateComment.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 { FeatureCommentsApi } from './featureComments.js';\nimport { PageCommentsApi } from './pageComments.js';\nimport { GoalCommentsApi } from './goalComments.js';\nimport { GoalsApi } from './goals.js';\nimport { KeyResultsApi } from './keyResults.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 featureComments: FeatureCommentsApi;\n pageComments: PageCommentsApi;\n goalComments: GoalCommentsApi;\n goals: GoalsApi;\n /** Same instance as `goals.keyResults`. */\n keyResults: KeyResultsApi;\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.featureComments = new FeatureCommentsApi(this.client);\n this.pageComments = new PageCommentsApi(this.client);\n this.goalComments = new GoalCommentsApi(this.client);\n this.keyResults = new KeyResultsApi(this.client);\n this.goals = new GoalsApi(this.client, this.keyResults);\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 {\n Project,\n ProjectDetail,\n ProjectKeyResultLink,\n ProjectOutput,\n ProjectPriority,\n ProjectStatus,\n ProjectsListOutput,\n} from './types/project.js';\nexport type { ProjectUpdateInput, ProjectsListOptions } from './projects.js';\nexport type {\n Workspace,\n WorkspaceMember,\n WorkspaceOutput,\n WorkspacesListOutput,\n} 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 FeatureComment,\n PageComment,\n GoalComment,\n CommentAuthor,\n} from './types/comment.js';\nexport type {\n ActionCommentAddInput,\n ActionCommentUpdateInput,\n} from './actionComments.js';\nexport type {\n FeatureCommentCreateInput,\n FeatureCommentReplyInput,\n FeatureCommentUpdateInput,\n FeatureCommentThreadInput,\n} from './featureComments.js';\nexport type {\n PageCommentCreateInput,\n PageCommentUpdateInput,\n} from './pageComments.js';\nexport type {\n GoalCommentAddInput,\n GoalCommentUpdateInput,\n} from './goalComments.js';\nexport type {\n Goal,\n GoalChildSummary,\n GoalHealth,\n GoalKeyResultSummary,\n GoalLifeDomain,\n GoalPeriod,\n GoalProjectSummary,\n GoalStats,\n GoalStatus,\n GoalTreeNode,\n GoalUserSummary,\n GoalWritableStatus,\n} from './types/goal.js';\nexport type {\n GoalListOptions,\n GoalTreeOptions,\n GoalCreateInput,\n GoalUpdateInput,\n GoalSetStatusInput,\n GoalSetParentInput,\n GoalStatsOptions,\n} from './goals.js';\nexport type {\n KeyResult,\n KeyResultCheckIn,\n KeyResultFeatureLink,\n KeyResultProjectLink,\n KeyResultStatus,\n KeyResultUnit,\n ObjectiveWithKeyResults,\n} from './types/keyResult.js';\nexport type {\n KeyResultListOptions,\n KeyResultByObjectiveOptions,\n KeyResultCreateInput,\n KeyResultUpdateInput,\n KeyResultCheckInInput,\n} from './keyResults.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 TicketCommentUpdateInput,\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;AAmZf,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;;;ACtUO,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,KAA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AK,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,EAnDQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;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;AA4BF;","names":[]}
1
+ {"version":3,"sources":["../src/client.ts","../src/actions.ts","../src/actionComments.ts","../src/featureComments.ts","../src/pageComments.ts","../src/goalComments.ts","../src/goals.ts","../src/keyResults.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/meetings.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\n/**\n * `project.update` as the server declares it: `name`, `status` and `priority`\n * are REQUIRED on every call, the rest are optional and only written when\n * present. `ProjectsApi.update` fills the required three from the current\n * project so callers can still pass a partial.\n */\ntype ProjectUpdateApiInput = {\n id: string;\n name: string;\n status: 'ACTIVE' | 'ON_HOLD' | 'COMPLETED' | 'CANCELLED';\n priority: 'HIGH' | 'MEDIUM' | 'LOW' | 'NONE';\n description?: string;\n productId?: string | null;\n workspaceId?: string | null;\n driId?: string | null;\n goalIds?: string[];\n outcomeIds?: string[];\n keyResultIds?: string[];\n lifeDomainIds?: number[];\n reviewDate?: Date | null;\n nextActionDate?: Date | null;\n startDate?: Date | null;\n endDate?: Date | null;\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\n// ── Goals (objectives) and key results ──────────────────────────────────────\n// Objectives are `Goal` rows with INTEGER ids; key results are `KeyResult` rows\n// with cuid ids. `period` is a free-form string (\"Q3-2026\", \"Annual-2026\").\n\ntype GoalStatusInput = 'planned' | 'active' | 'completed' | 'archived';\n/** Reads and `updateGoalStatus` also accept `on-hold`; `updateGoal` does not. */\ntype GoalQueryStatusInput = GoalStatusInput | 'on-hold';\n\ntype GoalCreateProcedureInput = {\n title: string;\n description?: string;\n whyThisGoal?: string;\n notes?: string;\n dueDate?: Date;\n period?: string;\n status?: GoalStatusInput;\n lifeDomainId?: number;\n projectId?: string;\n outcomeIds?: string[];\n driUserId?: string;\n workspaceId?: string;\n parentGoalId?: number;\n icon?: string | null;\n iconColor?: string | null;\n};\n\ntype GoalUpdateProcedureInput = {\n id: number;\n title?: string;\n description?: string | null;\n whyThisGoal?: string | null;\n notes?: string | null;\n dueDate?: Date | null;\n period?: string | null;\n status?: GoalStatusInput;\n lifeDomainId?: number | null;\n projectId?: string | null;\n projectIds?: string[];\n outcomeIds?: string[];\n driUserId?: string | null;\n workspaceId?: string | null;\n parentGoalId?: number | null;\n displayOrder?: number;\n icon?: string | null;\n iconColor?: string | null;\n};\n\ntype KeyResultStatusInput =\n | 'not-started'\n | 'on-track'\n | 'at-risk'\n | 'off-track'\n | 'achieved';\n\ntype KeyResultUnitInput = 'percent' | 'count' | 'currency' | 'hours' | 'custom';\n\ntype KeyResultCreateProcedureInput = {\n goalId: number;\n title: string;\n description?: string;\n targetValue: number;\n startValue?: number;\n currentValue?: number;\n unit?: KeyResultUnitInput;\n unitLabel?: string;\n period: string;\n periodStart?: Date;\n periodEnd?: Date;\n driUserId?: string;\n workspaceId?: string;\n};\n\ntype KeyResultUpdateProcedureInput = {\n id: string;\n title?: string;\n description?: string;\n targetValue?: number;\n currentValue?: number;\n startValue?: number;\n unit?: KeyResultUnitInput;\n unitLabel?: string;\n status?: KeyResultStatusInput;\n confidence?: number;\n driUserId?: string;\n goalId?: number;\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\ntype MeetingParticipantPersonInput = {\n userId?: string;\n contactId?: string;\n email?: string;\n name?: string;\n};\n\ntype MeetingCreateProcedureInput = {\n title: string;\n transcription: string;\n description?: string;\n notes?: string;\n meetingDate?: Date;\n projectId?: string;\n workspaceId?: string;\n participants?: MeetingParticipantPersonInput[];\n};\n\ntype MeetingUpdateDetailsProcedureInput = {\n id: string;\n description?: string;\n notes?: string;\n summary?: string;\n transcription?: string;\n workspaceId?: string | null;\n meetingDate?: Date | null;\n};\n\nexport interface TrpcClient {\n transcription: {\n getAllTranscriptions: {\n query: (input?: {\n includeArchived?: boolean;\n workspaceId?: string;\n meetingType?: 'all' | 'mine' | 'one_on_one' | 'customer' | 'internal';\n }) => Promise<unknown[]>;\n };\n getById: { query: (input: { id: string }) => Promise<unknown> };\n createManualTranscription: {\n mutate: (input: MeetingCreateProcedureInput) => Promise<unknown>;\n };\n updateDetails: {\n mutate: (input: MeetingUpdateDetailsProcedureInput) => Promise<unknown>;\n };\n updateTitle: {\n mutate: (input: { id: string; title: string }) => Promise<unknown>;\n };\n };\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 getById: { query: (input: { id: string }) => Promise<unknown> };\n update: { mutate: (input: ProjectUpdateApiInput) => Promise<unknown> };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n };\n workspace: {\n list: { query: () => Promise<unknown[]> };\n listMembers: { query: (input: { workspaceId: string }) => Promise<unknown[]> };\n };\n goal: {\n getById: { query: (input: { id: number }) => Promise<unknown> };\n getAllMyGoals: {\n query: (input?: {\n workspaceId?: string;\n period?: string;\n status?: GoalQueryStatusInput;\n }) => Promise<unknown[]>;\n };\n getGoalTree: {\n query: (input?: {\n workspaceId?: string;\n status?: GoalQueryStatusInput;\n }) => Promise<unknown[]>;\n };\n getProjectGoals: { query: (input: { projectId: string }) => Promise<unknown[]> };\n createGoal: { mutate: (input: GoalCreateProcedureInput) => Promise<unknown> };\n /**\n * Partial update — only the keys present are written, and an explicit null\n * clears. Every nullable field is therefore `T | null | undefined`.\n */\n updateGoal: { mutate: (input: GoalUpdateProcedureInput) => Promise<unknown> };\n /** Status-only write; the only path that accepts `on-hold`. */\n updateGoalStatus: {\n mutate: (input: { id: number; status: GoalQueryStatusInput }) => Promise<unknown>;\n };\n /** Single-column re-parent; validates no-self / no-cycle / depth-5. */\n setParent: {\n mutate: (input: { id: number; parentGoalId: number | null }) => Promise<unknown>;\n };\n deleteGoal: { mutate: (input: { id: number }) => Promise<unknown> };\n };\n // Mounted at `okr`, but this is the KEY RESULT router — objectives live on\n // `goal` above. Key results are cuid-keyed; the `goalId` linking them to an\n // objective is an integer.\n okr: {\n getAll: {\n query: (input?: {\n workspaceId?: string;\n goalId?: number;\n period?: string;\n status?: KeyResultStatusInput;\n onlyMine?: boolean;\n }) => Promise<unknown[]>;\n };\n getByObjective: {\n query: (input: {\n workspaceId?: string;\n period?: string;\n includePairedPeriod?: boolean;\n onlyMine?: boolean;\n }) => Promise<unknown[]>;\n };\n getById: { query: (input: { id: string }) => Promise<unknown> };\n getByIds: { query: (input: { ids: string[] }) => Promise<unknown[]> };\n create: { mutate: (input: KeyResultCreateProcedureInput) => Promise<unknown> };\n update: { mutate: (input: KeyResultUpdateProcedureInput) => Promise<unknown> };\n checkIn: {\n mutate: (input: {\n keyResultId: string;\n newValue: number;\n notes?: string;\n }) => Promise<unknown>;\n };\n delete: { mutate: (input: { id: string }) => Promise<unknown> };\n linkProject: {\n mutate: (input: { keyResultId: string; projectId: string }) => Promise<unknown>;\n };\n unlinkProject: {\n mutate: (input: { keyResultId: string; projectId: string }) => Promise<unknown>;\n };\n linkFeature: {\n mutate: (input: { keyResultId: string; featureId: string }) => Promise<unknown>;\n };\n unlinkFeature: {\n mutate: (input: { keyResultId: string; featureId: string }) => Promise<unknown>;\n };\n getPeriods: { query: () => Promise<unknown[]> };\n getStats: {\n query: (input: { workspaceId?: string; period?: string }) => Promise<unknown>;\n };\n };\n goalComment: {\n getComments: { query: (input: { goalId: number }) => Promise<unknown[]> };\n addComment: { mutate: (input: { goalId: number; content: string; parentUpdateId?: string }) => Promise<unknown> };\n updateComment: { mutate: (input: { commentId: string; content: string }) => Promise<unknown> };\n deleteComment: { mutate: (input: { commentId: string }) => Promise<unknown> };\n };\n pageComment: {\n list: { query: (input: { pageId: string }) => Promise<unknown[]> };\n create: { mutate: (input: { pageId: string; body: string }) => Promise<unknown> };\n update: { mutate: (input: { commentId: string; body: string }) => Promise<unknown> };\n delete: { mutate: (input: { commentId: string }) => 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 featureComment: {\n list: { query: (input: { featureId: string }) => Promise<unknown[]> };\n create: { mutate: (input: { featureId: string; scopeId?: string; threadId?: string; body: string; quotedText?: string }) => Promise<unknown> };\n reply: { mutate: (input: { parentId: string; body: string }) => Promise<unknown> };\n update: { mutate: (input: { commentId: string; body: string }) => Promise<unknown> };\n delete: { mutate: (input: { commentId: string }) => Promise<unknown> };\n resolve: { mutate: (input: { featureId: string; threadId: string }) => Promise<unknown> };\n unresolve: { mutate: (input: { featureId: string; threadId: 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 updateComment: { mutate: (input: { id: 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 { FeatureComment } from './types/comment.js';\n\nexport interface FeatureCommentCreateInput {\n featureId: string;\n /** Attach to a scope's activity feed instead of the feature's own feed. */\n scopeId?: string;\n /** Anchor to a span of the PRD body. Omit for a doc-level comment. */\n threadId?: string;\n /** Markdown. Mention members with `@[Name](userId)` — see `workspaces.listMembers()`. */\n body: string;\n quotedText?: string;\n}\n\nexport interface FeatureCommentReplyInput {\n parentId: string;\n body: string;\n}\n\nexport interface FeatureCommentUpdateInput {\n commentId: string;\n body: string;\n}\n\nexport interface FeatureCommentThreadInput {\n featureId: string;\n threadId: string;\n}\n\n/**\n * Discussion on a Feature (PRD). Any workspace member can read and comment;\n * editing and deleting are author-only.\n *\n * Mentions are `@[Display Name](userId)` in the body — that markup is what\n * triggers a notification. `workspaces.listMembers()` returns a ready-made\n * `mentionSyntax` per member so callers never have to build it by hand.\n */\nexport class FeatureCommentsApi {\n constructor(private client: TrpcClient) {}\n\n async list(featureId: string): Promise<FeatureComment[]> {\n return await this.client.product.featureComment.list.query({\n featureId,\n }) as FeatureComment[];\n }\n\n async create(input: FeatureCommentCreateInput): Promise<FeatureComment> {\n return await this.client.product.featureComment.create.mutate(\n input,\n ) as FeatureComment;\n }\n\n /** Reply to an existing comment. Replies to replies still hang off the root. */\n async reply(input: FeatureCommentReplyInput): Promise<FeatureComment> {\n return await this.client.product.featureComment.reply.mutate(\n input,\n ) as FeatureComment;\n }\n\n async update(input: FeatureCommentUpdateInput): Promise<FeatureComment> {\n return await this.client.product.featureComment.update.mutate(\n input,\n ) as FeatureComment;\n }\n\n async delete(commentId: string): Promise<{ success: boolean }> {\n return await this.client.product.featureComment.delete.mutate({\n commentId,\n }) as { success: boolean };\n }\n\n /** Mark an anchored thread resolved. Only anchored threads have a threadId. */\n async resolve(input: FeatureCommentThreadInput): Promise<{ success: boolean }> {\n return await this.client.product.featureComment.resolve.mutate(\n input,\n ) as { success: boolean };\n }\n\n async unresolve(input: FeatureCommentThreadInput): Promise<{ success: boolean }> {\n return await this.client.product.featureComment.unresolve.mutate(\n input,\n ) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { PageComment } from './types/comment.js';\n\nexport interface PageCommentCreateInput {\n pageId: string;\n /** Markdown. Mention members with `@[Name](userId)` — see `workspaces.listMembers()`. */\n body: string;\n}\n\nexport interface PageCommentUpdateInput {\n commentId: string;\n body: string;\n}\n\n/**\n * Discussion on a Knowledge Page — a flat, doc-level feed under the page body.\n * View access is the commenting gate: anyone the page is shared with can join\n * the thread. Editing and deleting are author-only.\n */\nexport class PageCommentsApi {\n constructor(private client: TrpcClient) {}\n\n async list(pageId: string): Promise<PageComment[]> {\n return await this.client.pageComment.list.query({ pageId }) as PageComment[];\n }\n\n async create(input: PageCommentCreateInput): Promise<PageComment> {\n return await this.client.pageComment.create.mutate(input) as PageComment;\n }\n\n async update(input: PageCommentUpdateInput): Promise<PageComment> {\n return await this.client.pageComment.update.mutate(input) as PageComment;\n }\n\n async delete(commentId: string): Promise<{ success: boolean }> {\n return await this.client.pageComment.delete.mutate({\n commentId,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { GoalComment } from './types/comment.js';\n\nexport interface GoalCommentAddInput {\n goalId: number;\n /** Markdown. Mention members with `@[Name](userId)` — see `workspaces.listMembers()`. */\n content: string;\n /** Thread this comment under a specific goal update rather than the goal itself. */\n parentUpdateId?: string;\n}\n\nexport interface GoalCommentUpdateInput {\n commentId: string;\n content: string;\n}\n\n/**\n * Discussion on a Goal/Objective. Note `goalId` is numeric — goals use integer\n * ids, unlike the cuid-keyed product entities.\n */\nexport class GoalCommentsApi {\n constructor(private client: TrpcClient) {}\n\n async list(goalId: number): Promise<GoalComment[]> {\n return await this.client.goalComment.getComments.query({\n goalId,\n }) as GoalComment[];\n }\n\n async add(input: GoalCommentAddInput): Promise<GoalComment> {\n return await this.client.goalComment.addComment.mutate(input) as GoalComment;\n }\n\n async update(input: GoalCommentUpdateInput): Promise<GoalComment> {\n return await this.client.goalComment.updateComment.mutate(\n input,\n ) as GoalComment;\n }\n\n async delete(commentId: string): Promise<{ success: boolean }> {\n return await this.client.goalComment.deleteComment.mutate({\n commentId,\n }) as { success: boolean };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { KeyResultsApi } from './keyResults.js';\nimport type {\n Goal,\n GoalPeriod,\n GoalStats,\n GoalStatus,\n GoalTreeNode,\n GoalWritableStatus,\n} from './types/goal.js';\n\nexport interface GoalListOptions {\n /**\n * Scope to a workspace. With it the list is workspace-**wide** — every\n * member's objectives, not just yours. Without it you get your own.\n */\n workspaceId?: string;\n /** Free-form period string, e.g. `\"Q3-2026\"` or `\"Annual-2026\"`. */\n period?: string;\n status?: GoalStatus;\n}\n\nexport interface GoalTreeOptions {\n workspaceId?: string;\n status?: GoalStatus;\n}\n\nexport interface GoalCreateInput {\n title: string;\n description?: string;\n whyThisGoal?: string;\n notes?: string;\n dueDate?: Date;\n period?: string;\n status?: GoalWritableStatus;\n lifeDomainId?: number;\n /** Link the objective to one project on creation. */\n projectId?: string;\n outcomeIds?: string[];\n driUserId?: string;\n workspaceId?: string;\n /** Nest under a parent objective. Max nesting depth is 5. */\n parentGoalId?: number;\n icon?: string | null;\n iconColor?: string | null;\n}\n\n/**\n * A **partial** update: omit a field and it is left untouched, pass an explicit\n * `null` to clear it. Nothing you don't name is written.\n *\n * Prefer {@link GoalsApi.setStatus} for a status change and\n * {@link GoalsApi.setParent} for a re-parent — both write exactly one column.\n */\nexport interface GoalUpdateInput {\n id: number;\n title?: string;\n description?: string | null;\n whyThisGoal?: string | null;\n notes?: string | null;\n dueDate?: Date | null;\n period?: string | null;\n status?: GoalWritableStatus;\n lifeDomainId?: number | null;\n /** Replace the project links with this one project; `null` clears them. */\n projectId?: string | null;\n /** Replace the project links wholesale; `[]` clears them. */\n projectIds?: string[];\n outcomeIds?: string[];\n driUserId?: string | null;\n workspaceId?: string | null;\n parentGoalId?: number | null;\n displayOrder?: number;\n icon?: string | null;\n iconColor?: string | null;\n}\n\nexport interface GoalSetStatusInput {\n id: number;\n /** `on-hold` is accepted here and only here. */\n status: GoalStatus;\n}\n\nexport interface GoalSetParentInput {\n id: number;\n /** `null` detaches the objective from its parent. */\n parentGoalId: number | null;\n}\n\nexport interface GoalStatsOptions {\n workspaceId?: string;\n period?: string;\n}\n\n/**\n * Objectives (`Goal`) — the qualitative half of an OKR, keyed by **integer** id.\n * Their measurable key results hang off {@link KeyResultsApi}, reachable here as\n * `goals.keyResults`.\n *\n * On writes: `update()` is a partial update, but `setStatus()` and `setParent()`\n * each write a single column and are the right call whenever that is all you\n * mean to change — closing a quarter or re-parenting a cascade should never risk\n * a collateral write.\n */\nexport class GoalsApi {\n constructor(\n private client: TrpcClient,\n /** Key results for these objectives. Same instance as `client.keyResults`. */\n public keyResults: KeyResultsApi,\n ) {}\n\n /**\n * List objectives. Pass `workspaceId` for the workspace-wide list (every\n * member's), omit it for your own. Includes each objective's linked\n * `projects`, which is the join that maps day-to-day work back to an OKR:\n * every action carries a `projectId`.\n *\n * `period` and `status` are sent to the server *and* re-applied here. The\n * server grew those filters recently; against an instance that predates them\n * zod strips the unknown keys and hands back **every** objective — a filter\n * that silently matches everything is worse than one that errors. Re-applying\n * is a no-op once the server has done the work. Same reasoning as the\n * client-side `branchName`/`prUrl` filters in `tickets.ts`.\n */\n async list(options: GoalListOptions = {}): Promise<Goal[]> {\n const goals = await this.client.goal.getAllMyGoals.query(options) as Goal[];\n return goals.filter(\n (g) =>\n (options.period === undefined || g.period === options.period) &&\n (options.status === undefined || g.status === options.status),\n );\n }\n\n /**\n * The same objectives nested parent → child (up to 5 levels), each with its\n * projects and key results. One call for the whole annual → quarterly cascade.\n */\n async tree(options: GoalTreeOptions = {}): Promise<GoalTreeNode[]> {\n return await this.client.goal.getGoalTree.query(\n options,\n ) as GoalTreeNode[];\n }\n\n async get(id: number): Promise<Goal> {\n return await this.client.goal.getById.query({ id }) as Goal;\n }\n\n /** Objectives linked to a given project. */\n async listByProject(projectId: string): Promise<Goal[]> {\n return await this.client.goal.getProjectGoals.query({ projectId }) as Goal[];\n }\n\n async create(input: GoalCreateInput): Promise<Goal> {\n return await this.client.goal.createGoal.mutate(input) as Goal;\n }\n\n /**\n * Partial update — see {@link GoalUpdateInput}. Fields you omit are left\n * alone; pass an explicit `null` to clear one.\n */\n async update(input: GoalUpdateInput): Promise<Goal> {\n return await this.client.goal.updateGoal.mutate(input) as Goal;\n }\n\n /**\n * Status-only write. Never touches another field, and is the only path that\n * accepts `on-hold`. Moving an objective to `completed` also records a\n * workspace milestone.\n */\n async setStatus(input: GoalSetStatusInput): Promise<Goal> {\n return await this.client.goal.updateGoalStatus.mutate(input) as Goal;\n }\n\n /**\n * Re-parent an objective, or detach it with `parentGoalId: null`. Writes only\n * `parentGoalId`, and validates the no-self / no-cycle / depth-5 rules.\n */\n async setParent(input: GoalSetParentInput): Promise<Goal> {\n return await this.client.goal.setParent.mutate(input) as Goal;\n }\n\n async delete(id: number): Promise<Goal> {\n return await this.client.goal.deleteGoal.mutate({ id }) as Goal;\n }\n\n /** The conventional period strings (quarters, halves, annual) for this year and next. */\n async periods(): Promise<GoalPeriod[]> {\n return await this.client.okr.getPeriods.query() as GoalPeriod[];\n }\n\n /** Aggregate objective/key-result counts and average progress. */\n async stats(options: GoalStatsOptions = {}): Promise<GoalStats> {\n return await this.client.okr.getStats.query(options) as GoalStats;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type {\n KeyResult,\n KeyResultCheckIn,\n KeyResultStatus,\n KeyResultUnit,\n ObjectiveWithKeyResults,\n} from './types/keyResult.js';\n\nexport interface KeyResultListOptions {\n /**\n * Scope to a workspace. With it the list is workspace-**wide** — every\n * member's key results, not just yours. Without it you get your own.\n */\n workspaceId?: string;\n /** Objective id — an integer, unlike the key result's own cuid. */\n goalId?: number;\n period?: string;\n status?: KeyResultStatus;\n /** Narrow a workspace-scoped list back to the key results you own. */\n onlyMine?: boolean;\n}\n\nexport interface KeyResultByObjectiveOptions {\n workspaceId?: string;\n period?: string;\n /** Also include the period's parent annual period (Q3-2026 → Annual-2026). */\n includePairedPeriod?: boolean;\n onlyMine?: boolean;\n}\n\nexport interface KeyResultCreateInput {\n /** Objective (integer id) the key result hangs off. */\n goalId: number;\n title: string;\n targetValue: number;\n /** Free-form, e.g. `\"Q3-2026\"`. */\n period: string;\n description?: string;\n startValue?: number;\n currentValue?: number;\n unit?: KeyResultUnit;\n unitLabel?: string;\n driUserId?: string;\n /**\n * Omit to inherit the objective's workspace — {@link KeyResultsApi.create}\n * resolves it before writing. Pass one explicitly only to override.\n */\n workspaceId?: string;\n}\n\nexport interface KeyResultUpdateInput {\n /** cuid. */\n id: string;\n title?: string;\n description?: string;\n targetValue?: number;\n currentValue?: number;\n startValue?: number;\n unit?: KeyResultUnit;\n unitLabel?: string;\n status?: KeyResultStatus;\n /** 0–100. */\n confidence?: number;\n driUserId?: string;\n /** Move the key result to a different objective. */\n goalId?: number;\n}\n\nexport interface KeyResultCheckInInput {\n /** cuid. */\n id: string;\n /** The new current value. */\n value: number;\n note?: string;\n}\n\n/**\n * Key results — the measurable half of an OKR.\n *\n * Reachable both as `client.keyResults` and as `client.goals.keyResults`; they\n * are the same instance. Every id here is a **cuid string**, while the `goalId`\n * that ties a key result to its objective is an **integer**. The tRPC router\n * behind these calls is mounted at `okr`, which is the key-result router — not\n * an objective router. Objectives live on {@link GoalsApi}.\n */\nexport class KeyResultsApi {\n constructor(private client: TrpcClient) {}\n\n /**\n * List key results. Pass `workspaceId` for the workspace-wide list (every\n * member's), omit it for your own.\n *\n * ⚠️ Workspace scoping here depends on a server-side fix to `okr.getAll`,\n * which previously accepted a `workspaceId` while still filtering on the\n * caller's `userId` — so against an older instance this returns only your own\n * key results, or `[]`, rather than the workspace's. Unlike the filters in\n * `goals.list()` that cannot be repaired here: the other members' rows never\n * reach the client. {@link KeyResultsApi.byObjective} is workspace-correct on\n * every server version and is the safer read when that matters.\n */\n async list(options: KeyResultListOptions = {}): Promise<KeyResult[]> {\n return await this.client.okr.getAll.query(options) as KeyResult[];\n }\n\n /**\n * Objectives with their key results nested — the richest OKR read, and the\n * one to reach for when rendering \"here is the quarter\".\n */\n async byObjective(\n options: KeyResultByObjectiveOptions = {},\n ): Promise<ObjectiveWithKeyResults[]> {\n return await this.client.okr.getByObjective.query(\n options,\n ) as ObjectiveWithKeyResults[];\n }\n\n async get(id: string): Promise<KeyResult> {\n return await this.client.okr.getById.query({ id }) as KeyResult;\n }\n\n /**\n * Create a key result on an objective.\n *\n * When `workspaceId` is omitted it is resolved from the objective first,\n * rather than left to the server. `okr.create` writes the input through as-is\n * on older instances, so an absent workspace persists as `null` — and a key\n * result with no workspace is invisible to every workspace-scoped read and\n * unwritable by teammates once owner-OR-member authz applies. That is the\n * same orphaning that has already cost a goal; one extra read on a mutation\n * is a cheap way not to repeat it.\n */\n async create(input: KeyResultCreateInput): Promise<KeyResult> {\n let workspaceId = input.workspaceId;\n if (workspaceId === undefined) {\n const goal = await this.client.goal.getById.query({\n id: input.goalId,\n }) as { workspaceId: string | null };\n workspaceId = goal.workspaceId ?? undefined;\n }\n return await this.client.okr.create.mutate({\n ...input,\n workspaceId,\n }) as KeyResult;\n }\n\n async update(input: KeyResultUpdateInput): Promise<KeyResult> {\n return await this.client.okr.update.mutate(input) as KeyResult;\n }\n\n /**\n * Record a progress check-in. The server derives the new status from where\n * `value` lands between `startValue` and `targetValue`, so a check-in both\n * moves the number and re-colours the key result.\n */\n async checkIn(input: KeyResultCheckInInput): Promise<KeyResultCheckIn> {\n return await this.client.okr.checkIn.mutate({\n keyResultId: input.id,\n newValue: input.value,\n notes: input.note,\n }) as KeyResultCheckIn;\n }\n\n async delete(id: string): Promise<{ success: boolean }> {\n return await this.client.okr.delete.mutate({ id }) as { success: boolean };\n }\n\n /** Link a project to a key result as executing work. Idempotent. */\n async linkProject(input: {\n keyResultId: string;\n projectId: string;\n }): Promise<{ success: boolean }> {\n return await this.client.okr.linkProject.mutate(input) as {\n success: boolean;\n };\n }\n\n async unlinkProject(input: {\n keyResultId: string;\n projectId: string;\n }): Promise<{ success: boolean }> {\n return await this.client.okr.unlinkProject.mutate(input) as {\n success: boolean;\n };\n }\n\n /**\n * Link a feature to a key result as executing work. Idempotent. The feature's\n * product must live in the key result's workspace. A feature with no\n * objective alignment inherits the key result's objective; one that already\n * has an objective is never overwritten.\n */\n async linkFeature(input: {\n keyResultId: string;\n featureId: string;\n }): Promise<{ success: boolean }> {\n return await this.client.okr.linkFeature.mutate(input) as {\n success: boolean;\n };\n }\n\n /** Removes only the link row — never the feature's objective alignment. */\n async unlinkFeature(input: {\n keyResultId: string;\n featureId: string;\n }): Promise<{ success: boolean }> {\n return await this.client.okr.unlinkFeature.mutate(input) as {\n success: boolean;\n };\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type {\n Project,\n ProjectDetail,\n ProjectPriority,\n ProjectStatus,\n} from './types/project.js';\n\nexport interface ProjectsListOptions {\n workspaceId?: string;\n includeActions?: boolean;\n}\n\n/**\n * A **partial** update. Omit a field and it is left untouched.\n *\n * `name`, `status` and `priority` are required by the server on every call, so\n * {@link ProjectsApi.update} reads the project first and sends the current\n * values for whichever of the three you leave out — the same read-before-write\n * that keeps `goals.update()` from clobbering. Everything else here is written\n * only when present.\n */\nexport interface ProjectUpdateInput {\n id: string;\n name?: string;\n /** The server has no way to clear a description — pass `''` to blank it. */\n description?: string;\n status?: ProjectStatus;\n priority?: ProjectPriority;\n /** `null` unlinks the product. */\n productId?: string | null;\n /** `null` makes the project personal. */\n workspaceId?: string | null;\n /** Directly responsible individual; `null` clears it. */\n driId?: string | null;\n /**\n * Replace the objective links. Integer goal ids passed as strings — the\n * server parses them. An empty array is a **no-op**, not a clear; the server\n * only writes this when the array is non-empty.\n */\n goalIds?: string[];\n outcomeIds?: string[];\n /** Replace the key-result links wholesale; `[]` clears them. */\n keyResultIds?: string[];\n lifeDomainIds?: number[];\n reviewDate?: Date | null;\n nextActionDate?: Date | null;\n startDate?: Date | null;\n endDate?: Date | null;\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 /**\n * Fetch one project with its relations — actions, linked objectives and key\n * results, DRI, team. Accepts a cuid, a slug, or the compound `slug-cuid`\n * form that appears in app URLs.\n *\n * The list read carries none of the OKR edges, so this is the only way to\n * answer \"what is this project driving?\".\n */\n async get(idOrSlug: string): Promise<ProjectDetail> {\n return await this.client.project.getById.query({\n id: idOrSlug,\n }) as ProjectDetail;\n }\n\n /**\n * Partial update — see {@link ProjectUpdateInput}. Costs one extra read when\n * `name`, `status` or `priority` is omitted, because the server requires all\n * three.\n */\n async update(input: ProjectUpdateInput): Promise<Project> {\n const { id, name, status, priority, ...rest } = input;\n\n let resolvedName = name;\n let resolvedStatus = status;\n let resolvedPriority = priority;\n\n if (\n resolvedName === undefined ||\n resolvedStatus === undefined ||\n resolvedPriority === undefined\n ) {\n const current = await this.get(id);\n resolvedName ??= current.name;\n resolvedStatus ??= (current.status as ProjectStatus | null) ?? 'ACTIVE';\n resolvedPriority ??=\n (current.priority as ProjectPriority | null) ?? 'NONE';\n }\n\n return await this.client.project.update.mutate({\n id,\n name: resolvedName,\n status: resolvedStatus,\n priority: resolvedPriority,\n ...rest,\n }) as Project;\n }\n\n /** Deletes the project and its actions. There is no undo. */\n async delete(id: string): Promise<Project> {\n return await this.client.project.delete.mutate({ id }) as Project;\n }\n}\n","import type { TrpcClient } from './client.js';\nimport type { Workspace, WorkspaceMember } 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 /**\n * Everyone who belongs to a workspace — direct members plus anyone with\n * access through a linked team. This is the lookup that makes mentions\n * possible from outside the app: match a name or email here, then drop the\n * row's `mentionSyntax` into a comment body.\n */\n async listMembers(workspaceId: string): Promise<WorkspaceMember[]> {\n return await this.client.workspace.listMembers.query({\n workspaceId,\n }) as WorkspaceMember[];\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 * Always required. `product.ticket.list` is product-scoped on the server —\n * there is no workspace-wide ticket query. To search several products, call\n * `list` once per product and merge the results.\n */\n productId: string;\n status?: TicketStatus;\n type?: TicketType;\n featureId?: string;\n epicId?: string;\n cycleId?: string;\n assigneeId?: string;\n /**\n * Filter by `Ticket.prUrl` (exact match).\n *\n * Applied **client-side**, after the product-scoped fetch — the server's\n * `list` input schema has no `prUrl` field. See the note on {@link\n * TicketsApi.list}.\n */\n prUrl?: string;\n /**\n * Filter by `Ticket.branchName` (exact match).\n *\n * Applied **client-side**, after the product-scoped fetch — the server's\n * `list` input schema has no `branchName` field. See the note on {@link\n * TicketsApi.list}.\n */\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 TicketCommentUpdateInput {\n id: 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 /**\n * List tickets in one product.\n *\n * `prUrl` and `branchName` are filtered here rather than on the server. The\n * `product.ticket.list` tRPC input schema accepts neither, and zod strips\n * unknown keys, so forwarding them was silently a no-op: a lookup by a branch\n * that matched nothing came back as *every ticket in the product*. Filtering\n * locally makes them mean what they say. Move them server-side once\n * `product.ticket.list` grows the matching input fields.\n */\n async list(options: TicketListOptions): Promise<Ticket[]> {\n const { prUrl, branchName, ...serverQuery } = options;\n const tickets = await this.client.product.ticket.list.query(\n serverQuery,\n ) as Ticket[];\n\n return tickets.filter((t) =>\n (prUrl === undefined || t.prUrl === prUrl) &&\n (branchName === undefined || t.branchName === branchName)\n );\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 updateComment(input: TicketCommentUpdateInput): Promise<TicketComment> {\n return await this.client.product.ticket.updateComment.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 { Meeting } from './types/meeting.js';\n\nexport type MeetingTypeFilter =\n | 'all'\n | 'mine'\n | 'one_on_one'\n | 'customer'\n | 'internal';\n\nexport interface MeetingListOptions {\n workspaceId?: string;\n includeArchived?: boolean;\n /**\n * - `mine`: caller owns the meeting or is a participant\n * - `one_on_one`: exactly two participants\n * - `customer` / `internal`: always empty until meeting tagging ships\n */\n meetingType?: MeetingTypeFilter;\n}\n\n/** A member (userId), an existing CRM contact (contactId), or a name/email. */\nexport interface MeetingParticipantInput {\n userId?: string;\n contactId?: string;\n email?: string;\n name?: string;\n}\n\nexport interface MeetingCreateInput {\n title: string;\n /** Raw transcript text — required by the server, min 1 character. */\n transcription: string;\n description?: string;\n notes?: string;\n meetingDate?: Date;\n /** A project-linked meeting inherits its project's workspace. */\n projectId?: string;\n workspaceId?: string;\n participants?: MeetingParticipantInput[];\n}\n\nexport interface MeetingUpdateInput {\n id: string;\n title?: string;\n description?: string;\n notes?: string;\n summary?: string;\n transcription?: string;\n meetingDate?: Date | null;\n workspaceId?: string | null;\n}\n\n/**\n * Meetings (transcription sessions): recorded/imported meetings and manually\n * created ones, each carrying `notes`, an AI `summary`, and the raw\n * `transcription`.\n */\nexport class MeetingsApi {\n constructor(private client: TrpcClient) {}\n\n /**\n * List meetings visible to the caller (owner, participant, project access,\n * or workspace membership). Rows include full `notes`/`summary`/\n * `transcription` bodies, so expect large payloads.\n */\n async list(options: MeetingListOptions = {}): Promise<Meeting[]> {\n return await this.client.transcription.getAllTranscriptions.query(\n options,\n ) as Meeting[];\n }\n\n async get(id: string): Promise<Meeting> {\n return await this.client.transcription.getById.query({ id }) as Meeting;\n }\n\n async create(input: MeetingCreateInput): Promise<Meeting> {\n return await this.client.transcription.createManualTranscription.mutate(\n input,\n ) as Meeting;\n }\n\n /**\n * Partial update — only the keys present are written. The server splits\n * title from the other fields, so a title change is a second mutation.\n */\n async update(input: MeetingUpdateInput): Promise<Meeting> {\n const { id, title, ...details } = input;\n const hasDetails = Object.values(details).some((v) => v !== undefined);\n if (title === undefined && !hasDetails) {\n throw new Error('MeetingsApi.update: nothing to update');\n }\n\n let result: Meeting | undefined;\n if (title !== undefined) {\n result = await this.client.transcription.updateTitle.mutate({\n id,\n title,\n }) as Meeting;\n }\n if (hasDetails) {\n result = await this.client.transcription.updateDetails.mutate({\n id,\n ...details,\n }) as Meeting;\n }\n return result!;\n }\n\n /** The meeting-notes body alone (null when none have been written). */\n async getNotes(id: string): Promise<string | null> {\n const meeting = await this.get(id);\n return meeting.notes ?? null;\n }\n\n /** Replace the meeting's notes. */\n async setNotes(id: string, notes: string): Promise<Meeting> {\n return await this.update({ id, notes });\n }\n\n /**\n * Append a block to the meeting's notes (separated by a blank line),\n * creating them if none exist. Read-modify-write, not atomic.\n */\n async appendNotes(id: string, text: string): Promise<Meeting> {\n const existing = await this.getNotes(id);\n const notes = existing?.trim()\n ? `${existing.replace(/\\s+$/, '')}\\n\\n${text}`\n : text;\n return await this.update({ id, notes });\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 { FeatureCommentsApi } from './featureComments.js';\nimport { PageCommentsApi } from './pageComments.js';\nimport { GoalCommentsApi } from './goalComments.js';\nimport { GoalsApi } from './goals.js';\nimport { KeyResultsApi } from './keyResults.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 { MeetingsApi } from './meetings.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 featureComments: FeatureCommentsApi;\n pageComments: PageCommentsApi;\n goalComments: GoalCommentsApi;\n goals: GoalsApi;\n /** Same instance as `goals.keyResults`. */\n keyResults: KeyResultsApi;\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 meetings: MeetingsApi;\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.featureComments = new FeatureCommentsApi(this.client);\n this.pageComments = new PageCommentsApi(this.client);\n this.goalComments = new GoalCommentsApi(this.client);\n this.keyResults = new KeyResultsApi(this.client);\n this.goals = new GoalsApi(this.client, this.keyResults);\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.meetings = new MeetingsApi(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 {\n Project,\n ProjectDetail,\n ProjectKeyResultLink,\n ProjectOutput,\n ProjectPriority,\n ProjectStatus,\n ProjectsListOutput,\n} from './types/project.js';\nexport type { ProjectUpdateInput, ProjectsListOptions } from './projects.js';\nexport type {\n Workspace,\n WorkspaceMember,\n WorkspaceOutput,\n WorkspacesListOutput,\n} 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 FeatureComment,\n PageComment,\n GoalComment,\n CommentAuthor,\n} from './types/comment.js';\nexport type {\n ActionCommentAddInput,\n ActionCommentUpdateInput,\n} from './actionComments.js';\nexport type {\n FeatureCommentCreateInput,\n FeatureCommentReplyInput,\n FeatureCommentUpdateInput,\n FeatureCommentThreadInput,\n} from './featureComments.js';\nexport type {\n PageCommentCreateInput,\n PageCommentUpdateInput,\n} from './pageComments.js';\nexport type {\n GoalCommentAddInput,\n GoalCommentUpdateInput,\n} from './goalComments.js';\nexport type {\n Goal,\n GoalChildSummary,\n GoalHealth,\n GoalKeyResultSummary,\n GoalLifeDomain,\n GoalPeriod,\n GoalProjectSummary,\n GoalStats,\n GoalStatus,\n GoalTreeNode,\n GoalUserSummary,\n GoalWritableStatus,\n} from './types/goal.js';\nexport type {\n GoalListOptions,\n GoalTreeOptions,\n GoalCreateInput,\n GoalUpdateInput,\n GoalSetStatusInput,\n GoalSetParentInput,\n GoalStatsOptions,\n} from './goals.js';\nexport type {\n KeyResult,\n KeyResultCheckIn,\n KeyResultFeatureLink,\n KeyResultProjectLink,\n KeyResultStatus,\n KeyResultUnit,\n ObjectiveWithKeyResults,\n} from './types/keyResult.js';\nexport type {\n KeyResultListOptions,\n KeyResultByObjectiveOptions,\n KeyResultCreateInput,\n KeyResultUpdateInput,\n KeyResultCheckInInput,\n} from './keyResults.js';\nexport type { Product } from './types/product.js';\nexport type { ProductCreateInput, ProductUpdateInput } from './products.js';\nexport type {\n Feature,\n FeatureKeyResultLink,\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 {\n Meeting,\n MeetingActionSummary,\n MeetingParticipant,\n MeetingProjectRef,\n MeetingSourceIntegration,\n MeetingWorkspaceRef,\n} from './types/meeting.js';\nexport type {\n MeetingListOptions,\n MeetingTypeFilter,\n MeetingParticipantInput,\n MeetingCreateInput,\n MeetingUpdateInput,\n} from './meetings.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 TicketCommentUpdateInput,\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 ListForEntityIn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Q,IAAI,SAAS,KAAK,MAAM;AACrC,SAAK,SAAS,IAAI,UAAU,KAAK,MAAM;AACvC,SAAK,QAAQ,IAAI,SAAS,KAAK,MAAM;AACrC,SAAK,WAAW,IAAI,YAAY,KAAK,MAAM;AAC3C,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,EArDQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;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;AA6BF;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exponential-sdk",
3
- "version": "1.13.0",
3
+ "version": "1.15.0",
4
4
  "description": "SDK for interacting with the Exponential API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",