@doist/todoist-sdk 8.2.1 → 8.3.0-next.1

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.
@@ -16,6 +16,7 @@ const zod_1 = require("zod");
16
16
  const endpoints_1 = require("./consts/endpoints");
17
17
  const http_client_1 = require("./transport/http-client");
18
18
  const reminders_1 = require("./types/reminders");
19
+ const goals_1 = require("./types/sync/resources/goals");
19
20
  const activity_helpers_1 = require("./utils/activity-helpers");
20
21
  const case_conversion_1 = require("./utils/case-conversion");
21
22
  const multipart_upload_1 = require("./utils/multipart-upload");
@@ -134,7 +135,11 @@ class TodoistApi {
134
135
  throw new types_1.TodoistRequestError(value.error, value.httpCode, value.errorExtra);
135
136
  });
136
137
  }
137
- return response.data;
138
+ const data = response.data;
139
+ if (data.goals) {
140
+ data.goals = data.goals.map((goal) => goals_1.GoalSchema.parse(goal));
141
+ }
142
+ return data;
138
143
  }
139
144
  /**
140
145
  * Executes a raw Sync API request.
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -27,6 +27,7 @@ __exportStar(require("./workspaces"), exports);
27
27
  __exportStar(require("./folders"), exports);
28
28
  __exportStar(require("./workspace-filters"), exports);
29
29
  __exportStar(require("./workspace-goals"), exports);
30
+ __exportStar(require("./goals"), exports);
30
31
  __exportStar(require("./notifications"), exports);
31
32
  __exportStar(require("./sharing"), exports);
32
33
  __exportStar(require("./view-options"), exports);
@@ -32,6 +32,7 @@ exports.SYNC_RESOURCE_TYPES = [
32
32
  'role_actions',
33
33
  'folders',
34
34
  'workspace_goals',
35
+ 'goals',
35
36
  'day_orders',
36
37
  'calendars',
37
38
  'calendar_accounts',
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GoalSchema = exports.GoalProgressSchema = exports.GOAL_OWNER_TYPES = void 0;
4
+ const zod_1 = require("zod");
5
+ /** Available goal owner types. */
6
+ exports.GOAL_OWNER_TYPES = ['USER', 'WORKSPACE'];
7
+ exports.GoalProgressSchema = zod_1.z
8
+ .object({
9
+ totalItemCount: zod_1.z.number().int(),
10
+ completedItemCount: zod_1.z.number().int(),
11
+ percentage: zod_1.z.number(),
12
+ })
13
+ .passthrough();
14
+ exports.GoalSchema = zod_1.z
15
+ .object({
16
+ id: zod_1.z.string(),
17
+ ownerType: zod_1.z.enum(exports.GOAL_OWNER_TYPES),
18
+ ownerId: zod_1.z.string(),
19
+ name: zod_1.z.string(),
20
+ description: zod_1.z.string().nullable(),
21
+ deadline: zod_1.z.string().nullable(),
22
+ parentGoalId: zod_1.z.string().nullable(),
23
+ childOrder: zod_1.z.number().int(),
24
+ isCompleted: zod_1.z.boolean(),
25
+ completedAt: zod_1.z.coerce.date().nullable(),
26
+ responsibleUid: zod_1.z.string().nullable(),
27
+ isDeleted: zod_1.z.boolean(),
28
+ progress: exports.GoalProgressSchema.optional(),
29
+ creatorUid: zod_1.z.string(),
30
+ createdAt: zod_1.z.coerce.date(),
31
+ updatedAt: zod_1.z.coerce.date(),
32
+ })
33
+ .passthrough();
@@ -21,6 +21,7 @@ __exportStar(require("./tooltips"), exports);
21
21
  __exportStar(require("./notes"), exports);
22
22
  __exportStar(require("./workspace-filters"), exports);
23
23
  __exportStar(require("./workspace-goals"), exports);
