@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,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for comments API (polymorphic)
|
|
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 { createCommentFixture, createCommentListFixture, createCommentListResponse, } from "../../fixtures/comments.js";
|
|
9
|
+
const TEST_PORTAL_ID = "12345";
|
|
10
|
+
const TEST_PROJECT_ID = "67890";
|
|
11
|
+
const TEST_TASK_ID = "11111";
|
|
12
|
+
const TEST_ISSUE_ID = "22222";
|
|
13
|
+
const BASE_URL = `https://projectsapi.zoho.com/restapi/portal/${TEST_PORTAL_ID}/projects/${TEST_PROJECT_ID}`;
|
|
14
|
+
describe("comments", () => {
|
|
15
|
+
let client;
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
client = createZohoProjectsClient({
|
|
18
|
+
clientId: "test-client-id",
|
|
19
|
+
clientSecret: "test-client-secret",
|
|
20
|
+
refreshToken: "test-refresh-token",
|
|
21
|
+
portalId: TEST_PORTAL_ID,
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
describe("forTask", () => {
|
|
25
|
+
describe("list", () => {
|
|
26
|
+
it("should list comments for a task", async () => {
|
|
27
|
+
const mockComments = createCommentListFixture(3);
|
|
28
|
+
server.use(http.get(`${BASE_URL}/tasks/${TEST_TASK_ID}/comments/`, () => {
|
|
29
|
+
return HttpResponse.json(createCommentListResponse(mockComments));
|
|
30
|
+
}));
|
|
31
|
+
const taskComments = client.comments.forTask(TEST_PROJECT_ID, TEST_TASK_ID);
|
|
32
|
+
const result = await taskComments.list();
|
|
33
|
+
expect(result.data).toHaveLength(3);
|
|
34
|
+
expect(result.data[0]).toMatchObject({
|
|
35
|
+
id: expect.any(Number),
|
|
36
|
+
content: expect.any(String),
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
describe("create", () => {
|
|
41
|
+
it("should create a comment on a task", async () => {
|
|
42
|
+
const newComment = createCommentFixture({ content: "New comment on task" });
|
|
43
|
+
server.use(http.post(`${BASE_URL}/tasks/${TEST_TASK_ID}/comments/`, async () => {
|
|
44
|
+
return HttpResponse.json({ comments: [newComment] });
|
|
45
|
+
}));
|
|
46
|
+
const taskComments = client.comments.forTask(TEST_PROJECT_ID, TEST_TASK_ID);
|
|
47
|
+
const result = await taskComments.create({ content: "New comment on task" });
|
|
48
|
+
expect(result.content).toBe("New comment on task");
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe("delete", () => {
|
|
52
|
+
it("should delete a comment from a task", async () => {
|
|
53
|
+
server.use(http.delete(`${BASE_URL}/tasks/${TEST_TASK_ID}/comments/333/`, () => {
|
|
54
|
+
return new HttpResponse(null, { status: 204 });
|
|
55
|
+
}));
|
|
56
|
+
const taskComments = client.comments.forTask(TEST_PROJECT_ID, TEST_TASK_ID);
|
|
57
|
+
await expect(taskComments.delete("333")).resolves.toBeUndefined();
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
describe("forIssue", () => {
|
|
62
|
+
describe("list", () => {
|
|
63
|
+
it("should list comments for an issue", async () => {
|
|
64
|
+
const mockComments = createCommentListFixture(3);
|
|
65
|
+
server.use(http.get(`${BASE_URL}/bugs/${TEST_ISSUE_ID}/comments/`, () => {
|
|
66
|
+
return HttpResponse.json(createCommentListResponse(mockComments));
|
|
67
|
+
}));
|
|
68
|
+
const issueComments = client.comments.forIssue(TEST_PROJECT_ID, TEST_ISSUE_ID);
|
|
69
|
+
const result = await issueComments.list();
|
|
70
|
+
expect(result.data).toHaveLength(3);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
describe("create", () => {
|
|
74
|
+
it("should create a comment on an issue", async () => {
|
|
75
|
+
const newComment = createCommentFixture({ content: "New comment on bug" });
|
|
76
|
+
server.use(http.post(`${BASE_URL}/bugs/${TEST_ISSUE_ID}/comments/`, async () => {
|
|
77
|
+
return HttpResponse.json({ comments: [newComment] });
|
|
78
|
+
}));
|
|
79
|
+
const issueComments = client.comments.forIssue(TEST_PROJECT_ID, TEST_ISSUE_ID);
|
|
80
|
+
const result = await issueComments.create({ content: "New comment on bug" });
|
|
81
|
+
expect(result.content).toBe("New comment on bug");
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
describe("delete", () => {
|
|
85
|
+
it("should delete a comment from an issue", async () => {
|
|
86
|
+
server.use(http.delete(`${BASE_URL}/bugs/${TEST_ISSUE_ID}/comments/333/`, () => {
|
|
87
|
+
return new HttpResponse(null, { status: 204 });
|
|
88
|
+
}));
|
|
89
|
+
const issueComments = client.comments.forIssue(TEST_PROJECT_ID, TEST_ISSUE_ID);
|
|
90
|
+
await expect(issueComments.delete("333")).resolves.toBeUndefined();
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=comments.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comments.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/comments.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,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,4BAA4B,CAAC;AAEpC,MAAM,cAAc,GAAG,OAAO,CAAC;AAC/B,MAAM,eAAe,GAAG,OAAO,CAAC;AAChC,MAAM,YAAY,GAAG,OAAO,CAAC;AAC7B,MAAM,aAAa,GAAG,OAAO,CAAC;AAC9B,MAAM,QAAQ,GAAG,+CAA+C,cAAc,aAAa,eAAe,EAAE,CAAC;AAE7G,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,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,SAAS,EAAE,GAAG,EAAE;QACvB,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;YACpB,EAAE,CAAC,iCAAiC,EAAE,KAAK,IAAI,EAAE;gBAC/C,MAAM,YAAY,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC;gBAEjD,MAAM,C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AE,GAAG,EAAE,CAAC,CAAC;gBACjD,CAAC,CAAC,CACH,CAAC;gBAEF,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;gBAC/E,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC;YACrE,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contacts.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/contacts.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for contacts 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 { mockContact, mockContacts } from "../../fixtures/contacts.js";
|
|
9
|
+
const TEST_PORTAL_ID = "12345";
|
|
10
|
+
const BASE_URL = `https://projectsapi.zoho.com/restapi/portal/${TEST_PORTAL_ID}`;
|
|
11
|
+
describe("contacts", () => {
|
|
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 contacts", async () => {
|
|
23
|
+
server.use(http.get(`${BASE_URL}/contacts/`, () => {
|
|
24
|
+
return HttpResponse.json({
|
|
25
|
+
contacts: mockContacts,
|
|
26
|
+
page_info: { page: 1, per_page: 100, has_more_page: false },
|
|
27
|
+
});
|
|
28
|
+
}));
|
|
29
|
+
const result = await client.contacts.list();
|
|
30
|
+
expect(result.data).toHaveLength(2);
|
|
31
|
+
expect(result.data[0]).toMatchObject({
|
|
32
|
+
id: expect.any(String),
|
|
33
|
+
first_name: expect.any(String),
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe("get", () => {
|
|
38
|
+
it("should get a single contact by ID", async () => {
|
|
39
|
+
server.use(http.get(`${BASE_URL}/contacts/contact_001/`, () => {
|
|
40
|
+
return HttpResponse.json({ contacts: [mockContact] });
|
|
41
|
+
}));
|
|
42
|
+
const result = await client.contacts.get("contact_001");
|
|
43
|
+
expect(result.id).toBe("contact_001");
|
|
44
|
+
expect(result.first_name).toBe("Jane");
|
|
45
|
+
expect(result.last_name).toBe("Smith");
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
describe("create", () => {
|
|
49
|
+
it("should create a contact", async () => {
|
|
50
|
+
let capturedBody;
|
|
51
|
+
server.use(http.post(`${BASE_URL}/contacts/`, async ({ request }) => {
|
|
52
|
+
capturedBody = await request.json();
|
|
53
|
+
return HttpResponse.json({ contacts: [mockContact] });
|
|
54
|
+
}));
|
|
55
|
+
const result = await client.contacts.create({
|
|
56
|
+
first_name: "Jane",
|
|
57
|
+
last_name: "Smith",
|
|
58
|
+
email: "jane.smith@acme.com",
|
|
59
|
+
});
|
|
60
|
+
expect(capturedBody).toMatchObject({
|
|
61
|
+
first_name: "Jane",
|
|
62
|
+
last_name: "Smith",
|
|
63
|
+
email: "jane.smith@acme.com",
|
|
64
|
+
});
|
|
65
|
+
expect(result.first_name).toBe("Jane");
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
describe("update", () => {
|
|
69
|
+
it("should update a contact", async () => {
|
|
70
|
+
const updatedContact = { ...mockContact, designation: "VP Engineering" };
|
|
71
|
+
server.use(http.put(`${BASE_URL}/contacts/contact_001/`, () => {
|
|
72
|
+
return HttpResponse.json({ contacts: [updatedContact] });
|
|
73
|
+
}));
|
|
74
|
+
const result = await client.contacts.update("contact_001", {
|
|
75
|
+
designation: "VP Engineering",
|
|
76
|
+
});
|
|
77
|
+
expect(result.designation).toBe("VP Engineering");
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
describe("delete", () => {
|
|
81
|
+
it("should delete a contact", async () => {
|
|
82
|
+
server.use(http.delete(`${BASE_URL}/contacts/contact_001/`, () => {
|
|
83
|
+
return new HttpResponse(null, { status: 204 });
|
|
84
|
+
}));
|
|
85
|
+
await expect(client.contacts.delete("contact_001")).resolves.toBeUndefined();
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
//# sourceMappingURL=contacts.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contacts.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/contacts.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,GAAG,wBAAwB,CAAC;YAChC,QAAQ,EAAE,gBAAgB;YAC1B,YAAY,EAAE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|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for custom views 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 { mockCustomView, mockCustomViews } from "../../fixtures/customviews.js";
|
|
9
|
+
const TEST_PORTAL_ID = "12345";
|
|
10
|
+
const BASE_URL = `https://projectsapi.zoho.com/restapi/portal/${TEST_PORTAL_ID}`;
|
|
11
|
+
describe("customViews", () => {
|
|
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 custom views for tasks", async () => {
|
|
23
|
+
server.use(http.get(`${BASE_URL}/tasks/customviews/`, () => {
|
|
24
|
+
return HttpResponse.json({
|
|
25
|
+
customviews: mockCustomViews,
|
|
26
|
+
page_info: { page: 1, per_page: 100, has_more_page: false },
|
|
27
|
+
});
|
|
28
|
+
}));
|
|
29
|
+
const result = await client.customViews.list("tasks");
|
|
30
|
+
expect(result.data).toHaveLength(2);
|
|
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 custom view by ID", async () => {
|
|
39
|
+
server.use(http.get(`${BASE_URL}/tasks/customviews/cv_001/`, () => {
|
|
40
|
+
return HttpResponse.json({ customviews: [mockCustomView] });
|
|
41
|
+
}));
|
|
42
|
+
const result = await client.customViews.get("tasks", "cv_001");
|
|
43
|
+
expect(result.id).toBe("cv_001");
|
|
44
|
+
expect(result.name).toBe("My Active Tasks");
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe("create", () => {
|
|
48
|
+
it("should create a custom view", async () => {
|
|
49
|
+
let capturedBody;
|
|
50
|
+
server.use(http.post(`${BASE_URL}/tasks/customviews/`, async ({ request }) => {
|
|
51
|
+
capturedBody = await request.json();
|
|
52
|
+
return HttpResponse.json({ customviews: [mockCustomView] });
|
|
53
|
+
}));
|
|
54
|
+
const result = await client.customViews.create("tasks", {
|
|
55
|
+
name: "My Active Tasks",
|
|
56
|
+
description: "All active tasks assigned to me",
|
|
57
|
+
});
|
|
58
|
+
expect(capturedBody).toMatchObject({
|
|
59
|
+
name: "My Active Tasks",
|
|
60
|
+
description: "All active tasks assigned to me",
|
|
61
|
+
});
|
|
62
|
+
expect(result.name).toBe("My Active Tasks");
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
describe("update", () => {
|
|
66
|
+
it("should update a custom view", async () => {
|
|
67
|
+
const updatedView = { ...mockCustomView, name: "Updated View" };
|
|
68
|
+
server.use(http.put(`${BASE_URL}/tasks/customviews/cv_001/`, () => {
|
|
69
|
+
return HttpResponse.json({ customviews: [updatedView] });
|
|
70
|
+
}));
|
|
71
|
+
const result = await client.customViews.update("tasks", "cv_001", {
|
|
72
|
+
name: "Updated View",
|
|
73
|
+
});
|
|
74
|
+
expect(result.name).toBe("Updated View");
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
describe("delete", () => {
|
|
78
|
+
it("should delete a custom view", async () => {
|
|
79
|
+
server.use(http.delete(`${BASE_URL}/tasks/customviews/cv_001/`, () => {
|
|
80
|
+
return new HttpResponse(null, { status: 204 });
|
|
81
|
+
}));
|
|
82
|
+
await expect(client.customViews.delete("tasks", "cv_001")).resolves.toBeUndefined();
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
describe("forTasks", () => {
|
|
86
|
+
it("should provide a convenience method for task views", async () => {
|
|
87
|
+
server.use(http.get(`${BASE_URL}/tasks/customviews/`, () => {
|
|
88
|
+
return HttpResponse.json({
|
|
89
|
+
customviews: mockCustomViews,
|
|
90
|
+
page_info: { page: 1, per_page: 100, has_more_page: false },
|
|
91
|
+
});
|
|
92
|
+
}));
|
|
93
|
+
const taskViews = client.customViews.forTasks();
|
|
94
|
+
const result = await taskViews.list();
|
|
95
|
+
expect(result.data).toHaveLength(2);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
describe("forIssues", () => {
|
|
99
|
+
it("should provide a convenience method for issue views", async () => {
|
|
100
|
+
server.use(http.get(`${BASE_URL}/issues/customviews/`, () => {
|
|
101
|
+
return HttpResponse.json({
|
|
102
|
+
customviews: mockCustomViews,
|
|
103
|
+
page_info: { page: 1, per_page: 100, has_more_page: false },
|
|
104
|
+
});
|
|
105
|
+
}));
|
|
106
|
+
const issueViews = client.customViews.forIssues();
|
|
107
|
+
const result = await issueViews.list();
|
|
108
|
+
expect(result.data).toHaveLength(2);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
//# sourceMappingURL=customviews.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customviews.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/customviews.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,cAAc,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhF,MAAM,cAAc,GAAG,OAAO,CAAC;A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AI,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboards.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/dashboards.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for dashboards 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 { mockDashboard, mockDashboards } from "../../fixtures/dashboards.js";
|
|
9
|
+
const TEST_PORTAL_ID = "12345";
|
|
10
|
+
const BASE_URL = `https://projectsapi.zoho.com/restapi/portal/${TEST_PORTAL_ID}`;
|
|
11
|
+
describe("dashboards", () => {
|
|
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 dashboards", async () => {
|
|
23
|
+
server.use(http.get(`${BASE_URL}/dashboards/`, () => {
|
|
24
|
+
return HttpResponse.json({
|
|
25
|
+
dashboards: mockDashboards,
|
|
26
|
+
page_info: { page: 1, per_page: 100, has_more_page: false },
|
|
27
|
+
});
|
|
28
|
+
}));
|
|
29
|
+
const result = await client.dashboards.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 dashboard by ID", async () => {
|
|
39
|
+
server.use(http.get(`${BASE_URL}/dashboards/1001/`, () => {
|
|
40
|
+
return HttpResponse.json({ dashboards: [mockDashboard] });
|
|
41
|
+
}));
|
|
42
|
+
const result = await client.dashboards.get("1001");
|
|
43
|
+
expect(result.id).toBe(1001);
|
|
44
|
+
expect(result.name).toBe("Project Overview");
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
describe("create", () => {
|
|
48
|
+
it("should create a dashboard", async () => {
|
|
49
|
+
let capturedBody;
|
|
50
|
+
server.use(http.post(`${BASE_URL}/dashboards/`, async ({ request }) => {
|
|
51
|
+
capturedBody = await request.json();
|
|
52
|
+
return HttpResponse.json({ dashboards: [mockDashboard] });
|
|
53
|
+
}));
|
|
54
|
+
const result = await client.dashboards.create({
|
|
55
|
+
name: "Project Overview",
|
|
56
|
+
description: "Main project dashboard",
|
|
57
|
+
type: "project",
|
|
58
|
+
});
|
|
59
|
+
expect(capturedBody).toMatchObject({
|
|
60
|
+
name: "Project Overview",
|
|
61
|
+
type: "project",
|
|
62
|
+
});
|
|
63
|
+
expect(result.name).toBe("Project Overview");
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
describe("update", () => {
|
|
67
|
+
it("should update a dashboard", async () => {
|
|
68
|
+
const updatedDashboard = { ...mockDashboard, name: "Team Overview" };
|
|
69
|
+
server.use(http.put(`${BASE_URL}/dashboards/1001/`, () => {
|
|
70
|
+
return HttpResponse.json({ dashboards: [updatedDashboard] });
|
|
71
|
+
}));
|
|
72
|
+
const result = await client.dashboards.update("1001", {
|
|
73
|
+
name: "Team Overview",
|
|
74
|
+
});
|
|
75
|
+
expect(result.name).toBe("Team Overview");
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
describe("delete", () => {
|
|
79
|
+
it("should delete a dashboard", async () => {
|
|
80
|
+
server.use(http.delete(`${BASE_URL}/dashboards/1001/`, () => {
|
|
81
|
+
return new HttpResponse(null, { status: 204 });
|
|
82
|
+
}));
|
|
83
|
+
await expect(client.dashboards.delete("1001")).resolves.toBeUndefined();
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
//# sourceMappingURL=dashboards.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboards.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/dashboards.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,aAAa,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE7E,MAAM,cAAc,GAAG,OAAO,CAAC;AAC/B,MAAM,QAAQ,GAAG,+CAA+C,cAAc,EAAE,CAAC;AAEjF,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,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,4BAA4B,EAAE,KAAK,IAAI,EAAE;YAC1C,MAAM,CAAC,GAAG,CACR,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,cAAc,EAAE,GAAG,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M,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE;gBACpD,IAAI,EAAE,eAAe;aACtB,CAAC,CAAC;YAEH,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC5C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,QAAQ,EAAE,GAAG,EAAE;QACtB,EAAE,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;YACzC,MAAM,CAAC,GAAG,CACR,IAAI,CAAC,MAAM,CAAC,GAAG,QAAQ,mBAAmB,EAAE,GAAG,EAAE;gBAC/C,OAAO,IAAI,YAAY,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACjD,CAAC,CAAC,CACH,CAAC;YAEF,MAAM,MAAM,CACV,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CACjC,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":"events.test.d.ts","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/events.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit tests for events 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 { createEventFixture, createEventListFixture, createEventListResponse, } from "../../fixtures/events.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("events", () => {
|
|
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 events for a project", async () => {
|
|
24
|
+
const mockEvents = createEventListFixture(3);
|
|
25
|
+
server.use(http.get(`${BASE_URL}/events/`, () => {
|
|
26
|
+
return HttpResponse.json(createEventListResponse(mockEvents));
|
|
27
|
+
}));
|
|
28
|
+
const result = await client.events.list(TEST_PROJECT_ID);
|
|
29
|
+
expect(result.data).toHaveLength(3);
|
|
30
|
+
expect(result.data[0]).toMatchObject({
|
|
31
|
+
id: expect.any(Number),
|
|
32
|
+
title: expect.any(String),
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
describe("get", () => {
|
|
37
|
+
it("should get a single event by ID", async () => {
|
|
38
|
+
const mockEvent = createEventFixture({ id: 123, id_string: "123" });
|
|
39
|
+
server.use(http.get(`${BASE_URL}/events/123/`, () => {
|
|
40
|
+
return HttpResponse.json({ events: [mockEvent] });
|
|
41
|
+
}));
|
|
42
|
+
const result = await client.events.get(TEST_PROJECT_ID, "123");
|
|
43
|
+
expect(result.id_string).toBe("123");
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
describe("create", () => {
|
|
47
|
+
it("should create an event", async () => {
|
|
48
|
+
const newEvent = createEventFixture({ title: "New Event" });
|
|
49
|
+
server.use(http.post(`${BASE_URL}/events/`, async () => {
|
|
50
|
+
return HttpResponse.json({ events: [newEvent] });
|
|
51
|
+
}));
|
|
52
|
+
const result = await client.events.create(TEST_PROJECT_ID, {
|
|
53
|
+
title: "New Event",
|
|
54
|
+
start_date: "2025-01-01",
|
|
55
|
+
end_date: "2025-01-01",
|
|
56
|
+
});
|
|
57
|
+
expect(result.title).toBe("New Event");
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
describe("update", () => {
|
|
61
|
+
it("should update an event", async () => {
|
|
62
|
+
const updatedEvent = createEventFixture({ id: 123, id_string: "123", title: "Updated Event" });
|
|
63
|
+
server.use(http.put(`${BASE_URL}/events/123/`, () => {
|
|
64
|
+
return HttpResponse.json({ events: [updatedEvent] });
|
|
65
|
+
}));
|
|
66
|
+
const result = await client.events.update(TEST_PROJECT_ID, "123", { title: "Updated Event" });
|
|
67
|
+
expect(result.title).toBe("Updated Event");
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
describe("delete", () => {
|
|
71
|
+
it("should delete an event", async () => {
|
|
72
|
+
server.use(http.delete(`${BASE_URL}/events/123/`, () => {
|
|
73
|
+
return new HttpResponse(null, { status: 204 });
|
|
74
|
+
}));
|
|
75
|
+
await expect(client.events.delete(TEST_PROJECT_ID, "123")).resolves.toBeUndefined();
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=events.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.test.js","sourceRoot":"","sources":["../../../../src/__tests__/unit/client/events.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,cA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