@doist/todoist-sdk 0.0.1 → 8.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 (340) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +194 -29
  3. package/dist/cjs/authentication.js +204 -0
  4. package/dist/cjs/consts/endpoints.js +141 -0
  5. package/dist/cjs/index.js +20 -0
  6. package/dist/cjs/package.json +1 -0
  7. package/dist/cjs/test-utils/asserts.js +11 -0
  8. package/dist/cjs/test-utils/msw-setup.js +97 -0
  9. package/dist/cjs/test-utils/obsidian-fetch-adapter.js +53 -0
  10. package/dist/cjs/test-utils/test-defaults.js +240 -0
  11. package/dist/cjs/todoist-api.js +2623 -0
  12. package/dist/cjs/transport/fetch-with-retry.js +206 -0
  13. package/dist/cjs/transport/http-client.js +133 -0
  14. package/dist/cjs/transport/http-dispatcher.js +72 -0
  15. package/dist/cjs/types/activity/index.js +18 -0
  16. package/dist/cjs/types/activity/requests.js +2 -0
  17. package/dist/cjs/types/activity/types.js +28 -0
  18. package/dist/cjs/types/backups/index.js +18 -0
  19. package/dist/cjs/types/backups/requests.js +2 -0
  20. package/dist/cjs/types/backups/types.js +8 -0
  21. package/dist/cjs/types/comments/index.js +18 -0
  22. package/dist/cjs/types/comments/requests.js +2 -0
  23. package/dist/cjs/types/comments/types.js +60 -0
  24. package/dist/cjs/types/common.js +10 -0
  25. package/dist/cjs/types/emails/index.js +17 -0
  26. package/dist/cjs/types/emails/requests.js +5 -0
  27. package/dist/cjs/types/errors.js +29 -0
  28. package/dist/cjs/types/folders/index.js +17 -0
  29. package/dist/cjs/types/folders/requests.js +2 -0
  30. package/dist/cjs/types/http.js +24 -0
  31. package/dist/cjs/types/id-mappings/index.js +18 -0
  32. package/dist/cjs/types/id-mappings/requests.js +20 -0
  33. package/dist/cjs/types/id-mappings/types.js +12 -0
  34. package/dist/cjs/types/index.js +36 -0
  35. package/dist/cjs/types/insights/index.js +18 -0
  36. package/dist/cjs/types/insights/requests.js +2 -0
  37. package/dist/cjs/types/insights/types.js +84 -0
  38. package/dist/cjs/types/labels/index.js +18 -0
  39. package/dist/cjs/types/labels/requests.js +2 -0
  40. package/dist/cjs/types/labels/types.js +11 -0
  41. package/dist/cjs/types/productivity/index.js +17 -0
  42. package/dist/cjs/types/productivity/types.js +67 -0
  43. package/dist/cjs/types/projects/index.js +18 -0
  44. package/dist/cjs/types/projects/requests.js +2 -0
  45. package/dist/cjs/types/projects/types.js +56 -0
  46. package/dist/cjs/types/reminders/index.js +17 -0
  47. package/dist/cjs/types/reminders/requests.js +95 -0
  48. package/dist/cjs/types/sections/index.js +18 -0
  49. package/dist/cjs/types/sections/requests.js +2 -0
  50. package/dist/cjs/types/sections/types.js +22 -0
  51. package/dist/cjs/types/sync/commands/calendars.js +2 -0
  52. package/dist/cjs/types/sync/commands/filters.js +2 -0
  53. package/dist/cjs/types/sync/commands/folders.js +2 -0
  54. package/dist/cjs/types/sync/commands/index.js +35 -0
  55. package/dist/cjs/types/sync/commands/labels.js +5 -0
  56. package/dist/cjs/types/sync/commands/notes.js +2 -0
  57. package/dist/cjs/types/sync/commands/notifications.js +2 -0
  58. package/dist/cjs/types/sync/commands/others.js +2 -0
  59. package/dist/cjs/types/sync/commands/project-view-options.js +2 -0
  60. package/dist/cjs/types/sync/commands/projects.js +2 -0
  61. package/dist/cjs/types/sync/commands/reminders.js +2 -0
  62. package/dist/cjs/types/sync/commands/sections.js +2 -0
  63. package/dist/cjs/types/sync/commands/shared.js +20 -0
  64. package/dist/cjs/types/sync/commands/sharing.js +2 -0
  65. package/dist/cjs/types/sync/commands/tasks.js +2 -0
  66. package/dist/cjs/types/sync/commands/view-options.js +2 -0
  67. package/dist/cjs/types/sync/commands/workspace-filters.js +2 -0
  68. package/dist/cjs/types/sync/commands/workspace-goals.js +2 -0
  69. package/dist/cjs/types/sync/commands/workspaces.js +2 -0
  70. package/dist/cjs/types/sync/index.js +22 -0
  71. package/dist/cjs/types/sync/request.js +2 -0
  72. package/dist/cjs/types/sync/resource-types.js +40 -0
  73. package/dist/cjs/types/sync/resources/calendars.js +31 -0
  74. package/dist/cjs/types/sync/resources/collaborators.js +25 -0
  75. package/dist/cjs/types/sync/resources/completed-info.js +30 -0
  76. package/dist/cjs/types/sync/resources/filters.js +16 -0
  77. package/dist/cjs/types/sync/resources/folders.js +14 -0
  78. package/dist/cjs/types/sync/resources/index.js +33 -0
  79. package/dist/cjs/types/sync/resources/live-notifications.js +39 -0
  80. package/dist/cjs/types/sync/resources/notes.js +23 -0
  81. package/dist/cjs/types/sync/resources/reminders.js +50 -0
  82. package/dist/cjs/types/sync/resources/suggestions.js +42 -0
  83. package/dist/cjs/types/sync/resources/tooltips.js +10 -0
  84. package/dist/cjs/types/sync/resources/user-plan-limits.js +24 -0
  85. package/dist/cjs/types/sync/resources/user-settings.js +42 -0
  86. package/dist/cjs/types/sync/resources/user.js +120 -0
  87. package/dist/cjs/types/sync/resources/view-options.js +83 -0
  88. package/dist/cjs/types/sync/resources/workspace-filters.js +21 -0
  89. package/dist/cjs/types/sync/resources/workspace-goals.js +32 -0
  90. package/dist/cjs/types/sync/resources/workspaces.js +73 -0
  91. package/dist/cjs/types/sync/response.js +2 -0
  92. package/dist/cjs/types/sync/user-preferences.js +71 -0
  93. package/dist/cjs/types/tasks/index.js +18 -0
  94. package/dist/cjs/types/tasks/requests.js +2 -0
  95. package/dist/cjs/types/tasks/types.js +59 -0
  96. package/dist/cjs/types/templates/index.js +17 -0
  97. package/dist/cjs/types/templates/requests.js +2 -0
  98. package/dist/cjs/types/uploads/index.js +17 -0
  99. package/dist/cjs/types/uploads/requests.js +2 -0
  100. package/dist/cjs/types/users/index.js +17 -0
  101. package/dist/cjs/types/users/types.js +51 -0
  102. package/dist/cjs/types/workspaces/index.js +18 -0
  103. package/dist/cjs/types/workspaces/requests.js +2 -0
  104. package/dist/cjs/types/workspaces/types.js +155 -0
  105. package/dist/cjs/utils/activity-helpers.js +58 -0
  106. package/dist/cjs/utils/case-conversion.js +69 -0
  107. package/dist/cjs/utils/colors.js +143 -0
  108. package/dist/cjs/utils/index.js +25 -0
  109. package/dist/cjs/utils/multipart-upload.js +178 -0
  110. package/dist/cjs/utils/processing-helpers.js +18 -0
  111. package/dist/cjs/utils/sanitization.js +116 -0
  112. package/dist/cjs/utils/sync-helpers.js +22 -0
  113. package/dist/cjs/utils/uncompletable-helpers.js +60 -0
  114. package/dist/cjs/utils/url-helpers.js +74 -0
  115. package/dist/cjs/utils/validators.js +141 -0
  116. package/dist/esm/authentication.js +196 -0
  117. package/dist/esm/consts/endpoints.js +122 -0
  118. package/dist/esm/index.js +4 -0
  119. package/dist/esm/test-utils/asserts.js +8 -0
  120. package/dist/esm/test-utils/msw-setup.js +88 -0
  121. package/dist/esm/test-utils/obsidian-fetch-adapter.js +50 -0
  122. package/dist/esm/test-utils/test-defaults.js +237 -0
  123. package/dist/esm/todoist-api.js +2619 -0
  124. package/dist/esm/transport/fetch-with-retry.js +203 -0
  125. package/dist/esm/transport/http-client.js +128 -0
  126. package/dist/esm/transport/http-dispatcher.js +35 -0
  127. package/dist/esm/types/activity/index.js +2 -0
  128. package/dist/esm/types/activity/requests.js +1 -0
  129. package/dist/esm/types/activity/types.js +25 -0
  130. package/dist/esm/types/backups/index.js +2 -0
  131. package/dist/esm/types/backups/requests.js +1 -0
  132. package/dist/esm/types/backups/types.js +5 -0
  133. package/dist/esm/types/comments/index.js +2 -0
  134. package/dist/esm/types/comments/requests.js +1 -0
  135. package/dist/esm/types/comments/types.js +57 -0
  136. package/dist/esm/types/common.js +7 -0
  137. package/dist/esm/types/emails/index.js +1 -0
  138. package/dist/esm/types/emails/requests.js +2 -0
  139. package/dist/esm/types/errors.js +24 -0
  140. package/dist/esm/types/folders/index.js +1 -0
  141. package/dist/esm/types/folders/requests.js +1 -0
  142. package/dist/esm/types/http.js +20 -0
  143. package/dist/esm/types/id-mappings/index.js +2 -0
  144. package/dist/esm/types/id-mappings/requests.js +17 -0
  145. package/dist/esm/types/id-mappings/types.js +9 -0
  146. package/dist/esm/types/index.js +20 -0
  147. package/dist/esm/types/insights/index.js +2 -0
  148. package/dist/esm/types/insights/requests.js +1 -0
  149. package/dist/esm/types/insights/types.js +81 -0
  150. package/dist/esm/types/labels/index.js +2 -0
  151. package/dist/esm/types/labels/requests.js +1 -0
  152. package/dist/esm/types/labels/types.js +8 -0
  153. package/dist/esm/types/productivity/index.js +1 -0
  154. package/dist/esm/types/productivity/types.js +64 -0
  155. package/dist/esm/types/projects/index.js +2 -0
  156. package/dist/esm/types/projects/requests.js +1 -0
  157. package/dist/esm/types/projects/types.js +53 -0
  158. package/dist/esm/types/reminders/index.js +1 -0
  159. package/dist/esm/types/reminders/requests.js +92 -0
  160. package/dist/esm/types/sections/index.js +2 -0
  161. package/dist/esm/types/sections/requests.js +1 -0
  162. package/dist/esm/types/sections/types.js +19 -0
  163. package/dist/esm/types/sync/commands/calendars.js +1 -0
  164. package/dist/esm/types/sync/commands/filters.js +1 -0
  165. package/dist/esm/types/sync/commands/folders.js +1 -0
  166. package/dist/esm/types/sync/commands/index.js +19 -0
  167. package/dist/esm/types/sync/commands/labels.js +2 -0
  168. package/dist/esm/types/sync/commands/notes.js +1 -0
  169. package/dist/esm/types/sync/commands/notifications.js +1 -0
  170. package/dist/esm/types/sync/commands/others.js +1 -0
  171. package/dist/esm/types/sync/commands/project-view-options.js +1 -0
  172. package/dist/esm/types/sync/commands/projects.js +1 -0
  173. package/dist/esm/types/sync/commands/reminders.js +1 -0
  174. package/dist/esm/types/sync/commands/sections.js +1 -0
  175. package/dist/esm/types/sync/commands/shared.js +16 -0
  176. package/dist/esm/types/sync/commands/sharing.js +1 -0
  177. package/dist/esm/types/sync/commands/tasks.js +1 -0
  178. package/dist/esm/types/sync/commands/view-options.js +1 -0
  179. package/dist/esm/types/sync/commands/workspace-filters.js +1 -0
  180. package/dist/esm/types/sync/commands/workspace-goals.js +1 -0
  181. package/dist/esm/types/sync/commands/workspaces.js +1 -0
  182. package/dist/esm/types/sync/index.js +6 -0
  183. package/dist/esm/types/sync/request.js +1 -0
  184. package/dist/esm/types/sync/resource-types.js +37 -0
  185. package/dist/esm/types/sync/resources/calendars.js +28 -0
  186. package/dist/esm/types/sync/resources/collaborators.js +22 -0
  187. package/dist/esm/types/sync/resources/completed-info.js +27 -0
  188. package/dist/esm/types/sync/resources/filters.js +13 -0
  189. package/dist/esm/types/sync/resources/folders.js +11 -0
  190. package/dist/esm/types/sync/resources/index.js +17 -0
  191. package/dist/esm/types/sync/resources/live-notifications.js +36 -0
  192. package/dist/esm/types/sync/resources/notes.js +20 -0
  193. package/dist/esm/types/sync/resources/reminders.js +47 -0
  194. package/dist/esm/types/sync/resources/suggestions.js +39 -0
  195. package/dist/esm/types/sync/resources/tooltips.js +7 -0
  196. package/dist/esm/types/sync/resources/user-plan-limits.js +21 -0
  197. package/dist/esm/types/sync/resources/user-settings.js +39 -0
  198. package/dist/esm/types/sync/resources/user.js +117 -0
  199. package/dist/esm/types/sync/resources/view-options.js +80 -0
  200. package/dist/esm/types/sync/resources/workspace-filters.js +18 -0
  201. package/dist/esm/types/sync/resources/workspace-goals.js +29 -0
  202. package/dist/esm/types/sync/resources/workspaces.js +70 -0
  203. package/dist/esm/types/sync/response.js +1 -0
  204. package/dist/esm/types/sync/user-preferences.js +68 -0
  205. package/dist/esm/types/tasks/index.js +2 -0
  206. package/dist/esm/types/tasks/requests.js +1 -0
  207. package/dist/esm/types/tasks/types.js +56 -0
  208. package/dist/esm/types/templates/index.js +1 -0
  209. package/dist/esm/types/templates/requests.js +1 -0
  210. package/dist/esm/types/uploads/index.js +1 -0
  211. package/dist/esm/types/uploads/requests.js +1 -0
  212. package/dist/esm/types/users/index.js +1 -0
  213. package/dist/esm/types/users/types.js +48 -0
  214. package/dist/esm/types/workspaces/index.js +2 -0
  215. package/dist/esm/types/workspaces/requests.js +1 -0
  216. package/dist/esm/types/workspaces/types.js +152 -0
  217. package/dist/esm/utils/activity-helpers.js +53 -0
  218. package/dist/esm/utils/case-conversion.js +61 -0
  219. package/dist/esm/utils/colors.js +139 -0
  220. package/dist/esm/utils/index.js +4 -0
  221. package/dist/esm/utils/multipart-upload.js +142 -0
  222. package/dist/esm/utils/processing-helpers.js +12 -0
  223. package/dist/esm/utils/sanitization.js +112 -0
  224. package/dist/esm/utils/sync-helpers.js +19 -0
  225. package/dist/esm/utils/uncompletable-helpers.js +54 -0
  226. package/dist/esm/utils/url-helpers.js +68 -0
  227. package/dist/esm/utils/validators.js +132 -0
  228. package/dist/types/authentication.d.ts +158 -0
  229. package/dist/types/consts/endpoints.d.ts +81 -0
  230. package/dist/types/index.d.ts +4 -0
  231. package/dist/types/test-utils/asserts.d.ts +1 -0
  232. package/dist/types/test-utils/msw-setup.d.ts +33 -0
  233. package/dist/types/test-utils/obsidian-fetch-adapter.d.ts +29 -0
  234. package/dist/types/test-utils/test-defaults.d.ts +261 -0
  235. package/dist/types/todoist-api.d.ts +1018 -0
  236. package/dist/types/transport/fetch-with-retry.d.ts +12 -0
  237. package/dist/types/transport/http-client.d.ts +16 -0
  238. package/dist/types/transport/http-dispatcher.d.ts +3 -0
  239. package/dist/types/types/activity/index.d.ts +2 -0
  240. package/dist/types/types/activity/requests.d.ts +85 -0
  241. package/dist/types/types/activity/types.d.ts +49 -0
  242. package/dist/types/types/backups/index.d.ts +2 -0
  243. package/dist/types/types/backups/requests.d.ts +16 -0
  244. package/dist/types/types/backups/types.d.ts +7 -0
  245. package/dist/types/types/comments/index.d.ts +2 -0
  246. package/dist/types/types/comments/requests.d.ts +64 -0
  247. package/dist/types/types/comments/types.d.ts +141 -0
  248. package/dist/types/types/common.d.ts +13 -0
  249. package/dist/types/types/emails/index.d.ts +1 -0
  250. package/dist/types/types/emails/requests.d.ts +30 -0
  251. package/dist/types/types/errors.d.ts +12 -0
  252. package/dist/types/types/folders/index.d.ts +1 -0
  253. package/dist/types/types/folders/requests.d.ts +20 -0
  254. package/dist/types/types/http.d.ts +85 -0
  255. package/dist/types/types/id-mappings/index.d.ts +2 -0
  256. package/dist/types/types/id-mappings/requests.d.ts +28 -0
  257. package/dist/types/types/id-mappings/types.d.ts +13 -0
  258. package/dist/types/types/index.d.ts +20 -0
  259. package/dist/types/types/insights/index.d.ts +2 -0
  260. package/dist/types/types/insights/requests.d.ts +26 -0
  261. package/dist/types/types/insights/types.d.ts +186 -0
  262. package/dist/types/types/labels/index.d.ts +2 -0
  263. package/dist/types/types/labels/requests.d.ts +75 -0
  264. package/dist/types/types/labels/types.d.ts +13 -0
  265. package/dist/types/types/productivity/index.d.ts +1 -0
  266. package/dist/types/types/productivity/types.d.ts +115 -0
  267. package/dist/types/types/projects/index.d.ts +2 -0
  268. package/dist/types/types/projects/requests.d.ts +169 -0
  269. package/dist/types/types/projects/types.d.ts +201 -0
  270. package/dist/types/types/reminders/index.d.ts +1 -0
  271. package/dist/types/types/reminders/requests.d.ts +205 -0
  272. package/dist/types/types/sections/index.d.ts +2 -0
  273. package/dist/types/types/sections/requests.d.ts +41 -0
  274. package/dist/types/types/sections/types.d.ts +44 -0
  275. package/dist/types/types/sync/commands/calendars.d.ts +14 -0
  276. package/dist/types/types/sync/commands/filters.d.ts +22 -0
  277. package/dist/types/types/sync/commands/folders.d.ts +18 -0
  278. package/dist/types/types/sync/commands/index.d.ts +171 -0
  279. package/dist/types/types/sync/commands/labels.d.ts +32 -0
  280. package/dist/types/types/sync/commands/notes.d.ts +27 -0
  281. package/dist/types/types/sync/commands/notifications.d.ts +10 -0
  282. package/dist/types/types/sync/commands/others.d.ts +39 -0
  283. package/dist/types/types/sync/commands/project-view-options.d.ts +14 -0
  284. package/dist/types/types/sync/commands/projects.d.ts +90 -0
  285. package/dist/types/types/sync/commands/reminders.d.ts +51 -0
  286. package/dist/types/types/sync/commands/sections.d.ts +31 -0
  287. package/dist/types/types/sync/commands/shared.d.ts +51 -0
  288. package/dist/types/types/sync/commands/sharing.d.ts +16 -0
  289. package/dist/types/types/sync/commands/tasks.d.ts +78 -0
  290. package/dist/types/types/sync/commands/view-options.d.ts +15 -0
  291. package/dist/types/types/sync/commands/workspace-filters.d.ts +23 -0
  292. package/dist/types/types/sync/commands/workspace-goals.d.ts +24 -0
  293. package/dist/types/types/sync/commands/workspaces.d.ts +79 -0
  294. package/dist/types/types/sync/index.d.ts +6 -0
  295. package/dist/types/types/sync/request.d.ts +7 -0
  296. package/dist/types/types/sync/resource-types.d.ts +5 -0
  297. package/dist/types/types/sync/resources/calendars.d.ts +38 -0
  298. package/dist/types/types/sync/resources/collaborators.d.ts +28 -0
  299. package/dist/types/types/sync/resources/completed-info.d.ts +33 -0
  300. package/dist/types/types/sync/resources/filters.d.ts +12 -0
  301. package/dist/types/types/sync/resources/folders.d.ts +10 -0
  302. package/dist/types/types/sync/resources/index.d.ts +17 -0
  303. package/dist/types/types/sync/resources/live-notifications.d.ts +32 -0
  304. package/dist/types/types/sync/resources/notes.d.ts +34 -0
  305. package/dist/types/types/sync/resources/reminders.d.ts +126 -0
  306. package/dist/types/types/sync/resources/suggestions.d.ts +96 -0
  307. package/dist/types/types/sync/resources/tooltips.d.ts +6 -0
  308. package/dist/types/types/sync/resources/user-plan-limits.d.ts +41 -0
  309. package/dist/types/types/sync/resources/user-settings.d.ts +40 -0
  310. package/dist/types/types/sync/resources/user.d.ts +134 -0
  311. package/dist/types/types/sync/resources/view-options.d.ts +169 -0
  312. package/dist/types/types/sync/resources/workspace-filters.d.ts +17 -0
  313. package/dist/types/types/sync/resources/workspace-goals.d.ts +29 -0
  314. package/dist/types/types/sync/resources/workspaces.d.ts +142 -0
  315. package/dist/types/types/sync/response.d.ts +51 -0
  316. package/dist/types/types/sync/user-preferences.d.ts +39 -0
  317. package/dist/types/types/tasks/index.d.ts +2 -0
  318. package/dist/types/types/tasks/requests.d.ts +197 -0
  319. package/dist/types/types/tasks/types.d.ts +162 -0
  320. package/dist/types/types/templates/index.d.ts +1 -0
  321. package/dist/types/types/templates/requests.d.ts +92 -0
  322. package/dist/types/types/uploads/index.d.ts +1 -0
  323. package/dist/types/types/uploads/requests.d.ts +32 -0
  324. package/dist/types/types/users/index.d.ts +1 -0
  325. package/dist/types/types/users/types.d.ts +66 -0
  326. package/dist/types/types/workspaces/index.d.ts +2 -0
  327. package/dist/types/types/workspaces/requests.d.ts +260 -0
  328. package/dist/types/types/workspaces/types.d.ts +267 -0
  329. package/dist/types/utils/activity-helpers.d.ts +28 -0
  330. package/dist/types/utils/case-conversion.d.ts +12 -0
  331. package/dist/types/utils/colors.d.ts +197 -0
  332. package/dist/types/utils/index.d.ts +4 -0
  333. package/dist/types/utils/multipart-upload.d.ts +54 -0
  334. package/dist/types/utils/processing-helpers.d.ts +1 -0
  335. package/dist/types/utils/sanitization.d.ts +35 -0
  336. package/dist/types/utils/sync-helpers.d.ts +17 -0
  337. package/dist/types/utils/uncompletable-helpers.d.ts +30 -0
  338. package/dist/types/utils/url-helpers.d.ts +32 -0
  339. package/dist/types/utils/validators.d.ts +1404 -0
  340. package/package.json +99 -8
