@doist/todoist-sdk 0.0.1 → 8.0.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.
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 +290 -0
  11. package/dist/cjs/todoist-api.js +2636 -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 +287 -0
  123. package/dist/esm/todoist-api.js +2632 -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 +267 -0
  235. package/dist/types/todoist-api.d.ts +1021 -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 +190 -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /**
3
+ * Shared types used across multiple Sync API command argument types.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.WORKSPACE_PROJECT_SORT_ORDERS = exports.REMINDER_SERVICES = exports.COLLABORATOR_ROLES = exports.PROJECT_STATUSES = void 0;
7
+ /** Available project workflow statuses. */
8
+ exports.PROJECT_STATUSES = [
9
+ 'PLANNED',
10
+ 'IN_PROGRESS',
11
+ 'PAUSED',
12
+ 'COMPLETED',
13
+ 'CANCELED',
14
+ ];
15
+ var types_1 = require("../../workspaces/types");
16
+ Object.defineProperty(exports, "COLLABORATOR_ROLES", { enumerable: true, get: function () { return types_1.COLLABORATOR_ROLES; } });
17
+ /** Available reminder notification services. */
18
+ exports.REMINDER_SERVICES = ['default', 'email', 'mobile', 'push', 'no_default'];
19
+ /** Available workspace project sort orders. */
20
+ exports.WORKSPACE_PROJECT_SORT_ORDERS = ['MANUAL', 'A_TO_Z', 'Z_TO_A'];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./commands"), exports);
18
+ __exportStar(require("./resources"), exports);
19
+ __exportStar(require("./resource-types"), exports);
20
+ __exportStar(require("./request"), exports);
21
+ __exportStar(require("./response"), exports);
22
+ __exportStar(require("./user-preferences"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SYNC_RESOURCE_TYPES = void 0;
4
+ /**
5
+ * All available Sync API resource types.
6
+ */
7
+ exports.SYNC_RESOURCE_TYPES = [
8
+ 'labels',
9
+ 'projects',
10
+ 'items',
11
+ 'notes',
12
+ 'project_notes',
13
+ 'sections',
14
+ 'filters',
15
+ 'reminders',
16
+ 'reminders_location',
17
+ 'locations',
18
+ 'user',
19
+ 'live_notifications',
20
+ 'collaborators',
21
+ 'collaborator_states',
22
+ 'user_settings',
23
+ 'notification_settings',
24
+ 'user_plan_limits',
25
+ 'completed_info',
26
+ 'stats',
27
+ 'workspaces',
28
+ 'workspace_users',
29
+ 'workspace_filters',
30
+ 'view_options',
31
+ 'project_view_options_defaults',
32
+ 'role_actions',
33
+ 'folders',
34
+ 'workspace_goals',
35
+ 'day_orders',
36
+ 'calendars',
37
+ 'calendar_accounts',
38
+ 'suggestions',
39
+ 'tooltips',
40
+ ];
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CalendarAccountSchema = exports.CALENDAR_SYNC_STATES = exports.CALENDAR_ACCOUNT_TYPES = exports.CalendarSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CalendarSchema = zod_1.z
6
+ .object({
7
+ id: zod_1.z.string(),
8
+ summary: zod_1.z.string(),
9
+ color: zod_1.z.string().nullable(),
10
+ accountId: zod_1.z.string(),
11
+ isVisible: zod_1.z.boolean(),
12
+ isTaskCalendar: zod_1.z.boolean().optional(),
13
+ })
14
+ .passthrough();
15
+ /** Available calendar account provider types. */
16
+ exports.CALENDAR_ACCOUNT_TYPES = ['google', 'microsoft', 'apple'];
17
+ /** Available calendar sync states. */
18
+ exports.CALENDAR_SYNC_STATES = ['synced', 'syncing', 'error'];
19
+ exports.CalendarAccountSchema = zod_1.z
20
+ .object({
21
+ id: zod_1.z.string(),
22
+ name: zod_1.z.string(),
23
+ type: zod_1.z.enum(exports.CALENDAR_ACCOUNT_TYPES),
24
+ isDeleted: zod_1.z.boolean().optional(),
25
+ isEventsEnabled: zod_1.z.boolean().optional(),
26
+ isTasksEnabled: zod_1.z.boolean().optional(),
27
+ isAllDayTasksEnabled: zod_1.z.boolean().optional(),
28
+ pendingOperationUntil: zod_1.z.string().nullable().optional(),
29
+ calendarsSyncState: zod_1.z.enum(exports.CALENDAR_SYNC_STATES).optional(),
30
+ })
31
+ .passthrough();
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CollaboratorStateSchema = exports.COLLABORATOR_STATUSES = exports.CollaboratorSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const types_1 = require("../../workspaces/types");
6
+ exports.CollaboratorSchema = zod_1.z
7
+ .object({
8
+ id: zod_1.z.string(),
9
+ email: zod_1.z.string(),
10
+ fullName: zod_1.z.string(),
11
+ timezone: zod_1.z.string(),
12
+ imageId: zod_1.z.string().nullable(),
13
+ })
14
+ .passthrough();
15
+ /** Available collaborator statuses. */
16
+ exports.COLLABORATOR_STATUSES = ['active', 'invited'];
17
+ exports.CollaboratorStateSchema = zod_1.z
18
+ .object({
19
+ userId: zod_1.z.string(),
20
+ projectId: zod_1.z.string(),
21
+ state: zod_1.z.enum(exports.COLLABORATOR_STATUSES),
22
+ isDeleted: zod_1.z.boolean(),
23
+ workspaceRole: types_1.WorkspaceRoleSchema.optional(),
24
+ })
25
+ .passthrough();
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompletedInfoSchema = exports.CompletedTaskMetadataSchema = exports.CompletedSectionMetadataSchema = exports.CompletedProjectMetadataSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.CompletedProjectMetadataSchema = zod_1.z
6
+ .object({
7
+ projectId: zod_1.z.string(),
8
+ archivedSections: zod_1.z.number().int(),
9
+ completedItems: zod_1.z.number().int(),
10
+ })
11
+ .passthrough();
12
+ exports.CompletedSectionMetadataSchema = zod_1.z
13
+ .object({
14
+ sectionId: zod_1.z.string(),
15
+ id: zod_1.z.string(),
16
+ completedItems: zod_1.z.number().int(),
17
+ })
18
+ .passthrough();
19
+ exports.CompletedTaskMetadataSchema = zod_1.z
20
+ .object({
21
+ itemId: zod_1.z.string(),
22
+ id: zod_1.z.string().optional(),
23
+ completedItems: zod_1.z.number().int(),
24
+ })
25
+ .passthrough();
26
+ exports.CompletedInfoSchema = zod_1.z.union([
27
+ exports.CompletedProjectMetadataSchema,
28
+ exports.CompletedSectionMetadataSchema,
29
+ exports.CompletedTaskMetadataSchema,
30
+ ]);
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FilterSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.FilterSchema = zod_1.z
6
+ .object({
7
+ id: zod_1.z.string(),
8
+ name: zod_1.z.string(),
9
+ query: zod_1.z.string(),
10
+ color: zod_1.z.string(),
11
+ isDeleted: zod_1.z.boolean(),
12
+ isFavorite: zod_1.z.boolean(),
13
+ isFrozen: zod_1.z.boolean(),
14
+ itemOrder: zod_1.z.number().int(),
15
+ })
16
+ .passthrough();
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FolderSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.FolderSchema = zod_1.z
6
+ .object({
7
+ id: zod_1.z.string(),
8
+ name: zod_1.z.string(),
9
+ workspaceId: zod_1.z.string(),
10
+ isDeleted: zod_1.z.boolean(),
11
+ defaultOrder: zod_1.z.number().int(),
12
+ childOrder: zod_1.z.number().int(),
13
+ })
14
+ .passthrough();
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./filters"), exports);
18
+ __exportStar(require("./collaborators"), exports);
19
+ __exportStar(require("./folders"), exports);
20
+ __exportStar(require("./tooltips"), exports);
21
+ __exportStar(require("./notes"), exports);
22
+ __exportStar(require("./workspace-filters"), exports);
23
+ __exportStar(require("./workspace-goals"), exports);
24
+ __exportStar(require("./calendars"), exports);
25
+ __exportStar(require("./reminders"), exports);
26
+ __exportStar(require("./completed-info"), exports);
27
+ __exportStar(require("./view-options"), exports);
28
+ __exportStar(require("./user-plan-limits"), exports);
29
+ __exportStar(require("./live-notifications"), exports);
30
+ __exportStar(require("./workspaces"), exports);
31
+ __exportStar(require("./user"), exports);
32
+ __exportStar(require("./user-settings"), exports);
33
+ __exportStar(require("./suggestions"), exports);
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiveNotificationSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Live notification resource from the Sync API.
7
+ *
8
+ * Uses a base schema with commonly-present fields plus `.passthrough()` for
9
+ * forward compatibility. The Sync API returns 20+ notification variants;
10
+ * fully typing each is too fragile for a library, so we validate the common
11
+ * shape and preserve all extra fields.
12
+ */
13
+ exports.LiveNotificationSchema = zod_1.z
14
+ .object({
15
+ id: zod_1.z.string(),
16
+ createdAt: zod_1.z.string(),
17
+ fromUid: zod_1.z.string(),
18
+ notificationType: zod_1.z.string(),
19
+ isUnread: zod_1.z.boolean(),
20
+ // Commonly present optional fields
21
+ projectId: zod_1.z.string().optional(),
22
+ invitationId: zod_1.z.string().optional(),
23
+ itemId: zod_1.z.string().optional(),
24
+ itemContent: zod_1.z.string().optional(),
25
+ responsibleUid: zod_1.z.string().optional(),
26
+ assignedByUid: zod_1.z.string().optional(),
27
+ fromUser: zod_1.z
28
+ .object({
29
+ email: zod_1.z.string(),
30
+ fullName: zod_1.z.string(),
31
+ id: zod_1.z.string(),
32
+ imageId: zod_1.z.string().nullable(),
33
+ })
34
+ .optional(),
35
+ projectName: zod_1.z.string().optional(),
36
+ isDeleted: zod_1.z.boolean().optional(),
37
+ invitationSecret: zod_1.z.string().optional(),
38
+ })
39
+ .passthrough();
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NoteSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const types_1 = require("../../comments/types");
6
+ /**
7
+ * Sync API note (comment) resource.
8
+ * Separate from the REST `CommentSchema` which transforms `itemId` to `taskId`.
9
+ */
10
+ exports.NoteSchema = zod_1.z
11
+ .object({
12
+ id: zod_1.z.string(),
13
+ itemId: zod_1.z.string().optional(),
14
+ projectId: zod_1.z.string().optional(),
15
+ content: zod_1.z.string(),
16
+ postedAt: zod_1.z.string(),
17
+ fileAttachment: types_1.AttachmentSchema.nullable(),
18
+ postedUid: zod_1.z.string(),
19
+ uidsToNotify: zod_1.z.array(zod_1.z.string()).nullable(),
20
+ reactions: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.string())).nullable(),
21
+ isDeleted: zod_1.z.boolean(),
22
+ })
23
+ .passthrough();
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReminderSchema = exports.RelativeReminderSchema = exports.AbsoluteReminderSchema = exports.LocationReminderSchema = exports.LOCATION_TRIGGERS = exports.REMINDER_TYPES = exports.ReminderTypeEnum = exports.ReminderBaseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const types_1 = require("../../tasks/types");
6
+ exports.ReminderBaseSchema = zod_1.z.object({
7
+ id: zod_1.z.string(),
8
+ notifyUid: zod_1.z.string(),
9
+ itemId: zod_1.z.string(),
10
+ projectId: zod_1.z.string().optional(),
11
+ isDeleted: zod_1.z.boolean(),
12
+ });
13
+ /** Enum-like object of reminder type values. */
14
+ exports.ReminderTypeEnum = {
15
+ Relative: 'relative',
16
+ Absolute: 'absolute',
17
+ Location: 'location',
18
+ };
19
+ /** Available reminder types. */
20
+ exports.REMINDER_TYPES = [
21
+ exports.ReminderTypeEnum.Relative,
22
+ exports.ReminderTypeEnum.Absolute,
23
+ exports.ReminderTypeEnum.Location,
24
+ ];
25
+ /** Available location reminder triggers. */
26
+ exports.LOCATION_TRIGGERS = ['on_enter', 'on_leave'];
27
+ exports.LocationReminderSchema = exports.ReminderBaseSchema.extend({
28
+ type: zod_1.z.literal(exports.ReminderTypeEnum.Location),
29
+ name: zod_1.z.string(),
30
+ locLat: zod_1.z.string(),
31
+ locLong: zod_1.z.string(),
32
+ locTrigger: zod_1.z.enum(exports.LOCATION_TRIGGERS),
33
+ radius: zod_1.z.number().int(),
34
+ }).passthrough();
35
+ exports.AbsoluteReminderSchema = exports.ReminderBaseSchema.extend({
36
+ type: zod_1.z.literal(exports.ReminderTypeEnum.Absolute),
37
+ due: types_1.DueDateSchema,
38
+ isUrgent: zod_1.z.boolean().optional(),
39
+ }).passthrough();
40
+ exports.RelativeReminderSchema = exports.ReminderBaseSchema.extend({
41
+ type: zod_1.z.literal(exports.ReminderTypeEnum.Relative),
42
+ minuteOffset: zod_1.z.number().int(),
43
+ due: types_1.DueDateSchema.optional(),
44
+ isUrgent: zod_1.z.boolean().optional(),
45
+ }).passthrough();
46
+ exports.ReminderSchema = zod_1.z.discriminatedUnion('type', [
47
+ exports.LocationReminderSchema,
48
+ exports.AbsoluteReminderSchema,
49
+ exports.RelativeReminderSchema,
50
+ ]);
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SuggestionSchema = exports.SyncWorkspaceTemplateSuggestionsSchema = exports.SyncTemplateSuggestionsSchema = exports.SUGGESTION_SECTION_TYPES = exports.WorkspaceTemplateSuggestionSchema = exports.TemplateSuggestionSchema = exports.TEMPLATE_TYPES = void 0;
4
+ const zod_1 = require("zod");
5
+ /** Available template types. */
6
+ exports.TEMPLATE_TYPES = ['project', 'setup'];
7
+ exports.TemplateSuggestionSchema = zod_1.z
8
+ .object({
9
+ id: zod_1.z.string(),
10
+ name: zod_1.z.string(),
11
+ templateType: zod_1.z.enum(exports.TEMPLATE_TYPES),
12
+ })
13
+ .passthrough();
14
+ exports.WorkspaceTemplateSuggestionSchema = exports.TemplateSuggestionSchema.extend({
15
+ workspaceId: zod_1.z.string().nullable(),
16
+ });
17
+ /** Available suggestion section types. */
18
+ exports.SUGGESTION_SECTION_TYPES = ['templates', 'most_used_user_templates'];
19
+ exports.SyncTemplateSuggestionsSchema = zod_1.z
20
+ .object({
21
+ type: zod_1.z.enum(exports.SUGGESTION_SECTION_TYPES),
22
+ content: zod_1.z.object({
23
+ templates: zod_1.z.array(exports.TemplateSuggestionSchema),
24
+ locale: zod_1.z.string(),
25
+ }),
26
+ isDeleted: zod_1.z.boolean(),
27
+ })
28
+ .passthrough();
29
+ exports.SyncWorkspaceTemplateSuggestionsSchema = zod_1.z
30
+ .object({
31
+ type: zod_1.z.literal('most_used_workspace_templates'),
32
+ content: zod_1.z.object({
33
+ templates: zod_1.z.array(exports.WorkspaceTemplateSuggestionSchema),
34
+ locale: zod_1.z.string(),
35
+ }),
36
+ isDeleted: zod_1.z.boolean(),
37
+ })
38
+ .passthrough();
39
+ exports.SuggestionSchema = zod_1.z.union([
40
+ exports.SyncWorkspaceTemplateSuggestionsSchema,
41
+ exports.SyncTemplateSuggestionsSchema,
42
+ ]);
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TooltipsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.TooltipsSchema = zod_1.z
6
+ .object({
7
+ seen: zod_1.z.array(zod_1.z.string()).optional(),
8
+ scheduled: zod_1.z.array(zod_1.z.string()).optional(),
9
+ })
10
+ .passthrough();
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserPlanLimitsSchema = exports.PlanLimitsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.PlanLimitsSchema = zod_1.z
6
+ .object({
7
+ activeProjects: zod_1.z.number().int().optional(),
8
+ activityLog: zod_1.z.number().int().optional(),
9
+ collaboratorsPerProject: zod_1.z.number().int().optional(),
10
+ commentsPerTask: zod_1.z.number().int().optional(),
11
+ fileUploadsPerComment: zod_1.z.number().int().optional(),
12
+ filtersPerUser: zod_1.z.number().int().optional(),
13
+ labelsPerTask: zod_1.z.number().int().optional(),
14
+ remindersPerUser: zod_1.z.number().int().optional(),
15
+ sectionsPerProject: zod_1.z.number().int().optional(),
16
+ tasksPerProject: zod_1.z.number().int().optional(),
17
+ })
18
+ .passthrough();
19
+ exports.UserPlanLimitsSchema = zod_1.z
20
+ .object({
21
+ current: exports.PlanLimitsSchema,
22
+ next: exports.PlanLimitsSchema.nullable(),
23
+ })
24
+ .passthrough();
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserSettingsSchema = exports.QuickAddFeatureSchema = exports.NavigationFeatureSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.NavigationFeatureSchema = zod_1.z.object({
6
+ name: zod_1.z.string(),
7
+ shown: zod_1.z.boolean(),
8
+ });
9
+ exports.QuickAddFeatureSchema = zod_1.z.object({
10
+ name: zod_1.z.string(),
11
+ shown: zod_1.z.boolean(),
12
+ });
13
+ /**
14
+ * Sync API user settings resource.
15
+ */
16
+ exports.UserSettingsSchema = zod_1.z
17
+ .object({
18
+ completedSoundDesktop: zod_1.z.boolean(),
19
+ completedSoundMobile: zod_1.z.boolean(),
20
+ debugLogSendingEnabledUntil: zod_1.z.string().nullable(),
21
+ legacyPricing: zod_1.z.boolean(),
22
+ navigation: zod_1.z
23
+ .object({
24
+ countsShown: zod_1.z.boolean(),
25
+ features: zod_1.z.array(exports.NavigationFeatureSchema),
26
+ })
27
+ .passthrough(),
28
+ reminderDesktop: zod_1.z.boolean(),
29
+ reminderEmail: zod_1.z.boolean(),
30
+ reminderPush: zod_1.z.boolean(),
31
+ resetRecurringSubtasks: zod_1.z.boolean(),
32
+ aiEmailAssist: zod_1.z.boolean(),
33
+ theme: zod_1.z.string().nullable().optional(),
34
+ syncTheme: zod_1.z.boolean().optional(),
35
+ quickAdd: zod_1.z
36
+ .object({
37
+ labelsShown: zod_1.z.boolean(),
38
+ features: zod_1.z.array(exports.QuickAddFeatureSchema),
39
+ })
40
+ .passthrough(),
41
+ })
42
+ .passthrough();
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SyncUserSchema = exports.GettingStartedGuideProjectSchema = exports.JoinableWorkspaceSchema = exports.TzInfoSchema = exports.FeaturesSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const types_1 = require("../../users/types");
6
+ const user_preferences_1 = require("../user-preferences");
7
+ exports.FeaturesSchema = zod_1.z
8
+ .object({
9
+ karmaDisabled: zod_1.z.boolean(),
10
+ restriction: zod_1.z.number().int(),
11
+ karmaVacation: zod_1.z.boolean(),
12
+ dateistLang: zod_1.z.any(),
13
+ beta: user_preferences_1.BooleanFromZeroOneSchema,
14
+ hasPushReminders: zod_1.z.boolean(),
15
+ dateistInlineDisabled: zod_1.z.boolean(),
16
+ autoInviteDisabled: zod_1.z.boolean().optional(),
17
+ goldTheme: zod_1.z.boolean().optional(),
18
+ migratedFromTdb: zod_1.z.boolean().optional(),
19
+ })
20
+ .passthrough();
21
+ exports.TzInfoSchema = zod_1.z
22
+ .object({
23
+ timezone: zod_1.z.string(),
24
+ hours: zod_1.z.number().int(),
25
+ minutes: zod_1.z.number().int(),
26
+ isDst: user_preferences_1.BooleanFromZeroOneSchema,
27
+ gmtString: zod_1.z.string(),
28
+ })
29
+ .passthrough();
30
+ exports.JoinableWorkspaceSchema = zod_1.z
31
+ .object({
32
+ workspaceId: zod_1.z.string(),
33
+ workspaceName: zod_1.z.string(),
34
+ memberCount: zod_1.z.number().int(),
35
+ })
36
+ .passthrough();
37
+ exports.GettingStartedGuideProjectSchema = zod_1.z
38
+ .object({
39
+ onboardingUseCase: zod_1.z.string(),
40
+ projectId: zod_1.z.string(),
41
+ completed: zod_1.z.boolean(),
42
+ closed: zod_1.z.boolean(),
43
+ })
44
+ .passthrough();
45
+ /**
46
+ * Sync API user resource.
47
+ *
48
+ * This is a superset of the REST `CurrentUserSchema` — the Sync API returns
49
+ * many additional fields for features, onboarding state, and account details.
50
+ */
51
+ exports.SyncUserSchema = zod_1.z
52
+ .object({
53
+ id: zod_1.z.string(),
54
+ email: zod_1.z.string(),
55
+ fullName: zod_1.z.string(),
56
+ activatedUser: zod_1.z.boolean(),
57
+ autoReminder: zod_1.z.number().int(),
58
+ avatarBig: zod_1.z.string().optional(),
59
+ avatarMedium: zod_1.z.string().optional(),
60
+ avatarS640: zod_1.z.string().optional(),
61
+ avatarSmall: zod_1.z.string().optional(),
62
+ businessAccountId: zod_1.z.string().nullable(),
63
+ dailyGoal: zod_1.z.number().int(),
64
+ dateFormat: user_preferences_1.DateFormatSchema,
65
+ dateistLang: zod_1.z.string().nullable(),
66
+ daysOff: zod_1.z.array(zod_1.z.number().int()),
67
+ featureIdentifier: zod_1.z.string(),
68
+ features: exports.FeaturesSchema,
69
+ freeTrailExpires: zod_1.z.string().optional(),
70
+ hasMagicNumber: zod_1.z.boolean(),
71
+ hasPassword: zod_1.z.boolean(),
72
+ hasStartedATrial: zod_1.z.boolean().optional(),
73
+ imageId: zod_1.z.string().nullable(),
74
+ inboxProjectId: zod_1.z.string(),
75
+ isCelebrationsEnabled: zod_1.z.boolean(),
76
+ isPremium: zod_1.z.boolean(),
77
+ joinableWorkspace: exports.JoinableWorkspaceSchema.nullable(),
78
+ joinedAt: zod_1.z.string(),
79
+ gettingStartedGuideProjects: zod_1.z.array(exports.GettingStartedGuideProjectSchema).nullable(),
80
+ karma: zod_1.z.number(),
81
+ karmaTrend: zod_1.z.string(),
82
+ lang: zod_1.z.string(),
83
+ mfaEnabled: zod_1.z.boolean().optional(),
84
+ mobileHost: zod_1.z.string().nullable(),
85
+ mobileNumber: zod_1.z.string().nullable(),
86
+ nextWeek: user_preferences_1.DayOfWeekSchema,
87
+ onboardingLevel: zod_1.z.string().nullable().optional(),
88
+ onboardingRole: zod_1.z.string().nullable().optional(),
89
+ onboardingPersona: zod_1.z.string().nullable().optional(),
90
+ onboardingInitiated: zod_1.z.boolean().nullable().optional(),
91
+ onboardingCompleted: zod_1.z.boolean().nullable().optional(),
92
+ onboardingSkipped: zod_1.z.boolean().optional(),
93
+ onboardingTeamMode: zod_1.z.boolean().nullable().optional(),
94
+ onboardingUseCases: zod_1.z.array(zod_1.z.string()).nullable().optional(),
95
+ premiumStatus: zod_1.z.enum(types_1.PREMIUM_STATUSES),
96
+ premiumUntil: zod_1.z.string().nullable(),
97
+ rambleSessionsUsage: zod_1.z
98
+ .object({
99
+ currentCount: zod_1.z.number().int(),
100
+ limit: zod_1.z.number().int(),
101
+ remaining: zod_1.z.number().int(),
102
+ resetDate: zod_1.z.string(),
103
+ })
104
+ .nullable()
105
+ .optional(),
106
+ shareLimit: zod_1.z.number().int(),
107
+ sortOrder: zod_1.z.number().int(),
108
+ startDay: user_preferences_1.DayOfWeekSchema,
109
+ startPage: zod_1.z.string(),
110
+ themeId: zod_1.z.string(),
111
+ timeFormat: user_preferences_1.TimeFormatSchema,
112
+ token: zod_1.z.string(),
113
+ tzInfo: exports.TzInfoSchema,
114
+ uniquePrefix: zod_1.z.number().int(),
115
+ verificationStatus: zod_1.z.string(),
116
+ websocketUrl: zod_1.z.string(),
117
+ weekendStartDay: zod_1.z.number().int(),
118
+ weeklyGoal: zod_1.z.number().int(),
119
+ })
120
+ .passthrough();