@doist/todoist-api-typescript 7.9.0 → 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 -2
  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 -56
  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 -137
  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 -1
  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 -53
  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 -134
  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 -6
  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 -57
  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 -225
  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 -1406
@@ -1 +0,0 @@
1
- export {};
@@ -1,134 +0,0 @@
1
- import { z } from 'zod';
2
- import { DueDateSchema, DeadlineSchema } from '../tasks/types.js';
3
- /** Available project collaborator roles. */
4
- export const COLLABORATOR_ROLES = [
5
- 'CREATOR',
6
- 'ADMIN',
7
- 'READ_WRITE',
8
- 'EDIT_ONLY',
9
- 'COMPLETE_ONLY',
10
- ];
11
- /**
12
- * Available workspace roles.
13
- */
14
- export const WORKSPACE_ROLES = ['ADMIN', 'MEMBER', 'GUEST'];
15
- export const WorkspaceRoleSchema = z.enum(WORKSPACE_ROLES);
16
- export const WorkspaceUserSchema = z.object({
17
- userId: z.string(),
18
- workspaceId: z.string(),
19
- userEmail: z.string(),
20
- fullName: z.string(),
21
- timezone: z.string(),
22
- role: WorkspaceRoleSchema,
23
- imageId: z.string().nullable(),
24
- isDeleted: z.boolean().default(false),
25
- });
26
- export const WorkspaceInvitationSchema = z.object({
27
- id: z.string().default('0'),
28
- inviterId: z.string(),
29
- userEmail: z.string(),
30
- workspaceId: z.string(),
31
- role: WorkspaceRoleSchema,
32
- isExistingUser: z.boolean(),
33
- });
34
- export const PlanPriceSchema = z.object({
35
- currency: z.string(),
36
- amount: z.union([z.number(), z.string()]),
37
- interval: z.string().optional(),
38
- });
39
- export const FormattedPriceListingSchema = z.object({
40
- currency: z.string().optional(),
41
- amount: z.number().optional(),
42
- interval: z.string().optional(),
43
- formatted: z.string().optional(),
44
- });
45
- /** Available workspace plan names. */
46
- export const WORKSPACE_CURRENT_PLANS = ['Business', 'Starter'];
47
- /** Available workspace plan statuses. */
48
- export const WORKSPACE_PLAN_STATUSES = [
49
- 'Active',
50
- 'Downgraded',
51
- 'Cancelled',
52
- 'NeverSubscribed',
53
- ];
54
- export const WorkspacePlanDetailsSchema = z.object({
55
- currentMemberCount: z.number(),
56
- currentPlan: z.enum(WORKSPACE_CURRENT_PLANS),
57
- currentPlanStatus: z.enum(WORKSPACE_PLAN_STATUSES),
58
- downgradeAt: z.string().nullable(),
59
- currentActiveProjects: z.number(),
60
- maximumActiveProjects: z.number(),
61
- priceList: z.array(FormattedPriceListingSchema),
62
- workspaceId: z.number(),
63
- isTrialing: z.boolean(),
64
- trialEndsAt: z.string().nullable(),
65
- cancelAtPeriodEnd: z.boolean(),
66
- hasTrialed: z.boolean(),
67
- planPrice: PlanPriceSchema.nullable(),
68
- hasBillingPortal: z.boolean(),
69
- hasBillingPortalSwitchToAnnual: z.boolean(),
70
- });
71
- export const JoinWorkspaceResultSchema = z.object({
72
- customSortingApplied: z.boolean(),
73
- projectSortPreference: z.string(),
74
- role: WorkspaceRoleSchema,
75
- userId: z.string(),
76
- workspaceId: z.string(),
77
- });
78
- /**
79
- * Available workspace plans.
80
- */
81
- export const WORKSPACE_PLANS = ['STARTER', 'BUSINESS'];
82
- export const WorkspacePlanSchema = z.enum(WORKSPACE_PLANS);
83
- /**
84
- * Workspace resource limits.
85
- */
86
- export const WorkspaceLimitsSchema = z
87
- .object({
88
- current: z.record(z.string(), z.any()).nullable(),
89
- next: z.record(z.string(), z.any()).nullable(),
90
- })
91
- .catchall(z.any());
92
- /**
93
- * Workspace properties (flexible object for unknown fields).
94
- */
95
- export const WorkspacePropertiesSchema = z.record(z.string(), z.unknown());
96
- /**
97
- * Represents a workspace in Todoist.
98
- */
99
- export const WorkspaceSchema = z.object({
100
- id: z.string(),
101
- name: z.string(),
102
- plan: WorkspacePlanSchema,
103
- role: WorkspaceRoleSchema,
104
- inviteCode: z.string(),
105
- isLinkSharingEnabled: z.boolean(),
106
- isGuestAllowed: z.boolean(),
107
- limits: WorkspaceLimitsSchema,
108
- logoBig: z.string().nullish(),
109
- logoMedium: z.string().nullish(),
110
- logoSmall: z.string().nullish(),
111
- logoS640: z.string().nullish(),
112
- createdAt: z.string(),
113
- creatorId: z.string(),
114
- properties: WorkspacePropertiesSchema,
115
- });
116
- export const MemberActivityInfoSchema = z.object({
117
- userId: z.string(),
118
- tasksAssigned: z.number().int(),
119
- tasksOverdue: z.number().int(),
120
- });
121
- export const WorkspaceUserTaskSchema = z.object({
122
- id: z.string(),
123
- content: z.string(),
124
- responsibleUid: z.string().nullable(),
125
- due: DueDateSchema.nullable(),
126
- deadline: DeadlineSchema.nullable(),
127
- labels: z.array(z.string()),
128
- notesCount: z.number().int(),
129
- projectId: z.string(),
130
- projectName: z.string(),
131
- priority: z.number().int(),
132
- description: z.string(),
133
- isOverdue: z.boolean(),
134
- });
@@ -1,53 +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 function normalizeObjectTypeForApi(objectType) {
11
- if (!objectType)
12
- return objectType;
13
- if (objectType === 'task')
14
- return 'item';
15
- if (objectType === 'comment')
16
- return 'note';
17
- return objectType;
18
- }
19
- /**
20
- * Converts legacy API object type naming to modern SDK naming.
21
- * Maps 'item' -> 'task' and 'note' -> 'comment' for SDK responses.
22
- * Other values pass through unchanged.
23
- *
24
- * @internal
25
- * @param objectType The object type using legacy API naming.
26
- * @returns The object type using modern SDK naming.
27
- */
28
- export function denormalizeObjectTypeFromApi(objectType) {
29
- if (!objectType)
30
- return objectType;
31
- if (objectType === 'item')
32
- return 'task';
33
- if (objectType === 'note')
34
- return 'comment';
35
- return objectType;
36
- }
37
- /**
38
- * Normalizes an `ActivityObjectEventType` filter string for the API,
39
- * converting modern object type names to legacy API names.
40
- * e.g. 'task:added' -> 'item:added', 'comment:' -> 'note:', ':deleted' -> ':deleted'
41
- *
42
- * @internal
43
- */
44
- export function normalizeObjectEventTypeForApi(filter) {
45
- var _a, _b;
46
- const colonIndex = filter.indexOf(':');
47
- if (colonIndex === -1) {
48
- return (_a = normalizeObjectTypeForApi(filter)) !== null && _a !== void 0 ? _a : filter;
49
- }
50
- const objectPart = filter.slice(0, colonIndex);
51
- const eventPart = filter.slice(colonIndex); // includes the colon
52
- return `${(_b = normalizeObjectTypeForApi(objectPart)) !== null && _b !== void 0 ? _b : objectPart}${eventPart}`;
53
- }
@@ -1,61 +0,0 @@
1
- import camelcase from 'camelcase';
2
- import emojiRegex from 'emoji-regex';
3
- /**
4
- * Checks if a string is a solitary emoji
5
- */
6
- function isEmojiKey(input) {
7
- const regex = emojiRegex();
8
- const match = input.match(regex);
9
- return match !== null && match.join('') === input;
10
- }
11
- /**
12
- * Custom camelCase function that preserves emoji strings
13
- */
14
- export function customCamelCase(input) {
15
- // If the value is a solitary emoji string, return the key as-is
16
- if (isEmojiKey(input)) {
17
- return input;
18
- }
19
- return camelcase(input);
20
- }
21
- /**
22
- * Converts object keys from snake_case to camelCase recursively
23
- */
24
- export function camelCaseKeys(obj) {
25
- if (obj === null || obj === undefined) {
26
- return obj;
27
- }
28
- if (Array.isArray(obj)) {
29
- return obj.map((item) => camelCaseKeys(item));
30
- }
31
- if (typeof obj === 'object' && obj.constructor === Object) {
32
- const converted = {};
33
- for (const [key, value] of Object.entries(obj)) {
34
- const camelKey = customCamelCase(key);
35
- converted[camelKey] = camelCaseKeys(value);
36
- }
37
- return converted;
38
- }
39
- return obj;
40
- }
41
- /**
42
- * Converts object keys from camelCase to snake_case recursively
43
- */
44
- export function snakeCaseKeys(obj) {
45
- if (obj === null || obj === undefined) {
46
- return obj;
47
- }
48
- if (Array.isArray(obj)) {
49
- return obj.map((item) => snakeCaseKeys(item));
50
- }
51
- if (typeof obj === 'object' && obj.constructor === Object) {
52
- const converted = {};
53
- for (const [key, value] of Object.entries(obj)) {
54
- // Convert camelCase to snake_case
55
- const snakeKey = key.replace(/([A-Z])/g, '_$1').toLowerCase();
56
- converted[snakeKey] = snakeCaseKeys(value);
57
- }
58
- return converted;
59
- }
60
- return obj;
61
- }
@@ -1,139 +0,0 @@
1
- export const berryRed = {
2
- key: 'berry_red',
3
- displayName: 'Berry Red',
4
- hexValue: '#b8255f',
5
- };
6
- export const red = {
7
- key: 'red',
8
- displayName: 'Red',
9
- hexValue: '#db4035',
10
- };
11
- export const orange = {
12
- key: 'orange',
13
- displayName: 'Orange',
14
- hexValue: '#ff9933',
15
- };
16
- export const yellow = {
17
- key: 'yellow',
18
- displayName: 'Yellow',
19
- hexValue: '#fad000',
20
- };
21
- export const oliveGreen = {
22
- key: 'olive_green',
23
- displayName: 'Olive Green',
24
- hexValue: '#afb83b',
25
- };
26
- export const limeGreen = {
27
- key: 'lime_green',
28
- displayName: 'Lime Green',
29
- hexValue: '#7ecc49',
30
- };
31
- export const green = {
32
- key: 'green',
33
- displayName: 'Green',
34
- hexValue: '#299438',
35
- };
36
- export const mintGreen = {
37
- key: 'mint_green',
38
- displayName: 'Mint Green',
39
- hexValue: '#6accbc',
40
- };
41
- export const teal = {
42
- key: 'teal',
43
- displayName: 'Teal',
44
- hexValue: '#158fad',
45
- };
46
- export const skyBlue = {
47
- key: 'sky_blue',
48
- displayName: 'Sky Blue',
49
- hexValue: '#14aaf5',
50
- };
51
- export const lightBlue = {
52
- key: 'light_blue',
53
- displayName: 'Light Blue',
54
- hexValue: '#96c3eb',
55
- };
56
- export const blue = {
57
- key: 'blue',
58
- displayName: 'Blue',
59
- hexValue: '#4073ff',
60
- };
61
- export const grape = {
62
- key: 'grape',
63
- displayName: 'Grape',
64
- hexValue: '#884dff',
65
- };
66
- export const violet = {
67
- key: 'violet',
68
- displayName: 'Violet',
69
- hexValue: '#af38eb',
70
- };
71
- export const lavender = {
72
- key: 'lavender',
73
- displayName: 'Lavender',
74
- hexValue: '#eb96eb',
75
- };
76
- export const magenta = {
77
- key: 'magenta',
78
- displayName: 'Magenta',
79
- hexValue: '#e05194',
80
- };
81
- export const salmon = {
82
- key: 'salmon',
83
- displayName: 'Salmon',
84
- hexValue: '#ff8d85',
85
- };
86
- export const charcoal = {
87
- key: 'charcoal',
88
- displayName: 'Charcoal',
89
- hexValue: '#808080',
90
- };
91
- export const grey = {
92
- key: 'grey',
93
- displayName: 'Grey',
94
- hexValue: '#b8b8b8',
95
- };
96
- export const taupe = {
97
- key: 'taupe',
98
- displayName: 'Taupe',
99
- hexValue: '#ccac93',
100
- };
101
- export const colors = [
102
- berryRed,
103
- red,
104
- orange,
105
- yellow,
106
- oliveGreen,
107
- limeGreen,
108
- green,
109
- mintGreen,
110
- teal,
111
- skyBlue,
112
- lightBlue,
113
- blue,
114
- grape,
115
- violet,
116
- lavender,
117
- magenta,
118
- salmon,
119
- charcoal,
120
- grey,
121
- taupe,
122
- ];
123
- export const defaultColor = charcoal;
124
- /**
125
- * Retrieves a {@link Color} object by its key identifier.
126
- *
127
- * @param colorKey - The unique key identifier of the color to find (e.g., 'berry_red', 'sky_blue')
128
- * @returns The matching Color object if found, otherwise returns the default color (charcoal)
129
- *
130
- * @example
131
- * ```typescript
132
- * const color = getColorByKey('berry_red');
133
- * console.log(color.hexValue); // '#b8255f'
134
- * ```
135
- */
136
- export function getColorByKey(colorKey) {
137
- const color = colors.find((color) => color.key === colorKey);
138
- return color !== null && color !== void 0 ? color : defaultColor;
139
- }
@@ -1,4 +0,0 @@
1
- export * from './colors.js';
2
- export * from './sanitization.js';
3
- export { getTaskUrl, getProjectUrl, getSectionUrl } from './url-helpers.js';
4
- export { createCommand } from './sync-helpers.js';
@@ -1,142 +0,0 @@
1
- import { fetchWithRetry } from '../transport/fetch-with-retry.js';
2
- /**
3
- * Helper function to determine content-type from filename extension.
4
- * @param fileName - The filename to analyze
5
- * @returns The appropriate MIME type
6
- */
7
- function getContentTypeFromFileName(fileName) {
8
- const extension = fileName.toLowerCase().split('.').pop();
9
- switch (extension) {
10
- case 'png':
11
- return 'image/png';
12
- case 'jpg':
13
- case 'jpeg':
14
- return 'image/jpeg';
15
- case 'gif':
16
- return 'image/gif';
17
- case 'webp':
18
- return 'image/webp';
19
- case 'svg':
20
- return 'image/svg+xml';
21
- default:
22
- return 'application/octet-stream';
23
- }
24
- }
25
- /**
26
- * Uploads a file using multipart/form-data.
27
- *
28
- * This is a shared utility for uploading files to Todoist endpoints that require
29
- * multipart/form-data content type (e.g., file uploads, workspace logo uploads).
30
- *
31
- * Supports both browser (Blob/File) and Node.js (Buffer/ReadableStream/path) environments.
32
- *
33
- * @param baseUrl - The base API URL (e.g., https://api.todoist.com/api/v1/)
34
- * @param authToken - The authentication token
35
- * @param endpoint - The relative endpoint path (e.g., 'uploads', 'workspaces/logo')
36
- * @param file - The file content (Blob/File for browser, or Buffer/ReadableStream/path for Node)
37
- * @param fileName - Optional file name (required for Buffer/Stream, optional for paths and File objects)
38
- * @param additionalFields - Additional form fields to include (e.g., project_id, workspace_id)
39
- * @param requestId - Optional request ID for idempotency
40
- * @returns The response data from the server
41
- *
42
- * @example
43
- * ```typescript
44
- * // Upload from a file path
45
- * const result = await uploadMultipartFile(
46
- * 'https://api.todoist.com/api/v1/',
47
- * 'my-token',
48
- * 'uploads',
49
- * '/path/to/file.pdf',
50
- * undefined,
51
- * { project_id: '12345' }
52
- * )
53
- *
54
- * // Upload from a Buffer
55
- * const buffer = Buffer.from('file content')
56
- * const result = await uploadMultipartFile(
57
- * 'https://api.todoist.com/api/v1/',
58
- * 'my-token',
59
- * 'uploads',
60
- * buffer,
61
- * 'document.pdf',
62
- * { project_id: '12345' }
63
- * )
64
- * ```
65
- */
66
- export async function uploadMultipartFile(args) {
67
- const { baseUrl, authToken, endpoint, file, fileName, additionalFields, requestId, customFetch, } = args;
68
- // Build the full URL
69
- const url = `${baseUrl}${endpoint}`;
70
- let body;
71
- const headers = {
72
- Authorization: `Bearer ${authToken}`,
73
- };
74
- if (requestId) {
75
- headers['X-Request-Id'] = requestId;
76
- }
77
- if (file instanceof Blob) {
78
- // Browser path: use native FormData
79
- const form = new globalThis.FormData();
80
- const resolvedFileName = fileName || (file instanceof File ? file.name : undefined) || 'upload';
81
- form.append('file', file, resolvedFileName);
82
- for (const [key, value] of Object.entries(additionalFields)) {
83
- if (value !== undefined && value !== null) {
84
- form.append(key, value.toString());
85
- }
86
- }
87
- // Don't set Content-Type — let fetch set it with the correct multipart boundary
88
- body = form;
89
- }
90
- else {
91
- // Node path: dynamically import Node-only modules
92
- const [FormDataModule, fsModule, pathModule] = await Promise.all([
93
- import('form-data'),
94
- import('fs'),
95
- import('path'),
96
- ]);
97
- const FormData = FormDataModule.default;
98
- const form = new FormData();
99
- if (typeof file === 'string') {
100
- // File path - create read stream
101
- const resolvedFileName = fileName || pathModule.basename(file);
102
- form.append('file', fsModule.createReadStream(file), resolvedFileName);
103
- }
104
- else if (Buffer.isBuffer(file)) {
105
- // Buffer - require fileName
106
- if (!fileName) {
107
- throw new Error('fileName is required when uploading from a Buffer');
108
- }
109
- const contentType = getContentTypeFromFileName(fileName);
110
- form.append('file', file, {
111
- filename: fileName,
112
- contentType: contentType,
113
- });
114
- }
115
- else {
116
- // Stream - require fileName
117
- if (!fileName) {
118
- throw new Error('fileName is required when uploading from a stream');
119
- }
120
- form.append('file', file, fileName);
121
- }
122
- for (const [key, value] of Object.entries(additionalFields)) {
123
- if (value !== undefined && value !== null) {
124
- form.append(key, value.toString());
125
- }
126
- }
127
- Object.assign(headers, form.getHeaders());
128
- body = form;
129
- }
130
- // Make the request using fetch
131
- const response = await fetchWithRetry({
132
- url,
133
- options: {
134
- method: 'POST',
135
- body,
136
- headers,
137
- timeout: 30000, // 30 second timeout for file uploads
138
- },
139
- customFetch,
140
- });
141
- return response.data;
142
- }
@@ -1,12 +0,0 @@
1
- import camelcase from 'camelcase';
2
- import emojiRegex from 'emoji-regex';
3
- function isEmojiKey(key) {
4
- const regex = emojiRegex();
5
- return regex.test(key);
6
- }
7
- export function customCamelCase(input) {
8
- // If the value is a solitary emoji string, return the key as-is
9
- if (isEmojiKey(input))
10
- return input;
11
- return camelcase(input);
12
- }
@@ -1,112 +0,0 @@
1
- const BOLD_FORMAT = /(^|[\s!?,;>:]+)(?:\*\*|__|!!)(.+?)(\*\*|__|!!)(?=$|[\s!?,;><:]+)/gi;
2
- const ITALIC_FORMAT = /(^|[\s!?,;>:]+)(?:\*|_|!)(.+?)(\*|_|!)(?=$|[\s!?,;><:]+)/gi;
3
- const BOLD_ITALIC_FORMAT = /(^|[\s!?,;>:]+)(?:\*\*\*|___|!!!)(.+?)(\*\*\*|___|!!!)(?=$|[\s!?,;><:]+)/gi;
4
- const CODE_BLOCK_FORMAT = /```([\s\S]*?)```/gi;
5
- const CODE_INLINE_FORMAT = /`([^`]+)`/gi;
6
- const TODOIST_LINK = /((?:(?:onenote:)?[\w-]+):\/\/[^\s]+)\s+[[(]([^)]+)[\])]/gi;
7
- const MARKDOWN_LINK = /\[(.+?)\]\((.+?)\)/gi;
8
- const GMAIL_LINK = /\[\[gmail=(.+?),\s*(.+?)\]\]/gi;
9
- const OUTLOOK_LINK = /\[\[outlook=(.+?),\s*(.+?)\]\]/gi;
10
- const THUNDERBIRD_LINK = /\[\[thunderbird\n(.+)\n(.+)\n\s*\]\]/gi;
11
- const FAKE_SECTION_PREFIX = '* ';
12
- const FAKE_SECTION_SUFFIX = ':';
13
- function removeStyleFormatting(input) {
14
- if (!input.includes('!') && !input.includes('*') && !input.includes('_')) {
15
- return input;
16
- }
17
- function removeMarkdown(_match, prefix, text) {
18
- return `${prefix}${text}`;
19
- }
20
- input = input.replace(BOLD_ITALIC_FORMAT, removeMarkdown);
21
- input = input.replace(BOLD_FORMAT, removeMarkdown);
22
- input = input.replace(ITALIC_FORMAT, removeMarkdown);
23
- return input;
24
- }
25
- function removeCodeFormatting(input) {
26
- function removeMarkdown(_match, text) {
27
- return text;
28
- }
29
- input = input.replace(CODE_BLOCK_FORMAT, removeMarkdown);
30
- input = input.replace(CODE_INLINE_FORMAT, removeMarkdown);
31
- return input;
32
- }
33
- function removeFakeSectionFormatting(input) {
34
- if (input.startsWith(FAKE_SECTION_PREFIX)) {
35
- input = input.slice(FAKE_SECTION_PREFIX.length);
36
- }
37
- if (input.endsWith(FAKE_SECTION_SUFFIX)) {
38
- input = input.slice(0, input.length - FAKE_SECTION_SUFFIX.length);
39
- }
40
- return input;
41
- }
42
- function removeMarkdownLinks(input) {
43
- if (!input.includes('[') || !input.includes(']')) {
44
- return input;
45
- }
46
- function removeMarkdown(_match, text) {
47
- return text;
48
- }
49
- return input.replace(MARKDOWN_LINK, removeMarkdown);
50
- }
51
- function removeTodoistLinks(input) {
52
- if (!input.includes('(') || !input.includes(')')) {
53
- return input;
54
- }
55
- function removeMarkdown(_match, _url, text) {
56
- return text;
57
- }
58
- return input.replace(TODOIST_LINK, removeMarkdown);
59
- }
60
- function removeAppLinks(input) {
61
- if (input.includes('gmail')) {
62
- input = input.replace(GMAIL_LINK, (_match, _id, text) => text);
63
- }
64
- if (input.includes('outlook')) {
65
- input = input.replace(OUTLOOK_LINK, (_match, _id, text) => text);
66
- }
67
- if (input.includes('thunderbird')) {
68
- input = input.replace(THUNDERBIRD_LINK, (_match, text) => text);
69
- }
70
- return input;
71
- }
72
- /**
73
- * Sanitizes a string by removing Todoist's formatting syntax (e.g. bold, italic, code blocks, links).
74
- *
75
- * @example
76
- * // Removes bold/italic formatting
77
- * getSanitizedContent('Some **bold** and *italic*') // 'Some bold and italic'
78
- *
79
- * // Removes markdown links
80
- * getSanitizedContent('A [markdown](http://url.com) link') // 'A markdown link'
81
- *
82
- * // Removes app-specific links
83
- * getSanitizedContent('A [[gmail=id, link from gmail]]') // 'A link from gmail'
84
- *
85
- * @param input - The string to sanitize
86
- * @returns The sanitized string with all formatting removed
87
- */
88
- export function getSanitizedContent(input) {
89
- input = removeStyleFormatting(input);
90
- input = removeCodeFormatting(input);
91
- input = removeFakeSectionFormatting(input);
92
- input = removeMarkdownLinks(input);
93
- input = removeTodoistLinks(input);
94
- input = removeAppLinks(input);
95
- return input;
96
- }
97
- /**
98
- * Takes an array of tasks and returns a new array with sanitized content
99
- * added as 'sanitizedContent' property to each task.
100
- *
101
- * @see {@link getSanitizedContent}
102
- *
103
- * @example
104
- * const tasks = [{ content: '**Bold** task', ... }]
105
- * getSanitizedTasks(tasks) // [{ content: '**Bold** task', sanitizedContent: 'Bold task', ... }]
106
- *
107
- * @param tasks - Array of Task objects to sanitize
108
- * @returns Array of tasks with added sanitizedContent property
109
- */
110
- export function getSanitizedTasks(tasks) {
111
- return tasks.map((task) => (Object.assign(Object.assign({}, task), { sanitizedContent: getSanitizedContent(task.content) })));
112
- }
@@ -1,19 +0,0 @@
1
- import { v4 as uuidv4 } from 'uuid';
2
- /**
3
- * Creates a strongly-typed Sync API command with an auto-generated UUID.
4
- *
5
- * @param type - The command type (e.g. `'item_add'`, `'project_update'`).
6
- * @param args - The command arguments, constrained by the command type.
7
- * @param tempId - Optional temporary ID for referencing the created resource in subsequent commands.
8
- * @returns A fully formed `SyncCommand` ready to include in a sync request.
9
- *
10
- * @example
11
- * ```typescript
12
- * const cmd = createCommand('item_add', { content: 'Buy milk', priority: 2 })
13
- * // cmd.type === 'item_add'
14
- * // cmd.args is typed as TaskAddArgs
15
- * ```
16
- */
17
- export function createCommand(type, args, tempId) {
18
- return Object.assign({ type, uuid: uuidv4(), args: args }, (tempId !== undefined ? { tempId } : {}));
19
- }