@doist/todoist-api-typescript 6.5.1 → 6.7.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 (140) hide show
  1. package/dist/cjs/todoist-api.js +32 -4
  2. package/dist/cjs/types/index.js +1 -0
  3. package/dist/cjs/types/sync/commands/calendars.js +2 -0
  4. package/dist/cjs/types/sync/commands/filters.js +2 -0
  5. package/dist/cjs/types/sync/commands/folders.js +2 -0
  6. package/dist/cjs/types/sync/commands/index.js +35 -0
  7. package/dist/cjs/types/sync/commands/labels.js +2 -0
  8. package/dist/cjs/types/sync/commands/notes.js +2 -0
  9. package/dist/cjs/types/sync/commands/notifications.js +2 -0
  10. package/dist/cjs/types/sync/commands/others.js +2 -0
  11. package/dist/cjs/types/sync/commands/project-view-options.js +2 -0
  12. package/dist/cjs/types/sync/commands/projects.js +2 -0
  13. package/dist/cjs/types/sync/commands/reminders.js +2 -0
  14. package/dist/cjs/types/sync/commands/sections.js +2 -0
  15. package/dist/cjs/types/sync/commands/shared.js +5 -0
  16. package/dist/cjs/types/sync/commands/sharing.js +2 -0
  17. package/dist/cjs/types/sync/commands/tasks.js +2 -0
  18. package/dist/cjs/types/sync/commands/view-options.js +2 -0
  19. package/dist/cjs/types/sync/commands/workspace-filters.js +2 -0
  20. package/dist/cjs/types/sync/commands/workspace-goals.js +2 -0
  21. package/dist/cjs/types/sync/commands/workspaces.js +2 -0
  22. package/dist/cjs/types/sync/index.js +21 -0
  23. package/dist/cjs/types/sync/request.js +2 -0
  24. package/dist/cjs/types/{sync.js → sync/resource-types.js} +9 -0
  25. package/dist/cjs/types/sync/resources/calendars.js +27 -0
  26. package/dist/cjs/types/sync/resources/collaborators.js +23 -0
  27. package/dist/cjs/types/sync/resources/completed-info.js +30 -0
  28. package/dist/cjs/types/sync/resources/filters.js +16 -0
  29. package/dist/cjs/types/sync/resources/folders.js +14 -0
  30. package/dist/cjs/types/sync/resources/index.js +33 -0
  31. package/dist/cjs/types/sync/resources/live-notifications.js +28 -0
  32. package/dist/cjs/types/sync/resources/notes.js +23 -0
  33. package/dist/cjs/types/sync/resources/reminders.js +34 -0
  34. package/dist/cjs/types/sync/resources/suggestions.js +38 -0
  35. package/dist/cjs/types/sync/resources/tooltips.js +10 -0
  36. package/dist/cjs/types/sync/resources/user-plan-limits.js +24 -0
  37. package/dist/cjs/types/sync/resources/user-settings.js +42 -0
  38. package/dist/cjs/types/sync/resources/user.js +123 -0
  39. package/dist/cjs/types/sync/resources/view-options.js +75 -0
  40. package/dist/cjs/types/sync/resources/workspace-filters.js +21 -0
  41. package/dist/cjs/types/sync/resources/workspace-goals.js +32 -0
  42. package/dist/cjs/types/sync/resources/workspaces.js +49 -0
  43. package/dist/cjs/types/sync/response.js +2 -0
  44. package/dist/cjs/utils/index.js +3 -1
  45. package/dist/cjs/utils/sync-helpers.js +22 -0
  46. package/dist/cjs/utils/validators.js +69 -88
  47. package/dist/esm/todoist-api.js +32 -4
  48. package/dist/esm/types/index.js +1 -0
  49. package/dist/esm/types/sync/commands/calendars.js +1 -0
  50. package/dist/esm/types/sync/commands/filters.js +1 -0
  51. package/dist/esm/types/sync/commands/folders.js +1 -0
  52. package/dist/esm/types/sync/commands/index.js +19 -0
  53. package/dist/esm/types/sync/commands/labels.js +1 -0
  54. package/dist/esm/types/sync/commands/notes.js +1 -0
  55. package/dist/esm/types/sync/commands/notifications.js +1 -0
  56. package/dist/esm/types/sync/commands/others.js +1 -0
  57. package/dist/esm/types/sync/commands/project-view-options.js +1 -0
  58. package/dist/esm/types/sync/commands/projects.js +1 -0
  59. package/dist/esm/types/sync/commands/reminders.js +1 -0
  60. package/dist/esm/types/sync/commands/sections.js +1 -0
  61. package/dist/esm/types/sync/commands/shared.js +4 -0
  62. package/dist/esm/types/sync/commands/sharing.js +1 -0
  63. package/dist/esm/types/sync/commands/tasks.js +1 -0
  64. package/dist/esm/types/sync/commands/view-options.js +1 -0
  65. package/dist/esm/types/sync/commands/workspace-filters.js +1 -0
  66. package/dist/esm/types/sync/commands/workspace-goals.js +1 -0
  67. package/dist/esm/types/sync/commands/workspaces.js +1 -0
  68. package/dist/esm/types/sync/index.js +5 -0
  69. package/dist/esm/types/sync/request.js +1 -0
  70. package/dist/esm/types/{sync.js → sync/resource-types.js} +9 -0
  71. package/dist/esm/types/sync/resources/calendars.js +24 -0
  72. package/dist/esm/types/sync/resources/collaborators.js +20 -0
  73. package/dist/esm/types/sync/resources/completed-info.js +27 -0
  74. package/dist/esm/types/sync/resources/filters.js +13 -0
  75. package/dist/esm/types/sync/resources/folders.js +11 -0
  76. package/dist/esm/types/sync/resources/index.js +17 -0
  77. package/dist/esm/types/sync/resources/live-notifications.js +25 -0
  78. package/dist/esm/types/sync/resources/notes.js +20 -0
  79. package/dist/esm/types/sync/resources/reminders.js +31 -0
  80. package/dist/esm/types/sync/resources/suggestions.js +35 -0
  81. package/dist/esm/types/sync/resources/tooltips.js +7 -0
  82. package/dist/esm/types/sync/resources/user-plan-limits.js +21 -0
  83. package/dist/esm/types/sync/resources/user-settings.js +39 -0
  84. package/dist/esm/types/sync/resources/user.js +120 -0
  85. package/dist/esm/types/sync/resources/view-options.js +72 -0
  86. package/dist/esm/types/sync/resources/workspace-filters.js +18 -0
  87. package/dist/esm/types/sync/resources/workspace-goals.js +29 -0
  88. package/dist/esm/types/sync/resources/workspaces.js +46 -0
  89. package/dist/esm/types/sync/response.js +1 -0
  90. package/dist/esm/utils/index.js +1 -0
  91. package/dist/esm/utils/sync-helpers.js +19 -0
  92. package/dist/esm/utils/validators.js +65 -64
  93. package/dist/types/todoist-api.d.ts +26 -0
  94. package/dist/types/types/index.d.ts +1 -0
  95. package/dist/types/types/sync/commands/calendars.d.ts +14 -0
  96. package/dist/types/types/sync/commands/filters.d.ts +21 -0
  97. package/dist/types/types/sync/commands/folders.d.ts +18 -0
  98. package/dist/types/types/sync/commands/index.d.ts +175 -0
  99. package/dist/types/types/sync/commands/labels.d.ts +27 -0
  100. package/dist/types/types/sync/commands/notes.d.ts +27 -0
  101. package/dist/types/types/sync/commands/notifications.d.ts +10 -0
  102. package/dist/types/types/sync/commands/others.d.ts +28 -0
  103. package/dist/types/types/sync/commands/project-view-options.d.ts +14 -0
  104. package/dist/types/types/sync/commands/projects.d.ts +88 -0
  105. package/dist/types/types/sync/commands/reminders.d.ts +40 -0
  106. package/dist/types/types/sync/commands/sections.d.ts +31 -0
  107. package/dist/types/types/sync/commands/shared.d.ts +46 -0
  108. package/dist/types/types/sync/commands/sharing.d.ts +16 -0
  109. package/dist/types/types/sync/commands/tasks.d.ts +78 -0
  110. package/dist/types/types/sync/commands/view-options.d.ts +19 -0
  111. package/dist/types/types/sync/commands/workspace-filters.d.ts +22 -0
  112. package/dist/types/types/sync/commands/workspace-goals.d.ts +24 -0
  113. package/dist/types/types/sync/commands/workspaces.d.ts +79 -0
  114. package/dist/types/types/sync/index.d.ts +5 -0
  115. package/dist/types/types/sync/request.d.ts +7 -0
  116. package/dist/types/types/sync/resource-types.d.ts +5 -0
  117. package/dist/types/types/sync/resources/calendars.d.ts +30 -0
  118. package/dist/types/types/sync/resources/collaborators.d.ts +24 -0
  119. package/dist/types/types/sync/resources/completed-info.d.ts +33 -0
  120. package/dist/types/types/sync/resources/filters.d.ts +12 -0
  121. package/dist/types/types/sync/resources/folders.d.ts +10 -0
  122. package/dist/types/types/sync/resources/index.d.ts +17 -0
  123. package/dist/types/types/sync/resources/live-notifications.d.ts +23 -0
  124. package/dist/types/types/sync/resources/notes.d.ts +34 -0
  125. package/dist/types/types/sync/resources/reminders.d.ts +101 -0
  126. package/dist/types/types/sync/resources/suggestions.d.ts +54 -0
  127. package/dist/types/types/sync/resources/tooltips.d.ts +6 -0
  128. package/dist/types/types/sync/resources/user-plan-limits.d.ts +41 -0
  129. package/dist/types/types/sync/resources/user-settings.d.ts +32 -0
  130. package/dist/types/types/sync/resources/user.d.ts +104 -0
  131. package/dist/types/types/sync/resources/view-options.d.ts +94 -0
  132. package/dist/types/types/sync/resources/workspace-filters.d.ts +17 -0
  133. package/dist/types/types/sync/resources/workspace-goals.d.ts +29 -0
  134. package/dist/types/types/sync/resources/workspaces.d.ts +52 -0
  135. package/dist/types/types/sync/response.d.ts +47 -0
  136. package/dist/types/utils/index.d.ts +1 -0
  137. package/dist/types/utils/sync-helpers.d.ts +17 -0
  138. package/dist/types/utils/validators.d.ts +1163 -23
  139. package/package.json +1 -1
  140. package/dist/types/types/sync.d.ts +0 -30