24
+ __exportStar(require("./goals"), exports);
24
25
  __exportStar(require("./calendars"), exports);
25
26
  __exportStar(require("./reminders"), exports);
26
27
  __exportStar(require("./completed-info"), exports);
@@ -13,6 +13,7 @@ import { z } from 'zod';
13
13
  import { getSyncBaseUri, ENDPOINT_REST_TASKS, ENDPOINT_REST_TASKS_FILTER, ENDPOINT_REST_TASKS_COMPLETED_BY_COMPLETION_DATE, ENDPOINT_REST_TASKS_COMPLETED_BY_DUE_DATE, ENDPOINT_REST_TASKS_COMPLETED_SEARCH, ENDPOINT_REST_TASKS_COMPLETED, ENDPOINT_REST_TEMPLATES_FILE, ENDPOINT_REST_TEMPLATES_URL, ENDPOINT_REST_TEMPLATES_CREATE_FROM_FILE, ENDPOINT_REST_TEMPLATES_IMPORT_FROM_FILE, ENDPOINT_REST_TEMPLATES_IMPORT_FROM_ID, ENDPOINT_REST_PROJECTS, ENDPOINT_REST_PROJECTS_SEARCH, ENDPOINT_SYNC_QUICK_ADD, ENDPOINT_REST_TASK_CLOSE, ENDPOINT_REST_TASK_REOPEN, ENDPOINT_REST_TASK_MOVE, ENDPOINT_REST_LABELS, ENDPOINT_REST_LABELS_SEARCH, ENDPOINT_REST_PROJECT_COLLABORATORS, ENDPOINT_REST_SECTIONS, ENDPOINT_REST_SECTIONS_SEARCH, ENDPOINT_REST_COMMENTS, ENDPOINT_REST_LOCATION_REMINDERS, ENDPOINT_REST_REMINDERS, ENDPOINT_REST_LABELS_SHARED, ENDPOINT_REST_LABELS_SHARED_RENAME, ENDPOINT_REST_LABELS_SHARED_REMOVE, ENDPOINT_SYNC, PROJECT_ARCHIVE, PROJECT_UNARCHIVE, ENDPOINT_REST_PROJECTS_MOVE_TO_WORKSPACE, ENDPOINT_REST_PROJECTS_MOVE_TO_PERSONAL, ENDPOINT_REST_PROJECTS_ARCHIVED, ENDPOINT_REST_PROJECTS_ARCHIVED_COUNT, ENDPOINT_REST_PROJECTS_PERMISSIONS, ENDPOINT_REST_PROJECT_FULL, ENDPOINT_REST_PROJECT_JOIN, SECTION_ARCHIVE, SECTION_UNARCHIVE, ENDPOINT_REST_USER, ENDPOINT_REST_PRODUCTIVITY, ENDPOINT_REST_ACTIVITIES, ENDPOINT_REST_UPLOADS, getProjectInsightsActivityStatsEndpoint, getProjectInsightsHealthEndpoint, getProjectInsightsHealthContextEndpoint, getProjectInsightsProgressEndpoint, getProjectInsightsHealthAnalyzeEndpoint, getWorkspaceInsightsEndpoint, ENDPOINT_REST_BACKUPS, ENDPOINT_REST_BACKUPS_DOWNLOAD, ENDPOINT_REST_EMAILS, ENDPOINT_REST_ID_MAPPINGS, ENDPOINT_REST_MOVED_IDS, ENDPOINT_REST_WORKSPACES, ENDPOINT_WORKSPACE_MEMBERS, getWorkspaceUserTasksEndpoint, getWorkspaceInviteUsersEndpoint, getWorkspaceUserEndpoint, ENDPOINT_WORKSPACE_INVITATIONS, ENDPOINT_WORKSPACE_INVITATIONS_ALL, ENDPOINT_WORKSPACE_INVITATIONS_DELETE, getWorkspaceInvitationAcceptEndpoint, getWorkspaceInvitationRejectEndpoint, ENDPOINT_WORKSPACE_JOIN, ENDPOINT_WORKSPACE_LOGO, ENDPOINT_WORKSPACE_PLAN_DETAILS, ENDPOINT_WORKSPACE_USERS, getWorkspaceActiveProjectsEndpoint, getWorkspaceArchivedProjectsEndpoint, ENDPOINT_REST_FOLDERS, } from './consts/endpoints.js';
