@panoptic-it-solutions/zoho-projects-client 0.1.3 → 0.2.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 (302) hide show
  1. package/dist/__tests__/fixtures/attachments.d.ts +126 -0
  2. package/dist/__tests__/fixtures/attachments.d.ts.map +1 -0
  3. package/dist/__tests__/fixtures/attachments.js +60 -0
  4. package/dist/__tests__/fixtures/attachments.js.map +1 -0
  5. package/dist/__tests__/fixtures/blueprints.d.ts +114 -0
  6. package/dist/__tests__/fixtures/blueprints.d.ts.map +1 -0
  7. package/dist/__tests__/fixtures/blueprints.js +102 -0
  8. package/dist/__tests__/fixtures/blueprints.js.map +1 -0
  9. package/dist/__tests__/fixtures/comments.d.ts +92 -0
  10. package/dist/__tests__/fixtures/comments.d.ts.map +1 -0
  11. package/dist/__tests__/fixtures/comments.js +42 -0
  12. package/dist/__tests__/fixtures/comments.js.map +1 -0
  13. package/dist/__tests__/fixtures/customviews.d.ts +5 -0
  14. package/dist/__tests__/fixtures/customviews.d.ts.map +1 -0
  15. package/dist/__tests__/fixtures/customviews.js +55 -0
  16. package/dist/__tests__/fixtures/customviews.js.map +1 -0
  17. package/dist/__tests__/fixtures/events.d.ts +133 -0
  18. package/dist/__tests__/fixtures/events.d.ts.map +1 -0
  19. package/dist/__tests__/fixtures/events.js +75 -0
  20. package/dist/__tests__/fixtures/events.js.map +1 -0
  21. package/dist/__tests__/fixtures/forums.d.ts +114 -0
  22. package/dist/__tests__/fixtures/forums.d.ts.map +1 -0
  23. package/dist/__tests__/fixtures/forums.js +53 -0
  24. package/dist/__tests__/fixtures/forums.js.map +1 -0
  25. package/dist/__tests__/fixtures/groups.d.ts +25 -0
  26. package/dist/__tests__/fixtures/groups.d.ts.map +1 -0
  27. package/dist/__tests__/fixtures/groups.js +36 -0
  28. package/dist/__tests__/fixtures/groups.js.map +1 -0
  29. package/dist/__tests__/fixtures/index.d.ts +22 -0
  30. package/dist/__tests__/fixtures/index.d.ts.map +1 -0
  31. package/dist/__tests__/fixtures/index.js +22 -0
  32. package/dist/__tests__/fixtures/index.js.map +1 -0
  33. package/dist/__tests__/fixtures/issues.d.ts +196 -0
  34. package/dist/__tests__/fixtures/issues.d.ts.map +1 -0
  35. package/dist/__tests__/fixtures/issues.js +80 -0
  36. package/dist/__tests__/fixtures/issues.js.map +1 -0
  37. package/dist/__tests__/fixtures/modules.d.ts +6 -0
  38. package/dist/__tests__/fixtures/modules.d.ts.map +1 -0
  39. package/dist/__tests__/fixtures/modules.js +103 -0
  40. package/dist/__tests__/fixtures/modules.js.map +1 -0
  41. package/dist/__tests__/fixtures/phases.d.ts +123 -0
  42. package/dist/__tests__/fixtures/phases.d.ts.map +1 -0
  43. package/dist/__tests__/fixtures/phases.js +68 -0
  44. package/dist/__tests__/fixtures/phases.js.map +1 -0
  45. package/dist/__tests__/fixtures/portals.d.ts +4 -0
  46. package/dist/__tests__/fixtures/portals.d.ts.map +1 -0
  47. package/dist/__tests__/fixtures/portals.js +48 -0
  48. package/dist/__tests__/fixtures/portals.js.map +1 -0
  49. package/dist/__tests__/fixtures/projects.d.ts +298 -0
  50. package/dist/__tests__/fixtures/projects.d.ts.map +1 -0
  51. package/dist/__tests__/fixtures/projects.js +44 -0
  52. package/dist/__tests__/fixtures/projects.js.map +1 -0
  53. package/dist/__tests__/fixtures/tags.d.ts +22 -0
  54. package/dist/__tests__/fixtures/tags.d.ts.map +1 -0
  55. package/dist/__tests__/fixtures/tags.js +33 -0
  56. package/dist/__tests__/fixtures/tags.js.map +1 -0
  57. package/dist/__tests__/fixtures/tasklists.d.ts +107 -0
  58. package/dist/__tests__/fixtures/tasklists.d.ts.map +1 -0
  59. package/dist/__tests__/fixtures/tasklists.js +31 -0
  60. package/dist/__tests__/fixtures/tasklists.js.map +1 -0
  61. package/dist/__tests__/fixtures/tasks.d.ts +209 -0
  62. package/dist/__tests__/fixtures/tasks.d.ts.map +1 -0
  63. package/dist/__tests__/fixtures/tasks.js +69 -0
  64. package/dist/__tests__/fixtures/tasks.js.map +1 -0
  65. package/dist/__tests__/fixtures/timelogs.d.ts +151 -0
  66. package/dist/__tests__/fixtures/timelogs.d.ts.map +1 -0
  67. package/dist/__tests__/fixtures/timelogs.js +79 -0
  68. package/dist/__tests__/fixtures/timelogs.js.map +1 -0
  69. package/dist/__tests__/fixtures/timers.d.ts +5 -0
  70. package/dist/__tests__/fixtures/timers.d.ts.map +1 -0
  71. package/dist/__tests__/fixtures/timers.js +50 -0
  72. package/dist/__tests__/fixtures/timers.js.map +1 -0
  73. package/dist/__tests__/fixtures/users.d.ts +55 -0
  74. package/dist/__tests__/fixtures/users.d.ts.map +1 -0
  75. package/dist/__tests__/fixtures/users.js +47 -0
  76. package/dist/__tests__/fixtures/users.js.map +1 -0
  77. package/dist/__tests__/integration/setup.d.ts +14 -0
  78. package/dist/__tests__/integration/setup.d.ts.map +1 -0
  79. package/dist/__tests__/integration/setup.js +52 -0
  80. package/dist/__tests__/integration/setup.js.map +1 -0
  81. package/dist/__tests__/mocks/handlers.d.ts +34 -0
  82. package/dist/__tests__/mocks/handlers.d.ts.map +1 -0
  83. package/dist/__tests__/mocks/handlers.js +49 -0
  84. package/dist/__tests__/mocks/handlers.js.map +1 -0
  85. package/dist/__tests__/mocks/server.d.ts +2 -0
  86. package/dist/__tests__/mocks/server.d.ts.map +1 -0
  87. package/dist/__tests__/mocks/server.js +7 -0
  88. package/dist/__tests__/mocks/server.js.map +1 -0
  89. package/dist/__tests__/setup.d.ts +2 -0
  90. package/dist/__tests__/setup.d.ts.map +1 -0
  91. package/dist/__tests__/setup.js +18 -0
  92. package/dist/__tests__/setup.js.map +1 -0
  93. package/dist/__tests__/unit/client/attachments.test.d.ts +2 -0
  94. package/dist/__tests__/unit/client/attachments.test.d.ts.map +1 -0
  95. package/dist/__tests__/unit/client/attachments.test.js +55 -0
  96. package/dist/__tests__/unit/client/attachments.test.js.map +1 -0
  97. package/dist/__tests__/unit/client/blueprints.test.d.ts +2 -0
  98. package/dist/__tests__/unit/client/blueprints.test.d.ts.map +1 -0
  99. package/dist/__tests__/unit/client/blueprints.test.js +127 -0
  100. package/dist/__tests__/unit/client/blueprints.test.js.map +1 -0
  101. package/dist/__tests__/unit/client/comments.test.d.ts +2 -0
  102. package/dist/__tests__/unit/client/comments.test.d.ts.map +1 -0
  103. package/dist/__tests__/unit/client/comments.test.js +95 -0
  104. package/dist/__tests__/unit/client/comments.test.js.map +1 -0
  105. package/dist/__tests__/unit/client/customviews.test.d.ts +2 -0
  106. package/dist/__tests__/unit/client/customviews.test.d.ts.map +1 -0
  107. package/dist/__tests__/unit/client/customviews.test.js +112 -0
  108. package/dist/__tests__/unit/client/customviews.test.js.map +1 -0
  109. package/dist/__tests__/unit/client/events.test.d.ts +2 -0
  110. package/dist/__tests__/unit/client/events.test.d.ts.map +1 -0
  111. package/dist/__tests__/unit/client/events.test.js +79 -0
  112. package/dist/__tests__/unit/client/events.test.js.map +1 -0
  113. package/dist/__tests__/unit/client/forums.test.d.ts +2 -0
  114. package/dist/__tests__/unit/client/forums.test.d.ts.map +1 -0
  115. package/dist/__tests__/unit/client/forums.test.js +75 -0
  116. package/dist/__tests__/unit/client/forums.test.js.map +1 -0
  117. package/dist/__tests__/unit/client/groups.test.d.ts +2 -0
  118. package/dist/__tests__/unit/client/groups.test.d.ts.map +1 -0
  119. package/dist/__tests__/unit/client/groups.test.js +74 -0
  120. package/dist/__tests__/unit/client/groups.test.js.map +1 -0
  121. package/dist/__tests__/unit/client/issues.test.d.ts +2 -0
  122. package/dist/__tests__/unit/client/issues.test.d.ts.map +1 -0
  123. package/dist/__tests__/unit/client/issues.test.js +75 -0
  124. package/dist/__tests__/unit/client/issues.test.js.map +1 -0
  125. package/dist/__tests__/unit/client/modules.test.d.ts +2 -0
  126. package/dist/__tests__/unit/client/modules.test.d.ts.map +1 -0
  127. package/dist/__tests__/unit/client/modules.test.js +92 -0
  128. package/dist/__tests__/unit/client/modules.test.js.map +1 -0
  129. package/dist/__tests__/unit/client/phases.test.d.ts +2 -0
  130. package/dist/__tests__/unit/client/phases.test.d.ts.map +1 -0
  131. package/dist/__tests__/unit/client/phases.test.js +79 -0
  132. package/dist/__tests__/unit/client/phases.test.js.map +1 -0
  133. package/dist/__tests__/unit/client/portals.test.d.ts +2 -0
  134. package/dist/__tests__/unit/client/portals.test.d.ts.map +1 -0
  135. package/dist/__tests__/unit/client/portals.test.js +54 -0
  136. package/dist/__tests__/unit/client/portals.test.js.map +1 -0
  137. package/dist/__tests__/unit/client/projects.test.d.ts +2 -0
  138. package/dist/__tests__/unit/client/projects.test.d.ts.map +1 -0
  139. package/dist/__tests__/unit/client/projects.test.js +171 -0
  140. package/dist/__tests__/unit/client/projects.test.js.map +1 -0
  141. package/dist/__tests__/unit/client/tags.test.d.ts +2 -0
  142. package/dist/__tests__/unit/client/tags.test.d.ts.map +1 -0
  143. package/dist/__tests__/unit/client/tags.test.js +99 -0
  144. package/dist/__tests__/unit/client/tags.test.js.map +1 -0
  145. package/dist/__tests__/unit/client/tasklists.test.d.ts +2 -0
  146. package/dist/__tests__/unit/client/tasklists.test.d.ts.map +1 -0
  147. package/dist/__tests__/unit/client/tasklists.test.js +75 -0
  148. package/dist/__tests__/unit/client/tasklists.test.js.map +1 -0
  149. package/dist/__tests__/unit/client/tasks.test.d.ts +2 -0
  150. package/dist/__tests__/unit/client/tasks.test.d.ts.map +1 -0
  151. package/dist/__tests__/unit/client/tasks.test.js +157 -0
  152. package/dist/__tests__/unit/client/tasks.test.js.map +1 -0
  153. package/dist/__tests__/unit/client/timers.test.d.ts +2 -0
  154. package/dist/__tests__/unit/client/timers.test.d.ts.map +1 -0
  155. package/dist/__tests__/unit/client/timers.test.js +122 -0
  156. package/dist/__tests__/unit/client/timers.test.js.map +1 -0
  157. package/dist/__tests__/unit/client/users.test.d.ts +2 -0
  158. package/dist/__tests__/unit/client/users.test.d.ts.map +1 -0
  159. package/dist/__tests__/unit/client/users.test.js +89 -0
  160. package/dist/__tests__/unit/client/users.test.js.map +1 -0
  161. package/dist/cli/init.d.ts +3 -0
  162. package/dist/cli/init.d.ts.map +1 -0
  163. package/dist/cli/init.js +130 -0
  164. package/dist/cli/init.js.map +1 -0
  165. package/dist/client.d.ts +2613 -1
  166. package/dist/client.d.ts.map +1 -1
  167. package/dist/client.js +1623 -1
  168. package/dist/client.js.map +1 -1
  169. package/dist/types/attachments.d.ts +1545 -0
  170. package/dist/types/attachments.d.ts.map +1 -0
  171. package/dist/types/attachments.js +78 -0
  172. package/dist/types/attachments.js.map +1 -0
  173. package/dist/types/blueprints.d.ts +5070 -0
  174. package/dist/types/blueprints.d.ts.map +1 -0
  175. package/dist/types/blueprints.js +111 -0
  176. package/dist/types/blueprints.js.map +1 -0
  177. package/dist/types/clients.d.ts +384 -0
  178. package/dist/types/clients.d.ts.map +1 -0
  179. package/dist/types/clients.js +77 -0
  180. package/dist/types/clients.js.map +1 -0
  181. package/dist/types/comments.d.ts +1111 -0
  182. package/dist/types/comments.d.ts.map +1 -0
  183. package/dist/types/comments.js +73 -0
  184. package/dist/types/comments.js.map +1 -0
  185. package/dist/types/contacts.d.ts +444 -0
  186. package/dist/types/contacts.d.ts.map +1 -0
  187. package/dist/types/contacts.js +86 -0
  188. package/dist/types/contacts.js.map +1 -0
  189. package/dist/types/customviews.d.ts +1593 -0
  190. package/dist/types/customviews.d.ts.map +1 -0
  191. package/dist/types/customviews.js +117 -0
  192. package/dist/types/customviews.js.map +1 -0
  193. package/dist/types/dashboards.d.ts +1675 -0
  194. package/dist/types/dashboards.d.ts.map +1 -0
  195. package/dist/types/dashboards.js +77 -0
  196. package/dist/types/dashboards.js.map +1 -0
  197. package/dist/types/documents.d.ts +2322 -0
  198. package/dist/types/documents.d.ts.map +1 -0
  199. package/dist/types/documents.js +121 -0
  200. package/dist/types/documents.js.map +1 -0
  201. package/dist/types/events.d.ts +1747 -0
  202. package/dist/types/events.d.ts.map +1 -0
  203. package/dist/types/events.js +122 -0
  204. package/dist/types/events.js.map +1 -0
  205. package/dist/types/followers.d.ts +198 -0
  206. package/dist/types/followers.d.ts.map +1 -0
  207. package/dist/types/followers.js +44 -0
  208. package/dist/types/followers.js.map +1 -0
  209. package/dist/types/forums.d.ts +1443 -0
  210. package/dist/types/forums.d.ts.map +1 -0
  211. package/dist/types/forums.js +89 -0
  212. package/dist/types/forums.js.map +1 -0
  213. package/dist/types/groups.d.ts +237 -0
  214. package/dist/types/groups.d.ts.map +1 -0
  215. package/dist/types/groups.js +52 -0
  216. package/dist/types/groups.js.map +1 -0
  217. package/dist/types/index.d.ts +31 -4
  218. package/dist/types/index.d.ts.map +1 -1
  219. package/dist/types/index.js +58 -4
  220. package/dist/types/index.js.map +1 -1
  221. package/dist/types/issues.d.ts +2600 -0
  222. package/dist/types/issues.d.ts.map +1 -0
  223. package/dist/types/issues.js +147 -0
  224. package/dist/types/issues.js.map +1 -0
  225. package/dist/types/leaves.d.ts +435 -0
  226. package/dist/types/leaves.d.ts.map +1 -0
  227. package/dist/types/leaves.js +92 -0
  228. package/dist/types/leaves.js.map +1 -0
  229. package/dist/types/modules.d.ts +469 -0
  230. package/dist/types/modules.d.ts.map +1 -0
  231. package/dist/types/modules.js +91 -0
  232. package/dist/types/modules.js.map +1 -0
  233. package/dist/types/phases.d.ts +1564 -0
  234. package/dist/types/phases.d.ts.map +1 -0
  235. package/dist/types/phases.js +98 -0
  236. package/dist/types/phases.js.map +1 -0
  237. package/dist/types/portals.d.ts +1050 -0
  238. package/dist/types/portals.d.ts.map +1 -0
  239. package/dist/types/portals.js +58 -0
  240. package/dist/types/portals.js.map +1 -0
  241. package/dist/types/profiles.d.ts +243 -0
  242. package/dist/types/profiles.d.ts.map +1 -0
  243. package/dist/types/profiles.js +59 -0
  244. package/dist/types/profiles.js.map +1 -0
  245. package/dist/types/projects.d.ts +128 -0
  246. package/dist/types/projects.d.ts.map +1 -1
  247. package/dist/types/projects.js +44 -0
  248. package/dist/types/projects.js.map +1 -1
  249. package/dist/types/reports.d.ts +2010 -0
  250. package/dist/types/reports.d.ts.map +1 -0
  251. package/dist/types/reports.js +110 -0
  252. package/dist/types/reports.js.map +1 -0
  253. package/dist/types/roles.d.ts +243 -0
  254. package/dist/types/roles.d.ts.map +1 -0
  255. package/dist/types/roles.js +59 -0
  256. package/dist/types/roles.js.map +1 -0
  257. package/dist/types/search.d.ts +1091 -0
  258. package/dist/types/search.d.ts.map +1 -0
  259. package/dist/types/search.js +83 -0
  260. package/dist/types/search.js.map +1 -0
  261. package/dist/types/tags.d.ts +198 -0
  262. package/dist/types/tags.d.ts.map +1 -0
  263. package/dist/types/tags.js +49 -0
  264. package/dist/types/tags.js.map +1 -0
  265. package/dist/types/tasklists.d.ts +1317 -0
  266. package/dist/types/tasklists.d.ts.map +1 -0
  267. package/dist/types/tasklists.js +78 -0
  268. package/dist/types/tasklists.js.map +1 -0
  269. package/dist/types/tasks.d.ts +182 -0
  270. package/dist/types/tasks.d.ts.map +1 -1
  271. package/dist/types/tasks.js +52 -0
  272. package/dist/types/tasks.js.map +1 -1
  273. package/dist/types/teams.d.ts +504 -0
  274. package/dist/types/teams.d.ts.map +1 -0
  275. package/dist/types/teams.js +75 -0
  276. package/dist/types/teams.js.map +1 -0
  277. package/dist/types/timelogs.d.ts +245 -0
  278. package/dist/types/timelogs.d.ts.map +1 -1
  279. package/dist/types/timelogs.js +53 -0
  280. package/dist/types/timelogs.js.map +1 -1
  281. package/dist/types/timers.d.ts +1334 -0
  282. package/dist/types/timers.d.ts.map +1 -0
  283. package/dist/types/timers.js +108 -0
  284. package/dist/types/timers.js.map +1 -0
  285. package/dist/types/trash.d.ts +1447 -0
  286. package/dist/types/trash.d.ts.map +1 -0
  287. package/dist/types/trash.js +77 -0
  288. package/dist/types/trash.js.map +1 -0
  289. package/dist/types/users.d.ts +100 -0
  290. package/dist/types/users.d.ts.map +1 -1
  291. package/dist/types/users.js +56 -0
  292. package/dist/types/users.js.map +1 -1
  293. package/dist/types/widgets.d.ts +1083 -0
  294. package/dist/types/widgets.d.ts.map +1 -0
  295. package/dist/types/widgets.js +87 -0
  296. package/dist/types/widgets.js.map +1 -0
  297. package/package.json +15 -3
  298. package/templates/CLAUDE.md +66 -0
  299. package/templates/commands/zoho-auth.md +195 -0
  300. package/templates/commands/zoho-examples.md +375 -0
  301. package/templates/commands/zoho-projects.md +183 -0
  302. package/templates/types/zoho-projects-api.d.ts +364 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widgets.d.ts","sourceRoot":"","sources":["../../src/types/widgets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;gCAKf,CAAC;AAEjB,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAoCT,CAAC;AAEjB,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAMlD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,87 @@
