@panoptic-it-solutions/zoho-projects-client 0.1.4 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/fixtures/attachments.d.ts +126 -0
- package/dist/__tests__/fixtures/attachments.d.ts.map +1 -0
- package/dist/__tests__/fixtures/attachments.js +60 -0
- package/dist/__tests__/fixtures/attachments.js.map +1 -0
- package/dist/__tests__/fixtures/blueprints.d.ts +114 -0
- package/dist/__tests__/fixtures/blueprints.d.ts.map +1 -0
- package/dist/__tests__/fixtures/blueprints.js +102 -0
- package/dist/__tests__/fixtures/blueprints.js.map +1 -0
- package/dist/__tests__/fixtures/clients.d.ts +4 -0
- package/dist/__tests__/fixtures/clients.d.ts.map +1 -0
- package/dist/__tests__/fixtures/clients.js +38 -0
- package/dist/__tests__/fixtures/clients.js.map +1 -0
- package/dist/__tests__/fixtures/comments.d.ts +92 -0
- package/dist/__tests__/fixtures/comments.d.ts.map +1 -0
- package/dist/__tests__/fixtures/comments.js +42 -0
- package/dist/__tests__/fixtures/comments.js.map +1 -0
- package/dist/__tests__/fixtures/contacts.d.ts +4 -0
- package/dist/__tests__/fixtures/contacts.d.ts.map +1 -0
- package/dist/__tests__/fixtures/contacts.js +40 -0
- package/dist/__tests__/fixtures/contacts.js.map +1 -0
- package/dist/__tests__/fixtures/customviews.d.ts +5 -0
- package/dist/__tests__/fixtures/customviews.d.ts.map +1 -0
- package/dist/__tests__/fixtures/customviews.js +55 -0
- package/dist/__tests__/fixtures/customviews.js.map +1 -0
- package/dist/__tests__/fixtures/dashboards.d.ts +4 -0
- package/dist/__tests__/fixtures/dashboards.d.ts.map +1 -0
- package/dist/__tests__/fixtures/dashboards.js +42 -0
- package/dist/__tests__/fixtures/dashboards.js.map +1 -0
- package/dist/__tests__/fixtures/events.d.ts +133 -0
- package/dist/__tests__/fixtures/events.d.ts.map +1 -0
- package/dist/__tests__/fixtures/events.js +75 -0
- package/dist/__tests__/fixtures/events.js.map +1 -0
- package/dist/__tests__/fixtures/followers.d.ts +4 -0
- package/dist/__tests__/fixtures/followers.d.ts.map +1 -0
- package/dist/__tests__/fixtures/followers.js +33 -0
- package/dist/__tests__/fixtures/followers.js.map +1 -0
- package/dist/__tests__/fixtures/forums.d.ts +114 -0
- package/dist/__tests__/fixtures/forums.d.ts.map +1 -0
- package/dist/__tests__/fixtures/forums.js +53 -0
- package/dist/__tests__/fixtures/forums.js.map +1 -0
- package/dist/__tests__/fixtures/groups.d.ts +25 -0
- package/dist/__tests__/fixtures/groups.d.ts.map +1 -0
- package/dist/__tests__/fixtures/groups.js +36 -0
- package/dist/__tests__/fixtures/groups.js.map +1 -0
- package/dist/__tests__/fixtures/index.d.ts +34 -0
- package/dist/__tests__/fixtures/index.d.ts.map +1 -0
- package/dist/__tests__/fixtures/index.js +34 -0
- package/dist/__tests__/fixtures/index.js.map +1 -0
- package/dist/__tests__/fixtures/issues.d.ts +196 -0
- package/dist/__tests__/fixtures/issues.d.ts.map +1 -0
- package/dist/__tests__/fixtures/issues.js +80 -0
- package/dist/__tests__/fixtures/issues.js.map +1 -0
- package/dist/__tests__/fixtures/leaves.d.ts +4 -0
- package/dist/__tests__/fixtures/leaves.d.ts.map +1 -0
- package/dist/__tests__/fixtures/leaves.js +45 -0
- package/dist/__tests__/fixtures/leaves.js.map +1 -0
- package/dist/__tests__/fixtures/modules.d.ts +6 -0
- package/dist/__tests__/fixtures/modules.d.ts.map +1 -0
- package/dist/__tests__/fixtures/modules.js +103 -0
- package/dist/__tests__/fixtures/modules.js.map +1 -0
- package/dist/__tests__/fixtures/phases.d.ts +123 -0
- package/dist/__tests__/fixtures/phases.d.ts.map +1 -0
- package/dist/__tests__/fixtures/phases.js +68 -0
- package/dist/__tests__/fixtures/phases.js.map +1 -0
- package/dist/__tests__/fixtures/portals.d.ts +4 -0
- package/dist/__tests__/fixtures/portals.d.ts.map +1 -0
- package/dist/__tests__/fixtures/portals.js +48 -0
- package/dist/__tests__/fixtures/portals.js.map +1 -0
- package/dist/__tests__/fixtures/profiles.d.ts +4 -0
- package/dist/__tests__/fixtures/profiles.d.ts.map +1 -0
- package/dist/__tests__/fixtures/profiles.js +35 -0
- package/dist/__tests__/fixtures/profiles.js.map +1 -0
- package/dist/__tests__/fixtures/projects.d.ts +298 -0
- package/dist/__tests__/fixtures/projects.d.ts.map +1 -0
- package/dist/__tests__/fixtures/projects.js +44 -0
- package/dist/__tests__/fixtures/projects.js.map +1 -0
- package/dist/__tests__/fixtures/reports.d.ts +5 -0
- package/dist/__tests__/fixtures/reports.d.ts.map +1 -0
- package/dist/__tests__/fixtures/reports.js +70 -0
- package/dist/__tests__/fixtures/reports.js.map +1 -0
- package/dist/__tests__/fixtures/roles.d.ts +4 -0
- package/dist/__tests__/fixtures/roles.d.ts.map +1 -0
- package/dist/__tests__/fixtures/roles.js +38 -0
- package/dist/__tests__/fixtures/roles.js.map +1 -0
- package/dist/__tests__/fixtures/search.d.ts +5 -0
- package/dist/__tests__/fixtures/search.d.ts.map +1 -0
- package/dist/__tests__/fixtures/search.js +61 -0
- package/dist/__tests__/fixtures/search.js.map +1 -0
- package/dist/__tests__/fixtures/tags.d.ts +22 -0
- package/dist/__tests__/fixtures/tags.d.ts.map +1 -0
- package/dist/__tests__/fixtures/tags.js +33 -0
- package/dist/__tests__/fixtures/tags.js.map +1 -0
- package/dist/__tests__/fixtures/tasklists.d.ts +107 -0
- package/dist/__tests__/fixtures/tasklists.d.ts.map +1 -0
- package/dist/__tests__/fixtures/tasklists.js +31 -0
- package/dist/__tests__/fixtures/tasklists.js.map +1 -0
- package/dist/__tests__/fixtures/tasks.d.ts +209 -0
- package/dist/__tests__/fixtures/tasks.d.ts.map +1 -0
- package/dist/__tests__/fixtures/tasks.js +69 -0
- package/dist/__tests__/fixtures/tasks.js.map +1 -0
- package/dist/__tests__/fixtures/teams.d.ts +5 -0
- package/dist/__tests__/fixtures/teams.d.ts.map +1 -0
- package/dist/__tests__/fixtures/teams.js +40 -0
- package/dist/__tests__/fixtures/teams.js.map +1 -0
- package/dist/__tests__/fixtures/timelogs.d.ts +151 -0
- package/dist/__tests__/fixtures/timelogs.d.ts.map +1 -0
- package/dist/__tests__/fixtures/timelogs.js +79 -0
- package/dist/__tests__/fixtures/timelogs.js.map +1 -0
- package/dist/__tests__/fixtures/timers.d.ts +5 -0
- package/dist/__tests__/fixtures/timers.d.ts.map +1 -0
- package/dist/__tests__/fixtures/timers.js +50 -0
- package/dist/__tests__/fixtures/timers.js.map +1 -0
- package/dist/__tests__/fixtures/trash.d.ts +5 -0
- package/dist/__tests__/fixtures/trash.d.ts.map +1 -0
- package/dist/__tests__/fixtures/trash.js +62 -0
- package/dist/__tests__/fixtures/trash.js.map +1 -0
- package/dist/__tests__/fixtures/users.d.ts +55 -0
- package/dist/__tests__/fixtures/users.d.ts.map +1 -0
- package/dist/__tests__/fixtures/users.js +47 -0
- package/dist/__tests__/fixtures/users.js.map +1 -0
- package/dist/__tests__/fixtures/widgets.d.ts +4 -0
- package/dist/__tests__/fixtures/widgets.d.ts.map +1 -0
- package/dist/__tests__/fixtures/widgets.js +51 -0
- package/dist/__tests__/fixtures/widgets.js.map +1 -0
- package/dist/__tests__/integration/setup.d.ts +14 -0
- package/dist/__tests__/integration/setup.d.ts.map +1 -0
- package/dist/__tests__/integration/setup.js +52 -0
- package/dist/__tests__/integration/setup.js.map +1 -0
- package/dist/__tests__/mocks/handlers.d.ts +34 -0
- package/dist/__tests__/mocks/handlers.d.ts.map +1 -0
- package/dist/__tests__/mocks/handlers.js +49 -0
- package/dist/__tests__/mocks/handlers.js.map +1 -0
- package/dist/__tests__/mocks/server.d.ts +2 -0
- package/dist/__tests__/mocks/server.d.ts.map +1 -0
- package/dist/__tests__/mocks/server.js +7 -0
- package/dist/__tests__/mocks/server.js.map +1 -0
- package/dist/__tests__/setup.d.ts +2 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/__tests__/setup.js +18 -0
- package/dist/__tests__/setup.js.map +1 -0
- package/dist/__tests__/unit/client/attachments.test.d.ts +2 -0
- package/dist/__tests__/unit/client/attachments.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/attachments.test.js +55 -0
- package/dist/__tests__/unit/client/attachments.test.js.map +1 -0
- package/dist/__tests__/unit/client/blueprints.test.d.ts +2 -0
- package/dist/__tests__/unit/client/blueprints.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/blueprints.test.js +127 -0
- package/dist/__tests__/unit/client/blueprints.test.js.map +1 -0
- package/dist/__tests__/unit/client/clients.test.d.ts +2 -0
- package/dist/__tests__/unit/client/clients.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/clients.test.js +87 -0
- package/dist/__tests__/unit/client/clients.test.js.map +1 -0
- package/dist/__tests__/unit/client/comments.test.d.ts +2 -0
- package/dist/__tests__/unit/client/comments.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/comments.test.js +95 -0
- package/dist/__tests__/unit/client/comments.test.js.map +1 -0
- package/dist/__tests__/unit/client/contacts.test.d.ts +2 -0
- package/dist/__tests__/unit/client/contacts.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/contacts.test.js +89 -0
- package/dist/__tests__/unit/client/contacts.test.js.map +1 -0
- package/dist/__tests__/unit/client/customviews.test.d.ts +2 -0
- package/dist/__tests__/unit/client/customviews.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/customviews.test.js +112 -0
- package/dist/__tests__/unit/client/customviews.test.js.map +1 -0
- package/dist/__tests__/unit/client/dashboards.test.d.ts +2 -0
- package/dist/__tests__/unit/client/dashboards.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/dashboards.test.js +87 -0
- package/dist/__tests__/unit/client/dashboards.test.js.map +1 -0
- package/dist/__tests__/unit/client/events.test.d.ts +2 -0
- package/dist/__tests__/unit/client/events.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/events.test.js +79 -0
- package/dist/__tests__/unit/client/events.test.js.map +1 -0
- package/dist/__tests__/unit/client/followers.test.d.ts +2 -0
- package/dist/__tests__/unit/client/followers.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/followers.test.js +109 -0
- package/dist/__tests__/unit/client/followers.test.js.map +1 -0
- package/dist/__tests__/unit/client/forums.test.d.ts +2 -0
- package/dist/__tests__/unit/client/forums.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/forums.test.js +75 -0
- package/dist/__tests__/unit/client/forums.test.js.map +1 -0
- package/dist/__tests__/unit/client/groups.test.d.ts +2 -0
- package/dist/__tests__/unit/client/groups.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/groups.test.js +74 -0
- package/dist/__tests__/unit/client/groups.test.js.map +1 -0
- package/dist/__tests__/unit/client/issues.test.d.ts +2 -0
- package/dist/__tests__/unit/client/issues.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/issues.test.js +75 -0
- package/dist/__tests__/unit/client/issues.test.js.map +1 -0
- package/dist/__tests__/unit/client/leaves.test.d.ts +2 -0
- package/dist/__tests__/unit/client/leaves.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/leaves.test.js +91 -0
- package/dist/__tests__/unit/client/leaves.test.js.map +1 -0
- package/dist/__tests__/unit/client/modules.test.d.ts +2 -0
- package/dist/__tests__/unit/client/modules.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/modules.test.js +92 -0
- package/dist/__tests__/unit/client/modules.test.js.map +1 -0
- package/dist/__tests__/unit/client/phases.test.d.ts +2 -0
- package/dist/__tests__/unit/client/phases.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/phases.test.js +79 -0
- package/dist/__tests__/unit/client/phases.test.js.map +1 -0
- package/dist/__tests__/unit/client/portals.test.d.ts +2 -0
- package/dist/__tests__/unit/client/portals.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/portals.test.js +54 -0
- package/dist/__tests__/unit/client/portals.test.js.map +1 -0
- package/dist/__tests__/unit/client/profiles.test.d.ts +2 -0
- package/dist/__tests__/unit/client/profiles.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/profiles.test.js +86 -0
- package/dist/__tests__/unit/client/profiles.test.js.map +1 -0
- package/dist/__tests__/unit/client/projects.test.d.ts +2 -0
- package/dist/__tests__/unit/client/projects.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/projects.test.js +171 -0
- package/dist/__tests__/unit/client/projects.test.js.map +1 -0
- package/dist/__tests__/unit/client/reports.test.d.ts +2 -0
- package/dist/__tests__/unit/client/reports.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/reports.test.js +86 -0
- package/dist/__tests__/unit/client/reports.test.js.map +1 -0
- package/dist/__tests__/unit/client/roles.test.d.ts +2 -0
- package/dist/__tests__/unit/client/roles.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/roles.test.js +86 -0
- package/dist/__tests__/unit/client/roles.test.js.map +1 -0
- package/dist/__tests__/unit/client/search.test.d.ts +2 -0
- package/dist/__tests__/unit/client/search.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/search.test.js +106 -0
- package/dist/__tests__/unit/client/search.test.js.map +1 -0
- package/dist/__tests__/unit/client/tags.test.d.ts +2 -0
- package/dist/__tests__/unit/client/tags.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/tags.test.js +99 -0
- package/dist/__tests__/unit/client/tags.test.js.map +1 -0
- package/dist/__tests__/unit/client/tasklists.test.d.ts +2 -0
- package/dist/__tests__/unit/client/tasklists.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/tasklists.test.js +75 -0
- package/dist/__tests__/unit/client/tasklists.test.js.map +1 -0
- package/dist/__tests__/unit/client/tasks.test.d.ts +2 -0
- package/dist/__tests__/unit/client/tasks.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/tasks.test.js +157 -0
- package/dist/__tests__/unit/client/tasks.test.js.map +1 -0
- package/dist/__tests__/unit/client/teams.test.d.ts +2 -0
- package/dist/__tests__/unit/client/teams.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/teams.test.js +115 -0
- package/dist/__tests__/unit/client/teams.test.js.map +1 -0
- package/dist/__tests__/unit/client/timelogs.test.d.ts +2 -0
- package/dist/__tests__/unit/client/timelogs.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/timelogs.test.js +112 -0
- package/dist/__tests__/unit/client/timelogs.test.js.map +1 -0
- package/dist/__tests__/unit/client/timers.test.d.ts +2 -0
- package/dist/__tests__/unit/client/timers.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/timers.test.js +122 -0
- package/dist/__tests__/unit/client/timers.test.js.map +1 -0
- package/dist/__tests__/unit/client/trash.test.d.ts +2 -0
- package/dist/__tests__/unit/client/trash.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/trash.test.js +103 -0
- package/dist/__tests__/unit/client/trash.test.js.map +1 -0
- package/dist/__tests__/unit/client/users.test.d.ts +2 -0
- package/dist/__tests__/unit/client/users.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/users.test.js +89 -0
- package/dist/__tests__/unit/client/users.test.js.map +1 -0
- package/dist/__tests__/unit/client/widgets.test.d.ts +2 -0
- package/dist/__tests__/unit/client/widgets.test.d.ts.map +1 -0
- package/dist/__tests__/unit/client/widgets.test.js +91 -0
- package/dist/__tests__/unit/client/widgets.test.js.map +1 -0
- package/dist/cli/init.d.ts +3 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +130 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/client.d.ts +2613 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1623 -1
- package/dist/client.js.map +1 -1
- package/dist/types/attachments.d.ts +1545 -0
- package/dist/types/attachments.d.ts.map +1 -0
- package/dist/types/attachments.js +78 -0
- package/dist/types/attachments.js.map +1 -0
- package/dist/types/blueprints.d.ts +5070 -0
- package/dist/types/blueprints.d.ts.map +1 -0
- package/dist/types/blueprints.js +111 -0
- package/dist/types/blueprints.js.map +1 -0
- package/dist/types/clients.d.ts +384 -0
- package/dist/types/clients.d.ts.map +1 -0
- package/dist/types/clients.js +77 -0
- package/dist/types/clients.js.map +1 -0
- package/dist/types/comments.d.ts +1111 -0
- package/dist/types/comments.d.ts.map +1 -0
- package/dist/types/comments.js +73 -0
- package/dist/types/comments.js.map +1 -0
- package/dist/types/contacts.d.ts +444 -0
- package/dist/types/contacts.d.ts.map +1 -0
- package/dist/types/contacts.js +86 -0
- package/dist/types/contacts.js.map +1 -0
- package/dist/types/customviews.d.ts +1593 -0
- package/dist/types/customviews.d.ts.map +1 -0
- package/dist/types/customviews.js +117 -0
- package/dist/types/customviews.js.map +1 -0
- package/dist/types/dashboards.d.ts +1675 -0
- package/dist/types/dashboards.d.ts.map +1 -0
- package/dist/types/dashboards.js +77 -0
- package/dist/types/dashboards.js.map +1 -0
- package/dist/types/documents.d.ts +2322 -0
- package/dist/types/documents.d.ts.map +1 -0
- package/dist/types/documents.js +121 -0
- package/dist/types/documents.js.map +1 -0
- package/dist/types/events.d.ts +1747 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +122 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/followers.d.ts +198 -0
- package/dist/types/followers.d.ts.map +1 -0
- package/dist/types/followers.js +44 -0
- package/dist/types/followers.js.map +1 -0
- package/dist/types/forums.d.ts +1443 -0
- package/dist/types/forums.d.ts.map +1 -0
- package/dist/types/forums.js +89 -0
- package/dist/types/forums.js.map +1 -0
- package/dist/types/groups.d.ts +237 -0
- package/dist/types/groups.d.ts.map +1 -0
- package/dist/types/groups.js +52 -0
- package/dist/types/groups.js.map +1 -0
- package/dist/types/index.d.ts +31 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +58 -4
- package/dist/types/index.js.map +1 -1
- package/dist/types/issues.d.ts +2600 -0
- package/dist/types/issues.d.ts.map +1 -0
- package/dist/types/issues.js +147 -0
- package/dist/types/issues.js.map +1 -0
- package/dist/types/leaves.d.ts +435 -0
- package/dist/types/leaves.d.ts.map +1 -0
- package/dist/types/leaves.js +92 -0
- package/dist/types/leaves.js.map +1 -0
- package/dist/types/modules.d.ts +469 -0
- package/dist/types/modules.d.ts.map +1 -0
- package/dist/types/modules.js +91 -0
- package/dist/types/modules.js.map +1 -0
- package/dist/types/phases.d.ts +1564 -0
- package/dist/types/phases.d.ts.map +1 -0
- package/dist/types/phases.js +98 -0
- package/dist/types/phases.js.map +1 -0
- package/dist/types/portals.d.ts +1050 -0
- package/dist/types/portals.d.ts.map +1 -0
- package/dist/types/portals.js +58 -0
- package/dist/types/portals.js.map +1 -0
- package/dist/types/profiles.d.ts +243 -0
- package/dist/types/profiles.d.ts.map +1 -0
- package/dist/types/profiles.js +59 -0
- package/dist/types/profiles.js.map +1 -0
- package/dist/types/projects.d.ts +128 -0
- package/dist/types/projects.d.ts.map +1 -1
- package/dist/types/projects.js +44 -0
- package/dist/types/projects.js.map +1 -1
- package/dist/types/reports.d.ts +2010 -0
- package/dist/types/reports.d.ts.map +1 -0
- package/dist/types/reports.js +110 -0
- package/dist/types/reports.js.map +1 -0
- package/dist/types/roles.d.ts +243 -0
- package/dist/types/roles.d.ts.map +1 -0
- package/dist/types/roles.js +59 -0
- package/dist/types/roles.js.map +1 -0
- package/dist/types/search.d.ts +1091 -0
- package/dist/types/search.d.ts.map +1 -0
- package/dist/types/search.js +83 -0
- package/dist/types/search.js.map +1 -0
- package/dist/types/tags.d.ts +198 -0
- package/dist/types/tags.d.ts.map +1 -0
- package/dist/types/tags.js +49 -0
- package/dist/types/tags.js.map +1 -0
- package/dist/types/tasklists.d.ts +1317 -0
- package/dist/types/tasklists.d.ts.map +1 -0
- package/dist/types/tasklists.js +78 -0
- package/dist/types/tasklists.js.map +1 -0
- package/dist/types/tasks.d.ts +182 -0
- package/dist/types/tasks.d.ts.map +1 -1
- package/dist/types/tasks.js +52 -0
- package/dist/types/tasks.js.map +1 -1
- package/dist/types/teams.d.ts +504 -0
- package/dist/types/teams.d.ts.map +1 -0
- package/dist/types/teams.js +75 -0
- package/dist/types/teams.js.map +1 -0
- package/dist/types/timelogs.d.ts +245 -0
- package/dist/types/timelogs.d.ts.map +1 -1
- package/dist/types/timelogs.js +53 -0
- package/dist/types/timelogs.js.map +1 -1
- package/dist/types/timers.d.ts +1334 -0
- package/dist/types/timers.d.ts.map +1 -0
- package/dist/types/timers.js +108 -0
- package/dist/types/timers.js.map +1 -0
- package/dist/types/trash.d.ts +1447 -0
- package/dist/types/trash.d.ts.map +1 -0
- package/dist/types/trash.js +77 -0
- package/dist/types/trash.js.map +1 -0
- package/dist/types/users.d.ts +100 -0
- package/dist/types/users.d.ts.map +1 -1
- package/dist/types/users.js +56 -0
- package/dist/types/users.js.map +1 -1
- package/dist/types/widgets.d.ts +1083 -0
- package/dist/types/widgets.d.ts.map +1 -0
- package/dist/types/widgets.js +87 -0
- package/dist/types/widgets.js.map +1 -0
- package/package.json +15 -3
- package/templates/CLAUDE.md +66 -0
- package/templates/commands/zoho-auth.md +195 -0
- package/templates/commands/zoho-examples.md +375 -0
- package/templates/commands/zoho-projects.md +183 -0
- 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;AAMlE;;GAEG;AACH,eAAO,MAAM,uBAAuB;IAClC,6BAA6B;;IAE7B,yBAAyB;;IAEzB,kBAAkB;;IAElB,sBAAsB;;;;;;;;;;;;;;;;;IAOtB,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;EAE3B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoC,CAAC;AAEzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,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,CAAC,CAAC,MAAM,CAAC;IACnC,iBAAiB;IACjB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,IAAI,EAAE,CAAC,CAAC,MAAM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AAO,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
|
+
"version": "0.2.1",
|
|
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
|
-
"
|
|
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
|