14
14
  import { request, isSuccess } from './transport/http-client.js';
15
15
  import { UpdateReminderArgsSchema, UpdateLocationReminderArgsSchema, ReminderIdSchema, } from './types/reminders/index.js';
16
+ import { GoalSchema } from './types/sync/resources/goals.js';
16
17
  import { normalizeObjectEventTypeForApi, denormalizeObjectTypeFromApi, } from './utils/activity-helpers.js';
17
18
  import { camelCaseKeys } from './utils/case-conversion.js';
18
19
  import { uploadMultipartFile } from './utils/multipart-upload.js';
@@ -131,7 +132,11 @@ export class TodoistApi {
131
132
  throw new TodoistRequestError(value.error, value.httpCode, value.errorExtra);
132
133
  });
133
134
  }
134
- return response.data;
135
+ const data = response.data;
136
+ if (data.goals) {
137
+ data.goals = data.goals.map((goal) => GoalSchema.parse(goal));
138
+ }
139
+ return data;
135
140
  }
136
141
  /**
137
142
  * Executes a raw Sync API request.
@@ -0,0 +1 @@
1
+ export {};
@@ -11,6 +11,7 @@ export * from './workspaces.js';
11
11
  export * from './folders.js';
12
12
  export * from './workspace-filters.js';
13
13
  export * from './workspace-goals.js';
14
+ export * from './goals.js';
14
15
  export * from './notifications.js';
15
16
  export * from './sharing.js';
16
17
  export * from './view-options.js';
@@ -29,6 +29,7 @@ export const SYNC_RESOURCE_TYPES = [
29
29
  'role_actions',
30
30
  'folders',
31
31
  'workspace_goals',
32
+ 'goals',
32
33
  'day_orders',
33
34
  'calendars',
34
35
  'calendar_accounts',
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ /** Available goal owner types. */
3
+ export const GOAL_OWNER_TYPES = ['USER', 'WORKSPACE'];
4
+ export const GoalProgressSchema = z
5
+ .object({
6
+ totalItemCount: z.number().int(),
7
+ completedItemCount: z.number().int(),
8
+ percentage: z.number(),
9
+ })
10
+ .passthrough();
11
+ export const GoalSchema = z
12
+ .object({
13
+ id: z.string(),
14
+ ownerType: z.enum(GOAL_OWNER_TYPES),
15
+ ownerId: z.string(),
16
+ name: z.string(),
17
+ description: z.string().nullable(),
18
+ deadline: z.string().nullable(),
19
+ parentGoalId: z.string().nullable(),
20
+ childOrder: z.number().int(),
21
+ isCompleted: z.boolean(),
22
+ completedAt: z.coerce.date().nullable(),
23
+ responsibleUid: z.string().nullable(),
24
+ isDeleted: z.boolean(),
25
+ progress: GoalProgressSchema.optional(),
26
+ creatorUid: z.string(),
27
+ createdAt: z.coerce.date(),
28
+ updatedAt: z.coerce.date(),
29
+ })
30
+ .passthrough();
@@ -5,6 +5,7 @@ export * from './tooltips.js';
5
5
  export * from './notes.js';
6
6
  export * from './workspace-filters.js';
7
7
  export * from './workspace-goals.js';
8
+ export * from './goals.js';
8
9
  export * from './calendars.js';
9
10
  export * from './reminders.js';
10
11
  export * from './completed-info.js';