@@ -0,0 +1,31 @@
1
+ export type SectionAddArgs = {
2
+ projectId: string;
3
+ name: string;
4
+ sectionOrder?: number;
5
+ addedAt?: string;
6
+ };
7
+ export type SectionUpdateArgs = {
8
+ id: string;
9
+ name?: string;
10
+ isCollapsed?: boolean;
11
+ };
12
+ export type SectionMoveArgs = {
13
+ id: string;
14
+ projectId: string;
15
+ };
16
+ export type SectionReorderArgs = {
17
+ sections: Array<{
18
+ id: string;
19
+ sectionOrder: number;
20
+ }>;
21
+ };
22
+ export type SectionArchiveArgs = {
23
+ id: string;
24
+ archivedAt?: string;
25
+ };
26
+ export type SectionUnarchiveArgs = {
27
+ id: string;
28
+ };
29
+ export type SectionDeleteArgs = {
30
+ id: string;
31
+ };
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Shared types used across multiple Sync API command argument types.
3
+ */
4
+ /**
5
+ * Due date for Sync API create/update operations.
6
+ * Unlike the REST API `DueDate` (which has required fields on responses),
7
+ * this type represents the input shape where all fields are optional.
8
+ */
9
+ export type SyncDueDate = {
10
+ date?: string;
11
+ string?: string;
12
+ timezone?: string | null;
13
+ lang?: string;
14
+ isRecurring?: boolean;
15
+ } | null;
16
+ /**
17
+ * Deadline for Sync API create/update operations.
18
+ * Unlike the REST API `Deadline` (which requires `lang`),
19
+ * this type makes `lang` optional for input.
20
+ */
21
+ export type SyncDeadline = {
22
+ date: string;
23
+ lang?: string;
24
+ } | null;
25
+ /**
26
+ * Duration for Sync API create/update operations.
27
+ */
28
+ export type SyncDuration = {
29
+ amount: number;
30
+ unit: string;
31
+ } | null;
32
+ /** Task priority: 1 = normal, 2 = medium, 3 = high, 4 = urgent. */
33
+ export type TaskPriority = 1 | 2 | 3 | 4;
34
+ /** Project workflow status. */
35
+ export type ProjectStatus = 'PLANNED' | 'IN_PROGRESS' | 'PAUSED' | 'COMPLETED' | 'CANCELED';
36
+ /** Default collaborator role for a project. */
37
+ export type CollaboratorRole = 'CREATOR' | 'ADMIN' | 'READ_WRITE' | 'EDIT_ONLY' | 'COMPLETE_ONLY';
38
+ /** Reminder notification service. */
39
+ export type ReminderService = 'default' | 'email' | 'mobile' | 'push' | 'no_default';
40
+ /**
41
+ * Default access level for workspaces.
42
+ * Same values as {@link ProjectVisibility} from entities.
43
+ */
44
+ export { type ProjectVisibility as DefaultAccessLevel } from '../../entities.js';
45
+ /** Workspace project sort order preference. */
46
+ export type WorkspaceProjectSortOrder = 'MANUAL' | 'A_TO_Z' | 'Z_TO_A';
@@ -0,0 +1,16 @@
1
+ export type AcceptInvitationArgs = {
2
+ invitationId: string;
3
+ invitationSecret: string;
4
+ };
5
+ export type RejectInvitationArgs = {
6
+ invitationId: string;
7
+ invitationSecret: string;
8
+ };
9
+ export type BizAcceptInvitationArgs = {
10
+ invitationId: string;
11
+ invitationSecret: string;
12
+ };
13
+ export type BizRejectInvitationArgs = {
14
+ invitationId: string;
15
+ invitationSecret: string;
16
+ };
@@ -0,0 +1,78 @@
1
+ import type { SyncDueDate, SyncDeadline, SyncDuration, TaskPriority } from './shared.js';
2
+ export type TaskAddArgs = {
3
+ content: string;
4
+ description?: string;
5
+ projectId?: string;
6
+ due?: SyncDueDate;
7
+ deadline?: SyncDeadline;
8
+ duration?: SyncDuration;
9
+ priority?: TaskPriority;
10
+ parentId?: string | null;
11
+ childOrder?: number;
12
+ sectionId?: string | null;
13
+ dayOrder?: number;
14
+ isCollapsed?: boolean;
15
+ labels?: string[];
16
+ assignedByUid?: string | null;
17
+ responsibleUid?: string | null;
18
+ autoReminder?: boolean;
19
+ autoParseLabels?: boolean;
20
+ };
21
+ export type TaskUpdateArgs = {
22
+ id: string;
23
+ content?: string;
24
+ description?: string;
25
+ due?: SyncDueDate;
26
+ deadline?: SyncDeadline;
27
+ duration?: SyncDuration;
28
+ priority?: TaskPriority;
29
+ isCollapsed?: boolean;
30
+ labels?: string[];
31
+ assignedByUid?: string | null;
32
+ responsibleUid?: string | null;
33
+ dayOrder?: number;
34
+ };
35
+ export type TaskCompleteArgs = {
36
+ id: string;
37
+ completedAt: string;
38
+ forceHistory?: boolean;
39
+ fromUndo?: boolean;
40
+ };
41
+ export type TaskCompleteUndoArgs = {
42
+ id: string;
43
+ descendants: Array<{
44
+ id: string;
45
+ checked?: boolean;
46
+ }>;
47
+ };
48
+ export type TaskMoveArgs = {
49
+ id: string;
50
+ parentId: string | null;
51
+ } | {
52
+ id: string;
53
+ sectionId: string | null;
54
+ } | {
55
+ id: string;
56
+ projectId: string;
57
+ };
58
+ export type TaskReorderArgs = {
59
+ items: Array<{
60
+ id: string;
61
+ childOrder: number;
62
+ }>;
63
+ };
64
+ export type TaskUncompleteArgs = {
65
+ id: string;
66
+ };
67
+ export type TaskUpdateDateCompleteArgs = {
68
+ id: string;
69
+ due: SyncDueDate;
70
+ isForward: 0 | 1;
71
+ resetSubtasks?: 0 | 1;
72
+ };
73
+ export type TaskDeleteArgs = {
74
+ id: string;
75
+ };
76
+ export type TaskUpdateDayOrderArgs = {
77
+ idsToOrders: Record<string, number | undefined>;
78
+ };
@@ -0,0 +1,19 @@
1
+ export type ViewType = 'TODAY' | 'UPCOMING' | 'PROJECT' | 'LABEL' | 'FILTER' | 'WORKSPACE_FILTER' | 'SEARCH' | 'TEMPLATE_PREVIEW' | 'TASK_DETAIL' | 'AUTOMATION' | 'ASSIGNED' | 'OVERDUE' | 'WORKSPACE_OVERVIEW';
2
+ export type ViewMode = 'LIST' | 'BOARD' | 'CALENDAR';
3
+ export type GroupedBy = null | 'ASSIGNEE' | 'ADDED_DATE' | 'DUE_DATE' | 'DEADLINE' | 'LABEL' | 'PRIORITY' | 'PROJECT' | 'WORKSPACE';
4
+ export type SortedBy = null | 'MANUAL' | 'ALPHABETICALLY' | 'ASSIGNEE' | 'DUE_DATE' | 'DEADLINE' | 'ADDED_DATE' | 'PRIORITY' | 'PROJECT' | 'WORKSPACE';
5
+ export type SortOrder = 'ASC' | 'DESC';
6
+ export type ViewOptionsSetArgs = {
7
+ viewType: ViewType;
8
+ objectId?: string;
9
+ groupedBy?: GroupedBy;
10
+ filteredBy?: string | null;
11
+ viewMode?: ViewMode;
12
+ showCompletedTasks?: boolean;
13
+ sortedBy?: SortedBy;
14
+ sortOrder?: SortOrder | null;
15
+ };
16
+ export type ViewOptionsDeleteArgs = {
17
+ viewType: ViewType;
18
+ objectId?: string;
19
+ };
@@ -0,0 +1,22 @@
1
+ export type WorkspaceFilterAddArgs = {
2
+ workspaceId: string;
3
+ name: string;
4
+ query: string;
5
+ color?: string;
6
+ itemOrder?: number;
7
+ isFavorite?: boolean;
8
+ };
9
+ export type WorkspaceFilterUpdateArgs = {
10
+ id: string;
11
+ name?: string;
12
+ query?: string;
13
+ color?: string;
14
+ itemOrder?: number;
15
+ isFavorite?: boolean;
16
+ };
17
+ export type WorkspaceFilterUpdateOrdersArgs = {
18
+ idOrderMapping: Record<string, number>;
19
+ };
20
+ export type WorkspaceFilterDeleteArgs = {
21
+ id: string;
22
+ };
@@ -0,0 +1,24 @@
1
+ export type WorkspaceGoalAddArgs = {
2
+ workspaceId: string;
3
+ title: string;
4
+ description?: string;
5
+ deadline?: string | null;
6
+ projectIds: string[];
7
+ };
8
+ export type WorkspaceGoalUpdateArgs = {
9
+ id: string;
10
+ title?: string;
11
+ description?: string;
12
+ deadline?: string | null;
13
+ };
14
+ export type WorkspaceGoalDeleteArgs = {
15
+ id: string;
16
+ };
17
+ export type WorkspaceGoalProjectAddArgs = {
18
+ goalId: string;
19
+ projectId: string;
20
+ };
21
+ export type WorkspaceGoalProjectRemoveArgs = {
22
+ goalId: string;
23
+ projectId: string;
24
+ };
@@ -0,0 +1,79 @@
1
+ import type { WorkspaceRole } from '../../entities.js';
2
+ import type { DefaultAccessLevel, WorkspaceProjectSortOrder } from './shared.js';
3
+ export type SyncWorkspaceProperties = {
4
+ organizationSize?: string;
5
+ defaultAccessLevel?: DefaultAccessLevel;
6
+ teamAcquisitionCohort?: string;
7
+ acquisitionSource?: string;
8
+ industry?: string;
9
+ department?: string;
10
+ creatorRole?: string;
11
+ desktopWorkspaceModal?: string | null;
12
+ hdyhau?: string;
13
+ acquisitionLoopLastShow?: string | null;
14
+ };
15
+ export type DefaultCollaborators = {
16
+ predefinedGroupIds?: string[];
17
+ userIds?: number[];
18
+ } | null;
19
+ export type WorkspaceAddArgs = {
20
+ name: string;
21
+ description?: string;
22
+ isLinkSharingEnabled?: boolean;
23
+ isGuestAllowed?: boolean | null;
24
+ domainName?: string;
25
+ domainDiscovery?: boolean;
26
+ restrictEmailDomains?: boolean;
27
+ properties?: SyncWorkspaceProperties;
28
+ defaultCollaborators?: DefaultCollaborators;
29
+ };
30
+ export type WorkspaceUpdateArgs = {
31
+ id: string;
32
+ name?: string;
33
+ description?: string;
34
+ isCollapsed?: boolean;
35
+ isLinkSharingEnabled?: boolean;
36
+ isGuestAllowed?: boolean | null;
37
+ inviteCode?: string;
38
+ domainName?: string;
39
+ domainDiscovery?: boolean;
40
+ restrictEmailDomains?: boolean;
41
+ properties?: SyncWorkspaceProperties;
42
+ defaultCollaborators?: DefaultCollaborators;
43
+ };
44
+ export type WorkspaceDeleteArgs = {
45
+ id: string;
46
+ };
47
+ export type WorkspaceUpdateUserArgs = {
48
+ workspaceId: string;
49
+ userEmail: string;
50
+ role: WorkspaceRole;
51
+ };
52
+ export type WorkspaceDeleteUserArgs = {
53
+ workspaceId: string;
54
+ userEmail: string;
55
+ };
56
+ export type WorkspaceLeaveArgs = {
57
+ id: string;
58
+ };
59
+ export type WorkspaceInviteArgs = {
60
+ id: string;
61
+ emailList: string[];
62
+ role?: WorkspaceRole;
63
+ };
64
+ export type WorkspaceSetDefaultOrderArgs = {
65
+ projects: Array<{
66
+ id: string;
67
+ defaultOrder: number;
68
+ folderId?: string | null;
69
+ }>;
70
+ folders: Array<{
71
+ id: string;
72
+ defaultOrder: number;
73
+ }>;
74
+ workspaceId: string;
75
+ };
76
+ export type WorkspaceUpdateUserProjectSortPreferenceArgs = {
77
+ workspaceId: string;
78
+ projectSortPreference: WorkspaceProjectSortOrder;
79
+ };
@@ -0,0 +1,5 @@
1
+ export * from './commands/index.js';
2
+ export * from './resources/index.js';
3
+ export * from './resource-types.js';
4
+ export * from './request.js';
5
+ export * from './response.js';
@@ -0,0 +1,7 @@
1
+ import type { SyncCommand } from './commands/index.js';
2
+ import type { SyncResourceType } from './resource-types.js';
3
+ export type SyncRequest = {
4
+ commands?: SyncCommand[];
5
+ resourceTypes?: SyncResourceType[];
6
+ syncToken?: string;
7
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * All available Sync API resource types.
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"];
5
+ export type SyncResourceType = (typeof SYNC_RESOURCE_TYPES)[number];
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ export declare const CalendarSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ summary: z.ZodString;
5
+ color: z.ZodNullable<z.ZodString>;
6
+ accountId: z.ZodString;
7
+ isVisible: z.ZodBoolean;
8
+ isTaskCalendar: z.ZodOptional<z.ZodBoolean>;
9
+ }, z.core.$loose>;
10
+ export type Calendar = z.infer<typeof CalendarSchema>;
11
+ export declare const CalendarAccountSchema: z.ZodObject<{
12
+ id: z.ZodString;
13
+ name: z.ZodString;
14
+ type: z.ZodEnum<{
15
+ google: "google";
16
+ microsoft: "microsoft";
17
+ apple: "apple";
18
+ }>;
19
+ isDeleted: z.ZodOptional<z.ZodBoolean>;
20
+ isEventsEnabled: z.ZodOptional<z.ZodBoolean>;
21
+ isTasksEnabled: z.ZodOptional<z.ZodBoolean>;
22
+ isAllDayTasksEnabled: z.ZodOptional<z.ZodBoolean>;
23
+ pendingOperationUntil: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ calendarsSyncState: z.ZodOptional<z.ZodEnum<{
25
+ error: "error";
26
+ synced: "synced";
27
+ syncing: "syncing";
28
+ }>>;
29
+ }, z.core.$loose>;
30
+ export type CalendarAccount = z.infer<typeof CalendarAccountSchema>;
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ export declare const CollaboratorSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ email: z.ZodString;
5
+ fullName: z.ZodString;
6
+ timezone: z.ZodString;
7
+ imageId: z.ZodNullable<z.ZodString>;
8
+ }, z.core.$loose>;
9
+ export type Collaborator = z.infer<typeof CollaboratorSchema>;
10
+ export declare const CollaboratorStateSchema: z.ZodObject<{
11
+ userId: z.ZodString;
12
+ projectId: z.ZodString;
13
+ state: z.ZodEnum<{
14
+ active: "active";
15
+ invited: "invited";
16
+ }>;
17
+ isDeleted: z.ZodBoolean;
18
+ workspaceRole: z.ZodOptional<z.ZodEnum<{
19
+ ADMIN: "ADMIN";
20
+ MEMBER: "MEMBER";
21
+ GUEST: "GUEST";
22
+ }>>;
23
+ }, z.core.$loose>;
24
+ export type CollaboratorState = z.infer<typeof CollaboratorStateSchema>;
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ export declare const CompletedProjectMetadataSchema: z.ZodObject<{
3
+ projectId: z.ZodString;
4
+ archivedSections: z.ZodNumber;
5
+ completedItems: z.ZodNumber;
6
+ }, z.core.$loose>;
7
+ export type CompletedProjectMetadata = z.infer<typeof CompletedProjectMetadataSchema>;
8
+ export declare const CompletedSectionMetadataSchema: z.ZodObject<{
9
+ sectionId: z.ZodString;
10
+ id: z.ZodString;
11
+ completedItems: z.ZodNumber;
12
+ }, z.core.$loose>;
13
+ export type CompletedSectionMetadata = z.infer<typeof CompletedSectionMetadataSchema>;
14
+ export declare const CompletedTaskMetadataSchema: z.ZodObject<{
15
+ itemId: z.ZodString;
16
+ id: z.ZodOptional<z.ZodString>;
17
+ completedItems: z.ZodNumber;
18
+ }, z.core.$loose>;
19
+ export type CompletedTaskMetadata = z.infer<typeof CompletedTaskMetadataSchema>;
20
+ export declare const CompletedInfoSchema: z.ZodUnion<readonly [z.ZodObject<{
21
+ projectId: z.ZodString;
22
+ archivedSections: z.ZodNumber;
23
+ completedItems: z.ZodNumber;
24
+ }, z.core.$loose>, z.ZodObject<{
25
+ sectionId: z.ZodString;
26
+ id: z.ZodString;
27
+ completedItems: z.ZodNumber;
28
+ }, z.core.$loose>, z.ZodObject<{
29
+ itemId: z.ZodString;
30
+ id: z.ZodOptional<z.ZodString>;
31
+ completedItems: z.ZodNumber;
32
+ }, z.core.$loose>]>;
33
+ export type CompletedInfo = z.infer<typeof CompletedInfoSchema>;
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ export declare const FilterSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ query: z.ZodString;
6
+ color: z.ZodString;
7
+ isDeleted: z.ZodBoolean;
8
+ isFavorite: z.ZodBoolean;
9
+ isFrozen: z.ZodBoolean;
10
+ itemOrder: z.ZodNumber;
11
+ }, z.core.$loose>;
12
+ export type Filter = z.infer<typeof FilterSchema>;
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ export declare const FolderSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ workspaceId: z.ZodString;
6
+ isDeleted: z.ZodBoolean;
7
+ defaultOrder: z.ZodNumber;
8
+ childOrder: z.ZodNumber;
9
+ }, z.core.$loose>;
10
+ export type Folder = z.infer<typeof FolderSchema>;
@@ -0,0 +1,17 @@
1
+ export * from './filters.js';
2
+ export * from './collaborators.js';
3
+ export * from './folders.js';
4
+ export * from './tooltips.js';
5
+ export * from './notes.js';
6
+ export * from './workspace-filters.js';
7
+ export * from './workspace-goals.js';
8
+ export * from './calendars.js';
9
+ export * from './reminders.js';
10
+ export * from './completed-info.js';
11
+ export * from './view-options.js';
12
+ export * from './user-plan-limits.js';
13
+ export * from './live-notifications.js';
14
+ export * from './workspaces.js';
15
+ export * from './user.js';
16
+ export * from './user-settings.js';
17
+ export * from './suggestions.js';
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Live notification resource from the Sync API.
4
+ *
5
+ * Uses a base schema with commonly-present fields plus `.passthrough()` for
6
+ * forward compatibility. The Sync API returns 20+ notification variants;
7
+ * fully typing each is too fragile for a library, so we validate the common
8
+ * shape and preserve all extra fields.
9
+ */
10
+ export declare const LiveNotificationSchema: z.ZodObject<{
11
+ id: z.ZodString;
12
+ createdAt: z.ZodString;
13
+ fromUid: z.ZodString;
14
+ notificationType: z.ZodString;
15
+ isUnread: z.ZodBoolean;
16
+ projectId: z.ZodOptional<z.ZodString>;
17
+ invitationId: z.ZodOptional<z.ZodString>;
18
+ itemId: z.ZodOptional<z.ZodString>;
19
+ itemContent: z.ZodOptional<z.ZodString>;
20
+ responsibleUid: z.ZodOptional<z.ZodString>;
21
+ assignedByUid: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$loose>;
23
+ export type LiveNotification = z.infer<typeof LiveNotificationSchema>;
@@ -0,0 +1,34 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Sync API note (comment) resource.
4
+ * Separate from the REST `CommentSchema` which transforms `itemId` to `taskId`.
5
+ */
6
+ export declare const NoteSchema: z.ZodObject<{
7
+ id: z.ZodString;
8
+ itemId: z.ZodOptional<z.ZodString>;
9
+ projectId: z.ZodOptional<z.ZodString>;
10
+ content: z.ZodString;
11
+ postedAt: z.ZodString;
12
+ fileAttachment: z.ZodNullable<z.ZodObject<{
13
+ resourceType: z.ZodString;
14
+ fileName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
+ fileSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
16
+ fileType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ fileUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ fileDuration: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
19
+ uploadState: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
20
+ pending: "pending";
21
+ completed: "completed";
22
+ }>>>;
23
+ image: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ imageWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
25
+ imageHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
26
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
28
+ }, z.core.$strip>>;
29
+ postedUid: z.ZodString;
30
+ uidsToNotify: z.ZodNullable<z.ZodArray<z.ZodString>>;
31
+ reactions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
32
+ isDeleted: z.ZodBoolean;
33
+ }, z.core.$loose>;
34
+ export type Note = z.infer<typeof NoteSchema>;
@@ -0,0 +1,101 @@
1
+ import { z } from 'zod';
2
+ export declare const LocationReminderSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ notifyUid: z.ZodString;
5
+ itemId: z.ZodString;
6
+ projectId: z.ZodOptional<z.ZodString>;
7
+ isDeleted: z.ZodBoolean;
8
+ type: z.ZodLiteral<"location">;
9
+ name: z.ZodString;
10
+ locLat: z.ZodString;
11
+ locLong: z.ZodString;
12
+ locTrigger: z.ZodEnum<{
13
+ on_enter: "on_enter";
14
+ on_leave: "on_leave";
15
+ }>;
16
+ radius: z.ZodNumber;
17
+ }, z.core.$loose>;
18
+ export type LocationReminder = z.infer<typeof LocationReminderSchema>;
19
+ export declare const AbsoluteReminderSchema: z.ZodObject<{
20
+ id: z.ZodString;
21
+ notifyUid: z.ZodString;
22
+ itemId: z.ZodString;
23
+ projectId: z.ZodOptional<z.ZodString>;
24
+ isDeleted: z.ZodBoolean;
25
+ type: z.ZodLiteral<"absolute">;
26
+ due: z.ZodObject<{
27
+ isRecurring: z.ZodBoolean;
28
+ string: z.ZodString;
29
+ date: z.ZodString;
30
+ datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
+ timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
32
+ lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
+ }, z.core.$strip>;
34
+ }, z.core.$loose>;
35
+ export type AbsoluteReminder = z.infer<typeof AbsoluteReminderSchema>;
36
+ export declare const RelativeReminderSchema: z.ZodObject<{
37
+ id: z.ZodString;
38
+ notifyUid: z.ZodString;
39
+ itemId: z.ZodString;
40
+ projectId: z.ZodOptional<z.ZodString>;
41
+ isDeleted: z.ZodBoolean;
42
+ type: z.ZodLiteral<"relative">;
43
+ minuteOffset: z.ZodNumber;
44
+ due: z.ZodOptional<z.ZodObject<{
45
+ isRecurring: z.ZodBoolean;
46
+ string: z.ZodString;
47
+ date: z.ZodString;
48
+ datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
+ timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ }, z.core.$strip>>;
52
+ }, z.core.$loose>;
53
+ export type RelativeReminder = z.infer<typeof RelativeReminderSchema>;
54
+ export declare const ReminderSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
55
+ id: z.ZodString;
56
+ notifyUid: z.ZodString;
57
+ itemId: z.ZodString;
58
+ projectId: z.ZodOptional<z.ZodString>;
59
+ isDeleted: z.ZodBoolean;
60
+ type: z.ZodLiteral<"location">;
61
+ name: z.ZodString;
62
+ locLat: z.ZodString;
63
+ locLong: z.ZodString;
64
+ locTrigger: z.ZodEnum<{
65
+ on_enter: "on_enter";
66
+ on_leave: "on_leave";
67
+ }>;
68
+ radius: z.ZodNumber;
69
+ }, z.core.$loose>, z.ZodObject<{
70
+ id: z.ZodString;
71
+ notifyUid: z.ZodString;
72
+ itemId: z.ZodString;
73
+ projectId: z.ZodOptional<z.ZodString>;
74
+ isDeleted: z.ZodBoolean;
75
+ type: z.ZodLiteral<"absolute">;
76
+ due: z.ZodObject<{
77
+ isRecurring: z.ZodBoolean;
78
+ string: z.ZodString;
79
+ date: z.ZodString;
80
+ datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
+ timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
+ lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
83
+ }, z.core.$strip>;
84
+ }, z.core.$loose>, z.ZodObject<{
85
+ id: z.ZodString;
86
+ notifyUid: z.ZodString;
87
+ itemId: z.ZodString;
88
+ projectId: z.ZodOptional<z.ZodString>;
89
+ isDeleted: z.ZodBoolean;
90
+ type: z.ZodLiteral<"relative">;
91
+ minuteOffset: z.ZodNumber;
92
+ due: z.ZodOptional<z.ZodObject<{
93
+ isRecurring: z.ZodBoolean;
94
+ string: z.ZodString;
95
+ date: z.ZodString;
96
+ datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
+ timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ }, z.core.$strip>>;
100
+ }, z.core.$loose>], "type">;
101
+ export type Reminder = z.infer<typeof ReminderSchema>;