@@ -0,0 +1,134 @@
1
+ import { z } from 'zod';
2
+ export declare const FeaturesSchema: z.ZodObject<{
3
+ karmaDisabled: z.ZodBoolean;
4
+ restriction: z.ZodNumber;
5
+ karmaVacation: z.ZodBoolean;
6
+ dateistLang: z.ZodAny;
7
+ beta: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<boolean, 0 | 1>>;
8
+ hasPushReminders: z.ZodBoolean;
9
+ dateistInlineDisabled: z.ZodBoolean;
10
+ autoInviteDisabled: z.ZodOptional<z.ZodBoolean>;
11
+ goldTheme: z.ZodOptional<z.ZodBoolean>;
12
+ migratedFromTdb: z.ZodOptional<z.ZodBoolean>;
13
+ }, z.core.$loose>;
14
+ export declare const TzInfoSchema: z.ZodObject<{
15
+ timezone: z.ZodString;
16
+ hours: z.ZodNumber;
17
+ minutes: z.ZodNumber;
18
+ isDst: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<boolean, 0 | 1>>;
19
+ gmtString: z.ZodString;
20
+ }, z.core.$loose>;
21
+ export declare const JoinableWorkspaceSchema: z.ZodObject<{
22
+ workspaceId: z.ZodString;
23
+ workspaceName: z.ZodString;
24
+ memberCount: z.ZodNumber;
25
+ }, z.core.$loose>;
26
+ export declare const GettingStartedGuideProjectSchema: z.ZodObject<{
27
+ onboardingUseCase: z.ZodString;
28
+ projectId: z.ZodString;
29
+ completed: z.ZodBoolean;
30
+ closed: z.ZodBoolean;
31
+ }, z.core.$loose>;
32
+ /**
33
+ * Sync API user resource.
34
+ *
35
+ * This is a superset of the REST `CurrentUserSchema` — the Sync API returns
36
+ * many additional fields for features, onboarding state, and account details.
37
+ */
38
+ export declare const SyncUserSchema: z.ZodObject<{
39
+ id: z.ZodString;
40
+ email: z.ZodString;
41
+ fullName: z.ZodString;
42
+ activatedUser: z.ZodBoolean;
43
+ autoReminder: z.ZodNumber;
44
+ avatarBig: z.ZodOptional<z.ZodString>;
45
+ avatarMedium: z.ZodOptional<z.ZodString>;
46
+ avatarS640: z.ZodOptional<z.ZodString>;
47
+ avatarSmall: z.ZodOptional<z.ZodString>;
48
+ businessAccountId: z.ZodNullable<z.ZodString>;
49
+ dailyGoal: z.ZodNumber;
50
+ dateFormat: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"DD/MM/YYYY" | "MM/DD/YYYY", 0 | 1>>;
51
+ dateistLang: z.ZodNullable<z.ZodString>;
52
+ daysOff: z.ZodArray<z.ZodNumber>;
53
+ featureIdentifier: z.ZodString;
54
+ features: z.ZodObject<{
55
+ karmaDisabled: z.ZodBoolean;
56
+ restriction: z.ZodNumber;
57
+ karmaVacation: z.ZodBoolean;
58
+ dateistLang: z.ZodAny;
59
+ beta: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<boolean, 0 | 1>>;
60
+ hasPushReminders: z.ZodBoolean;
61
+ dateistInlineDisabled: z.ZodBoolean;
62
+ autoInviteDisabled: z.ZodOptional<z.ZodBoolean>;
63
+ goldTheme: z.ZodOptional<z.ZodBoolean>;
64
+ migratedFromTdb: z.ZodOptional<z.ZodBoolean>;
65
+ }, z.core.$loose>;
66
+ freeTrailExpires: z.ZodOptional<z.ZodString>;
67
+ hasMagicNumber: z.ZodBoolean;
68
+ hasPassword: z.ZodBoolean;
69
+ hasStartedATrial: z.ZodOptional<z.ZodBoolean>;
70
+ imageId: z.ZodNullable<z.ZodString>;
71
+ inboxProjectId: z.ZodString;
72
+ isCelebrationsEnabled: z.ZodBoolean;
73
+ isPremium: z.ZodBoolean;
74
+ joinableWorkspace: z.ZodNullable<z.ZodObject<{
75
+ workspaceId: z.ZodString;
76
+ workspaceName: z.ZodString;
77
+ memberCount: z.ZodNumber;
78
+ }, z.core.$loose>>;
79
+ joinedAt: z.ZodString;
80
+ gettingStartedGuideProjects: z.ZodNullable<z.ZodArray<z.ZodObject<{
81
+ onboardingUseCase: z.ZodString;
82
+ projectId: z.ZodString;
83
+ completed: z.ZodBoolean;
84
+ closed: z.ZodBoolean;
85
+ }, z.core.$loose>>>;
86
+ karma: z.ZodNumber;
87
+ karmaTrend: z.ZodString;
88
+ lang: z.ZodString;
89
+ mfaEnabled: z.ZodOptional<z.ZodBoolean>;
90
+ mobileHost: z.ZodNullable<z.ZodString>;
91
+ mobileNumber: z.ZodNullable<z.ZodString>;
92
+ nextWeek: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 2 | 1 | 3 | 4 | 5 | 6 | 7>>;
93
+ onboardingLevel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ onboardingRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ onboardingPersona: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
+ onboardingInitiated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
97
+ onboardingCompleted: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
98
+ onboardingSkipped: z.ZodOptional<z.ZodBoolean>;
99
+ onboardingTeamMode: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
100
+ onboardingUseCases: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
101
+ premiumStatus: z.ZodEnum<{
102
+ not_premium: "not_premium";
103
+ current_personal_plan: "current_personal_plan";
104
+ legacy_personal_plan: "legacy_personal_plan";
105
+ teams_business_member: "teams_business_member";
106
+ }>;
107
+ premiumUntil: z.ZodNullable<z.ZodString>;
108
+ rambleSessionsUsage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
109
+ currentCount: z.ZodNumber;
110
+ limit: z.ZodNumber;
111
+ remaining: z.ZodNumber;
112
+ resetDate: z.ZodString;
113
+ }, z.core.$strip>>>;
114
+ shareLimit: z.ZodNumber;
115
+ sortOrder: z.ZodNumber;
116
+ startDay: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 2 | 1 | 3 | 4 | 5 | 6 | 7>>;
117
+ startPage: z.ZodString;
118
+ themeId: z.ZodString;
119
+ timeFormat: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"24h" | "12h", 0 | 1>>;
120
+ token: z.ZodString;
121
+ tzInfo: z.ZodObject<{
122
+ timezone: z.ZodString;
123
+ hours: z.ZodNumber;
124
+ minutes: z.ZodNumber;
125
+ isDst: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<boolean, 0 | 1>>;
126
+ gmtString: z.ZodString;
127
+ }, z.core.$loose>;
128
+ uniquePrefix: z.ZodNumber;
129
+ verificationStatus: z.ZodString;
130
+ websocketUrl: z.ZodString;
131
+ weekendStartDay: z.ZodNumber;
132
+ weeklyGoal: z.ZodNumber;
133
+ }, z.core.$loose>;
134
+ export type SyncUser = z.infer<typeof SyncUserSchema>;
@@ -0,0 +1,169 @@
1
+ import { z } from 'zod';
2
+ /** Available view types. */
3
+ export declare const VIEW_TYPES: readonly ["TODAY", "UPCOMING", "PROJECT", "LABEL", "FILTER", "WORKSPACE_FILTER", "SEARCH", "TEMPLATE_PREVIEW", "TASK_DETAIL", "AUTOMATION", "ASSIGNED", "OVERDUE", "WORKSPACE_OVERVIEW"];
4
+ /** Type of view in the Todoist UI. */
5
+ export type ViewType = (typeof VIEW_TYPES)[number];
6
+ export declare const ViewTypeSchema: z.ZodEnum<{
7
+ PROJECT: "PROJECT";
8
+ TODAY: "TODAY";
9
+ UPCOMING: "UPCOMING";
10
+ LABEL: "LABEL";
11
+ FILTER: "FILTER";
12
+ WORKSPACE_FILTER: "WORKSPACE_FILTER";
13
+ SEARCH: "SEARCH";
14
+ TEMPLATE_PREVIEW: "TEMPLATE_PREVIEW";
15
+ TASK_DETAIL: "TASK_DETAIL";
16
+ AUTOMATION: "AUTOMATION";
17
+ ASSIGNED: "ASSIGNED";
18
+ OVERDUE: "OVERDUE";
19
+ WORKSPACE_OVERVIEW: "WORKSPACE_OVERVIEW";
20
+ }>;
21
+ /** Available view modes. */
22
+ export declare const VIEW_MODES: readonly ["LIST", "BOARD", "CALENDAR"];
23
+ /** Display mode for a view. */
24
+ export type ViewMode = (typeof VIEW_MODES)[number];
25
+ export declare const ViewModeSchema: z.ZodEnum<{
26
+ LIST: "LIST";
27
+ BOARD: "BOARD";
28
+ CALENDAR: "CALENDAR";
29
+ }>;
30
+ /** Available grouping options. */
31
+ export declare const GROUPED_BY_OPTIONS: readonly ["ASSIGNEE", "ADDED_DATE", "DUE_DATE", "DEADLINE", "LABEL", "PRIORITY", "PROJECT", "WORKSPACE"];
32
+ /** Field to group tasks by. */
33
+ export type GroupedBy = (typeof GROUPED_BY_OPTIONS)[number];
34
+ export declare const GroupedBySchema: z.ZodNullable<z.ZodEnum<{
35
+ PROJECT: "PROJECT";
36
+ LABEL: "LABEL";
37
+ ASSIGNEE: "ASSIGNEE";
38
+ ADDED_DATE: "ADDED_DATE";
39
+ DUE_DATE: "DUE_DATE";
40
+ DEADLINE: "DEADLINE";
41
+ PRIORITY: "PRIORITY";
42
+ WORKSPACE: "WORKSPACE";
43
+ }>>;
44
+ /** Available sorting options. */
45
+ export declare const SORTED_BY_OPTIONS: readonly ["MANUAL", "ALPHABETICALLY", "ASSIGNEE", "DUE_DATE", "DEADLINE", "ADDED_DATE", "PRIORITY", "PROJECT", "WORKSPACE"];
46
+ /** Field to sort tasks by. */
47
+ export type SortedBy = (typeof SORTED_BY_OPTIONS)[number];
48
+ export declare const SortedBySchema: z.ZodNullable<z.ZodEnum<{
49
+ PROJECT: "PROJECT";
50
+ MANUAL: "MANUAL";
51
+ ASSIGNEE: "ASSIGNEE";
52
+ ADDED_DATE: "ADDED_DATE";
53
+ DUE_DATE: "DUE_DATE";
54
+ DEADLINE: "DEADLINE";
55
+ PRIORITY: "PRIORITY";
56
+ WORKSPACE: "WORKSPACE";
57
+ ALPHABETICALLY: "ALPHABETICALLY";
58
+ }>>;
59
+ /** Available sort directions. */
60
+ export declare const SORT_ORDERS: readonly ["ASC", "DESC"];
61
+ /** Sort direction. */
62
+ export type SortOrder = (typeof SORT_ORDERS)[number];
63
+ export declare const SortOrderSchema: z.ZodNullable<z.ZodEnum<{
64
+ ASC: "ASC";
65
+ DESC: "DESC";
66
+ }>>;
67
+ /** Available calendar layout modes. */
68
+ export declare const CALENDAR_LAYOUTS: readonly ["WEEK", "MONTH"];
69
+ /** Calendar layout mode. */
70
+ export type CalendarLayout = (typeof CALENDAR_LAYOUTS)[number];
71
+ export declare const CalendarSettingsSchema: z.ZodObject<{
72
+ layout: z.ZodOptional<z.ZodEnum<{
73
+ WEEK: "WEEK";
74
+ MONTH: "MONTH";
75
+ }>>;
76
+ }, z.core.$loose>;
77
+ export declare const ViewOptionsSchema: z.ZodObject<{
78
+ viewType: z.ZodEnum<{
79
+ PROJECT: "PROJECT";
80
+ TODAY: "TODAY";
81
+ UPCOMING: "UPCOMING";
82
+ LABEL: "LABEL";
83
+ FILTER: "FILTER";
84
+ WORKSPACE_FILTER: "WORKSPACE_FILTER";
85
+ SEARCH: "SEARCH";
86
+ TEMPLATE_PREVIEW: "TEMPLATE_PREVIEW";
87
+ TASK_DETAIL: "TASK_DETAIL";
88
+ AUTOMATION: "AUTOMATION";
89
+ ASSIGNED: "ASSIGNED";
90
+ OVERDUE: "OVERDUE";
91
+ WORKSPACE_OVERVIEW: "WORKSPACE_OVERVIEW";
92
+ }>;
93
+ objectId: z.ZodOptional<z.ZodString>;
94
+ groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
95
+ PROJECT: "PROJECT";
96
+ LABEL: "LABEL";
97
+ ASSIGNEE: "ASSIGNEE";
98
+ ADDED_DATE: "ADDED_DATE";
99
+ DUE_DATE: "DUE_DATE";
100
+ DEADLINE: "DEADLINE";
101
+ PRIORITY: "PRIORITY";
102
+ WORKSPACE: "WORKSPACE";
103
+ }>>>;
104
+ filteredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
105
+ viewMode: z.ZodOptional<z.ZodEnum<{
106
+ LIST: "LIST";
107
+ BOARD: "BOARD";
108
+ CALENDAR: "CALENDAR";
109
+ }>>;
110
+ showCompletedTasks: z.ZodOptional<z.ZodBoolean>;
111
+ sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
112
+ PROJECT: "PROJECT";
113
+ MANUAL: "MANUAL";
114
+ ASSIGNEE: "ASSIGNEE";
115
+ ADDED_DATE: "ADDED_DATE";
116
+ DUE_DATE: "DUE_DATE";
117
+ DEADLINE: "DEADLINE";
118
+ PRIORITY: "PRIORITY";
119
+ WORKSPACE: "WORKSPACE";
120
+ ALPHABETICALLY: "ALPHABETICALLY";
121
+ }>>>;
122
+ sortOrder: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
123
+ ASC: "ASC";
124
+ DESC: "DESC";
125
+ }>>>;
126
+ }, z.core.$loose>;
127
+ export type ViewOptions = z.infer<typeof ViewOptionsSchema>;
128
+ export declare const ProjectViewOptionsDefaultsSchema: z.ZodObject<{
129
+ projectId: z.ZodString;
130
+ viewMode: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
131
+ LIST: "LIST";
132
+ BOARD: "BOARD";
133
+ CALENDAR: "CALENDAR";
134
+ }>>>;
135
+ groupedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
136
+ PROJECT: "PROJECT";
137
+ LABEL: "LABEL";
138
+ ASSIGNEE: "ASSIGNEE";
139
+ ADDED_DATE: "ADDED_DATE";
140
+ DUE_DATE: "DUE_DATE";
141
+ DEADLINE: "DEADLINE";
142
+ PRIORITY: "PRIORITY";
143
+ WORKSPACE: "WORKSPACE";
144
+ }>>>;
145
+ sortedBy: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
146
+ PROJECT: "PROJECT";
147
+ MANUAL: "MANUAL";
148
+ ASSIGNEE: "ASSIGNEE";
149
+ ADDED_DATE: "ADDED_DATE";
150
+ DUE_DATE: "DUE_DATE";
151
+ DEADLINE: "DEADLINE";
152
+ PRIORITY: "PRIORITY";
153
+ WORKSPACE: "WORKSPACE";
154
+ ALPHABETICALLY: "ALPHABETICALLY";
155
+ }>>>;
156
+ sortOrder: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
157
+ ASC: "ASC";
158
+ DESC: "DESC";
159
+ }>>>;
160
+ showCompletedTasks: z.ZodOptional<z.ZodBoolean>;
161
+ filteredBy: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
+ calendarSettings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
163
+ layout: z.ZodOptional<z.ZodEnum<{
164
+ WEEK: "WEEK";
165
+ MONTH: "MONTH";
166
+ }>>;
167
+ }, z.core.$loose>>>;
168
+ }, z.core.$loose>;
169
+ export type ProjectViewOptionsDefaults = z.infer<typeof ProjectViewOptionsDefaultsSchema>;
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const WorkspaceFilterSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ workspaceId: z.ZodString;
5
+ name: z.ZodString;
6
+ query: z.ZodString;
7
+ color: z.ZodString;
8
+ itemOrder: z.ZodNumber;
9
+ isDeleted: z.ZodBoolean;
10
+ isFavorite: z.ZodBoolean;
11
+ isFrozen: z.ZodBoolean;
12
+ creatorUid: z.ZodString;
13
+ updaterUid: z.ZodString;
14
+ createdAt: z.ZodString;
15
+ updatedAt: z.ZodString;
16
+ }, z.core.$loose>;
17
+ export type WorkspaceFilter = z.infer<typeof WorkspaceFilterSchema>;
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ export declare const WorkspaceGoalMilestoneSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ title: z.ZodString;
5
+ isCompleted: z.ZodBoolean;
6
+ }, z.core.$loose>;
7
+ export type WorkspaceGoalMilestone = z.infer<typeof WorkspaceGoalMilestoneSchema>;
8
+ export declare const WorkspaceGoalProgressSchema: z.ZodObject<{
9
+ completedItems: z.ZodNumber;
10
+ totalItems: z.ZodNumber;
11
+ }, z.core.$loose>;
12
+ export type WorkspaceGoalProgress = z.infer<typeof WorkspaceGoalProgressSchema>;
13
+ export declare const WorkspaceGoalSchema: z.ZodObject<{
14
+ id: z.ZodString;
15
+ workspaceId: z.ZodString;
16
+ title: z.ZodString;
17
+ description: z.ZodNullable<z.ZodString>;
18
+ deadline: z.ZodNullable<z.ZodString>;
19
+ isDeleted: z.ZodBoolean;
20
+ projectIds: z.ZodArray<z.ZodString>;
21
+ progress: z.ZodNullable<z.ZodObject<{
22
+ completedItems: z.ZodNumber;
23
+ totalItems: z.ZodNumber;
24
+ }, z.core.$loose>>;
25
+ creatorUid: z.ZodString;
26
+ createdAt: z.ZodString;
27
+ updatedAt: z.ZodString;
28
+ }, z.core.$loose>;
29
+ export type WorkspaceGoal = z.infer<typeof WorkspaceGoalSchema>;
@@ -0,0 +1,142 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Sync API workspace resource.
4
+ *
5
+ * This is a superset of the REST `WorkspaceSchema` — the Sync API returns
6
+ * additional fields like description, isDeleted, isCollapsed, member counts,
7
+ * domain settings, and sorting preferences.
8
+ */
9
+ export declare const SyncWorkspaceSchema: z.ZodPipe<z.ZodObject<{
10
+ id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
11
+ name: z.ZodString;
12
+ description: z.ZodString;
13
+ logoBig: z.ZodOptional<z.ZodString>;
14
+ logoMedium: z.ZodOptional<z.ZodString>;
15
+ logoSmall: z.ZodOptional<z.ZodString>;
16
+ logoS640: z.ZodOptional<z.ZodString>;
17
+ creatorId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
18
+ createdAt: z.ZodOptional<z.ZodString>;
19
+ dateCreated: z.ZodOptional<z.ZodString>;
20
+ isDeleted: z.ZodBoolean;
21
+ isCollapsed: z.ZodBoolean;
22
+ role: z.ZodOptional<z.ZodEnum<{
23
+ ADMIN: "ADMIN";
24
+ MEMBER: "MEMBER";
25
+ GUEST: "GUEST";
26
+ }>>;
27
+ plan: z.ZodEnum<{
28
+ STARTER: "STARTER";
29
+ BUSINESS: "BUSINESS";
30
+ }>;
31
+ limits: z.ZodOptional<z.ZodObject<{
32
+ current: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
33
+ next: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
34
+ }, z.core.$catchall<z.ZodAny>>>;
35
+ inviteCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ isLinkSharingEnabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
37
+ isGuestAllowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
38
+ currentActiveProjects: z.ZodNullable<z.ZodNumber>;
39
+ currentMemberCount: z.ZodNullable<z.ZodNumber>;
40
+ memberCountByType: z.ZodOptional<z.ZodObject<{
41
+ adminCount: z.ZodNumber;
42
+ guestCount: z.ZodNumber;
43
+ memberCount: z.ZodNumber;
44
+ }, z.core.$strip>>;
45
+ currentTemplateCount: z.ZodNullable<z.ZodNumber>;
46
+ pendingInvitations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
47
+ domainName: z.ZodOptional<z.ZodString>;
48
+ domainDiscovery: z.ZodOptional<z.ZodBoolean>;
49
+ restrictEmailDomains: z.ZodOptional<z.ZodBoolean>;
50
+ adminSortingApplied: z.ZodBoolean;
51
+ projectSortPreference: z.ZodOptional<z.ZodString>;
52
+ defaultCollaborators: z.ZodOptional<z.ZodObject<{
53
+ predefinedGroupIds: z.ZodArray<z.ZodString>;
54
+ userIds: z.ZodArray<z.ZodNumber>;
55
+ }, z.core.$strip>>;
56
+ properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
57
+ }, z.core.$loose>, z.ZodTransform<{
58
+ createdAt: string | undefined;
59
+ id: string;
60
+ name: string;
61
+ description: string;
62
+ creatorId: string;
63
+ isDeleted: boolean;
64
+ isCollapsed: boolean;
65
+ plan: "STARTER" | "BUSINESS";
66
+ currentActiveProjects: number | null;
67
+ currentMemberCount: number | null;
68
+ currentTemplateCount: number | null;
69
+ adminSortingApplied: boolean;
70
+ logoBig?: string | undefined;
71
+ logoMedium?: string | undefined;
72
+ logoSmall?: string | undefined;
73
+ logoS640?: string | undefined;
74
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
75
+ limits?: {
76
+ [x: string]: any;
77
+ current: Record<string, any> | null;
78
+ next: Record<string, any> | null;
79
+ } | undefined;
80
+ inviteCode?: string | null | undefined;
81
+ isLinkSharingEnabled?: boolean | null | undefined;
82
+ isGuestAllowed?: boolean | null | undefined;
83
+ memberCountByType?: {
84
+ adminCount: number;
85
+ guestCount: number;
86
+ memberCount: number;
87
+ } | undefined;
88
+ pendingInvitations?: string[] | null | undefined;
89
+ domainName?: string | undefined;
90
+ domainDiscovery?: boolean | undefined;
91
+ restrictEmailDomains?: boolean | undefined;
92
+ projectSortPreference?: string | undefined;
93
+ defaultCollaborators?: {
94
+ predefinedGroupIds: string[];
95
+ userIds: number[];
96
+ } | undefined;
97
+ properties?: Record<string, unknown> | undefined;
98
+ }, {
99
+ [x: string]: unknown;
100
+ id: string;
101
+ name: string;
102
+ description: string;
103
+ creatorId: string;
104
+ isDeleted: boolean;
105
+ isCollapsed: boolean;
106
+ plan: "STARTER" | "BUSINESS";
107
+ currentActiveProjects: number | null;
108
+ currentMemberCount: number | null;
109
+ currentTemplateCount: number | null;
110
+ adminSortingApplied: boolean;
111
+ logoBig?: string | undefined;
112
+ logoMedium?: string | undefined;
113
+ logoSmall?: string | undefined;
114
+ logoS640?: string | undefined;
115
+ createdAt?: string | undefined;
116
+ dateCreated?: string | undefined;
117
+ role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
118
+ limits?: {
119
+ [x: string]: any;
120
+ current: Record<string, any> | null;
121
+ next: Record<string, any> | null;
122
+ } | undefined;
123
+ inviteCode?: string | null | undefined;
124
+ isLinkSharingEnabled?: boolean | null | undefined;
125
+ isGuestAllowed?: boolean | null | undefined;
126
+ memberCountByType?: {
127
+ adminCount: number;
128
+ guestCount: number;
129
+ memberCount: number;
130
+ } | undefined;
131
+ pendingInvitations?: string[] | null | undefined;
132
+ domainName?: string | undefined;
133
+ domainDiscovery?: boolean | undefined;
134
+ restrictEmailDomains?: boolean | undefined;
135
+ projectSortPreference?: string | undefined;
136
+ defaultCollaborators?: {
137
+ predefinedGroupIds: string[];
138
+ userIds: number[];
139
+ } | undefined;
140
+ properties?: Record<string, unknown> | undefined;
141
+ }>>;
142
+ export type SyncWorkspace = z.infer<typeof SyncWorkspaceSchema>;
@@ -0,0 +1,51 @@
1
+ import type { Task } from '../tasks/types.js';
2
+ import type { PersonalProject, WorkspaceProject } from '../projects/types.js';
3
+ import type { Section } from '../sections/types.js';
4
+ import type { Label } from '../labels/types.js';
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';
7
+ export type SyncError = {
8
+ error: string;
9
+ errorCode: number;
10
+ errorExtra: Record<string, unknown>;
11
+ errorTag: string;
12
+ httpCode: number;
13
+ };
14
+ export type SyncResponse = {
15
+ syncToken?: string;
16
+ fullSync?: boolean;
17
+ syncStatus?: Record<string, 'ok' | SyncError>;
18
+ tempIdMapping?: Record<string, string>;
19
+ items?: Task[];
20
+ projects?: (PersonalProject | WorkspaceProject)[];
21
+ sections?: Section[];
22
+ labels?: Label[];
23
+ notes?: Note[];
24
+ projectNotes?: Note[];
25
+ filters?: Filter[];
26
+ reminders?: Reminder[];
27
+ remindersLocation?: LocationReminder[];
28
+ locations?: Record<string, unknown>[];
29
+ user?: SyncUser;
30
+ liveNotifications?: LiveNotification[];
31
+ collaborators?: Collaborator[];
32
+ collaboratorStates?: CollaboratorState[];
33
+ userSettings?: UserSettings;
34
+ notificationSettings?: Record<string, boolean>;
35
+ userPlanLimits?: UserPlanLimits;
36
+ completedInfo?: CompletedInfo[];
37
+ stats?: Record<string, unknown>;
38
+ workspaces?: SyncWorkspace[];
39
+ workspaceUsers?: WorkspaceUser[];
40
+ workspaceFilters?: WorkspaceFilter[];
41
+ viewOptions?: ViewOptions[];
42
+ projectViewOptionsDefaults?: ProjectViewOptionsDefaults[];
43
+ roleActions?: Record<string, unknown>[];
44
+ folders?: Folder[];
45
+ workspaceGoals?: WorkspaceGoal[];
46
+ dayOrders?: Record<string, number>;
47
+ calendars?: Calendar[];
48
+ calendarAccounts?: CalendarAccount[];
49
+ suggestions?: Suggestion[];
50
+ tooltips?: Tooltips;
51
+ };
@@ -0,0 +1,39 @@
1
+ import { z } from 'zod';
2
+ /** Available date format options. */
3
+ export declare const DATE_FORMATS: readonly ["DD/MM/YYYY", "MM/DD/YYYY"];
4
+ /** User date format preference. */
5
+ export type DateFormat = (typeof DATE_FORMATS)[number];
6
+ /** Available time format options. */
7
+ export declare const TIME_FORMATS: readonly ["24h", "12h"];
8
+ /** User time format preference. */
9
+ export type TimeFormat = (typeof TIME_FORMATS)[number];
10
+ /** Available days of the week. */
11
+ export declare const DAYS_OF_WEEK: readonly ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
12
+ /** Day of the week. */
13
+ export type DayOfWeek = (typeof DAYS_OF_WEEK)[number];
14
+ export declare const DATE_FORMAT_FROM_API: {
15
+ readonly 0: "DD/MM/YYYY";
16
+ readonly 1: "MM/DD/YYYY";
17
+ };
18
+ export declare const TIME_FORMAT_FROM_API: {
19
+ readonly 0: "24h";
20
+ readonly 1: "12h";
21
+ };
22
+ export declare const DAY_OF_WEEK_FROM_API: {
23
+ readonly 1: "Monday";
24
+ readonly 2: "Tuesday";
25
+ readonly 3: "Wednesday";
26
+ readonly 4: "Thursday";
27
+ readonly 5: "Friday";
28
+ readonly 6: "Saturday";
29
+ readonly 7: "Sunday";
30
+ };
31
+ export declare const DATE_FORMAT_TO_API: Record<DateFormat, 0 | 1>;
32
+ export declare const TIME_FORMAT_TO_API: Record<TimeFormat, 0 | 1>;
33
+ export declare const DAY_OF_WEEK_TO_API: Record<DayOfWeek, 1 | 2 | 3 | 4 | 5 | 6 | 7>;
34
+ /** Zod read-schema: parse API 0/1 integer, emit boolean */
35
+ export declare const BooleanFromZeroOneSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<boolean, 0 | 1>>;
36
+ /** Zod read-schemas: parse API numbers, emit descriptive strings */
37
+ export declare const DateFormatSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"DD/MM/YYYY" | "MM/DD/YYYY", 0 | 1>>;
38
+ export declare const TimeFormatSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<0>, z.ZodLiteral<1>]>, z.ZodTransform<"24h" | "12h", 0 | 1>>;
39
+ export declare const DayOfWeekSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>, z.ZodLiteral<5>, z.ZodLiteral<6>, z.ZodLiteral<7>]>, z.ZodTransform<"Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday", 2 | 1 | 3 | 4 | 5 | 6 | 7>>;
@@ -0,0 +1,2 @@
1
+ export * from './types.js';
2
+ export * from './requests.js';