1
+ import { z } from "zod";
2
+ import { ZohoPageInfoSchema } from "./common.js";
3
+ // ─────────────────────────────────────────────────────────────────────────────
4
+ // WIDGET SCHEMA
5
+ // ─────────────────────────────────────────────────────────────────────────────
6
+ /**
7
+ * Widget configuration
8
+ */
9
+ export const WidgetConfigSchema = z.object({
10
+ chart_type: z.string().optional(),
11
+ data_source: z.string().optional(),
12
+ filters: z.record(z.unknown()).optional(),
13
+ display_options: z.record(z.unknown()).optional(),
14
+ }).passthrough();
15
+ /**
16
+ * Widget from Zoho Projects API
17
+ * Widgets are nested under dashboards
18
+ */
19
+ export const WidgetSchema = z.object({
20
+ // Identification
21
+ id: z.number(),
22
+ id_string: z.string(),
23
+ name: z.string(),
24
+ description: z.string().nullable().optional(),
25
+ // Type
26
+ type: z.string().optional(), // "chart", "list", "summary", etc.
27
+ widget_type: z.string().optional(),
28
+ // Position and size
29
+ position: z.object({
30
+ row: z.number().optional(),
31
+ col: z.number().optional(),
32
+ width: z.number().optional(),
33
+ height: z.number().optional(),
34
+ }).optional(),
35
+ // Configuration
36
+ config: WidgetConfigSchema.optional(),
37
+ settings: z.record(z.unknown()).optional(),
38
+ // Dashboard reference
39
+ dashboard_id: z.string().optional(),
40
+ // Links
41
+ link: z.object({
42
+ self: z.object({ url: z.string() }).optional(),
43
+ }).passthrough().optional(),
44
+ // Timestamps
45
+ created_time: z.string().optional(),
46
+ created_time_long: z.number().optional(),
47
+ last_modified_time: z.string().optional(),
48
+ last_modified_time_long: z.number().optional(),
49
+ }).passthrough();
50
+ // ─────────────────────────────────────────────────────────────────────────────
51
+ // RESPONSE SCHEMAS
52
+ // ─────────────────────────────────────────────────────────────────────────────
53
+ export const WidgetListResponseSchema = z.object({
54
+ widgets: z.array(WidgetSchema),
55
+ page_info: ZohoPageInfoSchema.optional(),
56
+ });
57
+ export const WidgetResponseSchema = z.object({
58
+ widgets: z.array(WidgetSchema),
59
+ });
60
+ // ─────────────────────────────────────────────────────────────────────────────
61
+ // INPUT SCHEMAS (CREATE/UPDATE)
62
+ // ─────────────────────────────────────────────────────────────────────────────
63
+ /**
64
+ * Input schema for creating a widget
65
+ */
66
+ export const CreateWidgetInputSchema = z.object({
67
+ /** Widget name (required) */
68
+ name: z.string().min(1),
69
+ /** Widget description */
70
+ description: z.string().optional(),
71
+ /** Widget type */
72
+ type: z.string().optional(),
73
+ /** Widget position */
74
+ position: z.object({
75
+ row: z.number().optional(),
76
+ col: z.number().optional(),
77
+ width: z.number().optional(),
78
+ height: z.number().optional(),
79
+ }).optional(),
80
+ /** Widget configuration */
81
+ config: z.record(z.unknown()).optional(),
82
+ });
83
+ /**
84
+ * Input schema for updating a widget
85
+ */
86
+ export const UpdateWidgetInputSchema = CreateWidgetInputSchema.partial();
87
+ //# sourceMappingURL=widgets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widgets.js","sourceRoot":"","sources":["../../src/types/widgets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,gFAAgF;AAChF,gBAAgB;AAChB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IACzC,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC,WAAW,EAAE,CAAC;AAIjB;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG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MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC,CAAC,QAAQ,EAAE;IACb,2BAA2B;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CACzC,CAAC,CAAC;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC,OAAO,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "@panoptic-it-solutions/zoho-projects-client",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "TypeScript client for Zoho Projects V3 API with OAuth 2.0 and rate limiting",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "zoho-projects": "./dist/cli/init.js"
10
+ },
8
11
  "exports": {
9
12
  ".": {
10
13
  "types": "./dist/index.d.ts",
@@ -12,11 +15,16 @@
12
15
  }
13
16
  },