@@ -0,0 +1,33 @@
1
+ import type { GoalOwnerType } from '../resources/goals.js';
2
+ export type GoalAddArgs = {
3
+ ownerType: GoalOwnerType;
4
+ ownerId: string;
5
+ name: string;
6
+ description?: string | null;
7
+ deadline?: string | null;
8
+ responsibleUid?: string | null;
9
+ };
10
+ export type GoalUpdateArgs = {
11
+ id: string;
12
+ name?: string;
13
+ description?: string | null;
14
+ deadline?: string | null;
15
+ responsibleUid?: string | null;
16
+ };
17
+ export type GoalCompleteArgs = {
18
+ id: string;
19
+ };
20
+ export type GoalUncompleteArgs = {
21
+ id: string;
22
+ };
23
+ export type GoalDeleteArgs = {
24
+ id: string;
25
+ };
26
+ export type GoalLinkItemArgs = {
27
+ goalId: string;
28
+ itemId: string;
29
+ };
30
+ export type GoalUnlinkItemArgs = {
31
+ goalId: string;
32
+ itemId: string;
33
+ };
@@ -1,6 +1,7 @@
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';
4
5
  import type { LabelAddArgs, LabelRenameArgs, LabelUpdateArgs, LabelUpdateOrdersArgs, LabelDeleteArgs, LabelDeleteOccurrencesArgs } from './labels.js';
5
6
  import type { NoteAddArgs, NoteUpdateArgs, NoteDeleteArgs, NoteReactionAddArgs, NoteReactionRemoveArgs } from './notes.js';
6
7
  import type { LiveNotificationsMarkUnreadArgs, LiveNotificationsMarkReadArgs, LiveNotificationsMarkReadAllArgs, LiveNotificationsSetLastReadArgs } from './notifications.js';
