@doist/todoist-sdk 10.5.1 → 12.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/cjs/consts/endpoints.js +1 -6
  2. package/dist/cjs/test-utils/test-defaults.js +2 -26
  3. package/dist/cjs/test-utils/webhook-fixtures.js +1 -1
  4. package/dist/cjs/todoist-api.js +0 -101
  5. package/dist/cjs/types/index.js +0 -1
  6. package/dist/cjs/types/sync/commands/index.js +0 -2
  7. package/dist/cjs/types/sync/resource-types.js +0 -2
  8. package/dist/cjs/types/sync/resources/index.js +0 -1
  9. package/dist/cjs/types/sync/response.js +10 -13
  10. package/dist/cjs/utils/validators.js +50 -54
  11. package/dist/esm/consts/endpoints.js +0 -5
  12. package/dist/esm/test-utils/test-defaults.js +0 -24
  13. package/dist/esm/test-utils/webhook-fixtures.js +1 -1
  14. package/dist/esm/todoist-api.js +0 -101
  15. package/dist/esm/types/index.js +0 -1
  16. package/dist/esm/types/sync/commands/index.js +0 -2
  17. package/dist/esm/types/sync/resource-types.js +0 -2
  18. package/dist/esm/types/sync/resources/index.js +0 -1
  19. package/dist/esm/types/sync/response.js +1 -4
  20. package/dist/esm/utils/validators.js +1 -4
  21. package/dist/types/consts/endpoints.d.ts +0 -5
  22. package/dist/types/test-utils/test-defaults.d.ts +1 -4
  23. package/dist/types/todoist-api.d.ts +0 -80
  24. package/dist/types/types/index.d.ts +0 -1
  25. package/dist/types/types/sync/commands/index.d.ts +0 -16
  26. package/dist/types/types/sync/resource-types.d.ts +1 -1
  27. package/dist/types/types/sync/resources/index.d.ts +0 -1
  28. package/dist/types/types/sync/resources/view-options.d.ts +6 -6
  29. package/dist/types/types/sync/response.d.ts +4 -45
  30. package/dist/types/types/tasks/requests.d.ts +0 -1
  31. package/dist/types/utils/validators.d.ts +8 -90
  32. package/package.json +3 -2
  33. package/dist/cjs/clients/goals-client.js +0 -144
  34. package/dist/cjs/types/goals/index.js +0 -18
  35. package/dist/cjs/types/goals/requests.js +0 -2
  36. package/dist/cjs/types/goals/types.js +0 -56
  37. package/dist/cjs/types/sync/commands/goals.js +0 -2
  38. package/dist/cjs/types/sync/commands/workspace-goals.js +0 -2
  39. package/dist/cjs/types/sync/resources/workspace-goals.js +0 -26
  40. package/dist/esm/clients/goals-client.js +0 -140
  41. package/dist/esm/types/goals/index.js +0 -2
  42. package/dist/esm/types/goals/requests.js +0 -1
  43. package/dist/esm/types/goals/types.js +0 -53
  44. package/dist/esm/types/sync/commands/goals.js +0 -1
  45. package/dist/esm/types/sync/commands/workspace-goals.js +0 -1
  46. package/dist/esm/types/sync/resources/workspace-goals.js +0 -23
  47. package/dist/types/clients/goals-client.d.ts +0 -20
  48. package/dist/types/types/goals/index.d.ts +0 -2
  49. package/dist/types/types/goals/requests.d.ts +0 -33
  50. package/dist/types/types/goals/types.d.ts +0 -51
  51. package/dist/types/types/sync/commands/goals.d.ts +0 -33
  52. package/dist/types/types/sync/commands/workspace-goals.d.ts +0 -24
  53. package/dist/types/types/sync/resources/workspace-goals.d.ts +0 -29
@@ -5,7 +5,6 @@ import { BillingClient } from './clients/billing-client.js';
5
5
  import { CommentClient } from './clients/comment-client.js';
6
6
  import { EmailClient } from './clients/email-client.js';
7
7
  import { FolderClient } from './clients/folder-client.js';
8
- import { GoalsClient } from './clients/goals-client.js';
9
8
  import { IdMappingClient } from './clients/id-mapping-client.js';
10
9
  import { InsightsClient } from './clients/insights-client.js';
11
10
  import { LabelClient } from './clients/label-client.js';
