@doist/todoist-sdk 10.5.0 → 11.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 (60) 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/transport-seam.js +17 -0
  4. package/dist/cjs/test-utils/webhook-fixtures.js +1 -1
  5. package/dist/cjs/todoist-api.js +0 -101
  6. package/dist/cjs/transport/fetch-with-retry.js +19 -7
  7. package/dist/cjs/transport/http-dispatcher.js +60 -15
  8. package/dist/cjs/types/index.js +0 -1
  9. package/dist/cjs/types/sync/commands/index.js +0 -2
  10. package/dist/cjs/types/sync/resource-types.js +0 -2
  11. package/dist/cjs/types/sync/resources/index.js +0 -1
  12. package/dist/cjs/types/sync/response.js +10 -13
  13. package/dist/cjs/utils/validators.js +50 -54
  14. package/dist/esm/consts/endpoints.js +0 -5
  15. package/dist/esm/test-utils/test-defaults.js +0 -24
  16. package/dist/esm/test-utils/transport-seam.js +15 -0
  17. package/dist/esm/test-utils/webhook-fixtures.js +1 -1
  18. package/dist/esm/todoist-api.js +0 -101
  19. package/dist/esm/transport/fetch-with-retry.js +20 -8
  20. package/dist/esm/transport/http-dispatcher.js +58 -15
  21. package/dist/esm/types/index.js +0 -1
  22. package/dist/esm/types/sync/commands/index.js +0 -2
  23. package/dist/esm/types/sync/resource-types.js +0 -2
  24. package/dist/esm/types/sync/resources/index.js +0 -1
  25. package/dist/esm/types/sync/response.js +1 -4
  26. package/dist/esm/utils/validators.js +1 -4
  27. package/dist/types/consts/endpoints.d.ts +0 -5
  28. package/dist/types/test-utils/test-defaults.d.ts +1 -4
  29. package/dist/types/todoist-api.d.ts +0 -80
  30. package/dist/types/transport/http-dispatcher.d.ts +36 -0
  31. package/dist/types/types/index.d.ts +0 -1
  32. package/dist/types/types/sync/commands/index.d.ts +0 -16
  33. package/dist/types/types/sync/resource-types.d.ts +1 -1
  34. package/dist/types/types/sync/resources/index.d.ts +0 -1
  35. package/dist/types/types/sync/resources/view-options.d.ts +6 -6
  36. package/dist/types/types/sync/response.d.ts +4 -45
  37. package/dist/types/types/tasks/requests.d.ts +0 -1
  38. package/dist/types/utils/validators.d.ts +8 -90
  39. package/package.json +1 -1
  40. package/dist/cjs/clients/goals-client.js +0 -144
  41. package/dist/cjs/types/goals/index.js +0 -18
  42. package/dist/cjs/types/goals/requests.js +0 -2
  43. package/dist/cjs/types/goals/types.js +0 -56
  44. package/dist/cjs/types/sync/commands/goals.js +0 -2
  45. package/dist/cjs/types/sync/commands/workspace-goals.js +0 -2
  46. package/dist/cjs/types/sync/resources/workspace-goals.js +0 -26
  47. package/dist/esm/clients/goals-client.js +0 -140
  48. package/dist/esm/types/goals/index.js +0 -2
  49. package/dist/esm/types/goals/types.js +0 -53
  50. package/dist/esm/types/sync/commands/goals.js +0 -1
  51. package/dist/esm/types/sync/commands/workspace-goals.js +0 -1
  52. package/dist/esm/types/sync/resources/workspace-goals.js +0 -23
  53. package/dist/types/clients/goals-client.d.ts +0 -20
  54. package/dist/types/types/goals/index.d.ts +0 -2
  55. package/dist/types/types/goals/requests.d.ts +0 -33
  56. package/dist/types/types/goals/types.d.ts +0 -51
  57. package/dist/types/types/sync/commands/goals.d.ts +0 -33
  58. package/dist/types/types/sync/commands/workspace-goals.d.ts +0 -24
  59. package/dist/types/types/sync/resources/workspace-goals.d.ts +0 -29
  60. /package/dist/{esm/types/goals/requests.js → types/test-utils/transport-seam.d.ts} +0 -0
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
2
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.validateFolder = exports.validateCollaboratorStateArray = exports.validateCollaboratorState = exports.validateCollaboratorArray = exports.validateCollaborator = exports.validateFilterArray = exports.validateFilter = exports.validateMovedIdArray = exports.validateMovedId = exports.validateIdMappingArray = exports.validateIdMapping = exports.validateBackupArray = exports.validateBackup = exports.validateWorkspaceInsights = exports.validateProjectProgress = exports.validateProjectHealthContext = exports.validateProjectHealth = exports.validateProjectActivityStats = exports.validateWorkspaceUserTaskArray = exports.validateWorkspaceUserTask = exports.validateMemberActivityInfoArray = exports.validateMemberActivityInfo = exports.validateWorkspaceArray = exports.validateWorkspace = exports.validateJoinWorkspaceResult = exports.validateWorkspacePlanDetails = exports.validateWorkspaceInvitationArray = exports.validateWorkspaceInvitation = exports.validateWorkspaceUserArray = exports.validateWorkspaceUser = exports.validateAttachment = exports.validateActivityEventArray = exports.validateActivityEvent = exports.validateCurrentUser = exports.validateProductivityStats = exports.validateUserArray = exports.validateUser = exports.validateCommentArray = exports.validateComment = exports.validateLabelArray = exports.validateLabel = exports.validateSectionArray = exports.validateSection = exports.validateWorkspaceProjectArray = exports.validateWorkspaceProject = exports.validateProjectArray = exports.validateProject = exports.validateTaskArray = exports.validateTask = exports.IdSchema = void 0;
5
- exports.validateUserAuthorizationArray = exports.validateUserAuthorization = exports.validateAppInstallationArray = exports.validateAppInstallation = exports.validateAppWebhook = exports.validateAppByDistributionToken = exports.validateAppDistributionToken = exports.validateAppTestToken = exports.validateAppVerificationToken = exports.validateAppSecrets = exports.validateAppWithUserCount = exports.validateAppArray = exports.validateApp = exports.validateSuggestionArray = exports.validateSuggestion = exports.validateUserSettings = exports.validateSyncUser = exports.validateSyncWorkspaceArray = exports.validateSyncWorkspace = exports.validateLiveNotificationArray = exports.validateLiveNotification = exports.validateUserPlanLimits = exports.validateProjectViewOptionsDefaultsArray = exports.validateProjectViewOptionsDefaults = exports.validateViewOptionsArray = exports.validateViewOptions = exports.validateCompletedInfoArray = exports.validateCompletedInfo = exports.validateLocationReminderArray = exports.validateLocationReminder = exports.validateReminderArray = exports.validateReminder = exports.validateCalendarAccountArray = exports.validateCalendarAccount = exports.validateCalendarArray = exports.validateCalendar = exports.validateWorkspaceGoalArray = exports.validateWorkspaceGoal = exports.validateWorkspaceFilterArray = exports.validateWorkspaceFilter = exports.validateTooltips = exports.validateNoteArray = exports.validateNote = exports.validatePricing = exports.validatePrices = exports.validateProPlanDetails = exports.validateSubscriptionInfo = exports.validateGoalArray = exports.validateGoal = exports.validateFolderArray = void 0;
6
- exports.validateUiExtensionArray = exports.validateUiExtension = void 0;
5
+ exports.validateUiExtensionArray = exports.validateUiExtension = exports.validateUserAuthorizationArray = exports.validateUserAuthorization = exports.validateAppInstallationArray = exports.validateAppInstallation = exports.validateAppWebhook = exports.validateAppByDistributionToken = exports.validateAppDistributionToken = exports.validateAppTestToken = exports.validateAppVerificationToken = exports.validateAppSecrets = exports.validateAppWithUserCount = exports.validateAppArray = exports.validateApp = exports.validateSuggestionArray = exports.validateSuggestion = exports.validateUserSettings = exports.validateSyncUser = exports.validateSyncWorkspaceArray = exports.validateSyncWorkspace = exports.validateLiveNotificationArray = exports.validateLiveNotification = exports.validateUserPlanLimits = exports.validateProjectViewOptionsDefaultsArray = exports.validateProjectViewOptionsDefaults = exports.validateViewOptionsArray = exports.validateViewOptions = exports.validateCompletedInfoArray = exports.validateCompletedInfo = exports.validateLocationReminderArray = exports.validateLocationReminder = exports.validateReminderArray = exports.validateReminder = exports.validateCalendarAccountArray = exports.validateCalendarAccount = exports.validateCalendarArray = exports.validateCalendar = exports.validateWorkspaceFilterArray = exports.validateWorkspaceFilter = exports.validateTooltips = exports.validateNoteArray = exports.validateNote = exports.validatePricing = exports.validatePrices = exports.validateProPlanDetails = exports.validateSubscriptionInfo = exports.validateFolderArray = void 0;
7
6
  exports.parseSyncResponse = parseSyncResponse;