@@ -96,6 +97,13 @@ export type SyncCommandsMap = {
96
97
  workspace_goal_delete: WorkspaceGoalDeleteArgs;
97
98
  workspace_goal_project_add: WorkspaceGoalProjectAddArgs;
98
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;
99
107
  live_notifications_mark_unread: LiveNotificationsMarkUnreadArgs;
100
108
  live_notifications_mark_read: LiveNotificationsMarkReadArgs;
101
109
  live_notifications_mark_read_all: LiveNotificationsMarkReadAllArgs;
@@ -163,6 +171,7 @@ export * from './workspaces.js';
163
171
  export * from './folders.js';
164
172
  export * from './workspace-filters.js';
165
173
  export * from './workspace-goals.js';
174
+ export * from './goals.js';
166
175
  export * from './notifications.js';
167
176
  export * from './sharing.js';
168
177
  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", "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", "workspace_goals", "goals", "day_orders", "calendars", "calendar_accounts", "suggestions", "tooltips"];
5
5
  export type SyncResourceType = (typeof SYNC_RESOURCE_TYPES)[number];
@@ -0,0 +1,37 @@
1
+ import { z } from 'zod';
2
+ /** Available goal owner types. */
3
+ export declare const GOAL_OWNER_TYPES: readonly ["USER", "WORKSPACE"];
4
+ /** Goal owner type. */
5
+ export type GoalOwnerType = (typeof GOAL_OWNER_TYPES)[number];
6
+ export declare const GoalProgressSchema: z.ZodObject<{
7
+ totalItemCount: z.ZodNumber;
8
+ completedItemCount: z.ZodNumber;
9
+ percentage: z.ZodNumber;
10
+ }, z.core.$loose>;
11
+ export type GoalProgress = z.infer<typeof GoalProgressSchema>;
12
+ export declare const GoalSchema: z.ZodObject<{
13
+ id: z.ZodString;
14
+ ownerType: z.ZodEnum<{
15
+ USER: "USER";
16
+ WORKSPACE: "WORKSPACE";
17
+ }>;
18
+ ownerId: z.ZodString;
19
+ name: z.ZodString;
20
+ description: z.ZodNullable<z.ZodString>;
21
+ deadline: z.ZodNullable<z.ZodString>;
22
+ parentGoalId: z.ZodNullable<z.ZodString>;
23
+ childOrder: z.ZodNumber;
24
+ isCompleted: z.ZodBoolean;
25
+ completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
26
+ responsibleUid: z.ZodNullable<z.ZodString>;
27
+ isDeleted: z.ZodBoolean;
28
+ progress: z.ZodOptional<z.ZodObject<{
29
+ totalItemCount: z.ZodNumber;
30
+ completedItemCount: z.ZodNumber;
31
+ percentage: z.ZodNumber;
32
+ }, z.core.$loose>>;
33
+ creatorUid: z.ZodString;
34
+ createdAt: z.ZodCoercedDate<unknown>;
35
+ updatedAt: z.ZodCoercedDate<unknown>;
36
+ }, z.core.$loose>;
37
+ export type Goal = z.infer<typeof GoalSchema>;
@@ -5,6 +5,7 @@ export * from './tooltips.js';
5
5
  export * from './notes.js';
6
6
  export * from './workspace-filters.js';
7
7
  export * from './workspace-goals.js';
8
+ export * from './goals.js';
8
9
  export * from './calendars.js';
9
10
  export * from './reminders.js';
10
11
  export * from './completed-info.js';
@@ -33,13 +33,13 @@ export declare const GROUPED_BY_OPTIONS: readonly ["ASSIGNEE", "ADDED_DATE", "DU
33
33
  export type GroupedBy = (typeof GROUPED_BY_OPTIONS)[number];
34
34
  export declare const GroupedBySchema: z.ZodNullable<z.ZodEnum<{
35
35
  PROJECT: "PROJECT";
36
+ WORKSPACE: "WORKSPACE";
36
37
  LABEL: "LABEL";
37
38
  ASSIGNEE: "ASSIGNEE";
38
39
  ADDED_DATE: "ADDED_DATE";
39
40
  DUE_DATE: "DUE_DATE";
40
41
  DEADLINE: "DEADLINE";
41
42
  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"];
@@ -47,12 +47,12 @@ export declare const SORTED_BY_OPTIONS: readonly ["MANUAL", "ALPHABETICALLY", "A
47
47
  export type SortedBy = (typeof SORTED_BY_OPTIONS)[number];
48
48
  export declare const SortedBySchema: z.ZodNullable<z.ZodEnum<{
49
49
  PROJECT: "PROJECT";
50
+ WORKSPACE: "WORKSPACE";
50
51
  ASSIGNEE: "ASSIGNEE";
51
52
  ADDED_DATE: "ADDED_DATE";
52
53
  DUE_DATE: "DUE_DATE";
53
54
  DEADLINE: "DEADLINE";
54
55
  PRIORITY: "PRIORITY";
55
- WORKSPACE: "WORKSPACE";
56
56
  MANUAL: "MANUAL";
57
57
  ALPHABETICALLY: "ALPHABETICALLY";
58
58
  }>>;
@@ -93,13 +93,13 @@ export declare const ViewOptionsSchema: z.ZodObject<{
93
93
  objectId: z.ZodOptional<z.ZodString>;
94
94
  groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
95
95
  PROJECT: "PROJECT";
96
+ WORKSPACE: "WORKSPACE";
96
97
  LABEL: "LABEL";
97
98
  ASSIGNEE: "ASSIGNEE";
98
99
  ADDED_DATE: "ADDED_DATE";
99
100
  DUE_DATE: "DUE_DATE";
100
101
  DEADLINE: "DEADLINE";
101
102
  PRIORITY: "PRIORITY";
102
- WORKSPACE: "WORKSPACE";
103
103
  }>>>;
104
104
  filteredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
105
  viewMode: z.ZodOptional<z.ZodEnum<{
@@ -110,12 +110,12 @@ export declare const ViewOptionsSchema: z.ZodObject<{
110
110
  showCompletedTasks: z.ZodOptional<z.ZodBoolean>;
111
111
  sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
112
112
  PROJECT: "PROJECT";
113
+ WORKSPACE: "WORKSPACE";
113
114
  ASSIGNEE: "ASSIGNEE";
114
115
  ADDED_DATE: "ADDED_DATE";
115
116
  DUE_DATE: "DUE_DATE";
116
117
  DEADLINE: "DEADLINE";
117
118
  PRIORITY: "PRIORITY";
118
- WORKSPACE: "WORKSPACE";
119
119
  MANUAL: "MANUAL";
120
120
  ALPHABETICALLY: "ALPHABETICALLY";
121
121
  }>>>;
@@ -134,22 +134,22 @@ export declare const ProjectViewOptionsDefaultsSchema: z.ZodObject<{
134
134
  }>>>;
135
135
  groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
136
136
  PROJECT: "PROJECT";
137
+ WORKSPACE: "WORKSPACE";
137
138
  LABEL: "LABEL";
138
139
  ASSIGNEE: "ASSIGNEE";
139
140
  ADDED_DATE: "ADDED_DATE";
140
141
  DUE_DATE: "DUE_DATE";
141
142
  DEADLINE: "DEADLINE";
142
143
  PRIORITY: "PRIORITY";
143
- WORKSPACE: "WORKSPACE";
144
144
  }>>>;
145
145
  sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
146
146
  PROJECT: "PROJECT";
147
+ WORKSPACE: "WORKSPACE";
147
148
  ASSIGNEE: "ASSIGNEE";
148
149
  ADDED_DATE: "ADDED_DATE";
149
150
  DUE_DATE: "DUE_DATE";
150
151
  DEADLINE: "DEADLINE";
151
152
  PRIORITY: "PRIORITY";
152
- WORKSPACE: "WORKSPACE";
153
153
  MANUAL: "MANUAL";
154
154
  ALPHABETICALLY: "ALPHABETICALLY";
155
155
  }>>>;
@@ -3,7 +3,7 @@ import type { PersonalProject, WorkspaceProject } from '../projects/types.js';
3
3
  import type { Section } from '../sections/types.js';
4
4
  import type { Task } from '../tasks/types.js';
5
5
  import type { WorkspaceUser } from '../workspaces/types.js';
6
- import type { Filter, Collaborator, CollaboratorState, Folder, Note, Tooltips, WorkspaceFilter, WorkspaceGoal, Calendar, CalendarAccount, Reminder, CompletedInfo, ViewOptions, ProjectViewOptionsDefaults, UserPlanLimits, LiveNotification, SyncWorkspace, SyncUser, UserSettings, LocationReminder, Suggestion } from './resources/index.js';
6
+ import type { Filter, Collaborator, CollaboratorState, Folder, Note, Tooltips, WorkspaceFilter, WorkspaceGoal, Goal, Calendar, CalendarAccount, Reminder, CompletedInfo, ViewOptions, ProjectViewOptionsDefaults, UserPlanLimits, LiveNotification, SyncWorkspace, SyncUser, UserSettings, LocationReminder, Suggestion } from './resources/index.js';
7
7
  export type SyncError = {
8
8
  error: string;
9
9
  errorCode: number;
@@ -43,6 +43,7 @@ export type SyncResponse = {
43
43
  roleActions?: Record<string, unknown>[];
44
44
  folders?: Folder[];
45
45
  workspaceGoals?: WorkspaceGoal[];
46
+ goals?: Goal[];
46
47
  dayOrders?: Record<string, number>;
47
48
  calendars?: Calendar[];
48
49
  calendarAccounts?: CalendarAccount[];
@@ -1073,30 +1073,30 @@ export declare const validateViewOptions: (input: unknown) => {
1073
1073
  [x: string]: unknown;
1074
1074
  viewType: "PROJECT" | "TODAY" | "UPCOMING" | "LABEL" | "FILTER" | "WORKSPACE_FILTER" | "SEARCH" | "TEMPLATE_PREVIEW" | "TASK_DETAIL" | "AUTOMATION" | "ASSIGNED" | "OVERDUE" | "WORKSPACE_OVERVIEW";
1075
1075
  objectId?: string | undefined;
1076
- groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
1076
+ groupedBy?: "PROJECT" | "WORKSPACE" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | null | undefined;
1077
1077
  filteredBy?: string | null | undefined;
1078
1078
  viewMode?: "LIST" | "BOARD" | "CALENDAR" | undefined;
1079
1079
  showCompletedTasks?: boolean | undefined;
1080
- sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1080
+ sortedBy?: "PROJECT" | "WORKSPACE" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1081
1081
  sortOrder?: "ASC" | "DESC" | null | undefined;
1082
1082
  };
1083
1083
  export declare const validateViewOptionsArray: (input: unknown[]) => {
1084
1084
  [x: string]: unknown;
1085
1085
  viewType: "PROJECT" | "TODAY" | "UPCOMING" | "LABEL" | "FILTER" | "WORKSPACE_FILTER" | "SEARCH" | "TEMPLATE_PREVIEW" | "TASK_DETAIL" | "AUTOMATION" | "ASSIGNED" | "OVERDUE" | "WORKSPACE_OVERVIEW";
1086
1086
  objectId?: string | undefined;
1087
- groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
1087
+ groupedBy?: "PROJECT" | "WORKSPACE" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | null | undefined;
1088
1088
  filteredBy?: string | null | undefined;
1089
1089
  viewMode?: "LIST" | "BOARD" | "CALENDAR" | undefined;
1090
1090
  showCompletedTasks?: boolean | undefined;
1091
- sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1091
+ sortedBy?: "PROJECT" | "WORKSPACE" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1092
1092
  sortOrder?: "ASC" | "DESC" | null | undefined;
1093
1093
  }[];
1094
1094
  export declare const validateProjectViewOptionsDefaults: (input: unknown) => {
1095
1095
  [x: string]: unknown;
1096
1096
  projectId: string;
1097
1097
  viewMode?: "LIST" | "BOARD" | "CALENDAR" | null | undefined;
1098
- groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
1099
- sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1098
+ groupedBy?: "PROJECT" | "WORKSPACE" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | null | undefined;
1099
+ sortedBy?: "PROJECT" | "WORKSPACE" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1100
1100
  sortOrder?: "ASC" | "DESC" | null | undefined;
1101
1101
  showCompletedTasks?: boolean | undefined;
1102
1102
  filteredBy?: string | null | undefined;
@@ -1109,8 +1109,8 @@ export declare const validateProjectViewOptionsDefaultsArray: (input: unknown[])
1109
1109
  [x: string]: unknown;
1110
1110
  projectId: string;
1111
1111
  viewMode?: "LIST" | "BOARD" | "CALENDAR" | null | undefined;
1112
- groupedBy?: "PROJECT" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | null | undefined;
1113
- sortedBy?: "PROJECT" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "WORKSPACE" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1112
+ groupedBy?: "PROJECT" | "WORKSPACE" | "LABEL" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | null | undefined;
1113
+ sortedBy?: "PROJECT" | "WORKSPACE" | "ASSIGNEE" | "ADDED_DATE" | "DUE_DATE" | "DEADLINE" | "PRIORITY" | "MANUAL" | "ALPHABETICALLY" | null | undefined;
1114
1114
  sortOrder?: "ASC" | "DESC" | null | undefined;
1115
1115
  showCompletedTasks?: boolean | undefined;
1116
1116
  filteredBy?: string | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doist/todoist-sdk",
3
- "version": "8.2.1",
3
+ "version": "8.3.0-next.1",
4
4
  "description": "The official TypeScript SDK for the Todoist REST API.",
5
5
  "author": "Doist developers",
6
6
  "repository": "https://github.com/Doist/todoist-sdk-typescript",