@@ -60,7 +59,6 @@ export class TodoistApi {
60
59
  this.activityClient = new ActivityClient(clientDeps);
61
60
  this.productivityClient = new ProductivityClient(clientDeps);
62
61
  this.workspaceClient = new WorkspaceClient(clientDeps);
63
- this.goalsClient = new GoalsClient(clientDeps);
64
62
  this.billingClient = new BillingClient(clientDeps);
65
63
  this.appClient = new AppClient(clientDeps);
66
64
  this.uiExtensionClient = new UiExtensionClient(clientDeps);
@@ -948,105 +946,6 @@ export class TodoistApi {
948
946
  async deleteFolder(id, requestId) {
949
947
  return this.folderClient.deleteFolder(id, requestId);
950
948
  }
951
- // ── Goals ──
952
- /**
953
- * Retrieves a paginated list of goals.
954
- *
955
- * @param args - Optional filters including owner type, workspace ID, cursor, and limit.
956
- * @returns A promise that resolves to a paginated list of goals.
957
- */
958
- async getGoals(args) {
959
- return this.goalsClient.getGoals(args);
960
- }
961
- /**
962
- * Searches for goals matching a query.
963
- *
964
- * @param args - Search parameters including query string and optional owner type.
965
- * @returns A promise that resolves to a paginated list of matching goals.
966
- */
967
- async searchGoals(args) {
968
- return this.goalsClient.searchGoals(args);
969
- }
970
- /**
971
- * Retrieves a single goal by its ID.
972
- *
973
- * @param id - The unique identifier of the goal.
974
- * @returns A promise that resolves to the goal.
975
- */
976
- async getGoal(id) {
977
- return this.goalsClient.getGoal(id);
978
- }
979
- /**
980
- * Creates a new goal.
981
- *
982
- * @param args - Goal attributes including name and optional workspace, description, deadline, and responsible user.
983
- * @param requestId - Optional custom identifier for the request.
984
- * @returns A promise that resolves to the created goal.
985
- */
986
- async addGoal(args, requestId) {
987
- return this.goalsClient.addGoal(args, requestId);
988
- }
989
- /**
990
- * Updates an existing goal.
991
- *
992
- * @param id - The unique identifier of the goal to update.
993
- * @param args - Attributes to update on the goal.
994
- * @param requestId - Optional custom identifier for the request.
995
- * @returns A promise that resolves to the updated goal.
996
- */
997
- async updateGoal(id, args, requestId) {
998
- return this.goalsClient.updateGoal(id, args, requestId);
999
- }
1000
- /**
1001
- * Deletes a goal by its ID.
1002
- *
1003
- * @param id - The unique identifier of the goal to delete.
1004
- * @param requestId - Optional custom identifier for the request.
1005
- * @returns A promise that resolves to `true` if successful.
1006
- */
1007
- async deleteGoal(id, requestId) {
1008
- return this.goalsClient.deleteGoal(id, requestId);
1009
- }
1010
- /**
1011
- * Marks a goal as complete.
1012
- *
1013
- * @param id - The unique identifier of the goal to complete.
1014
- * @param requestId - Optional custom identifier for the request.
1015
- * @returns A promise that resolves to the updated goal.
1016
- */
1017
- async completeGoal(id, requestId) {
1018
- return this.goalsClient.completeGoal(id, requestId);
1019
- }
1020
- /**
1021
- * Marks a previously completed goal as incomplete.
1022
- *
1023
- * @param id - The unique identifier of the goal to uncomplete.
1024
- * @param requestId - Optional custom identifier for the request.
1025
- * @returns A promise that resolves to the updated goal.
1026
- */
1027
- async uncompleteGoal(id, requestId) {
1028
- return this.goalsClient.uncompleteGoal(id, requestId);
1029
- }
1030
- /**
1031
- * Links a task to a goal so it contributes to goal progress.
1032
- *
1033
- * @param args - The goal ID and task ID to link.
1034
- * @param requestId - Optional custom identifier for the request.
1035
- * @returns A promise that resolves to the updated goal.
1036
- */
1037
- async linkTaskToGoal(args, requestId) {
1038
- return this.goalsClient.linkTaskToGoal(args, requestId);
1039
- }
1040
- /**
1041
- * Unlinks a previously linked task from a goal.
1042
- *
1043
- * @param args - The goal ID and task ID to unlink.
1044
- * @param requestId - Optional custom identifier for the request.
1045
- * @returns A promise that resolves to `true` if successful.
1046
- */
1047
- async unlinkTaskFromGoal(args, requestId) {
1048
- return this.goalsClient.unlinkTaskFromGoal(args, requestId);
1049
- }
1050
949
  // ── Billing ──
1051
950
  /**
1052
951
  * Retrieves the current user's subscription state.
@@ -9,7 +9,6 @@ export * from './productivity/index.js';
9
9
  export * from './activity/index.js';
10
10
  export * from './workspaces/index.js';
11
11
  export * from './folders/index.js';
12
- export * from './goals/index.js';
13
12
  export * from './billing/index.js';
14
13
  export * from './insights/index.js';
15
14
  export * from './backups/index.js';
@@ -10,8 +10,6 @@ export * from './reminders.js';
10
10
  export * from './workspaces.js';
11
11
  export * from './folders.js';
12
12
  export * from './workspace-filters.js';
13
- export * from './workspace-goals.js';
14
- export * from './goals.js';
15
13
  export * from './notifications.js';
16
14
  export * from './sharing.js';
17
15
  export * from './view-options.js';
@@ -28,8 +28,6 @@ export const SYNC_RESOURCE_TYPES = [
28
28
  'project_view_options_defaults',
29
29
  'role_actions',
30
30
  'folders',
31
- 'workspace_goals',
32
- 'goals',
33
31
  'day_orders',
34
32
  'calendars',
35
33
  'calendar_accounts',
@@ -4,7 +4,6 @@ export * from './folders.js';
4
4
  export * from './tooltips.js';
5
5
  export * from './notes.js';
6
6
  export * from './workspace-filters.js';
7
- export * from './workspace-goals.js';
8
7
  export * from './calendars.js';
9
8
  export * from './reminders.js';
10
9
  export * from './completed-info.js';
@@ -1,11 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { GoalSchema } from '../goals/types.js';
3
2
  import { LabelSchema } from '../labels/types.js';
4
3
  import { ProjectSchema } from '../projects/types.js';
5
4
  import { SectionSchema } from '../sections/types.js';
6
5
  import { TaskSchema } from '../tasks/types.js';
7
6
  import { WorkspaceUserSchema } from '../workspaces/types.js';
8
- import { FilterSchema, CollaboratorSchema, CollaboratorStateSchema, FolderSchema, NoteSchema, TooltipsSchema, WorkspaceFilterSchema, WorkspaceGoalSchema, CalendarSchema, CalendarAccountSchema, ReminderSchema, LocationReminderSchema, CompletedInfoSchema, ViewOptionsSchema, ProjectViewOptionsDefaultsSchema, UserPlanLimitsSchema, LiveNotificationSchema, SyncWorkspaceSchema, SyncUserSchema, UserSettingsSchema, SuggestionSchema, } from './resources/index.js';
7
+ import { FilterSchema, CollaboratorSchema, CollaboratorStateSchema, FolderSchema, NoteSchema, TooltipsSchema, WorkspaceFilterSchema, CalendarSchema, CalendarAccountSchema, ReminderSchema, LocationReminderSchema, CompletedInfoSchema, ViewOptionsSchema, ProjectViewOptionsDefaultsSchema, UserPlanLimitsSchema, LiveNotificationSchema, SyncWorkspaceSchema, SyncUserSchema, UserSettingsSchema, SuggestionSchema, } from './resources/index.js';
9
8
  export const SyncErrorSchema = z.object({
10
9
  error: z.string(),
11
10
  errorCode: z.number(),
@@ -44,8 +43,6 @@ export const SyncResponseSchema = z.looseObject({
44
43
  projectViewOptionsDefaults: z.array(ProjectViewOptionsDefaultsSchema).optional(),
45
44
  roleActions: z.array(z.record(z.string(), z.unknown())).optional(),
46
45
  folders: z.array(FolderSchema).optional(),
47
- goals: z.array(GoalSchema).optional(),
48
- workspaceGoals: z.array(WorkspaceGoalSchema).optional(),
49
46
  dayOrders: z.record(z.string(), z.number()).optional(),
50
47
  calendars: z.array(CalendarSchema).optional(),
51
48
  calendarAccounts: z.array(CalendarAccountSchema).optional(),
@@ -4,7 +4,6 @@ import { AppSchema, AppWithUserCountSchema, AppSecretsSchema, AppVerificationTok
4
4
  import { BackupSchema } from '../types/backups/types.js';
5
5
  import { SubscriptionInfoSchema, ProPlanDetailsSchema, PricesResponseSchema, PricingResponseSchema, } from '../types/billing/types.js';
6
6
  import { AttachmentSchema, CommentSchema } from '../types/comments/types.js';
7
- import { GoalSchema } from '../types/goals/types.js';
8
7
  import { IdMappingSchema, MovedIdSchema } from '../types/id-mappings/types.js';
9
8
  import { ProjectActivityStatsSchema, ProjectHealthSchema, ProjectHealthContextSchema, ProjectProgressSchema, WorkspaceInsightsSchema, } from '../types/insights/types.js';
10
9
  import { LabelSchema } from '../types/labels/types.js';
@@ -16,7 +15,7 @@ import { TaskSchema } from '../types/tasks/types.js';
16
15
  import { UiExtensionSchema } from '../types/ui-extensions/types.js';
17
16
  import { UserSchema, CurrentUserSchema } from '../types/users/types.js';
18
17
  import { WorkspaceUserSchema, WorkspaceInvitationSchema, WorkspacePlanDetailsSchema, JoinWorkspaceResultSchema, WorkspaceSchema, MemberActivityInfoSchema, WorkspaceUserTaskSchema, } from '../types/workspaces/types.js';
19
- import { FilterSchema, CollaboratorSchema, CollaboratorStateSchema, FolderSchema, NoteSchema, TooltipsSchema, WorkspaceFilterSchema, WorkspaceGoalSchema, CalendarSchema, CalendarAccountSchema, ReminderSchema, LocationReminderSchema, CompletedInfoSchema, ViewOptionsSchema, ProjectViewOptionsDefaultsSchema, UserPlanLimitsSchema, LiveNotificationSchema, SyncWorkspaceSchema, SyncUserSchema, UserSettingsSchema, SuggestionSchema, } from '../types/sync/resources/index.js';
18
+ import { FilterSchema, CollaboratorSchema, CollaboratorStateSchema, FolderSchema, NoteSchema, TooltipsSchema, WorkspaceFilterSchema, CalendarSchema, CalendarAccountSchema, ReminderSchema, LocationReminderSchema, CompletedInfoSchema, ViewOptionsSchema, ProjectViewOptionsDefaultsSchema, UserPlanLimitsSchema, LiveNotificationSchema, SyncWorkspaceSchema, SyncUserSchema, UserSettingsSchema, SuggestionSchema, } from '../types/sync/resources/index.js';
20
19
  function createValidator(schema) {
21
20
  return {
22
21
  validate: (input) => schema.parse(input),
@@ -65,7 +64,6 @@ export const { validate: validateFilter, validateArray: validateFilterArray } =
65
64
  export const { validate: validateCollaborator, validateArray: validateCollaboratorArray } = createValidator(CollaboratorSchema);
66
65
  export const { validate: validateCollaboratorState, validateArray: validateCollaboratorStateArray, } = createValidator(CollaboratorStateSchema);
67
66
  export const { validate: validateFolder, validateArray: validateFolderArray } = createValidator(FolderSchema);
68
- export const { validate: validateGoal, validateArray: validateGoalArray } = createValidator(GoalSchema);
69
67
  // Billing validators
70
68
  export const { validate: validateSubscriptionInfo } = createValidator(SubscriptionInfoSchema);
71
69
  export const { validate: validateProPlanDetails } = createValidator(ProPlanDetailsSchema);
@@ -74,7 +72,6 @@ export const { validate: validatePricing } = createValidator(PricingResponseSche
74
72
  export const { validate: validateNote, validateArray: validateNoteArray } = createValidator(NoteSchema);
75
73
  export const { validate: validateTooltips } = createValidator(TooltipsSchema);
76
74
  export const { validate: validateWorkspaceFilter, validateArray: validateWorkspaceFilterArray } = createValidator(WorkspaceFilterSchema);
77
- export const { validate: validateWorkspaceGoal, validateArray: validateWorkspaceGoalArray } = createValidator(WorkspaceGoalSchema);
78
75
  export const { validate: validateCalendar, validateArray: validateCalendarArray } = createValidator(CalendarSchema);
79
76
  export const { validate: validateCalendarAccount, validateArray: validateCalendarAccountArray } = createValidator(CalendarAccountSchema);
80
77
  export const { validate: validateReminder, validateArray: validateReminderArray } = createValidator(ReminderSchema);
@@ -59,11 +59,6 @@ export declare const ENDPOINT_GET_TOKEN = "access_token";
59
59
  export declare const ENDPOINT_REVOKE = "revoke";
60
60
  export declare const ENDPOINT_REGISTER = "register";
61
61
  export declare const ENDPOINT_REST_FOLDERS = "folders";
62
- export declare const ENDPOINT_REST_GOALS = "goals";
63
- export declare const ENDPOINT_REST_GOALS_SEARCH: string;
64
- export declare const GOAL_COMPLETE = "complete";
65
- export declare const GOAL_UNCOMPLETE = "uncomplete";
66
- export declare const GOAL_TASKS = "items";
67
62
  export declare const ENDPOINT_REST_WORKSPACES = "workspaces";
68
63
  export declare const ENDPOINT_WORKSPACE_INVITATIONS = "workspaces/invitations";
69
64
  export declare const ENDPOINT_WORKSPACE_INVITATIONS_ALL = "workspaces/invitations/all";
@@ -1,4 +1,4 @@
1
- import { Label, Section, Task, User, Attachment, Duration, Deadline, RawComment, PersonalProject, WorkspaceProject, Reminder, Folder, Goal, App, AppWithUserCount, AppSecrets, AppVerificationToken, AppTestToken, AppDistributionToken, AppWebhook, AppInstallation, UserAuthorization, UiExtension } from '../types/index.js';
1
+ import { Label, Section, Task, User, Attachment, Duration, Deadline, RawComment, PersonalProject, WorkspaceProject, Reminder, Folder, App, AppWithUserCount, AppSecrets, AppVerificationToken, AppTestToken, AppDistributionToken, AppWebhook, AppInstallation, UserAuthorization, UiExtension } from '../types/index.js';
2
2
  import type { Collaborator, CollaboratorState } from '../types/sync/resources/collaborators.js';
3
3
  import type { Note } from '../types/sync/resources/notes.js';
4
4
  export declare const DEFAULT_TASK_ID = "1234";
@@ -265,9 +265,6 @@ export declare const COMMENT_WITH_OPTIONALS_AS_NULL_PROJECT: {
265
265
  export declare const DEFAULT_FOLDER: Folder;
266
266
  export declare const DEFAULT_COLLABORATOR: Collaborator;
267
267
  export declare const DEFAULT_COLLABORATOR_STATE: CollaboratorState;
268
- export declare const DEFAULT_GOAL_ID = "550e8400-e29b-41d4-a716-446655440000";
269
- export declare const DEFAULT_GOAL: Goal;
270
- export declare const DEFAULT_GOAL_NO_PROGRESS: Goal;
271
268
  export declare const DEFAULT_APP_ID = "42";
272
269
  export declare const DEFAULT_INSTALLATION_ID = "1001";
273
270
  export declare const DEFAULT_UI_EXTENSION_ID = "2002";
@@ -6,7 +6,6 @@ import type { BillingPortalUrlResponse, CancelPlanArgs, CheckoutSessionResponse,
6
6
  import { Attachment, Comment, AddCommentArgs, UpdateCommentArgs, GetProjectCommentsArgs, GetTaskCommentsArgs, GetCommentsResponse } from './types/comments/index.js';
7
7
  import { GetOrCreateEmailArgs, GetOrCreateEmailResponse, DisableEmailArgs } from './types/emails/index.js';
8
8
  import { GetFoldersArgs, GetFoldersResponse, AddFolderArgs, UpdateFolderArgs } from './types/folders/index.js';
9
- import type { AddGoalArgs, GetGoalsArgs, GetGoalsResponse, Goal, SearchGoalsArgs, TaskLinkingArgs, UpdateGoalArgs } from './types/goals/index.js';
10
9
  import { CustomFetch, FileResponse } from './types/http.js';
11
10
  import { IdMapping, MovedId, GetIdMappingsArgs, GetMovedIdsArgs } from './types/id-mappings/index.js';
12
11
  import { ProjectActivityStats, ProjectHealth, ProjectHealthContext, ProjectProgress, WorkspaceInsights, GetProjectActivityStatsArgs, GetWorkspaceInsightsArgs } from './types/insights/index.js';
@@ -77,7 +76,6 @@ export declare class TodoistApi {
77
76
  private readonly activityClient;
78
77
  private readonly productivityClient;
79
78
  private readonly workspaceClient;
80
- private readonly goalsClient;
81
79
  private readonly billingClient;
82
80
  private readonly appClient;
83
81
  private readonly uiExtensionClient;
@@ -796,84 +794,6 @@ export declare class TodoistApi {
796
794
  * @returns A promise that resolves to `true` if successful.
797
795
  */
798
796
  deleteFolder(id: string, requestId?: string): Promise<boolean>;
799
- /**
800
- * Retrieves a paginated list of goals.
801
- *
802
- * @param args - Optional filters including owner type, workspace ID, cursor, and limit.
803
- * @returns A promise that resolves to a paginated list of goals.
804
- */
805
- getGoals(args?: GetGoalsArgs): Promise<GetGoalsResponse>;
806
- /**
807
- * Searches for goals matching a query.
808
- *
809
- * @param args - Search parameters including query string and optional owner type.
810
- * @returns A promise that resolves to a paginated list of matching goals.
811
- */
812
- searchGoals(args: SearchGoalsArgs): Promise<GetGoalsResponse>;
813
- /**
814
- * Retrieves a single goal by its ID.
815
- *
816
- * @param id - The unique identifier of the goal.
817
- * @returns A promise that resolves to the goal.
818
- */
819
- getGoal(id: string): Promise<Goal>;
820
- /**
821
- * Creates a new goal.
822
- *
823
- * @param args - Goal attributes including name and optional workspace, description, deadline, and responsible user.
824
- * @param requestId - Optional custom identifier for the request.
825
- * @returns A promise that resolves to the created goal.
826
- */
827
- addGoal(args: AddGoalArgs, requestId?: string): Promise<Goal>;
828
- /**
829
- * Updates an existing goal.
830
- *
831
- * @param id - The unique identifier of the goal to update.
832
- * @param args - Attributes to update on the goal.
833
- * @param requestId - Optional custom identifier for the request.
834
- * @returns A promise that resolves to the updated goal.
835
- */
836
- updateGoal(id: string, args: UpdateGoalArgs, requestId?: string): Promise<Goal>;
837
- /**
838
- * Deletes a goal by its ID.
839
- *
840
- * @param id - The unique identifier of the goal to delete.
841
- * @param requestId - Optional custom identifier for the request.
842
- * @returns A promise that resolves to `true` if successful.
843
- */
844
- deleteGoal(id: string, requestId?: string): Promise<boolean>;
845
- /**
846
- * Marks a goal as complete.
847
- *
848
- * @param id - The unique identifier of the goal to complete.
849
- * @param requestId - Optional custom identifier for the request.
850
- * @returns A promise that resolves to the updated goal.
851
- */
852
- completeGoal(id: string, requestId?: string): Promise<Goal>;
853
- /**
854
- * Marks a previously completed goal as incomplete.
855
- *
856
- * @param id - The unique identifier of the goal to uncomplete.
857
- * @param requestId - Optional custom identifier for the request.
858
- * @returns A promise that resolves to the updated goal.
859
- */
860
- uncompleteGoal(id: string, requestId?: string): Promise<Goal>;
861
- /**
862
- * Links a task to a goal so it contributes to goal progress.
863
- *
864
- * @param args - The goal ID and task ID to link.
865
- * @param requestId - Optional custom identifier for the request.
866
- * @returns A promise that resolves to the updated goal.
867
- */
868
- linkTaskToGoal(args: TaskLinkingArgs, requestId?: string): Promise<Goal>;
869
- /**
870
- * Unlinks a previously linked task from a goal.
871
- *
872
- * @param args - The goal ID and task ID to unlink.
873
- * @param requestId - Optional custom identifier for the request.
874
- * @returns A promise that resolves to `true` if successful.
875
- */
876
- unlinkTaskFromGoal(args: TaskLinkingArgs, requestId?: string): Promise<boolean>;
877
797
  /**
878
798
  * Retrieves the current user's subscription state.
879
799
  *
@@ -9,7 +9,6 @@ export * from './productivity/index.js';
9
9
  export * from './activity/index.js';
10
10
  export * from './workspaces/index.js';
11
11
  export * from './folders/index.js';
12
- export * from './goals/index.js';
13
12
  export * from './billing/index.js';
14
13
  export * from './insights/index.js';
15
14
  export * from './backups/index.js';
@@ -1,7 +1,6 @@
1
1
  import type { CalendarUpdateArgs, CalendarAccountUpdateArgs, CalendarAccountRestoreTaskCalendarArgs } from './calendars.js';
2
2
  import type { FilterAddArgs, FilterUpdateArgs, FilterUpdateOrdersArgs, FilterDeleteArgs } from './filters.js';
3
3
  import type { FolderAddArgs, FolderUpdateArgs, FolderDeleteArgs } from './folders.js';
4
- import type { GoalAddArgs, GoalUpdateArgs, GoalCompleteArgs, GoalUncompleteArgs, GoalDeleteArgs, GoalLinkItemArgs, GoalUnlinkItemArgs } from './goals.js';
5
4
  import type { LabelAddArgs, LabelRenameArgs, LabelUpdateArgs, LabelUpdateOrdersArgs, LabelDeleteArgs, LabelDeleteOccurrencesArgs } from './labels.js';
6
5
  import type { NoteAddArgs, NoteUpdateArgs, NoteDeleteArgs, NoteReactionAddArgs, NoteReactionRemoveArgs } from './notes.js';
7
6
  import type { LiveNotificationsMarkUnreadArgs, LiveNotificationsMarkReadArgs, LiveNotificationsMarkReadAllArgs, LiveNotificationsSetLastReadArgs } from './notifications.js';
@@ -14,7 +13,6 @@ import type { AcceptInvitationArgs, RejectInvitationArgs, BizAcceptInvitationArg
14
13
  import type { TaskAddArgs, TaskUpdateArgs, TaskCompleteArgs, TaskCompleteUndoArgs, TaskMoveArgs, TaskReorderArgs, TaskUncompleteArgs, TaskUpdateDateCompleteArgs, TaskDeleteArgs, TaskUpdateDayOrderArgs } from './tasks.js';
15
14
  import type { ViewOptionsSetArgs, ViewOptionsDeleteArgs } from './view-options.js';
16
15
  import type { WorkspaceFilterAddArgs, WorkspaceFilterUpdateArgs, WorkspaceFilterUpdateOrdersArgs, WorkspaceFilterDeleteArgs } from './workspace-filters.js';
17
- import type { WorkspaceGoalAddArgs, WorkspaceGoalUpdateArgs, WorkspaceGoalDeleteArgs, WorkspaceGoalProjectAddArgs, WorkspaceGoalProjectRemoveArgs } from './workspace-goals.js';
18
16
  import type { WorkspaceAddArgs, WorkspaceUpdateArgs, WorkspaceDeleteArgs, WorkspaceUpdateUserArgs, WorkspaceDeleteUserArgs, WorkspaceLeaveArgs, WorkspaceInviteArgs, WorkspaceSetDefaultOrderArgs, WorkspaceUpdateUserProjectSortPreferenceArgs } from './workspaces.js';
19
17
  /**
20
18
  * Maps each Sync API command type string to its corresponding argument type.
@@ -92,18 +90,6 @@ export type SyncCommandsMap = {
92
90
  workspace_filter_update: WorkspaceFilterUpdateArgs;
93
91
  workspace_filter_update_orders: WorkspaceFilterUpdateOrdersArgs;
94
92
  workspace_filter_delete: WorkspaceFilterDeleteArgs;
95
- workspace_goal_add: WorkspaceGoalAddArgs;
96
- workspace_goal_update: WorkspaceGoalUpdateArgs;
97
- workspace_goal_delete: WorkspaceGoalDeleteArgs;
98
- workspace_goal_project_add: WorkspaceGoalProjectAddArgs;
99
- workspace_goal_project_remove: WorkspaceGoalProjectRemoveArgs;
100
- goal_add: GoalAddArgs;
101
- goal_update: GoalUpdateArgs;
102
- goal_complete: GoalCompleteArgs;
103
- goal_uncomplete: GoalUncompleteArgs;
104
- goal_delete: GoalDeleteArgs;
105
- goal_link_item: GoalLinkItemArgs;
106
- goal_unlink_item: GoalUnlinkItemArgs;
107
93
  live_notifications_mark_unread: LiveNotificationsMarkUnreadArgs;
108
94
  live_notifications_mark_read: LiveNotificationsMarkReadArgs;
109
95
  live_notifications_mark_read_all: LiveNotificationsMarkReadAllArgs;
@@ -170,8 +156,6 @@ export * from './reminders.js';
170
156
  export * from './workspaces.js';
171
157
  export * from './folders.js';
172
158
  export * from './workspace-filters.js';
173
- export * from './workspace-goals.js';
174
- export * from './goals.js';
175
159
  export * from './notifications.js';
176
160
  export * from './sharing.js';
177
161
  export * from './view-options.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * All available Sync API resource types.
3
3
  */
4
- export declare const SYNC_RESOURCE_TYPES: readonly ["labels", "projects", "items", "notes", "project_notes", "sections", "filters", "reminders", "reminders_location", "locations", "user", "live_notifications", "collaborators", "collaborator_states", "user_settings", "notification_settings", "user_plan_limits", "completed_info", "stats", "workspaces", "workspace_users", "workspace_filters", "view_options", "project_view_options_defaults", "role_actions", "folders", "workspace_goals", "goals", "day_orders", "calendars", "calendar_accounts", "suggestions", "tooltips"];
4
+ export declare const SYNC_RESOURCE_TYPES: readonly ["labels", "projects", "items", "notes", "project_notes", "sections", "filters", "reminders", "reminders_location", "locations", "user", "live_notifications", "collaborators", "collaborator_states", "user_settings", "notification_settings", "user_plan_limits", "completed_info", "stats", "workspaces", "workspace_users", "workspace_filters", "view_options", "project_view_options_defaults", "role_actions", "folders", "day_orders", "calendars", "calendar_accounts", "suggestions", "tooltips"];
5
5
  export type SyncResourceType = (typeof SYNC_RESOURCE_TYPES)[number];
@@ -4,7 +4,6 @@ export * from './folders.js';
4
4
  export * from './tooltips.js';
5
5
  export * from './notes.js';
6
6
  export * from './workspace-filters.js';
7
- export * from './workspace-goals.js';
8
7
  export * from './calendars.js';
9
8
  export * from './reminders.js';
10
9
  export * from './completed-info.js';
@@ -32,7 +32,6 @@ export declare const GROUPED_BY_OPTIONS: readonly ["ASSIGNEE", "ADDED_DATE", "DU
32
32
  /** Field to group tasks by. */
33
33
  export type GroupedBy = (typeof GROUPED_BY_OPTIONS)[number];
34
34
  export declare const GroupedBySchema: z.ZodNullable<z.ZodEnum<{
35
- WORKSPACE: "WORKSPACE";
36
35
  PROJECT: "PROJECT";
37
36
  LABEL: "LABEL";
38
37
  ASSIGNEE: "ASSIGNEE";
@@ -40,19 +39,20 @@ export declare const GroupedBySchema: z.ZodNullable<z.ZodEnum<{
40
39
  DUE_DATE: "DUE_DATE";
41
40
  DEADLINE: "DEADLINE";
42
41
  PRIORITY: "PRIORITY";
42
+ WORKSPACE: "WORKSPACE";
43
43
  }>>;
44
44
  /** Available sorting options. */
45
45
  export declare const SORTED_BY_OPTIONS: readonly ["MANUAL", "ALPHABETICALLY", "ASSIGNEE", "DUE_DATE", "DEADLINE", "ADDED_DATE", "PRIORITY", "PROJECT", "WORKSPACE"];
46
46
  /** Field to sort tasks by. */
47
47
  export type SortedBy = (typeof SORTED_BY_OPTIONS)[number];
48
48
  export declare const SortedBySchema: z.ZodNullable<z.ZodEnum<{
49
- WORKSPACE: "WORKSPACE";
50
49
  PROJECT: "PROJECT";
51
50
  ASSIGNEE: "ASSIGNEE";
52
51
  ADDED_DATE: "ADDED_DATE";
53
52
  DUE_DATE: "DUE_DATE";
54
53
  DEADLINE: "DEADLINE";
55
54
  PRIORITY: "PRIORITY";
55
+ WORKSPACE: "WORKSPACE";
56
56
  MANUAL: "MANUAL";
57
57
  ALPHABETICALLY: "ALPHABETICALLY";
58
58
  }>>;
@@ -92,7 +92,6 @@ export declare const ViewOptionsSchema: z.ZodObject<{
92
92
  }>;
93
93
  objectId: z.ZodOptional<z.ZodString>;
94
94
  groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
95
- WORKSPACE: "WORKSPACE";
96
95
  PROJECT: "PROJECT";
97
96
  LABEL: "LABEL";
98
97
  ASSIGNEE: "ASSIGNEE";
@@ -100,6 +99,7 @@ export declare const ViewOptionsSchema: z.ZodObject<{
100
99
  DUE_DATE: "DUE_DATE";
101
100
  DEADLINE: "DEADLINE";
102
101
  PRIORITY: "PRIORITY";
102
+ WORKSPACE: "WORKSPACE";
103
103
  }>>>;
104
104
  filteredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
105
  viewMode: z.ZodOptional<z.ZodEnum<{
@@ -109,13 +109,13 @@ export declare const ViewOptionsSchema: z.ZodObject<{
109
109
  }>>;
110
110
  showCompletedTasks: z.ZodOptional<z.ZodBoolean>;
111
111
  sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
112
- WORKSPACE: "WORKSPACE";
113
112
  PROJECT: "PROJECT";
114
113
  ASSIGNEE: "ASSIGNEE";
115
114
  ADDED_DATE: "ADDED_DATE";
116
115
  DUE_DATE: "DUE_DATE";
117
116
  DEADLINE: "DEADLINE";
118
117
  PRIORITY: "PRIORITY";
118
+ WORKSPACE: "WORKSPACE";
119
119
  MANUAL: "MANUAL";
120
120
  ALPHABETICALLY: "ALPHABETICALLY";
121
121
  }>>>;
@@ -133,7 +133,6 @@ export declare const ProjectViewOptionsDefaultsSchema: z.ZodObject<{
133
133
  CALENDAR: "CALENDAR";
134
134
  }>>>;
135
135
  groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
136
- WORKSPACE: "WORKSPACE";
137
136
  PROJECT: "PROJECT";
138
137
  LABEL: "LABEL";
139
138
  ASSIGNEE: "ASSIGNEE";
@@ -141,15 +140,16 @@ export declare const ProjectViewOptionsDefaultsSchema: z.ZodObject<{
141
140
  DUE_DATE: "DUE_DATE";
142
141
  DEADLINE: "DEADLINE";
143
142
  PRIORITY: "PRIORITY";
143
+ WORKSPACE: "WORKSPACE";
144
144
  }>>>;
145
145
  sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
146
- WORKSPACE: "WORKSPACE";
147
146
  PROJECT: "PROJECT";
148
147
  ASSIGNEE: "ASSIGNEE";
149
148
  ADDED_DATE: "ADDED_DATE";
150
149
  DUE_DATE: "DUE_DATE";
151
150
  DEADLINE: "DEADLINE";
152
151
  PRIORITY: "PRIORITY";
152
+ WORKSPACE: "WORKSPACE";
153
153
  MANUAL: "MANUAL";
154
154
  ALPHABETICALLY: "ALPHABETICALLY";
155
155
  }>>>;
@@ -753,7 +753,6 @@ export declare const SyncResponseSchema: z.ZodObject<{
753
753
  }>;
754
754
  objectId: z.ZodOptional<z.ZodString>;
755
755
  groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
756
- WORKSPACE: "WORKSPACE";
757
756
  PROJECT: "PROJECT";
758
757
  LABEL: "LABEL";
759
758
  ASSIGNEE: "ASSIGNEE";
@@ -761,6 +760,7 @@ export declare const SyncResponseSchema: z.ZodObject<{
761
760
  DUE_DATE: "DUE_DATE";
762
761
  DEADLINE: "DEADLINE";
763
762
  PRIORITY: "PRIORITY";
763
+ WORKSPACE: "WORKSPACE";
764
764
  }>>>;
765
765
  filteredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
766
766
  viewMode: z.ZodOptional<z.ZodEnum<{
@@ -770,13 +770,13 @@ export declare const SyncResponseSchema: z.ZodObject<{
770
770
  }>>;
771
771
  showCompletedTasks: z.ZodOptional<z.ZodBoolean>;
772
772
  sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
773
- WORKSPACE: "WORKSPACE";
774
773
  PROJECT: "PROJECT";
775
774
  ASSIGNEE: "ASSIGNEE";
776
775
  ADDED_DATE: "ADDED_DATE";
777
776
  DUE_DATE: "DUE_DATE";
778
777
  DEADLINE: "DEADLINE";
779
778
  PRIORITY: "PRIORITY";
779
+ WORKSPACE: "WORKSPACE";
780
780
  MANUAL: "MANUAL";
781
781
  ALPHABETICALLY: "ALPHABETICALLY";
782
782
  }>>>;
@@ -793,7 +793,6 @@ export declare const SyncResponseSchema: z.ZodObject<{
793
793
  CALENDAR: "CALENDAR";
794
794
  }>>>;
795
795
  groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
796
- WORKSPACE: "WORKSPACE";
797
796
  PROJECT: "PROJECT";
798
797
  LABEL: "LABEL";
799
798
  ASSIGNEE: "ASSIGNEE";
@@ -801,15 +800,16 @@ export declare const SyncResponseSchema: z.ZodObject<{
801
800
  DUE_DATE: "DUE_DATE";
802
801
  DEADLINE: "DEADLINE";
803
802
  PRIORITY: "PRIORITY";
803
+ WORKSPACE: "WORKSPACE";
804
804
  }>>>;
805
805
  sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
806
- WORKSPACE: "WORKSPACE";
807
806
  PROJECT: "PROJECT";
808
807
  ASSIGNEE: "ASSIGNEE";
809
808
  ADDED_DATE: "ADDED_DATE";
810
809
  DUE_DATE: "DUE_DATE";
811
810
  DEADLINE: "DEADLINE";
812
811
  PRIORITY: "PRIORITY";
812
+ WORKSPACE: "WORKSPACE";
813
813
  MANUAL: "MANUAL";
814
814
  ALPHABETICALLY: "ALPHABETICALLY";
815
815
  }>>>;
@@ -835,47 +835,6 @@ export declare const SyncResponseSchema: z.ZodObject<{
835
835
  defaultOrder: z.ZodNumber;
836
836
  childOrder: z.ZodNumber;
837
837
  }, z.core.$loose>>>;
838
- goals: z.ZodOptional<z.ZodArray<z.ZodObject<{
839
- id: z.ZodString;
840
- ownerType: z.ZodEnum<{
841
- USER: "USER";
842
- WORKSPACE: "WORKSPACE";
843
- }>;
844
- ownerId: z.ZodString;
845
- name: z.ZodString;
846
- description: z.ZodNullable<z.ZodString>;
847
- deadline: z.ZodNullable<z.ZodString>;
848
- parentGoalId: z.ZodNullable<z.ZodString>;
849
- childOrder: z.ZodNumber;
850
- isCompleted: z.ZodBoolean;
851
- completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
852
- responsibleUid: z.ZodNullable<z.ZodString>;
853
- isDeleted: z.ZodBoolean;
854
- progress: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
855
- totalTaskCount: z.ZodNumber;
856
- completedTaskCount: z.ZodNumber;
857
- percentage: z.ZodNumber;
858
- }, z.core.$loose>>>;
859
- creatorUid: z.ZodString;
860
- createdAt: z.ZodCoercedDate<unknown>;
861
- updatedAt: z.ZodCoercedDate<unknown>;
862
- }, z.core.$loose>>>;
863
- workspaceGoals: z.ZodOptional<z.ZodArray<z.ZodObject<{
864
- id: z.ZodString;
865
- workspaceId: z.ZodString;
866
- title: z.ZodString;
867
- description: z.ZodNullable<z.ZodString>;
868
- deadline: z.ZodNullable<z.ZodString>;
869
- isDeleted: z.ZodBoolean;
870
- projectIds: z.ZodArray<z.ZodString>;
871
- progress: z.ZodNullable<z.ZodObject<{
872
- completedItems: z.ZodNumber;
873
- totalItems: z.ZodNumber;
874
- }, z.core.$loose>>;
875
- creatorUid: z.ZodString;
876
- createdAt: z.ZodCoercedDate<unknown>;
877
- updatedAt: z.ZodCoercedDate<unknown>;
878
- }, z.core.$loose>>>;
879
838
  dayOrders: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
880
839
  calendars: z.ZodOptional<z.ZodArray<z.ZodObject<{
881
840
  id: z.ZodString;
@@ -36,7 +36,6 @@ export type GetTasksArgs = {
36
36
  parentId?: string;
37
37
  label?: string;
38
38
  ids?: string[];
39
- goalId?: string;
40
39
  cursor?: string | null;
41
40
  limit?: number;
42
41
  };