8
7
  const zod_1 = require("zod");
9
8
  const types_1 = require("../types/activity/types");
@@ -11,18 +10,17 @@ const types_2 = require("../types/apps/types");
11
10
  const types_3 = require("../types/backups/types");
12
11
  const types_4 = require("../types/billing/types");
13
12
  const types_5 = require("../types/comments/types");
14
- const types_6 = require("../types/goals/types");
15
- const types_7 = require("../types/id-mappings/types");
16
- const types_8 = require("../types/insights/types");
17
- const types_9 = require("../types/labels/types");
18
- const types_10 = require("../types/productivity/types");
19
- const types_11 = require("../types/projects/types");
20
- const types_12 = require("../types/sections/types");
13
+ const types_6 = require("../types/id-mappings/types");
14
+ const types_7 = require("../types/insights/types");
15
+ const types_8 = require("../types/labels/types");
16
+ const types_9 = require("../types/productivity/types");
17
+ const types_10 = require("../types/projects/types");
18
+ const types_11 = require("../types/sections/types");
21
19
  const response_1 = require("../types/sync/response");
22
- const types_13 = require("../types/tasks/types");
23
- const types_14 = require("../types/ui-extensions/types");
24
- const types_15 = require("../types/users/types");
25
- const types_16 = require("../types/workspaces/types");
20
+ const types_12 = require("../types/tasks/types");
21
+ const types_13 = require("../types/ui-extensions/types");
22
+ const types_14 = require("../types/users/types");
23
+ const types_15 = require("../types/workspaces/types");
26
24
  const resources_1 = require("../types/sync/resources");
