@doist/todoist-api-typescript 7.9.1 → 7.10.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 (343) hide show
  1. package/README.md +5 -204
  2. package/index.d.ts +1 -0
  3. package/index.js +1 -0
  4. package/index.mjs +1 -0
  5. package/package.json +12 -92
  6. package/LICENSE +0 -21
  7. package/dist/cjs/authentication.js +0 -204
  8. package/dist/cjs/consts/endpoints.js +0 -141
  9. package/dist/cjs/index.js +0 -20
  10. package/dist/cjs/package.json +0 -1
  11. package/dist/cjs/test-utils/asserts.js +0 -11
  12. package/dist/cjs/test-utils/msw-setup.js +0 -97
  13. package/dist/cjs/test-utils/obsidian-fetch-adapter.js +0 -53
  14. package/dist/cjs/test-utils/test-defaults.js +0 -240
  15. package/dist/cjs/todoist-api.js +0 -2623
  16. package/dist/cjs/transport/fetch-with-retry.js +0 -206
  17. package/dist/cjs/transport/http-client.js +0 -133
  18. package/dist/cjs/transport/http-dispatcher.js +0 -72
  19. package/dist/cjs/types/activity/index.js +0 -18
  20. package/dist/cjs/types/activity/requests.js +0 -2
  21. package/dist/cjs/types/activity/types.js +0 -28
  22. package/dist/cjs/types/backups/index.js +0 -18
  23. package/dist/cjs/types/backups/requests.js +0 -2
  24. package/dist/cjs/types/backups/types.js +0 -8
  25. package/dist/cjs/types/comments/index.js +0 -18
  26. package/dist/cjs/types/comments/requests.js +0 -2
  27. package/dist/cjs/types/comments/types.js +0 -60
  28. package/dist/cjs/types/common.js +0 -10
  29. package/dist/cjs/types/emails/index.js +0 -17
  30. package/dist/cjs/types/emails/requests.js +0 -5
  31. package/dist/cjs/types/errors.js +0 -29
  32. package/dist/cjs/types/folders/index.js +0 -17
  33. package/dist/cjs/types/folders/requests.js +0 -2
  34. package/dist/cjs/types/http.js +0 -24
  35. package/dist/cjs/types/id-mappings/index.js +0 -18
  36. package/dist/cjs/types/id-mappings/requests.js +0 -20
  37. package/dist/cjs/types/id-mappings/types.js +0 -12
  38. package/dist/cjs/types/index.js +0 -36
  39. package/dist/cjs/types/insights/index.js +0 -18
  40. package/dist/cjs/types/insights/requests.js +0 -2
  41. package/dist/cjs/types/insights/types.js +0 -84
  42. package/dist/cjs/types/labels/index.js +0 -18
  43. package/dist/cjs/types/labels/requests.js +0 -2
  44. package/dist/cjs/types/labels/types.js +0 -11
  45. package/dist/cjs/types/productivity/index.js +0 -17
  46. package/dist/cjs/types/productivity/types.js +0 -67
  47. package/dist/cjs/types/projects/index.js +0 -18
  48. package/dist/cjs/types/projects/requests.js +0 -2
  49. package/dist/cjs/types/projects/types.js +0 -56
  50. package/dist/cjs/types/reminders/index.js +0 -17
  51. package/dist/cjs/types/reminders/requests.js +0 -95
  52. package/dist/cjs/types/sections/index.js +0 -18
  53. package/dist/cjs/types/sections/requests.js +0 -2
  54. package/dist/cjs/types/sections/types.js +0 -22
  55. package/dist/cjs/types/sync/commands/calendars.js +0 -2
  56. package/dist/cjs/types/sync/commands/filters.js +0 -2
  57. package/dist/cjs/types/sync/commands/folders.js +0 -2
  58. package/dist/cjs/types/sync/commands/index.js +0 -35
  59. package/dist/cjs/types/sync/commands/labels.js +0 -5
  60. package/dist/cjs/types/sync/commands/notes.js +0 -2
  61. package/dist/cjs/types/sync/commands/notifications.js +0 -2
  62. package/dist/cjs/types/sync/commands/others.js +0 -2
  63. package/dist/cjs/types/sync/commands/project-view-options.js +0 -2
  64. package/dist/cjs/types/sync/commands/projects.js +0 -2
  65. package/dist/cjs/types/sync/commands/reminders.js +0 -2
  66. package/dist/cjs/types/sync/commands/sections.js +0 -2
  67. package/dist/cjs/types/sync/commands/shared.js +0 -20
  68. package/dist/cjs/types/sync/commands/sharing.js +0 -2
  69. package/dist/cjs/types/sync/commands/tasks.js +0 -2
  70. package/dist/cjs/types/sync/commands/view-options.js +0 -2
  71. package/dist/cjs/types/sync/commands/workspace-filters.js +0 -2
  72. package/dist/cjs/types/sync/commands/workspace-goals.js +0 -2
  73. package/dist/cjs/types/sync/commands/workspaces.js +0 -2
  74. package/dist/cjs/types/sync/index.js +0 -22
  75. package/dist/cjs/types/sync/request.js +0 -2
  76. package/dist/cjs/types/sync/resource-types.js +0 -40
  77. package/dist/cjs/types/sync/resources/calendars.js +0 -31
  78. package/dist/cjs/types/sync/resources/collaborators.js +0 -25
  79. package/dist/cjs/types/sync/resources/completed-info.js +0 -30
  80. package/dist/cjs/types/sync/resources/filters.js +0 -16
  81. package/dist/cjs/types/sync/resources/folders.js +0 -14
  82. package/dist/cjs/types/sync/resources/index.js +0 -33
  83. package/dist/cjs/types/sync/resources/live-notifications.js +0 -39
  84. package/dist/cjs/types/sync/resources/notes.js +0 -23
  85. package/dist/cjs/types/sync/resources/reminders.js +0 -50
  86. package/dist/cjs/types/sync/resources/suggestions.js +0 -42
  87. package/dist/cjs/types/sync/resources/tooltips.js +0 -10
  88. package/dist/cjs/types/sync/resources/user-plan-limits.js +0 -24
  89. package/dist/cjs/types/sync/resources/user-settings.js +0 -42
  90. package/dist/cjs/types/sync/resources/user.js +0 -120
  91. package/dist/cjs/types/sync/resources/view-options.js +0 -83
  92. package/dist/cjs/types/sync/resources/workspace-filters.js +0 -21
  93. package/dist/cjs/types/sync/resources/workspace-goals.js +0 -32
  94. package/dist/cjs/types/sync/resources/workspaces.js +0 -73
  95. package/dist/cjs/types/sync/response.js +0 -2
  96. package/dist/cjs/types/sync/user-preferences.js +0 -71
  97. package/dist/cjs/types/tasks/index.js +0 -18
  98. package/dist/cjs/types/tasks/requests.js +0 -2
  99. package/dist/cjs/types/tasks/types.js +0 -59
  100. package/dist/cjs/types/templates/index.js +0 -17
  101. package/dist/cjs/types/templates/requests.js +0 -2
  102. package/dist/cjs/types/uploads/index.js +0 -17
  103. package/dist/cjs/types/uploads/requests.js +0 -2
  104. package/dist/cjs/types/users/index.js +0 -17
  105. package/dist/cjs/types/users/types.js +0 -51
  106. package/dist/cjs/types/workspaces/index.js +0 -18
  107. package/dist/cjs/types/workspaces/requests.js +0 -2
  108. package/dist/cjs/types/workspaces/types.js +0 -155
  109. package/dist/cjs/utils/activity-helpers.js +0 -58
  110. package/dist/cjs/utils/case-conversion.js +0 -69
  111. package/dist/cjs/utils/colors.js +0 -143
  112. package/dist/cjs/utils/index.js +0 -25
  113. package/dist/cjs/utils/multipart-upload.js +0 -178
  114. package/dist/cjs/utils/processing-helpers.js +0 -18
  115. package/dist/cjs/utils/sanitization.js +0 -116
  116. package/dist/cjs/utils/sync-helpers.js +0 -22
  117. package/dist/cjs/utils/uncompletable-helpers.js +0 -60
  118. package/dist/cjs/utils/url-helpers.js +0 -74
  119. package/dist/cjs/utils/validators.js +0 -141
  120. package/dist/esm/authentication.js +0 -196
  121. package/dist/esm/consts/endpoints.js +0 -122
  122. package/dist/esm/index.js +0 -4
  123. package/dist/esm/test-utils/asserts.js +0 -8
  124. package/dist/esm/test-utils/msw-setup.js +0 -88
  125. package/dist/esm/test-utils/obsidian-fetch-adapter.js +0 -50
  126. package/dist/esm/test-utils/test-defaults.js +0 -237
  127. package/dist/esm/todoist-api.js +0 -2619
  128. package/dist/esm/transport/fetch-with-retry.js +0 -203
  129. package/dist/esm/transport/http-client.js +0 -128
  130. package/dist/esm/transport/http-dispatcher.js +0 -35
  131. package/dist/esm/types/activity/index.js +0 -2
  132. package/dist/esm/types/activity/requests.js +0 -1
  133. package/dist/esm/types/activity/types.js +0 -25
  134. package/dist/esm/types/backups/index.js +0 -2
  135. package/dist/esm/types/backups/requests.js +0 -1
  136. package/dist/esm/types/backups/types.js +0 -5
  137. package/dist/esm/types/comments/index.js +0 -2
  138. package/dist/esm/types/comments/requests.js +0 -1
  139. package/dist/esm/types/comments/types.js +0 -57
  140. package/dist/esm/types/common.js +0 -7
  141. package/dist/esm/types/emails/index.js +0 -1
  142. package/dist/esm/types/emails/requests.js +0 -2
  143. package/dist/esm/types/errors.js +0 -24
  144. package/dist/esm/types/folders/index.js +0 -1
  145. package/dist/esm/types/folders/requests.js +0 -1
  146. package/dist/esm/types/http.js +0 -20
  147. package/dist/esm/types/id-mappings/index.js +0 -2
  148. package/dist/esm/types/id-mappings/requests.js +0 -17
  149. package/dist/esm/types/id-mappings/types.js +0 -9
  150. package/dist/esm/types/index.js +0 -20
  151. package/dist/esm/types/insights/index.js +0 -2
  152. package/dist/esm/types/insights/requests.js +0 -1
  153. package/dist/esm/types/insights/types.js +0 -81
  154. package/dist/esm/types/labels/index.js +0 -2
  155. package/dist/esm/types/labels/requests.js +0 -1
  156. package/dist/esm/types/labels/types.js +0 -8
  157. package/dist/esm/types/productivity/index.js +0 -1
  158. package/dist/esm/types/productivity/types.js +0 -64
  159. package/dist/esm/types/projects/index.js +0 -2
  160. package/dist/esm/types/projects/requests.js +0 -1
  161. package/dist/esm/types/projects/types.js +0 -53
  162. package/dist/esm/types/reminders/index.js +0 -1
  163. package/dist/esm/types/reminders/requests.js +0 -92
  164. package/dist/esm/types/sections/index.js +0 -2
  165. package/dist/esm/types/sections/requests.js +0 -1
  166. package/dist/esm/types/sections/types.js +0 -19
  167. package/dist/esm/types/sync/commands/calendars.js +0 -1
  168. package/dist/esm/types/sync/commands/filters.js +0 -1
  169. package/dist/esm/types/sync/commands/folders.js +0 -1
  170. package/dist/esm/types/sync/commands/index.js +0 -19
  171. package/dist/esm/types/sync/commands/labels.js +0 -2
  172. package/dist/esm/types/sync/commands/notes.js +0 -1
  173. package/dist/esm/types/sync/commands/notifications.js +0 -1
  174. package/dist/esm/types/sync/commands/others.js +0 -1
  175. package/dist/esm/types/sync/commands/project-view-options.js +0 -1
  176. package/dist/esm/types/sync/commands/projects.js +0 -1
  177. package/dist/esm/types/sync/commands/reminders.js +0 -1
  178. package/dist/esm/types/sync/commands/sections.js +0 -1
  179. package/dist/esm/types/sync/commands/shared.js +0 -16
  180. package/dist/esm/types/sync/commands/sharing.js +0 -1
  181. package/dist/esm/types/sync/commands/tasks.js +0 -1
  182. package/dist/esm/types/sync/commands/view-options.js +0 -1
  183. package/dist/esm/types/sync/commands/workspace-filters.js +0 -1
  184. package/dist/esm/types/sync/commands/workspace-goals.js +0 -1
  185. package/dist/esm/types/sync/commands/workspaces.js +0 -1
  186. package/dist/esm/types/sync/index.js +0 -6
  187. package/dist/esm/types/sync/request.js +0 -1
  188. package/dist/esm/types/sync/resource-types.js +0 -37
  189. package/dist/esm/types/sync/resources/calendars.js +0 -28
  190. package/dist/esm/types/sync/resources/collaborators.js +0 -22
  191. package/dist/esm/types/sync/resources/completed-info.js +0 -27
  192. package/dist/esm/types/sync/resources/filters.js +0 -13
  193. package/dist/esm/types/sync/resources/folders.js +0 -11
  194. package/dist/esm/types/sync/resources/index.js +0 -17
  195. package/dist/esm/types/sync/resources/live-notifications.js +0 -36
  196. package/dist/esm/types/sync/resources/notes.js +0 -20
  197. package/dist/esm/types/sync/resources/reminders.js +0 -47
  198. package/dist/esm/types/sync/resources/suggestions.js +0 -39
  199. package/dist/esm/types/sync/resources/tooltips.js +0 -7
  200. package/dist/esm/types/sync/resources/user-plan-limits.js +0 -21
  201. package/dist/esm/types/sync/resources/user-settings.js +0 -39
  202. package/dist/esm/types/sync/resources/user.js +0 -117
  203. package/dist/esm/types/sync/resources/view-options.js +0 -80
  204. package/dist/esm/types/sync/resources/workspace-filters.js +0 -18
  205. package/dist/esm/types/sync/resources/workspace-goals.js +0 -29
  206. package/dist/esm/types/sync/resources/workspaces.js +0 -70
  207. package/dist/esm/types/sync/response.js +0 -1
  208. package/dist/esm/types/sync/user-preferences.js +0 -68
  209. package/dist/esm/types/tasks/index.js +0 -2
  210. package/dist/esm/types/tasks/requests.js +0 -1
  211. package/dist/esm/types/tasks/types.js +0 -56
  212. package/dist/esm/types/templates/index.js +0 -1
  213. package/dist/esm/types/templates/requests.js +0 -1
  214. package/dist/esm/types/uploads/index.js +0 -1
  215. package/dist/esm/types/uploads/requests.js +0 -1
  216. package/dist/esm/types/users/index.js +0 -1
  217. package/dist/esm/types/users/types.js +0 -48
  218. package/dist/esm/types/workspaces/index.js +0 -2
  219. package/dist/esm/types/workspaces/requests.js +0 -1
  220. package/dist/esm/types/workspaces/types.js +0 -152
  221. package/dist/esm/utils/activity-helpers.js +0 -53
  222. package/dist/esm/utils/case-conversion.js +0 -61
  223. package/dist/esm/utils/colors.js +0 -139
  224. package/dist/esm/utils/index.js +0 -4
  225. package/dist/esm/utils/multipart-upload.js +0 -142
  226. package/dist/esm/utils/processing-helpers.js +0 -12
  227. package/dist/esm/utils/sanitization.js +0 -112
  228. package/dist/esm/utils/sync-helpers.js +0 -19
  229. package/dist/esm/utils/uncompletable-helpers.js +0 -54
  230. package/dist/esm/utils/url-helpers.js +0 -68
  231. package/dist/esm/utils/validators.js +0 -132
  232. package/dist/types/authentication.d.ts +0 -158
  233. package/dist/types/consts/endpoints.d.ts +0 -81
  234. package/dist/types/index.d.ts +0 -4
  235. package/dist/types/test-utils/asserts.d.ts +0 -1
  236. package/dist/types/test-utils/msw-setup.d.ts +0 -33
  237. package/dist/types/test-utils/obsidian-fetch-adapter.d.ts +0 -29
  238. package/dist/types/test-utils/test-defaults.d.ts +0 -261
  239. package/dist/types/todoist-api.d.ts +0 -1018
  240. package/dist/types/transport/fetch-with-retry.d.ts +0 -12
  241. package/dist/types/transport/http-client.d.ts +0 -16
  242. package/dist/types/transport/http-dispatcher.d.ts +0 -3
  243. package/dist/types/types/activity/index.d.ts +0 -2
  244. package/dist/types/types/activity/requests.d.ts +0 -85
  245. package/dist/types/types/activity/types.d.ts +0 -49
  246. package/dist/types/types/backups/index.d.ts +0 -2
  247. package/dist/types/types/backups/requests.d.ts +0 -16
  248. package/dist/types/types/backups/types.d.ts +0 -7
  249. package/dist/types/types/comments/index.d.ts +0 -2
  250. package/dist/types/types/comments/requests.d.ts +0 -64
  251. package/dist/types/types/comments/types.d.ts +0 -141
  252. package/dist/types/types/common.d.ts +0 -13
  253. package/dist/types/types/emails/index.d.ts +0 -1
  254. package/dist/types/types/emails/requests.d.ts +0 -30
  255. package/dist/types/types/errors.d.ts +0 -12
  256. package/dist/types/types/folders/index.d.ts +0 -1
  257. package/dist/types/types/folders/requests.d.ts +0 -20
  258. package/dist/types/types/http.d.ts +0 -85
  259. package/dist/types/types/id-mappings/index.d.ts +0 -2
  260. package/dist/types/types/id-mappings/requests.d.ts +0 -28
  261. package/dist/types/types/id-mappings/types.d.ts +0 -13
  262. package/dist/types/types/index.d.ts +0 -20
  263. package/dist/types/types/insights/index.d.ts +0 -2
  264. package/dist/types/types/insights/requests.d.ts +0 -26
  265. package/dist/types/types/insights/types.d.ts +0 -186
  266. package/dist/types/types/labels/index.d.ts +0 -2
  267. package/dist/types/types/labels/requests.d.ts +0 -75
  268. package/dist/types/types/labels/types.d.ts +0 -13
  269. package/dist/types/types/productivity/index.d.ts +0 -1
  270. package/dist/types/types/productivity/types.d.ts +0 -115
  271. package/dist/types/types/projects/index.d.ts +0 -2
  272. package/dist/types/types/projects/requests.d.ts +0 -169
  273. package/dist/types/types/projects/types.d.ts +0 -201
  274. package/dist/types/types/reminders/index.d.ts +0 -1
  275. package/dist/types/types/reminders/requests.d.ts +0 -205
  276. package/dist/types/types/sections/index.d.ts +0 -2
  277. package/dist/types/types/sections/requests.d.ts +0 -41
  278. package/dist/types/types/sections/types.d.ts +0 -44
  279. package/dist/types/types/sync/commands/calendars.d.ts +0 -14
  280. package/dist/types/types/sync/commands/filters.d.ts +0 -22
  281. package/dist/types/types/sync/commands/folders.d.ts +0 -18
  282. package/dist/types/types/sync/commands/index.d.ts +0 -171
  283. package/dist/types/types/sync/commands/labels.d.ts +0 -32
  284. package/dist/types/types/sync/commands/notes.d.ts +0 -27
  285. package/dist/types/types/sync/commands/notifications.d.ts +0 -10
  286. package/dist/types/types/sync/commands/others.d.ts +0 -39
  287. package/dist/types/types/sync/commands/project-view-options.d.ts +0 -14
  288. package/dist/types/types/sync/commands/projects.d.ts +0 -90
  289. package/dist/types/types/sync/commands/reminders.d.ts +0 -51
  290. package/dist/types/types/sync/commands/sections.d.ts +0 -31
  291. package/dist/types/types/sync/commands/shared.d.ts +0 -51
  292. package/dist/types/types/sync/commands/sharing.d.ts +0 -16
  293. package/dist/types/types/sync/commands/tasks.d.ts +0 -78
  294. package/dist/types/types/sync/commands/view-options.d.ts +0 -15
  295. package/dist/types/types/sync/commands/workspace-filters.d.ts +0 -23
  296. package/dist/types/types/sync/commands/workspace-goals.d.ts +0 -24
  297. package/dist/types/types/sync/commands/workspaces.d.ts +0 -79
  298. package/dist/types/types/sync/index.d.ts +0 -6
  299. package/dist/types/types/sync/request.d.ts +0 -7
  300. package/dist/types/types/sync/resource-types.d.ts +0 -5
  301. package/dist/types/types/sync/resources/calendars.d.ts +0 -38
  302. package/dist/types/types/sync/resources/collaborators.d.ts +0 -28
  303. package/dist/types/types/sync/resources/completed-info.d.ts +0 -33
  304. package/dist/types/types/sync/resources/filters.d.ts +0 -12
  305. package/dist/types/types/sync/resources/folders.d.ts +0 -10
  306. package/dist/types/types/sync/resources/index.d.ts +0 -17
  307. package/dist/types/types/sync/resources/live-notifications.d.ts +0 -32
  308. package/dist/types/types/sync/resources/notes.d.ts +0 -34
  309. package/dist/types/types/sync/resources/reminders.d.ts +0 -126
  310. package/dist/types/types/sync/resources/suggestions.d.ts +0 -96
  311. package/dist/types/types/sync/resources/tooltips.d.ts +0 -6
  312. package/dist/types/types/sync/resources/user-plan-limits.d.ts +0 -41
  313. package/dist/types/types/sync/resources/user-settings.d.ts +0 -40
  314. package/dist/types/types/sync/resources/user.d.ts +0 -134
  315. package/dist/types/types/sync/resources/view-options.d.ts +0 -169
  316. package/dist/types/types/sync/resources/workspace-filters.d.ts +0 -17
  317. package/dist/types/types/sync/resources/workspace-goals.d.ts +0 -29
  318. package/dist/types/types/sync/resources/workspaces.d.ts +0 -142
  319. package/dist/types/types/sync/response.d.ts +0 -51
  320. package/dist/types/types/sync/user-preferences.d.ts +0 -39
  321. package/dist/types/types/tasks/index.d.ts +0 -2
  322. package/dist/types/types/tasks/requests.d.ts +0 -197
  323. package/dist/types/types/tasks/types.d.ts +0 -162
  324. package/dist/types/types/templates/index.d.ts +0 -1
  325. package/dist/types/types/templates/requests.d.ts +0 -92
  326. package/dist/types/types/uploads/index.d.ts +0 -1
  327. package/dist/types/types/uploads/requests.d.ts +0 -32
  328. package/dist/types/types/users/index.d.ts +0 -1
  329. package/dist/types/types/users/types.d.ts +0 -66
  330. package/dist/types/types/workspaces/index.d.ts +0 -2
  331. package/dist/types/types/workspaces/requests.d.ts +0 -260
  332. package/dist/types/types/workspaces/types.d.ts +0 -267
  333. package/dist/types/utils/activity-helpers.d.ts +0 -28
  334. package/dist/types/utils/case-conversion.d.ts +0 -12
  335. package/dist/types/utils/colors.d.ts +0 -197
  336. package/dist/types/utils/index.d.ts +0 -4
  337. package/dist/types/utils/multipart-upload.d.ts +0 -54
  338. package/dist/types/utils/processing-helpers.d.ts +0 -1
  339. package/dist/types/utils/sanitization.d.ts +0 -35
  340. package/dist/types/utils/sync-helpers.d.ts +0 -17
  341. package/dist/types/utils/uncompletable-helpers.d.ts +0 -30
  342. package/dist/types/utils/url-helpers.d.ts +0 -32
  343. package/dist/types/utils/validators.d.ts +0 -1404
