@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,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for phases (milestones) API
|
|
3
|
+
*/
|
|
4
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
5
|
+
import { http, HttpResponse } from "msw";
|
|
6
|
+
import { server } from "../../mocks/server.js";
|
|
7
|
+
import { createZohoProjectsClient } from "../../../client.js";
|
|
8
|
+
import { createPhaseFixture, createPhaseListFixture, createPhaseListResponse, } from "../../fixtures/phases.js";
|
|
9
|
+
const TEST_PORTAL_ID = "12345";
|
|
10
|
+
const TEST_PROJECT_ID = "67890";
|
|
11
|
+
const BASE_URL = `https://projectsapi.zoho.com/restapi/portal/${TEST_PORTAL_ID}/projects/${TEST_PROJECT_ID}`;
|
|
12
|
+
describe("phases", () => {
|
|
13
|
+
let client;
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
client = createZohoProjectsClient({
|
|
16
|
+
clientId: "test-client-id",
|
|
17
|
+
clientSecret: "test-client-secret",
|
|
18
|
+
refreshToken: "test-refresh-token",
|
|
19
|
+
portalId: TEST_PORTAL_ID,
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
describe("list", () => {
|
|
23
|
+
it("should list phases for a project", async () => {
|
|
24
|
+
const mockPhases = createPhaseListFixture(3);
|
|
25
|
+
server.use(http.get(`${BASE_URL}/milestones/`, () => {
|
|
26
|
+
return HttpResponse.json(createPhaseListResponse(mockPhases));
|
|
27
|
+
}));
|
|
28
|
+
const result = await client.phases.list(TEST_PROJECT_ID);
|
|
29
|
+
expect(result.data).toHaveLength(3);
|
|
30
|
+
expect(result.data[0]).toMatchObject({
|
|
31
|
+
id: expect.any(Number),
|
|
32
|
+
name: expect.any(String),
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
describe("get", () => {
|
|
37
|
+
it("should get a single phase by ID", async () => {
|
|
38
|
+
const mockPhase = createPhaseFixture({ id: 123, id_string: "123" });
|
|
39
|
+
server.use(http.get(`${BASE_URL}/milestones/123/`, () => {
|
|
40
|
+
return HttpResponse.json({ milestones: [mockPhase] });
|
|
41
|
+
}));
|
|
42
|
+
const result = await client.phases.get(TEST_PROJECT_ID, "123");
|
|
43
|
+
expect(result.id_string).toBe("123");
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
describe("create", () => {
|
|
47
|
+
it("should create a phase", async () => {
|
|
48
|
+
const newPhase = createPhaseFixture({ name: "New Milestone" });
|
|
49
|
+
server.use(http.post(`${BASE_URL}/milestones/`, async () => {
|
|
50
|
+
return HttpResponse.json({ milestones: [newPhase] });
|
|
51
|
+
}));
|
|
52
|
+
const result = await client.phases.create(TEST_PROJECT_ID, {
|
|
53
|
+
name: "New Milestone",
|
|
54
|
+
start_date: "2025-01-01",
|
|
55
|
+
end_date: "2025-01-31",
|
|
56
|
+
});
|
|
57
|
+
expect(result.name).toBe("New Milestone");
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
describe("update", () => {
|
|
61
|
+
it("should update a phase", async () => {
|
|
62
|
+
const updatedPhase = createPhaseFixture({ id: 123, id_string: "123", name: "Updated Milestone" });
|
|
63
|
+
server.use(http.put(`${BASE_URL}/milestones/123/`, () => {
|
|
64
|
+
return HttpResponse.json({ milestones: [updatedPhase] });
|
|
65
|
+
}));
|
|
66
|
+
const result = await client.phases.update(TEST_PROJECT_ID, "123", { name: "Updated Milestone" });
|
|
67
|
+
expect(result.name).toBe("Updated Milestone");
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
describe("delete", () => {
|
|
71
|
+
it("should delete a phase", async () => {
|
|
72
|
+
server.use(http.delete(`${BASE_URL}/milestones/123/`, () => {
|
|
73
|
+
return new HttpResponse(null, { status: 204 });
|
|
74
|
+
}));
|
|
75
|
+
await expect(client.phases.delete(TEST_PROJECT_ID, "123")).resolves.toBeUndefined();
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=phases.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phases.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/phases.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAElC,MAAM,cAAc,GAAG,OAAO,CAAC;AAC/B,MAAM,eAAe,GAAG,OAAO,CAAC;AAChC,MAAM,QAAQ,GAAG,+CAA+C,cAAc,aAAa,eAAe,EAAE,CAA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],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for portals API
|
|
3
|
+
*/
|
|
4
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
5
|
+
import { http, HttpResponse } from "msw";
|
|
6
|
+
import { server } from "../../mocks/server.js";
|
|
7
|
+
import { createZohoProjectsClient } from "../../../client.js";
|
|
8
|
+
import { mockPortal, mockPortals } from "../../fixtures/portals.js";
|
|
9
|
+
const TEST_PORTAL_ID = "123456789";
|
|
10
|
+
const BASE_URL = "https://projectsapi.zoho.com/restapi";
|
|
11
|
+
describe("portals", () => {
|
|
12
|
+
let client;
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
client = createZohoProjectsClient({
|
|
15
|
+
clientId: "test-client-id",
|
|
16
|
+
clientSecret: "test-client-secret",
|
|
17
|
+
refreshToken: "test-refresh-token",
|
|
18
|
+
portalId: TEST_PORTAL_ID,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe("list", () => {
|
|
22
|
+
it("should list all portals", async () => {
|
|
23
|
+
server.use(http.get(`${BASE_URL}/portals/`, () => {
|
|
24
|
+
return HttpResponse.json({ portals: mockPortals });
|
|
25
|
+
}));
|
|
26
|
+
const result = await client.portals.list();
|
|
27
|
+
expect(result).toHaveLength(2);
|
|
28
|
+
expect(result[0]).toMatchObject({
|
|
29
|
+
id: expect.any(String),
|
|
30
|
+
name: expect.any(String),
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
describe("get", () => {
|
|
35
|
+
it("should get a single portal by ID", async () => {
|
|
36
|
+
server.use(http.get(`${BASE_URL}/portals/${TEST_PORTAL_ID}/`, () => {
|
|
37
|
+
return HttpResponse.json({ portals: [mockPortal] });
|
|
38
|
+
}));
|
|
39
|
+
const result = await client.portals.get(TEST_PORTAL_ID);
|
|
40
|
+
expect(result.id).toBe(TEST_PORTAL_ID);
|
|
41
|
+
expect(result.name).toBe("Test Portal");
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
describe("getCurrent", () => {
|
|
45
|
+
it("should get the current portal configured in the client", async () => {
|
|
46
|
+
server.use(http.get(`${BASE_URL}/portals/${TEST_PORTAL_ID}/`, () => {
|
|
47
|
+
return HttpResponse.json({ portals: [mockPortal] });
|
|
48
|
+
}));
|
|
49
|
+
const result = await client.portals.getCurrent();
|
|
50
|
+
expect(result.id).toBe(TEST_PORTAL_ID);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
//# sourceMappingURL=portals.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portals.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/portals.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,MAAM,QAAQ,GAAG,sCAAsC,CAAC;AAExD,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,MAAmD,CAAC;IAExD,UAAU,CAAC,GAAG,EAAE;QACd,MAAM,GAAG,wBAAwB,CAAC;YAChC,QAAQ,EAAE,gBAAgB;YAC1B,YAAY,EAAE,oBAAoB;YAClC,YAAY,EAAE,oBAAoB;YAClC,QAAQ,EAAE,cAAc;SACzB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,EAAE,CAAC,yBAAyB,EAA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EAAE,GAAG,EAAE;QAC1B,EAAE,CAAC,wDAAwD,EAAE,KAAK,IAAI,EAAE;YACtE,MAAM,CAAC,GAAG,CACR,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,YAAY,cAAc,GAAG,EAAE,GAAG,EAAE;gBACtD,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACtD,CAAC,CAAC,CACH,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YAEjD,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/profiles.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for profiles API
|
|
3
|
+
*/
|
|
4
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
5
|
+
import { http, HttpResponse } from "msw";
|
|
6
|
+
import { server } from "../../mocks/server.js";
|
|
7
|
+
import { createZohoProjectsClient } from "../../../client.js";
|
|
8
|
+
import { mockProfile, mockProfiles } from "../../fixtures/profiles.js";
|
|
9
|
+
const TEST_PORTAL_ID = "12345";
|
|
10
|
+
const BASE_URL = `https://projectsapi.zoho.com/restapi/portal/${TEST_PORTAL_ID}`;
|
|
11
|
+
describe("profiles", () => {
|
|
12
|
+
let client;
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
client = createZohoProjectsClient({
|
|
15
|
+
clientId: "test-client-id",
|
|
16
|
+
clientSecret: "test-client-secret",
|
|
17
|
+
refreshToken: "test-refresh-token",
|
|
18
|
+
portalId: TEST_PORTAL_ID,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe("list", () => {
|
|
22
|
+
it("should list all profiles", async () => {
|
|
23
|
+
server.use(http.get(`${BASE_URL}/profiles/`, () => {
|
|
24
|
+
return HttpResponse.json({
|
|
25
|
+
profiles: mockProfiles,
|
|
26
|
+
page_info: { page: 1, per_page: 100, has_more_page: false },
|
|
27
|
+
});
|
|
28
|
+
}));
|
|
29
|
+
const result = await client.profiles.list();
|
|
30
|
+
expect(result.data).toHaveLength(3);
|
|
31
|
+
expect(result.data[0]).toMatchObject({
|
|
32
|
+
id: expect.any(String),
|
|
33
|
+
name: expect.any(String),
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe("get", () => {
|
|
38
|
+
it("should get a single profile by ID", async () => {
|
|
39
|
+
server.use(http.get(`${BASE_URL}/profiles/profile_001/`, () => {
|
|
40
|
+
return HttpResponse.json({ profiles: [mockProfile] });
|
|
41
|
+
}));
|
|
42
|
+
const result = await client.profiles.get("profile_001");
|
|
43
|
+
expect(result.id).toBe("profile_001");
|
|
44
|
+
expect(result.name).toBe("Standard User");
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe("create", () => {
|
|
48
|
+
it("should create a profile", async () => {
|
|
49
|
+
let capturedBody;
|
|
50
|
+
server.use(http.post(`${BASE_URL}/profiles/`, async ({ request }) => {
|
|
51
|
+
capturedBody = await request.json();
|
|
52
|
+
return HttpResponse.json({ profiles: [mockProfile] });
|
|
53
|
+
}));
|
|
54
|
+
const result = await client.profiles.create({
|
|
55
|
+
name: "Standard User",
|
|
56
|
+
description: "Default profile for regular users",
|
|
57
|
+
});
|
|
58
|
+
expect(capturedBody).toMatchObject({
|
|
59
|
+
name: "Standard User",
|
|
60
|
+
description: "Default profile for regular users",
|
|
61
|
+
});
|
|
62
|
+
expect(result.name).toBe("Standard User");
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
describe("update", () => {
|
|
66
|
+
it("should update a profile", async () => {
|
|
67
|
+
const updatedProfile = { ...mockProfile, name: "Power User" };
|
|
68
|
+
server.use(http.put(`${BASE_URL}/profiles/profile_001/`, () => {
|
|
69
|
+
return HttpResponse.json({ profiles: [updatedProfile] });
|
|
70
|
+
}));
|
|
71
|
+
const result = await client.profiles.update("profile_001", {
|
|
72
|
+
name: "Power User",
|
|
73
|
+
});
|
|
74
|
+
expect(result.name).toBe("Power User");
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
describe("delete", () => {
|
|
78
|
+
it("should delete a profile", async () => {
|
|
79
|
+
server.use(http.delete(`${BASE_URL}/profiles/profile_001/`, () => {
|
|
80
|
+
return new HttpResponse(null, { status: 204 });
|
|
81
|
+
}));
|
|
82
|
+
await expect(client.profiles.delete("profile_001")).resolves.toBeUndefined();
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=profiles.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/profiles.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,cAAc,GAAG,OAAO,CAAC;AAC/B,MAAM,QAAQ,GAAG,+CAA+C,cAAc,EAAE,CAAC;AAEjF,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,IAAI,MAAmD,CAAC;IAExD,UAAU,CAAC,GAAG,EAAE;QACd,MAAM,G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ACvC,MAAM,cAAc,GAAG,EAAE,GAAG,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;YAE9D,MAAM,CAAC,GAAG,CACR,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,wBAAwB,EAAE,GAAG,EAAE;gBACjD,OAAO,YAAY,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAC3D,CAAC,CAAC,CACH,CAAC;YAEF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE;gBACzD,IAAI,EAAE,YAAY;aACnB,CAAC,CAAC;YAEH,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;YACvC,MAAM,CAAC,GAAG,CACR,IAAI,CAAC,MAAM,CAAC,GAAG,QAAQ,wBAAwB,EAAE,GAAG,EAAE;gBACpD,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACjD,CAAC,CAAC,CACH,CAAC;YAEF,MAAM,MAAM,CACV,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,aAAa,CAAC,CACtC,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC;QAC7B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/projects.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for projects API
|
|
3
|
+
*/
|
|
4
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
5
|
+
import { http, HttpResponse } from "msw";
|
|
6
|
+
import { server } from "../../mocks/server.js";
|
|
7
|
+
import { createZohoProjectsClient } from "../../../client.js";
|
|
8
|
+
import { createProjectFixture, createProjectListFixture, createProjectListResponse, } from "../../fixtures/projects.js";
|
|
9
|
+
const TEST_PORTAL_ID = "12345";
|
|
10
|
+
const BASE_URL = `https://projectsapi.zoho.com/restapi/portal/${TEST_PORTAL_ID}`;
|
|
11
|
+
describe("projects", () => {
|
|
12
|
+
let client;
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
client = createZohoProjectsClient({
|
|
15
|
+
clientId: "test-client-id",
|
|
16
|
+
clientSecret: "test-client-secret",
|
|
17
|
+
refreshToken: "test-refresh-token",
|
|
18
|
+
portalId: TEST_PORTAL_ID,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe("list", () => {
|
|
22
|
+
it("should list projects with default pagination", async () => {
|
|
23
|
+
const mockProjects = createProjectListFixture(3);
|
|
24
|
+
server.use(http.get(`${BASE_URL}/projects/`, () => {
|
|
25
|
+
return HttpResponse.json(createProjectListResponse(mockProjects));
|
|
26
|
+
}));
|
|
27
|
+
const result = await client.projects.list();
|
|
28
|
+
expect(result.data).toHaveLength(3);
|
|
29
|
+
expect(result.data[0]).toMatchObject({
|
|
30
|
+
id: expect.any(Number),
|
|
31
|
+
id_string: expect.any(String),
|
|
32
|
+
name: expect.any(String),
|
|
33
|
+
});
|
|
34
|
+
expect(result.pageInfo).toBeDefined();
|
|
35
|
+
});
|
|
36
|
+
it("should pass pagination parameters", async () => {
|
|
37
|
+
let capturedParams;
|
|
38
|
+
server.use(http.get(`${BASE_URL}/projects/`, ({ request }) => {
|
|
39
|
+
capturedParams = new URL(request.url).searchParams;
|
|
40
|
+
return HttpResponse.json(createProjectListResponse([]));
|
|
41
|
+
}));
|
|
42
|
+
await client.projects.list({ index: 10, range: 50 });
|
|
43
|
+
expect(capturedParams?.get("index")).toBe("10");
|
|
44
|
+
expect(capturedParams?.get("range")).toBe("50");
|
|
45
|
+
});
|
|
46
|
+
it("should handle empty response", async () => {
|
|
47
|
+
server.use(http.get(`${BASE_URL}/projects/`, () => {
|
|
48
|
+
return HttpResponse.json(createProjectListResponse([]));
|
|
49
|
+
}));
|
|
50
|
+
const result = await client.projects.list();
|
|
51
|
+
expect(result.data).toHaveLength(0);
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
describe("get", () => {
|
|
55
|
+
it("should get a single project by ID", async () => {
|
|
56
|
+
const mockProject = createProjectFixture({ id: 123, id_string: "123" });
|
|
57
|
+
server.use(http.get(`${BASE_URL}/projects/123/`, () => {
|
|
58
|
+
return HttpResponse.json({ projects: [mockProject] });
|
|
59
|
+
}));
|
|
60
|
+
const result = await client.projects.get("123");
|
|
61
|
+
expect(result.id_string).toBe("123");
|
|
62
|
+
expect(result.name).toBeDefined();
|
|
63
|
+
});
|
|
64
|
+
it("should throw error when project not found", async () => {
|
|
65
|
+
server.use(http.get(`${BASE_URL}/projects/999/`, () => {
|
|
66
|
+
return HttpResponse.json({ projects: [] });
|
|
67
|
+
}));
|
|
68
|
+
await expect(client.projects.get("999")).rejects.toThrow("Project not found: 999");
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
describe("listAll", () => {
|
|
72
|
+
it("should auto-paginate through all projects", async () => {
|
|
73
|
+
const page1 = createProjectListFixture(100);
|
|
74
|
+
const page2 = createProjectListFixture(50);
|
|
75
|
+
let requestCount = 0;
|
|
76
|
+
server.use(http.get(`${BASE_URL}/projects/`, ({ request }) => {
|
|
77
|
+
requestCount++;
|
|
78
|
+
const url = new URL(request.url);
|
|
79
|
+
const index = parseInt(url.searchParams.get("index") || "0");
|
|
80
|
+
if (index === 0) {
|
|
81
|
+
return HttpResponse.json(createProjectListResponse(page1, true));
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return HttpResponse.json(createProjectListResponse(page2, false));
|
|
85
|
+
}
|
|
86
|
+
}));
|
|
87
|
+
const result = await client.projects.listAll();
|
|
88
|
+
expect(requestCount).toBe(2);
|
|
89
|
+
expect(result).toHaveLength(150);
|
|
90
|
+
});
|
|
91
|
+
it("should respect maxItems option", async () => {
|
|
92
|
+
const projects = createProjectListFixture(100);
|
|
93
|
+
server.use(http.get(`${BASE_URL}/projects/`, () => {
|
|
94
|
+
return HttpResponse.json(createProjectListResponse(projects, true));
|
|
95
|
+
}));
|
|
96
|
+
const result = await client.projects.listAll({ maxItems: 25 });
|
|
97
|
+
expect(result).toHaveLength(25);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
describe("iterate", () => {
|
|
101
|
+
it("should yield projects one at a time", async () => {
|
|
102
|
+
const mockProjects = createProjectListFixture(3);
|
|
103
|
+
server.use(http.get(`${BASE_URL}/projects/`, () => {
|
|
104
|
+
return HttpResponse.json(createProjectListResponse(mockProjects));
|
|
105
|
+
}));
|
|
106
|
+
const results = [];
|
|
107
|
+
for await (const project of client.projects.iterate()) {
|
|
108
|
+
results.push(project);
|
|
109
|
+
}
|
|
110
|
+
expect(results).toHaveLength(3);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
describe("create", () => {
|
|
114
|
+
it("should create a project with required fields", async () => {
|
|
115
|
+
const newProject = createProjectFixture({ name: "New Project" });
|
|
116
|
+
let capturedBody;
|
|
117
|
+
server.use(http.post(`${BASE_URL}/projects/`, async ({ request }) => {
|
|
118
|
+
capturedBody = await request.json();
|
|
119
|
+
return HttpResponse.json({ projects: [newProject] });
|
|
120
|
+
}));
|
|
121
|
+
const result = await client.projects.create({ name: "New Project" });
|
|
122
|
+
expect(capturedBody).toMatchObject({ name: "New Project" });
|
|
123
|
+
expect(result.name).toBe("New Project");
|
|
124
|
+
});
|
|
125
|
+
it("should create a project with all optional fields", async () => {
|
|
126
|
+
const newProject = createProjectFixture({ name: "Full Project" });
|
|
127
|
+
let capturedBody;
|
|
128
|
+
server.use(http.post(`${BASE_URL}/projects/`, async ({ request }) => {
|
|
129
|
+
capturedBody = await request.json();
|
|
130
|
+
return HttpResponse.json({ projects: [newProject] });
|
|
131
|
+
}));
|
|
132
|
+
const result = await client.projects.create({
|
|
133
|
+
name: "Full Project",
|
|
134
|
+
description: "A test project",
|
|
135
|
+
status: "active",
|
|
136
|
+
is_public: "yes",
|
|
137
|
+
budget_type: "based_on_project_hours",
|
|
138
|
+
budget_value: 100,
|
|
139
|
+
});
|
|
140
|
+
expect(capturedBody).toMatchObject({
|
|
141
|
+
name: "Full Project",
|
|
142
|
+
description: "A test project",
|
|
143
|
+
status: "active",
|
|
144
|
+
});
|
|
145
|
+
expect(result.name).toBe("Full Project");
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
describe("update", () => {
|
|
149
|
+
it("should update a project", async () => {
|
|
150
|
+
const updatedProject = createProjectFixture({
|
|
151
|
+
id: 123,
|
|
152
|
+
id_string: "123",
|
|
153
|
+
name: "Updated Name",
|
|
154
|
+
});
|
|
155
|
+
server.use(http.put(`${BASE_URL}/projects/123/`, () => {
|
|
156
|
+
return HttpResponse.json({ projects: [updatedProject] });
|
|
157
|
+
}));
|
|
158
|
+
const result = await client.projects.update("123", { name: "Updated Name" });
|
|
159
|
+
expect(result.name).toBe("Updated Name");
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
describe("delete", () => {
|
|
163
|
+
it("should delete a project", async () => {
|
|
164
|
+
server.use(http.delete(`${BASE_URL}/projects/123/`, () => {
|
|
165
|
+
return new HttpResponse(null, { status: 204 });
|
|
166
|
+
}));
|
|
167
|
+
await expect(client.projects.delete("123")).resolves.toBeUndefined();
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
//# sourceMappingURL=projects.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/projects.test.ts"],"names":[],"mappings":"AAAA;;GA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C,yBAAyB,EAAE,KAAK,IAAI,EAAE;YACvC,MAAM,CAAC,GAAG,CACR,IAAI,CAAC,MAAM,CAAC,GAAG,QAAQ,gBAAgB,EAAE,GAAG,EAAE;gBAC5C,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACjD,CAAC,CAAC,CACH,CAAC;YAEF,MAAM,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/reports.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for reports API
|
|
3
|
+
*/
|
|
4
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
5
|
+
import { http, HttpResponse } from "msw";
|
|
6
|
+
import { server } from "../../mocks/server.js";
|
|
7
|
+
import { createZohoProjectsClient } from "../../../client.js";
|
|
8
|
+
import { mockReport, mockReports, mockReportData } from "../../fixtures/reports.js";
|
|
9
|
+
const TEST_PORTAL_ID = "12345";
|
|
10
|
+
const BASE_URL = `https://projectsapi.zoho.com/restapi/portal/${TEST_PORTAL_ID}`;
|
|
11
|
+
describe("reports", () => {
|
|
12
|
+
let client;
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
client = createZohoProjectsClient({
|
|
15
|
+
clientId: "test-client-id",
|
|
16
|
+
clientSecret: "test-client-secret",
|
|
17
|
+
refreshToken: "test-refresh-token",
|
|
18
|
+
portalId: TEST_PORTAL_ID,
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
describe("list", () => {
|
|
22
|
+
it("should list all reports", async () => {
|
|
23
|
+
server.use(http.get(`${BASE_URL}/reports/`, () => {
|
|
24
|
+
return HttpResponse.json({
|
|
25
|
+
reports: mockReports,
|
|
26
|
+
page_info: { page: 1, per_page: 100, has_more_page: false },
|
|
27
|
+
});
|
|
28
|
+
}));
|
|
29
|
+
const result = await client.reports.list();
|
|
30
|
+
expect(result.data).toHaveLength(2);
|
|
31
|
+
expect(result.data[0]).toMatchObject({
|
|
32
|
+
id: expect.any(Number),
|
|
33
|
+
name: expect.any(String),
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe("get", () => {
|
|
38
|
+
it("should get a single report by ID", async () => {
|
|
39
|
+
server.use(http.get(`${BASE_URL}/reports/3001/`, () => {
|
|
40
|
+
return HttpResponse.json({ reports: [mockReport] });
|
|
41
|
+
}));
|
|
42
|
+
const result = await client.reports.get("3001");
|
|
43
|
+
expect(result.id).toBe(3001);
|
|
44
|
+
expect(result.name).toBe("Task Status Report");
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe("execute", () => {
|
|
48
|
+
it("should execute a report and return data", async () => {
|
|
49
|
+
server.use(http.get(`${BASE_URL}/reports/3001/data/`, () => {
|
|
50
|
+
return HttpResponse.json(mockReportData);
|
|
51
|
+
}));
|
|
52
|
+
const result = await client.reports.execute("3001");
|
|
53
|
+
expect(result.data).toHaveLength(3);
|
|
54
|
+
expect(result.total_count).toBe(3);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
describe("listForProject", () => {
|
|
58
|
+
it("should list reports for a specific project", async () => {
|
|
59
|
+
server.use(http.get(`${BASE_URL}/projects/proj_001/reports/`, () => {
|
|
60
|
+
return HttpResponse.json({
|
|
61
|
+
reports: mockReports,
|
|
62
|
+
page_info: { page: 1, per_page: 100, has_more_page: false },
|
|
63
|
+
});
|
|
64
|
+
}));
|
|
65
|
+
const result = await client.reports.listForProject("proj_001");
|
|
66
|
+
expect(result.data).toHaveLength(2);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
describe("list with pagination", () => {
|
|
70
|
+
it("should list reports with pagination params", async () => {
|
|
71
|
+
let capturedParams;
|
|
72
|
+
server.use(http.get(`${BASE_URL}/reports/`, ({ request }) => {
|
|
73
|
+
capturedParams = new URL(request.url).searchParams;
|
|
74
|
+
return HttpResponse.json({
|
|
75
|
+
reports: mockReports,
|
|
76
|
+
page_info: { page: 1, per_page: 10, has_more_page: true },
|
|
77
|
+
});
|
|
78
|
+
}));
|
|
79
|
+
const result = await client.reports.list({ index: 0, range: 10 });
|
|
80
|
+
expect(capturedParams?.get("index")).toBe("0");
|
|
81
|
+
expect(capturedParams?.get("range")).toBe("10");
|
|
82
|
+
expect(result.data).toBeDefined();
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
//# sourceMappingURL=reports.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/reports.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEpF,MAAM,cAAc,GAAG,OAAO,CAAC;AAC/B,MAAM,QAAQ,GAAG,+CAA+C,cAAc,EAAE,CAAC;AAEjF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,MAAmD,CAAC;IAExD,UAAU,CAAC,GAAG,EAAE;QACd,MAAM,GAAG,wBAAwB,CAAC;YAChC,QAAQ,EAAE,gBAAgB;Y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