27
25
  function createValidator(schema) {
28
26
  return {
@@ -36,70 +34,68 @@ exports.IdSchema = zod_1.z
36
34
  .min(1)
37
35
  .refine((id) => !id.startsWith('tmp-'), { message: TMP_ID_MESSAGE });
38
36
  // Entity validators
39
- _a = createValidator(types_13.TaskSchema), exports.validateTask = _a.validate, exports.validateTaskArray = _a.validateArray;
37
+ _a = createValidator(types_12.TaskSchema), exports.validateTask = _a.validate, exports.validateTaskArray = _a.validateArray;
40
38
  /**
41
39
  * Validates and parses a project input.
42
40
  * @param input The input to validate
43
41
  * @returns A validated project (either PersonalProject or WorkspaceProject)
44
42
  */
45
- _b = createValidator(types_11.ProjectSchema), exports.validateProject = _b.validate, exports.validateProjectArray = _b.validateArray;
46
- _c = createValidator(types_11.WorkspaceProjectSchema), exports.validateWorkspaceProject = _c.validate, exports.validateWorkspaceProjectArray = _c.validateArray;
47
- _d = createValidator(types_12.SectionSchema), exports.validateSection = _d.validate, exports.validateSectionArray = _d.validateArray;
48
- _e = createValidator(types_9.LabelSchema), exports.validateLabel = _e.validate, exports.validateLabelArray = _e.validateArray;
43
+ _b = createValidator(types_10.ProjectSchema), exports.validateProject = _b.validate, exports.validateProjectArray = _b.validateArray;
44
+ _c = createValidator(types_10.WorkspaceProjectSchema), exports.validateWorkspaceProject = _c.validate, exports.validateWorkspaceProjectArray = _c.validateArray;
45
+ _d = createValidator(types_11.SectionSchema), exports.validateSection = _d.validate, exports.validateSectionArray = _d.validateArray;
46
+ _e = createValidator(types_8.LabelSchema), exports.validateLabel = _e.validate, exports.validateLabelArray = _e.validateArray;
49
47
  _f = createValidator(types_5.CommentSchema), exports.validateComment = _f.validate, exports.validateCommentArray = _f.validateArray;
50
- _g = createValidator(types_15.UserSchema), exports.validateUser = _g.validate, exports.validateUserArray = _g.validateArray;
51
- exports.validateProductivityStats = createValidator(types_10.ProductivityStatsSchema).validate;
52
- exports.validateCurrentUser = createValidator(types_15.CurrentUserSchema).validate;
48
+ _g = createValidator(types_14.UserSchema), exports.validateUser = _g.validate, exports.validateUserArray = _g.validateArray;
49
+ exports.validateProductivityStats = createValidator(types_9.ProductivityStatsSchema).validate;
50
+ exports.validateCurrentUser = createValidator(types_14.CurrentUserSchema).validate;
53
51
  _h = createValidator(types_1.ActivityEventSchema), exports.validateActivityEvent = _h.validate, exports.validateActivityEventArray = _h.validateArray;
54
52
  exports.validateAttachment = createValidator(types_5.AttachmentSchema).validate;
55
- _j = createValidator(types_16.WorkspaceUserSchema), exports.validateWorkspaceUser = _j.validate, exports.validateWorkspaceUserArray = _j.validateArray;
56
- _k = createValidator(types_16.WorkspaceInvitationSchema), exports.validateWorkspaceInvitation = _k.validate, exports.validateWorkspaceInvitationArray = _k.validateArray;
57
- exports.validateWorkspacePlanDetails = createValidator(types_16.WorkspacePlanDetailsSchema).validate;
58
- exports.validateJoinWorkspaceResult = createValidator(types_16.JoinWorkspaceResultSchema).validate;
59
- _l = createValidator(types_16.WorkspaceSchema), exports.validateWorkspace = _l.validate, exports.validateWorkspaceArray = _l.validateArray;
60
- _m = createValidator(types_16.MemberActivityInfoSchema), exports.validateMemberActivityInfo = _m.validate, exports.validateMemberActivityInfoArray = _m.validateArray;
61
- _o = createValidator(types_16.WorkspaceUserTaskSchema), exports.validateWorkspaceUserTask = _o.validate, exports.validateWorkspaceUserTaskArray = _o.validateArray;
62
- exports.validateProjectActivityStats = createValidator(types_8.ProjectActivityStatsSchema).validate;
63
- exports.validateProjectHealth = createValidator(types_8.ProjectHealthSchema).validate;
64
- exports.validateProjectHealthContext = createValidator(types_8.ProjectHealthContextSchema).validate;
65
- exports.validateProjectProgress = createValidator(types_8.ProjectProgressSchema).validate;
66
- exports.validateWorkspaceInsights = createValidator(types_8.WorkspaceInsightsSchema).validate;
53
+ _j = createValidator(types_15.WorkspaceUserSchema), exports.validateWorkspaceUser = _j.validate, exports.validateWorkspaceUserArray = _j.validateArray;
54
+ _k = createValidator(types_15.WorkspaceInvitationSchema), exports.validateWorkspaceInvitation = _k.validate, exports.validateWorkspaceInvitationArray = _k.validateArray;
55
+ exports.validateWorkspacePlanDetails = createValidator(types_15.WorkspacePlanDetailsSchema).validate;
56
+ exports.validateJoinWorkspaceResult = createValidator(types_15.JoinWorkspaceResultSchema).validate;
57
+ _l = createValidator(types_15.WorkspaceSchema), exports.validateWorkspace = _l.validate, exports.validateWorkspaceArray = _l.validateArray;
58
+ _m = createValidator(types_15.MemberActivityInfoSchema), exports.validateMemberActivityInfo = _m.validate, exports.validateMemberActivityInfoArray = _m.validateArray;
59
+ _o = createValidator(types_15.WorkspaceUserTaskSchema), exports.validateWorkspaceUserTask = _o.validate, exports.validateWorkspaceUserTaskArray = _o.validateArray;
60
+ exports.validateProjectActivityStats = createValidator(types_7.ProjectActivityStatsSchema).validate;
61
+ exports.validateProjectHealth = createValidator(types_7.ProjectHealthSchema).validate;
62
+ exports.validateProjectHealthContext = createValidator(types_7.ProjectHealthContextSchema).validate;
63
+ exports.validateProjectProgress = createValidator(types_7.ProjectProgressSchema).validate;
64
+ exports.validateWorkspaceInsights = createValidator(types_7.WorkspaceInsightsSchema).validate;
67
65
  _p = createValidator(types_3.BackupSchema), exports.validateBackup = _p.validate, exports.validateBackupArray = _p.validateArray;
68
- _q = createValidator(types_7.IdMappingSchema), exports.validateIdMapping = _q.validate, exports.validateIdMappingArray = _q.validateArray;
69
- _r = createValidator(types_7.MovedIdSchema), exports.validateMovedId = _r.validate, exports.validateMovedIdArray = _r.validateArray;
66
+ _q = createValidator(types_6.IdMappingSchema), exports.validateIdMapping = _q.validate, exports.validateIdMappingArray = _q.validateArray;
67
+ _r = createValidator(types_6.MovedIdSchema), exports.validateMovedId = _r.validate, exports.validateMovedIdArray = _r.validateArray;
70
68
  // Sync resource validators
71
69
  _s = createValidator(resources_1.FilterSchema), exports.validateFilter = _s.validate, exports.validateFilterArray = _s.validateArray;
72
70
  _t = createValidator(resources_1.CollaboratorSchema), exports.validateCollaborator = _t.validate, exports.validateCollaboratorArray = _t.validateArray;
73
71
  _u = createValidator(resources_1.CollaboratorStateSchema), exports.validateCollaboratorState = _u.validate, exports.validateCollaboratorStateArray = _u.validateArray;
74
72
  _v = createValidator(resources_1.FolderSchema), exports.validateFolder = _v.validate, exports.validateFolderArray = _v.validateArray;
75
- _w = createValidator(types_6.GoalSchema), exports.validateGoal = _w.validate, exports.validateGoalArray = _w.validateArray;
76
73
  // Billing validators
77
74
  exports.validateSubscriptionInfo = createValidator(types_4.SubscriptionInfoSchema).validate;
78
75
  exports.validateProPlanDetails = createValidator(types_4.ProPlanDetailsSchema).validate;
79
76
  exports.validatePrices = createValidator(types_4.PricesResponseSchema).validate;
80
77
  exports.validatePricing = createValidator(types_4.PricingResponseSchema).validate;
81
- _x = createValidator(resources_1.NoteSchema), exports.validateNote = _x.validate, exports.validateNoteArray = _x.validateArray;
78
+ _w = createValidator(resources_1.NoteSchema), exports.validateNote = _w.validate, exports.validateNoteArray = _w.validateArray;
82
79
  exports.validateTooltips = createValidator(resources_1.TooltipsSchema).validate;
83
- _y = createValidator(resources_1.WorkspaceFilterSchema), exports.validateWorkspaceFilter = _y.validate, exports.validateWorkspaceFilterArray = _y.validateArray;
84
- _z = createValidator(resources_1.WorkspaceGoalSchema), exports.validateWorkspaceGoal = _z.validate, exports.validateWorkspaceGoalArray = _z.validateArray;
85
- _0 = createValidator(resources_1.CalendarSchema), exports.validateCalendar = _0.validate, exports.validateCalendarArray = _0.validateArray;
86
- _1 = createValidator(resources_1.CalendarAccountSchema), exports.validateCalendarAccount = _1.validate, exports.validateCalendarAccountArray = _1.validateArray;
87
- _2 = createValidator(resources_1.ReminderSchema), exports.validateReminder = _2.validate, exports.validateReminderArray = _2.validateArray;
88
- _3 = createValidator(resources_1.LocationReminderSchema), exports.validateLocationReminder = _3.validate, exports.validateLocationReminderArray = _3.validateArray;
89
- _4 = createValidator(resources_1.CompletedInfoSchema), exports.validateCompletedInfo = _4.validate, exports.validateCompletedInfoArray = _4.validateArray;
90
- _5 = createValidator(resources_1.ViewOptionsSchema), exports.validateViewOptions = _5.validate, exports.validateViewOptionsArray = _5.validateArray;
91
- _6 = createValidator(resources_1.ProjectViewOptionsDefaultsSchema), exports.validateProjectViewOptionsDefaults = _6.validate, exports.validateProjectViewOptionsDefaultsArray = _6.validateArray;
80
+ _x = createValidator(resources_1.WorkspaceFilterSchema), exports.validateWorkspaceFilter = _x.validate, exports.validateWorkspaceFilterArray = _x.validateArray;
81
+ _y = createValidator(resources_1.CalendarSchema), exports.validateCalendar = _y.validate, exports.validateCalendarArray = _y.validateArray;
82
+ _z = createValidator(resources_1.CalendarAccountSchema), exports.validateCalendarAccount = _z.validate, exports.validateCalendarAccountArray = _z.validateArray;
83
+ _0 = createValidator(resources_1.ReminderSchema), exports.validateReminder = _0.validate, exports.validateReminderArray = _0.validateArray;
84
+ _1 = createValidator(resources_1.LocationReminderSchema), exports.validateLocationReminder = _1.validate, exports.validateLocationReminderArray = _1.validateArray;
85
+ _2 = createValidator(resources_1.CompletedInfoSchema), exports.validateCompletedInfo = _2.validate, exports.validateCompletedInfoArray = _2.validateArray;
86
+ _3 = createValidator(resources_1.ViewOptionsSchema), exports.validateViewOptions = _3.validate, exports.validateViewOptionsArray = _3.validateArray;
87
+ _4 = createValidator(resources_1.ProjectViewOptionsDefaultsSchema), exports.validateProjectViewOptionsDefaults = _4.validate, exports.validateProjectViewOptionsDefaultsArray = _4.validateArray;
92
88
  exports.validateUserPlanLimits = createValidator(resources_1.UserPlanLimitsSchema).validate;
93
- _7 = createValidator(resources_1.LiveNotificationSchema), exports.validateLiveNotification = _7.validate, exports.validateLiveNotificationArray = _7.validateArray;
94
- _8 = createValidator(resources_1.SyncWorkspaceSchema), exports.validateSyncWorkspace = _8.validate, exports.validateSyncWorkspaceArray = _8.validateArray;
89
+ _5 = createValidator(resources_1.LiveNotificationSchema), exports.validateLiveNotification = _5.validate, exports.validateLiveNotificationArray = _5.validateArray;
90
+ _6 = createValidator(resources_1.SyncWorkspaceSchema), exports.validateSyncWorkspace = _6.validate, exports.validateSyncWorkspaceArray = _6.validateArray;
95
91
  exports.validateSyncUser = createValidator(resources_1.SyncUserSchema).validate;
96
92
  exports.validateUserSettings = createValidator(resources_1.UserSettingsSchema).validate;
97
- _9 = createValidator(resources_1.SuggestionSchema), exports.validateSuggestion = _9.validate, exports.validateSuggestionArray = _9.validateArray;
93
+ _7 = createValidator(resources_1.SuggestionSchema), exports.validateSuggestion = _7.validate, exports.validateSuggestionArray = _7.validateArray;
98
94
  function parseSyncResponse(raw) {
99
95
  return response_1.SyncResponseSchema.parse(raw);
100
96
  }
101
97
  // App management validators
102
- _10 = createValidator(types_2.AppSchema), exports.validateApp = _10.validate, exports.validateAppArray = _10.validateArray;
98
+ _8 = createValidator(types_2.AppSchema), exports.validateApp = _8.validate, exports.validateAppArray = _8.validateArray;
103
99
  exports.validateAppWithUserCount = createValidator(types_2.AppWithUserCountSchema).validate;
104
100
  exports.validateAppSecrets = createValidator(types_2.AppSecretsSchema).validate;
105
101
  exports.validateAppVerificationToken = createValidator(types_2.AppVerificationTokenSchema).validate;
@@ -107,6 +103,6 @@ exports.validateAppTestToken = createValidator(types_2.AppTestTokenSchema).valid
107
103
  exports.validateAppDistributionToken = createValidator(types_2.AppDistributionTokenSchema).validate;
108
104
  exports.validateAppByDistributionToken = createValidator(types_2.AppByDistributionTokenSchema).validate;
109
105
  exports.validateAppWebhook = createValidator(types_2.AppWebhookSchema).validate;
110
- _11 = createValidator(types_2.AppInstallationSchema), exports.validateAppInstallation = _11.validate, exports.validateAppInstallationArray = _11.validateArray;
111
- _12 = createValidator(types_2.UserAuthorizationSchema), exports.validateUserAuthorization = _12.validate, exports.validateUserAuthorizationArray = _12.validateArray;
112
- _13 = createValidator(types_14.UiExtensionSchema), exports.validateUiExtension = _13.validate, exports.validateUiExtensionArray = _13.validateArray;
106
+ _9 = createValidator(types_2.AppInstallationSchema), exports.validateAppInstallation = _9.validate, exports.validateAppInstallationArray = _9.validateArray;
107
+ _10 = createValidator(types_2.UserAuthorizationSchema), exports.validateUserAuthorization = _10.validate, exports.validateUserAuthorizationArray = _10.validateArray;
108
+ _11 = createValidator(types_13.UiExtensionSchema), exports.validateUiExtension = _11.validate, exports.validateUiExtensionArray = _11.validateArray;
@@ -70,11 +70,6 @@ export const ENDPOINT_GET_TOKEN = 'access_token';
70
70
  export const ENDPOINT_REVOKE = 'revoke';
71
71
  export const ENDPOINT_REGISTER = 'register';
72
72
  export const ENDPOINT_REST_FOLDERS = 'folders';
73
- export const ENDPOINT_REST_GOALS = 'goals';
74
- export const ENDPOINT_REST_GOALS_SEARCH = ENDPOINT_REST_GOALS + '/search';
75
- export const GOAL_COMPLETE = 'complete';
76
- export const GOAL_UNCOMPLETE = 'uncomplete';
77
- export const GOAL_TASKS = 'items';
78
73
  // Workspace endpoints
79
74
  export const ENDPOINT_REST_WORKSPACES = 'workspaces';
80
75
  export const ENDPOINT_WORKSPACE_INVITATIONS = 'workspaces/invitations';
@@ -278,30 +278,6 @@ export const DEFAULT_COLLABORATOR_STATE = {
278
278
  state: 'active',
279
279
  isDeleted: false,
280
280
  };
281
- export const DEFAULT_GOAL_ID = '550e8400-e29b-41d4-a716-446655440000';
282
- export const DEFAULT_GOAL = {
283
- id: DEFAULT_GOAL_ID,
284
- ownerType: 'USER',
285
- ownerId: DEFAULT_USER_ID,
286
- name: 'Ship v2',
287
- description: 'Launch the new version',
288
- deadline: '2026-04-03',
289
- parentGoalId: null,
290
- childOrder: 0,
291
- isCompleted: false,
292
- completedAt: null,
293
- responsibleUid: null,
294
- isDeleted: false,
295
- progress: {
296
- totalTaskCount: 5,
297
- completedTaskCount: 2,
298
- percentage: 40,
299
- },
300
- creatorUid: DEFAULT_USER_ID,
301
- createdAt: defaultDate(),
302
- updatedAt: defaultDate(),
303
- };
304
- export const DEFAULT_GOAL_NO_PROGRESS = Object.assign(Object.assign({}, DEFAULT_GOAL), { id: 'e5f6g7h8-e29b-41d4-a716-446655440001', progress: undefined });
305
281
  export const DEFAULT_APP_ID = '42';
306
282
  export const DEFAULT_INSTALLATION_ID = '1001';
307
283
  export const DEFAULT_UI_EXTENSION_ID = '2002';
@@ -0,0 +1,15 @@
1
+ import { vi } from 'vitest';
2
+ // In production the transport uses undici's own `fetch` (paired with the
3
+ // dispatcher) so the request client and dispatcher stay on one undici version.
4
+ // MSW intercepts the *global* `fetch`, not that separate undici instance, so
5
+ // force the transport onto the global `fetch` for every test in the suite; MSW
6
+ // then intercepts requests as usual. The real undici transport is covered
7
+ // directly by `http-dispatcher.test.ts` and `fetch-with-retry.test.ts`, which
8
+ // opt out of this seam with `vi.unmock('./http-dispatcher')`.
9
+ //
10
+ // This lives in its own setup file (not `msw-setup.ts`) because a hoisted
11
+ // `vi.mock` in a module that also re-exports values corrupts those exports.
12
+ vi.mock('../transport/http-dispatcher', async (importOriginal) => {
13
+ const actual = await importOriginal();
14
+ return Object.assign(Object.assign({}, actual), { getDefaultTransport: vi.fn(async () => undefined) });
15
+ });
@@ -8,7 +8,7 @@ export function sign(body, secret = CLIENT_SECRET) {
8
8
  * Snake_case task payload matching the v1 webhook wire shape.
9
9
  */
10
10
  export function rawTask(overrides = {}) {
11
- return Object.assign({ id: '6XR4GqQQCW6Gv9h4', user_id: '2671355', project_id: '6XR4H993xv8H5qCR', section_id: null, parent_id: null, added_by_uid: '2671355', assigned_by_uid: null, responsible_uid: null, labels: [], deadline: null, duration: null, is_collapsed: false, checked: false, is_deleted: false, added_at: '2025-02-10T10:33:38.000000Z', completed_at: null, completed_by_uid: null, updated_at: '2025-02-10T10:33:38.000000Z', due: null, priority: 1, child_order: 3, content: 'Buy Milk', description: '', note_count: 0, day_order: -1, goal_ids: [], url: 'https://app.todoist.com/app/task/6XR4GqQQCW6Gv9h4' }, overrides);
11
+ return Object.assign({ id: '6XR4GqQQCW6Gv9h4', user_id: '2671355', project_id: '6XR4H993xv8H5qCR', section_id: null, parent_id: null, added_by_uid: '2671355', assigned_by_uid: null, responsible_uid: null, labels: [], deadline: null, duration: null, is_collapsed: false, checked: false, is_deleted: false, added_at: '2025-02-10T10:33:38.000000Z', completed_at: null, completed_by_uid: null, updated_at: '2025-02-10T10:33:38.000000Z', due: null, priority: 1, child_order: 3, content: 'Buy Milk', description: '', note_count: 0, day_order: -1, url: 'https://app.todoist.com/app/task/6XR4GqQQCW6Gv9h4' }, overrides);
12
12
  }
13
13
  /**
14
14
  * Wraps an event's `event_data` in the snake_case envelope the backend sends
@@ -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.
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { isNetworkError } from '../types/http.js';
13
- import { getDefaultDispatcher } from './http-dispatcher.js';
13
+ import { getDefaultTransport } from './http-dispatcher.js';
14
14
  /**
15
15
  * Default retry configuration matching the original axios-retry behavior
16
16
  */
@@ -96,6 +96,7 @@ function convertResponseToCustomFetch(response) {
96
96
  * Performs a fetch request with retry logic and timeout support
97
97
  */
98
98
  export async function fetchWithRetry(args) {
99
+ var _a;
99
100
  const { url, options = {}, retryConfig = {}, customFetch } = args;
100
101
  const config = Object.assign(Object.assign({}, DEFAULT_RETRY_CONFIG), retryConfig);
101
102
  const { timeout, signal: userSignal } = options, fetchOptions = __rest(options, ["timeout", "signal"]);
@@ -117,13 +118,24 @@ export async function fetchWithRetry(args) {
117
118
  fetchResponse = await customFetch(url, Object.assign(Object.assign({}, fetchOptions), { signal: requestSignal, timeout }));
118
119
  }
119
120
  else {
120
- const dispatcher = await getDefaultDispatcher();
121
+ // Read the dispatcher and its paired `fetch` as one value so
122
+ // they can never be mismatched. On Node, `fetch` is undici's
123
+ // own — paired with the dispatcher — so the request client and
124
+ // dispatcher stay on one undici version; otherwise the
125
+ // `decompress` interceptor terminates gzip responses when the
126
+ // global `fetch`'s bundled undici differs. Browser/edge (and
127
+ // Bun) have no paired `fetch` and fall back to the global one.
128
+ const transport = await getDefaultTransport();
121
129
  const nativeFetchOptions = Object.assign(Object.assign({}, fetchOptions), { signal: requestSignal });
122
- if (dispatcher !== undefined) {
130
+ if ((transport === null || transport === void 0 ? void 0 : transport.dispatcher) !== undefined) {
123
131
  // @ts-expect-error - dispatcher is a valid option for Node.js fetch but not in the TS types
124
- nativeFetchOptions.dispatcher = dispatcher;
132
+ nativeFetchOptions.dispatcher = transport.dispatcher;
125
133
  }
126
- const nativeResponse = await fetch(url, nativeFetchOptions);
134
+ // undici's `fetch` and the global `fetch` are the same function
135
+ // at runtime but carry different (undici vs DOM) types. Call
136
+ // through the global signature, which matches the options above.
137
+ const fetchImpl = ((_a = transport === null || transport === void 0 ? void 0 : transport.fetch) !== null && _a !== void 0 ? _a : fetch);
138
+ const nativeResponse = await fetchImpl(url, nativeFetchOptions);
127
139
  fetchResponse = convertResponseToCustomFetch(nativeResponse);
128
140
  }
129
141
  // Check if the response is successful
@@ -145,13 +157,13 @@ export async function fetchWithRetry(args) {
145
157
  try {
146
158
  responseData = responseText ? JSON.parse(responseText) : undefined;
147
159
  }
148
- catch (_a) {
160
+ catch (_b) {
149
161
  responseData = responseText;
150
162
  }
151
163
  error.data = responseData;
152
164
  error.response.data = responseData;
153
165
  }
154
- catch (_b) {
166
+ catch (_c) {
155
167
  // If we can't read the response body, that's OK
156
168
  }
157
169
  throw error;
@@ -162,7 +174,7 @@ export async function fetchWithRetry(args) {
162
174
  try {
163
175
  data = responseText ? JSON.parse(responseText) : undefined;
164
176
  }
165
- catch (_c) {
177
+ catch (_d) {
166
178
  // If JSON parsing fails, return the raw text
167
179
  data = responseText;
168
180
  }
@@ -4,32 +4,68 @@ const KEEP_ALIVE_OPTIONS = {
4
4
  keepAliveTimeout: 1,
5
5
  keepAliveMaxTimeout: 1,
6
6
  };
7
- let defaultDispatcherPromise;
8
- export function getDefaultDispatcher() {
7
+ let defaultTransport;
8
+ let defaultTransportPromise;
9
+ /**
10
+ * The default dispatcher and its paired `fetch`, as a single value so the two
11
+ * are always read consistently. Resolves to `undefined` outside Node (browser/
12
+ * edge), where callers use the global `fetch` with no dispatcher.
13
+ */
14
+ export function getDefaultTransport() {
9
15
  if (!isNodeEnvironment()) {
10
16
  return Promise.resolve(undefined);
11
17
  }
12
- if (!defaultDispatcherPromise) {
13
- defaultDispatcherPromise = createDefaultDispatcher().catch((error) => {
14
- defaultDispatcherPromise = undefined;
18
+ if (!defaultTransportPromise) {
19
+ defaultTransportPromise = createDefaultTransport()
20
+ .then((transport) => {
21
+ defaultTransport = transport;
22
+ return transport;
23
+ })
24
+ .catch((error) => {
25
+ defaultTransport = undefined;
26
+ defaultTransportPromise = undefined;
15
27
  throw error;
16
28
  });
17
29
  }
18
- return defaultDispatcherPromise;
30
+ return defaultTransportPromise;
31
+ }
32
+ export async function getDefaultDispatcher() {
33
+ var _a;
34
+ return (_a = (await getDefaultTransport())) === null || _a === void 0 ? void 0 : _a.dispatcher;
35
+ }
36
+ /**
37
+ * The `fetch` implementation that must be used with the default dispatcher.
38
+ * Returns undici's own `fetch` on the full-undici Node path, or `undefined`
39
+ * (meaning: use the global `fetch`) in the browser/edge/Bun paths.
40
+ *
41
+ * Node's global `fetch` is backed by whatever undici version ships inside that
42
+ * Node release (6.x on Node 22 … 8.x on Node 26). Our dispatcher — and its
43
+ * `decompress` interceptor — comes from the npm `undici` package, which is a
44
+ * different version. Handing an npm-undici dispatcher to a mismatched built-in
45
+ * client makes gzip responses fail mid-stream with `terminated`. Sourcing
46
+ * `fetch` from the same npm `undici` keeps the whole request path on one
47
+ * version and removes the split.
48
+ *
49
+ * Only meaningful after {@link getDefaultTransport} has resolved, which is the
50
+ * one place that populates it.
51
+ */
52
+ export function getDefaultFetch() {
53
+ return defaultTransport === null || defaultTransport === void 0 ? void 0 : defaultTransport.fetch;
19
54
  }
20
55
  export async function resetDefaultDispatcherForTests() {
21
- if (!defaultDispatcherPromise) {
56
+ if (!defaultTransportPromise) {
22
57
  return;
23
58
  }
24
- const dispatcherPromise = defaultDispatcherPromise;
25
- defaultDispatcherPromise = undefined;
26
- await dispatcherPromise.then((dispatcher) => dispatcher.close(), () => undefined);
59
+ const transportPromise = defaultTransportPromise;
60
+ defaultTransport = undefined;
61
+ defaultTransportPromise = undefined;
62
+ await transportPromise.then((transport) => transport.dispatcher.close(), () => undefined);
27
63
  }
28
- async function createDefaultDispatcher() {
64
+ async function createDefaultTransport() {
29
65
  // Dynamic import so non-Node consumers (browser, edge runtimes) don't pull
30
- // undici into their bundle. `getDefaultDispatcher` already short-circuits
66
+ // undici into their bundle. `getDefaultTransport` already short-circuits
31
67
  // outside Node, so this branch only runs when undici is safe to load.
32
- const { EnvHttpProxyAgent, interceptors } = await import('undici');
68
+ const { EnvHttpProxyAgent, interceptors, fetch: undiciFetch } = await import('undici');
33
69
  const agent = new EnvHttpProxyAgent(KEEP_ALIVE_OPTIONS);
34
70
  // Some runtimes report `process.versions.node` (so `isNodeEnvironment()`
35
71
  // passes) but ship only a partial undici: `interceptors.decompress` is
@@ -38,7 +74,9 @@ async function createDefaultDispatcher() {
38
74
  // gzip/deflate/br/zstd natively — so skip the interceptor instead of
39
75
  // crashing on the missing API.
40
76
  if (typeof interceptors.decompress !== 'function') {
41
- return agent;
77
+ // Bun: pair the agent with the global `fetch` (undefined), which
78
+ // decompresses natively.
79
+ return { dispatcher: agent, fetch: undefined };
42
80
  }
43
81
  // Compose the response-decompression interceptor so gzip/deflate/br/zstd
44
82
  // bodies are decoded before consumers parse them. Required on Node 24+:
@@ -47,7 +85,12 @@ async function createDefaultDispatcher() {
47
85
  // so callers receive raw gzipped bytes and `JSON.parse` fails.
48
86
  // See https://github.com/Doist/todoist-cli/issues/318.
49
87
  const decompress = suppressExperimentalWarningsSync(() => interceptors.decompress());
50
- return agent.compose(decompress);
88
+ // Pair undici's own `fetch` with this dispatcher so the request client and
89
+ // the dispatcher stay on one undici version (see `getDefaultFetch`). The
90
+ // global `fetch` is backed by a different, Node-bundled undici; mixing the
91
+ // two makes the decompress interceptor terminate gzip responses on some
92
+ // Node versions.
93
+ return { dispatcher: agent.compose(decompress), fetch: undiciFetch };
51
94
  }
52
95
  // undici emits an `ExperimentalWarning` the first time `interceptors.decompress()`
53
96
  // runs. The interceptor is stable for our gzipped-JSON-over-HTTPS use case;
@@ -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(),