@@ -1,260 +0,0 @@
1
- import type { MemberActivityInfo, WorkspaceInvitation, WorkspaceRole, WorkspaceUser, WorkspaceUserTask } from './types.js';
2
- /**
3
- * Arguments for creating a new workspace.
4
- * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/create_workspace_api_v1_workspaces_post
5
- */
6
- export type AddWorkspaceArgs = {
7
- /** Name of the workspace. */
8
- name: string;
9
- /** Description of the workspace. */
10
- description?: string | null;
11
- /** Whether link sharing is enabled for the workspace. */
12
- isLinkSharingEnabled?: boolean;
13
- /** Whether guests are allowed in the workspace. */
14
- isGuestAllowed?: boolean;
15
- /** Workspace email domain. */
16
- domainName?: string | null;
17
- /** Whether users with matching email domains can discover this workspace. */
18
- domainDiscovery?: boolean;
19
- /** Whether workspace invites are restricted to workspace domain. */
20
- restrictEmailDomains?: boolean;
21
- /** Workspace properties. */
22
- properties?: Record<string, unknown> | null;
23
- };
24
- /**
25
- * Arguments for updating an existing workspace.
26
- * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/update_workspace_api_v1_workspaces__workspace_id__post
27
- */
28
- export type UpdateWorkspaceArgs = {
29
- /** Updated workspace name. */
30
- name?: string;
31
- /** Updated workspace description. */
32
- description?: string | null;
33
- /** Updated link sharing status. */
34
- isLinkSharingEnabled?: boolean;
35
- /** Updated guest access status. */
36
- isGuestAllowed?: boolean | null;
37
- /** Updated workspace email domain. */
38
- domainName?: string | null;
39
- /** Updated domain discovery setting. */
40
- domainDiscovery?: boolean;
41
- /** Updated email domain restriction setting. */
42
- restrictEmailDomains?: boolean;
43
- /** Updated workspace properties. */
44
- properties?: Record<string, unknown> | null;
45
- /** Updated collapse state for current user. */
46
- isCollapsed?: boolean;
47
- };
48
- /**
49
- * Arguments for getting workspace members activity.
50
- * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/get_workspace_members_activity_api_v1_workspaces_members_get
51
- */
52
- export type GetWorkspaceMembersActivityArgs = {
53
- /** The workspace ID. */
54
- workspaceId: string;
55
- /** Comma-separated list of user IDs to filter by. */
56
- userIds?: string | null;
57
- /** Comma-separated list of project IDs to filter by. */
58
- projectIds?: string | null;
59
- };
60
- /**
61
- * Response from getting workspace members activity.
62
- */
63
- export type GetWorkspaceMembersActivityResponse = {
64
- members: MemberActivityInfo[];
65
- };
66
- /**
67
- * Arguments for getting tasks assigned to a workspace user.
68
- * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/get_workspace_user_tasks_api_v1_workspaces__workspace_id__users__user_id__tasks_get
69
- */
70
- export type GetWorkspaceUserTasksArgs = {
71
- /** The workspace ID. */
72
- workspaceId: string;
73
- /** The user ID. */
74
- userId: string;
75
- /** Comma-separated list of project IDs to filter by. */
76
- projectIds?: string | null;
77
- };
78
- /**
79
- * Response from getting workspace user tasks.
80
- */
81
- export type GetWorkspaceUserTasksResponse = {
82
- tasks: WorkspaceUserTask[];
83
- };
84
- /**
85
- * Arguments for inviting users to a workspace.
86
- * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/invite_workspace_users_api_v1_workspaces__workspace_id__users_invite_post
87
- */
88
- export type InviteWorkspaceUsersArgs = {
89
- /** The workspace ID. */
90
- workspaceId: string;
91
- /** List of user emails to invite. */
92
- emailList: string[];
93
- /** Role assigned to invited users. */
94
- role?: WorkspaceRole;
95
- };
96
- /**
97
- * Response from inviting workspace users.
98
- */
99
- export type InviteWorkspaceUsersResponse = {
100
- invitedEmails: string[];
101
- };
102
- /**
103
- * Arguments for updating a workspace user's role.
104
- * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/update_workspace_user_api_v1_workspaces__workspace_id__users__user_id__post
105
- */
106
- export type UpdateWorkspaceUserArgs = {
107
- /** The workspace ID. */
108
- workspaceId: string;
109
- /** The user ID. */
110
- userId: string;
111
- /** Updated role for the user. */
112
- role: WorkspaceRole;
113
- };
114
- /**
115
- * Arguments for removing a user from a workspace.
116
- * @see https://developer.todoist.com/api/v1/#tag/Workspace/operation/remove_workspace_user_api_v1_workspaces__workspace_id__users__user_id__delete
117
- */
118
- export type RemoveWorkspaceUserArgs = {
119
- /** The workspace ID. */
120
- workspaceId: string;
121
- /** The user ID. */
122
- userId: string;
123
- };
124
- /**
125
- * Arguments for getting workspace invitations.
126
- */
127
- export type GetWorkspaceInvitationsArgs = {
128
- /**
129
- * The workspace ID to get invitations for.
130
- */
131
- workspaceId: number;
132
- };
133
- /**
134
- * Arguments for deleting a workspace invitation.
135
- */
136
- export type DeleteWorkspaceInvitationArgs = {
137
- /**
138
- * The workspace ID.
139
- */
140
- workspaceId: number;
141
- /**
142
- * The email address of the invitation to delete.
143
- */
144
- userEmail: string;
145
- };
146
- /**
147
- * Arguments for accepting/rejecting a workspace invitation.
148
- */
149
- export type WorkspaceInvitationActionArgs = {
150
- /**
151
- * The invitation code from the email.
152
- */
153
- inviteCode: string;
154
- };
155
- /**
156
- * Arguments for joining a workspace.
157
- */
158
- export type JoinWorkspaceArgs = {
159
- /**
160
- * Optional invitation code/link to join via.
161
- */
162
- inviteCode?: string | null;
163
- /**
164
- * Optional workspace ID to join via domain auto-join.
165
- */
166
- workspaceId?: number | null;
167
- };
168
- /**
169
- * Arguments for uploading/updating workspace logo.
170
- */
171
- export type WorkspaceLogoArgs = {
172
- /**
173
- * The workspace ID.
174
- */
175
- workspaceId: number;
176
- /**
177
- * The image file to upload (Buffer, Stream, or file path).
178
- */
179
- file?: Buffer | NodeJS.ReadableStream | string | Blob;
180
- /**
181
- * The file name (required for Buffer/Stream uploads).
182
- */
183
- fileName?: string;
184
- /**
185
- * Whether to delete the logo instead of updating it.
186
- */
187
- delete?: boolean;
188
- };
189
- /**
190
- * Arguments for getting workspace plan details.
191
- */
192
- export type GetWorkspacePlanDetailsArgs = {
193
- /**
194
- * The workspace ID.
195
- */
196
- workspaceId: number;
197
- };
198
- /**
199
- * Arguments for getting workspace users (paginated).
200
- */
201
- export type GetWorkspaceUsersArgs = {
202
- /**
203
- * Optional workspace ID. If not provided, returns users for all workspaces.
204
- */
205
- workspaceId?: number | null;
206
- /**
207
- * Cursor for pagination.
208
- */
209
- cursor?: string | null;
210
- /**
211
- * Maximum number of users to return (default: 100).
212
- */
213
- limit?: number;
214
- };
215
- /**
216
- * Arguments for getting workspace projects (paginated).
217
- */
218
- export type GetWorkspaceProjectsArgs = {
219
- /**
220
- * The workspace ID.
221
- */
222
- workspaceId: number;
223
- /**
224
- * Cursor for pagination.
225
- */
226
- cursor?: string | null;
227
- /**
228
- * Maximum number of projects to return (default: 100).
229
- */
230
- limit?: number;
231
- };
232
- /**
233
- * Paginated response for workspace users.
234
- */
235
- export type GetWorkspaceUsersResponse = {
236
- /**
237
- * Whether there are more users available.
238
- */
239
- hasMore: boolean;
240
- /**
241
- * Cursor for the next page of results.
242
- */
243
- nextCursor?: string;
244
- /**
245
- * Array of workspace users.
246
- */
247
- workspaceUsers: WorkspaceUser[];
248
- };
249
- /**
250
- * Response type for workspace invitations endpoint (simple email list).
251
- */
252
- export type WorkspaceInvitationsResponse = string[];
253
- /**
254
- * Response type for all workspace invitations endpoint (detailed objects).
255
- */
256
- export type AllWorkspaceInvitationsResponse = WorkspaceInvitation[];
257
- /**
258
- * Response type for workspace logo upload.
259
- */
260
- export type WorkspaceLogoResponse = Record<string, unknown> | null;
@@ -1,267 +0,0 @@
1
- import { z } from 'zod';
2
- /** Available project collaborator roles. */
3
- export declare const COLLABORATOR_ROLES: readonly ["CREATOR", "ADMIN", "READ_WRITE", "EDIT_ONLY", "COMPLETE_ONLY"];
4
- /** Role of a collaborator in a project. */
5
- export type CollaboratorRole = (typeof COLLABORATOR_ROLES)[number];
6
- /**
7
- * Available workspace roles.
8
- */
9
- export declare const WORKSPACE_ROLES: readonly ["ADMIN", "MEMBER", "GUEST"];
10
- /**
11
- * Role of a user within a workspace.
12
- */
13
- export type WorkspaceRole = (typeof WORKSPACE_ROLES)[number];
14
- export declare const WorkspaceRoleSchema: z.ZodEnum<{
15
- ADMIN: "ADMIN";
16
- MEMBER: "MEMBER";
17
- GUEST: "GUEST";
18
- }>;
19
- export declare const WorkspaceUserSchema: z.ZodObject<{
20
- userId: z.ZodString;
21
- workspaceId: z.ZodString;
22
- userEmail: z.ZodString;
23
- fullName: z.ZodString;
24
- timezone: z.ZodString;
25
- role: z.ZodEnum<{
26
- ADMIN: "ADMIN";
27
- MEMBER: "MEMBER";
28
- GUEST: "GUEST";
29
- }>;
30
- imageId: z.ZodNullable<z.ZodString>;
31
- isDeleted: z.ZodDefault<z.ZodBoolean>;
32
- }, z.core.$strip>;
33
- /**
34
- * Represents a user within a workspace (MemberView from API).
35
- */
36
- export type WorkspaceUser = z.infer<typeof WorkspaceUserSchema>;
37
- export declare const WorkspaceInvitationSchema: z.ZodObject<{
38
- id: z.ZodDefault<z.ZodString>;
39
- inviterId: z.ZodString;
40
- userEmail: z.ZodString;
41
- workspaceId: z.ZodString;
42
- role: z.ZodEnum<{
43
- ADMIN: "ADMIN";
44
- MEMBER: "MEMBER";
45
- GUEST: "GUEST";
46
- }>;
47
- isExistingUser: z.ZodBoolean;
48
- }, z.core.$strip>;
49
- /**
50
- * Represents a workspace invitation.
51
- */
52
- export type WorkspaceInvitation = z.infer<typeof WorkspaceInvitationSchema>;
53
- export declare const PlanPriceSchema: z.ZodObject<{
54
- currency: z.ZodString;
55
- amount: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
56
- interval: z.ZodOptional<z.ZodString>;
57
- }, z.core.$strip>;
58
- /**
59
- * Plan pricing information.
60
- */
61
- export type PlanPrice = z.infer<typeof PlanPriceSchema>;
62
- export declare const FormattedPriceListingSchema: z.ZodObject<{
63
- currency: z.ZodOptional<z.ZodString>;
64
- amount: z.ZodOptional<z.ZodNumber>;
65
- interval: z.ZodOptional<z.ZodString>;
66
- formatted: z.ZodOptional<z.ZodString>;
67
- }, z.core.$strip>;
68
- /**
69
- * Formatted price listing for workspace plans.
70
- */
71
- export type FormattedPriceListing = z.infer<typeof FormattedPriceListingSchema>;
72
- /** Available workspace plan names. */
73
- export declare const WORKSPACE_CURRENT_PLANS: readonly ["Business", "Starter"];
74
- /** Display name of a workspace plan. */
75
- export type WorkspaceCurrentPlan = (typeof WORKSPACE_CURRENT_PLANS)[number];
76
- /** Available workspace plan statuses. */
77
- export declare const WORKSPACE_PLAN_STATUSES: readonly ["Active", "Downgraded", "Cancelled", "NeverSubscribed"];
78
- /** Subscription status of a workspace plan. */
79
- export type WorkspacePlanStatus = (typeof WORKSPACE_PLAN_STATUSES)[number];
80
- export declare const WorkspacePlanDetailsSchema: z.ZodObject<{
81
- currentMemberCount: z.ZodNumber;
82
- currentPlan: z.ZodEnum<{
83
- Business: "Business";
84
- Starter: "Starter";
85
- }>;
86
- currentPlanStatus: z.ZodEnum<{
87
- Active: "Active";
88
- Downgraded: "Downgraded";
89
- Cancelled: "Cancelled";
90
- NeverSubscribed: "NeverSubscribed";
91
- }>;
92
- downgradeAt: z.ZodNullable<z.ZodString>;
93
- currentActiveProjects: z.ZodNumber;
94
- maximumActiveProjects: z.ZodNumber;
95
- priceList: z.ZodArray<z.ZodObject<{
96
- currency: z.ZodOptional<z.ZodString>;
97
- amount: z.ZodOptional<z.ZodNumber>;
98
- interval: z.ZodOptional<z.ZodString>;
99
- formatted: z.ZodOptional<z.ZodString>;
100
- }, z.core.$strip>>;
101
- workspaceId: z.ZodNumber;
102
- isTrialing: z.ZodBoolean;
103
- trialEndsAt: z.ZodNullable<z.ZodString>;
104
- cancelAtPeriodEnd: z.ZodBoolean;
105
- hasTrialed: z.ZodBoolean;
106
- planPrice: z.ZodNullable<z.ZodObject<{
107
- currency: z.ZodString;
108
- amount: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
109
- interval: z.ZodOptional<z.ZodString>;
110
- }, z.core.$strip>>;
111
- hasBillingPortal: z.ZodBoolean;
112
- hasBillingPortalSwitchToAnnual: z.ZodBoolean;
113
- }, z.core.$strip>;
114
- /**
115
- * Represents workspace plan and billing details.
116
- */
117
- export type WorkspacePlanDetails = z.infer<typeof WorkspacePlanDetailsSchema>;
118
- export declare const JoinWorkspaceResultSchema: z.ZodObject<{
119
- customSortingApplied: z.ZodBoolean;
120
- projectSortPreference: z.ZodString;
121
- role: z.ZodEnum<{
122
- ADMIN: "ADMIN";
123
- MEMBER: "MEMBER";
124
- GUEST: "GUEST";
125
- }>;
126
- userId: z.ZodString;
127
- workspaceId: z.ZodString;
128
- }, z.core.$strip>;
129
- /**
130
- * Result returned when successfully joining a workspace.
131
- */
132
- export type JoinWorkspaceResult = z.infer<typeof JoinWorkspaceResultSchema>;
133
- /**
134
- * Available workspace plans.
135
- */
136
- export declare const WORKSPACE_PLANS: readonly ["STARTER", "BUSINESS"];
137
- /**
138
- * Workspace plan type.
139
- */
140
- export type WorkspacePlan = (typeof WORKSPACE_PLANS)[number];
141
- export declare const WorkspacePlanSchema: z.ZodEnum<{
142
- STARTER: "STARTER";
143
- BUSINESS: "BUSINESS";
144
- }>;
145
- /**
146
- * Workspace resource limits.
147
- */
148
- export declare const WorkspaceLimitsSchema: z.ZodObject<{
149
- current: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
150
- next: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
151
- }, z.core.$catchall<z.ZodAny>>;
152
- export type WorkspaceLimits = z.infer<typeof WorkspaceLimitsSchema>;
153
- /**
154
- * Workspace properties (flexible object for unknown fields).
155
- */
156
- export declare const WorkspacePropertiesSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
157
- export type WorkspaceProperties = z.infer<typeof WorkspacePropertiesSchema>;
158
- /**
159
- * Represents a workspace in Todoist.
160
- */
161
- export declare const WorkspaceSchema: z.ZodPipe<z.ZodObject<{
162
- id: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
163
- name: z.ZodString;
164
- plan: z.ZodEnum<{
165
- STARTER: "STARTER";
166
- BUSINESS: "BUSINESS";
167
- }>;
168
- role: z.ZodOptional<z.ZodEnum<{
169
- ADMIN: "ADMIN";
170
- MEMBER: "MEMBER";
171
- GUEST: "GUEST";
172
- }>>;
173
- inviteCode: z.ZodString;
174
- isLinkSharingEnabled: z.ZodBoolean;
175
- isGuestAllowed: z.ZodBoolean;
176
- limits: z.ZodOptional<z.ZodObject<{
177
- current: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
178
- next: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>;
179
- }, z.core.$catchall<z.ZodAny>>>;
180
- logoBig: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
- logoMedium: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
- logoSmall: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
- logoS640: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
- createdAt: z.ZodOptional<z.ZodString>;
185
- dateCreated: z.ZodOptional<z.ZodString>;
186
- creatorId: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
187
- properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
188
- }, z.core.$strip>, z.ZodTransform<{
189
- createdAt: string | undefined;
190
- id: string;
191
- name: string;
192
- plan: "STARTER" | "BUSINESS";
193
- inviteCode: string;
194
- isLinkSharingEnabled: boolean;
195
- isGuestAllowed: boolean;
196
- creatorId: string;
197
- properties: Record<string, unknown>;
198
- role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
199
- limits?: {
200
- [x: string]: any;
201
- current: Record<string, any> | null;
202
- next: Record<string, any> | null;
203
- } | undefined;
204
- logoBig?: string | null | undefined;
205
- logoMedium?: string | null | undefined;
206
- logoSmall?: string | null | undefined;
207
- logoS640?: string | null | undefined;
208
- }, {
209
- id: string;
210
- name: string;
211
- plan: "STARTER" | "BUSINESS";
212
- inviteCode: string;
213
- isLinkSharingEnabled: boolean;
214
- isGuestAllowed: boolean;
215
- creatorId: string;
216
- properties: Record<string, unknown>;
217
- role?: "ADMIN" | "MEMBER" | "GUEST" | undefined;
218
- limits?: {
219
- [x: string]: any;
220
- current: Record<string, any> | null;
221
- next: Record<string, any> | null;
222
- } | undefined;
223
- logoBig?: string | null | undefined;
224
- logoMedium?: string | null | undefined;
225
- logoSmall?: string | null | undefined;
226
- logoS640?: string | null | undefined;
227
- createdAt?: string | undefined;
228
- dateCreated?: string | undefined;
229
- }>>;
230
- export type Workspace = z.infer<typeof WorkspaceSchema>;
231
- export declare const MemberActivityInfoSchema: z.ZodObject<{
232
- userId: z.ZodString;
233
- tasksAssigned: z.ZodNumber;
234
- tasksOverdue: z.ZodNumber;
235
- }, z.core.$strip>;
236
- /**
237
- * Represents activity information for a workspace member.
238
- */
239
- export type MemberActivityInfo = z.infer<typeof MemberActivityInfoSchema>;
240
- export declare const WorkspaceUserTaskSchema: z.ZodObject<{
241
- id: z.ZodString;
242
- content: z.ZodString;
243
- responsibleUid: z.ZodNullable<z.ZodString>;
244
- due: z.ZodNullable<z.ZodObject<{
245
- isRecurring: z.ZodBoolean;
246
- string: z.ZodString;
247
- date: z.ZodString;
248
- datetime: z.ZodOptional<z.ZodNullable<z.ZodString>>;
249
- timezone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
250
- lang: z.ZodOptional<z.ZodNullable<z.ZodString>>;
251
- }, z.core.$strip>>;
252
- deadline: z.ZodNullable<z.ZodObject<{
253
- date: z.ZodString;
254
- lang: z.ZodString;
255
- }, z.core.$strip>>;
256
- labels: z.ZodArray<z.ZodString>;
257
- notesCount: z.ZodNumber;
258
- projectId: z.ZodString;
259
- projectName: z.ZodString;
260
- priority: z.ZodNumber;
261
- description: z.ZodString;
262
- isOverdue: z.ZodBoolean;
263
- }, z.core.$strip>;
264
- /**
265
- * Represents a task assigned to a workspace user.
266
- */
267
- export type WorkspaceUserTask = z.infer<typeof WorkspaceUserTaskSchema>;
@@ -1,28 +0,0 @@
1
- /**
2
- * Converts modern SDK object type naming to legacy API naming.
3
- * Maps 'task' -> 'item' and 'comment' -> 'note' for API requests.
4
- * Other values pass through unchanged.
5
- *
6
- * @internal
7
- * @param objectType The object type using modern naming.
8
- * @returns The object type using legacy API naming.
9
- */
10
- export declare function normalizeObjectTypeForApi(objectType: string | undefined): string | undefined;
11
- /**
12
- * Converts legacy API object type naming to modern SDK naming.
13
- * Maps 'item' -> 'task' and 'note' -> 'comment' for SDK responses.
14
- * Other values pass through unchanged.
15
- *
16
- * @internal
17
- * @param objectType The object type using legacy API naming.
18
- * @returns The object type using modern SDK naming.
19
- */
20
- export declare function denormalizeObjectTypeFromApi(objectType: string | undefined): string | undefined;
21
- /**
22
- * Normalizes an `ActivityObjectEventType` filter string for the API,
23
- * converting modern object type names to legacy API names.
24
- * e.g. 'task:added' -> 'item:added', 'comment:' -> 'note:', ':deleted' -> ':deleted'
25
- *
26
- * @internal
27
- */
28
- export declare function normalizeObjectEventTypeForApi(filter: string): string;
@@ -1,12 +0,0 @@
1
- /**
2
- * Custom camelCase function that preserves emoji strings
3
- */
4
- export declare function customCamelCase(input: string): string;
5
- /**
6
- * Converts object keys from snake_case to camelCase recursively
7
- */
8
- export declare function camelCaseKeys<T>(obj: T): T;
9
- /**
10
- * Converts object keys from camelCase to snake_case recursively
11
- */
12
- export declare function snakeCaseKeys<T>(obj: T): T;