14
17
  "files": [
15
- "dist"
18
+ "dist",
19
+ "templates"
16
20
  ],
17
21
  "scripts": {
18
22
  "build": "tsc",
19
23
  "clean": "rm -rf dist",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest",
26
+ "test:coverage": "vitest run --coverage",
27
+ "test:integration": "vitest run --config vitest.integration.config.ts",
20
28
  "prepublishOnly": "npm run clean && npm run build"
21
29
  },
22
30
  "keywords": [
@@ -44,8 +52,12 @@
44
52
  "zod": "^3.23.0"
45
53
  },
46
54
  "devDependencies": {
55
+ "@faker-js/faker": "^9.3.0",
47
56
  "@types/node": "^22.0.0",
48
- "typescript": "^5.6.0"
57
+ "@vitest/coverage-v8": "^2.1.0",
58
+ "msw": "^2.7.0",
59
+ "typescript": "^5.6.0",
60
+ "vitest": "^2.1.0"
49
61
  },
50
62
  "engines": {
51
63
  "node": ">=18.0.0"
@@ -0,0 +1,66 @@
1
+ # Zoho Projects Client
2
+
3
+ This project uses the `@panoptic-it-solutions/zoho-projects-client` package for interacting with the Zoho Projects V3 API.
4
+
5
+ ## Quick Reference
6
+
7
+ Use these slash commands for detailed information:
8
+ - `/zoho-projects` - Full API reference with all namespaces and methods
9
+ - `/zoho-auth` - OAuth 2.0 setup guide
10
+ - `/zoho-examples` - Common usage patterns and examples
11
+
12
+ ## Client Setup
13
+
14
+ ```typescript
15
+ import { createZohoProjectsClient } from '@panoptic-it-solutions/zoho-projects-client';
16
+
17
+ const client = createZohoProjectsClient({
18
+ clientId: process.env.ZOHO_CLIENT_ID!,
19
+ clientSecret: process.env.ZOHO_CLIENT_SECRET!,
20
+ refreshToken: process.env.ZOHO_REFRESH_TOKEN!,
21
+ portalId: process.env.ZOHO_PORTAL_ID!,
22
+ });
23
+ ```
24
+
25
+ ## Environment Variables
26
+
27
+ ```bash
28
+ ZOHO_CLIENT_ID= # OAuth client ID from Zoho API Console
29
+ ZOHO_CLIENT_SECRET= # OAuth client secret
30
+ ZOHO_REFRESH_TOKEN= # Refresh token from OAuth flow
31
+ ZOHO_PORTAL_ID= # Your Zoho Projects portal ID
32
+ ```
33
+
34
+ ## Available Namespaces
35
+
36
+ ### Portal-Level (no projectId needed)
37
+ `projects`, `users`, `tags`, `roles`, `profiles`, `clients`, `contacts`, `groups`, `leaves`, `teams`, `dashboards`, `reports`, `search`, `trash`
38
+
39
+ ### Project-Scoped (require projectId)
40
+ `tasks`, `tasklists`, `phases`, `issues`, `forums`, `events`, `timelogs`, `attachments`, `documents`
41
+
42
+ ### Polymorphic
43
+ - `comments.forTask(projectId, taskId)` / `comments.forIssue(projectId, issueId)`
44
+ - `followers.forTask(projectId, taskId)`
45
+
46
+ ## Common Patterns
47
+
48
+ ```typescript
49
+ // List all (auto-paginate)
50
+ const allProjects = await client.projects.listAll();
51
+
52
+ // Iterate (memory-efficient)
53
+ for await (const project of client.projects.iterate()) {
54
+ console.log(project.name);
55
+ }
56
+
57
+ // CRUD operations
58
+ await client.tasks.create(projectId, { name: 'New task', tasklist_id: tasklistId });
59
+ await client.tasks.update(projectId, taskId, { status: 'completed' });
60
+ await client.tasks.delete(projectId, taskId);
61
+ ```
62
+
63
+ ## Package Documentation
64
+
65
+ - [GitHub Repository](https://github.com/Panoptic-IT-Solutions/zoho-projects-client)
66
+ - [npm Package](https://www.npmjs.com/package/@panoptic-it-solutions/zoho-projects-client)
@@ -0,0 +1,195 @@
1
+ # Zoho Projects OAuth 2.0 Setup Guide
2
+
3
+ This guide explains how to set up OAuth 2.0 authentication for the Zoho Projects API.
4
+
5
+ ## Prerequisites
6
+
7
+ 1. A Zoho account
8
+ 2. Access to Zoho Projects
9
+ 3. Access to Zoho API Console
10
+
11
+ ## Step 1: Create a Zoho API Client
12
+
13
+ 1. Go to [Zoho API Console](https://api-console.zoho.com/)
14
+ 2. Click "Add Client"
15
+ 3. Choose "Server-based Applications"
16
+ 4. Fill in the details:
17
+ - **Client Name**: Your application name
18
+ - **Homepage URL**: Your application URL
19
+ - **Authorized Redirect URIs**: `http://localhost:3000/callback` (for local development)
20
+ 5. Click "Create"
21
+ 6. Note down the **Client ID** and **Client Secret**
22
+
23
+ ## Step 2: Get Authorization Code
24
+
25
+ Open this URL in your browser (replace placeholders):
26
+
27
+ ```
28
+ https://accounts.zoho.com/oauth/v2/auth?
29
+ client_id=YOUR_CLIENT_ID&
30
+ response_type=code&
31
+ scope=ZohoProjects.projects.ALL,ZohoProjects.tasks.ALL,ZohoProjects.users.ALL,ZohoProjects.timesheets.ALL,ZohoProjects.bugs.ALL,ZohoProjects.forums.ALL,ZohoProjects.events.ALL,ZohoProjects.documents.ALL&
32
+ redirect_uri=http://localhost:3000/callback&
33
+ access_type=offline&
34
+ prompt=consent
35
+ ```
36
+
37
+ ### Available Scopes
38
+
39
+ | Scope | Description |
40
+ |-------|-------------|
41
+ | `ZohoProjects.projects.ALL` | Projects CRUD |
42
+ | `ZohoProjects.tasks.ALL` | Tasks and task lists |
43
+ | `ZohoProjects.users.ALL` | Users and roles |
44
+ | `ZohoProjects.timesheets.ALL` | Time logs |
45
+ | `ZohoProjects.bugs.ALL` | Issues/bugs |
46
+ | `ZohoProjects.forums.ALL` | Forums |
47
+ | `ZohoProjects.events.ALL` | Events/calendar |
48
+ | `ZohoProjects.documents.ALL` | Documents |
49
+ | `ZohoProjects.portals.ALL` | Portal settings |
50
+
51
+ Use `ZohoProjects.ALL` for full access to all Zoho Projects resources.
52
+
53
+ ## Step 3: Exchange Code for Tokens
54
+
55
+ After authorization, you'll be redirected to your callback URL with a `code` parameter.
56
+
57
+ Exchange it for tokens:
58
+
59
+ ```bash
60
+ curl -X POST "https://accounts.zoho.com/oauth/v2/token" \
61
+ -d "grant_type=authorization_code" \
62
+ -d "client_id=YOUR_CLIENT_ID" \
63
+ -d "client_secret=YOUR_CLIENT_SECRET" \
64
+ -d "redirect_uri=http://localhost:3000/callback" \
65
+ -d "code=YOUR_AUTHORIZATION_CODE"
66
+ ```
67
+
68
+ Response:
69
+
70
+ ```json
71
+ {
72
+ "access_token": "...",
73
+ "refresh_token": "...",
74
+ "api_domain": "https://www.zohoapis.com",
75
+ "token_type": "Bearer",
76
+ "expires_in": 3600
77
+ }
78
+ ```
79
+
80
+ **Important**: Save the `refresh_token` - you'll need it for the client configuration.
81
+
82
+ ## Step 4: Get Your Portal ID
83
+
84
+ Use your access token to get the portal ID:
85
+
86
+ ```bash
87
+ curl "https://projectsapi.zoho.com/restapi/portals/" \
88
+ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
89
+ ```
90
+
91
+ Response:
92
+
93
+ ```json
94
+ {
95
+ "portals": [
96
+ {
97
+ "id": 123456789,
98
+ "name": "Your Portal Name",
99
+ ...
100
+ }
101
+ ]
102
+ }
103
+ ```
104
+
105
+ Note the `id` value - this is your Portal ID.
106
+
107
+ ## Step 5: Configure Environment Variables
108
+
109
+ Create a `.env` file:
110
+
111
+ ```bash
112
+ ZOHO_CLIENT_ID=your_client_id
113
+ ZOHO_CLIENT_SECRET=your_client_secret
114
+ ZOHO_REFRESH_TOKEN=your_refresh_token
115
+ ZOHO_PORTAL_ID=your_portal_id
116
+ ```
117
+
118
+ ## Step 6: Initialize the Client
119
+
120
+ ```typescript
121
+ import { createZohoProjectsClient } from '@panoptic-it-solutions/zoho-projects-client';
122
+ import 'dotenv/config';
123
+
124
+ const client = createZohoProjectsClient({
125
+ clientId: process.env.ZOHO_CLIENT_ID!,
126
+ clientSecret: process.env.ZOHO_CLIENT_SECRET!,
127
+ refreshToken: process.env.ZOHO_REFRESH_TOKEN!,
128
+ portalId: process.env.ZOHO_PORTAL_ID!,
129
+ });
130
+
131
+ // Test the connection
132
+ const projects = await client.projects.list();
133
+ console.log('Connected! Projects:', projects.projects.length);
134
+ ```
135
+
136
+ ## Data Centers
137
+
138
+ Zoho operates in multiple data centers. Use the correct one for your account:
139
+
140
+ | Extension | Region |
141
+ |-----------|--------|
142
+ | `com` | United States (default) |
143
+ | `eu` | Europe |
144
+ | `in` | India |
145
+ | `com.au` | Australia |
146
+ | `jp` | Japan |
147
+
148
+ Configure in client:
149
+
150
+ ```typescript
151
+ const client = createZohoProjectsClient({
152
+ // ... other options
153
+ dataCenterExtension: 'eu', // For EU accounts
154
+ });
155
+ ```
156
+
157
+ ## Token Refresh
158
+
159
+ The client automatically handles token refresh. When the access token expires, it will use the refresh token to get a new one.
160
+
161
+ ## Troubleshooting
162
+
163
+ ### "Invalid refresh token"
164
+
165
+ - Refresh tokens can expire if not used for 90+ days
166
+ - Re-authorize your application to get a new refresh token
167
+
168
+ ### "Unauthorized" errors
169
+
170
+ - Check that your scopes include the required permissions
171
+ - Verify the Portal ID is correct
172
+ - Ensure you're using the correct data center
173
+
174
+ ### Rate Limiting
175
+
176
+ The client includes automatic rate limiting. If you hit rate limits:
177
+
178
+ ```typescript
179
+ import { ZohoRateLimitError } from '@panoptic-it-solutions/zoho-projects-client';
180
+
181
+ try {
182
+ await client.projects.list();
183
+ } catch (error) {
184
+ if (error instanceof ZohoRateLimitError) {
185
+ console.log(`Retry after ${error.retryAfter}ms`);
186
+ }
187
+ }
188
+ ```
189
+
190
+ ## Security Best Practices
191
+
192
+ 1. **Never commit credentials** - Use environment variables
193
+ 2. **Use minimal scopes** - Only request scopes you need
194
+ 3. **Rotate secrets** - Periodically regenerate your client secret
195
+ 4. **Secure storage** - Use a secrets manager in production