Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add useExportItemChat hook #203

Merged
merged 23 commits into from
Feb 16, 2023
Merged

feat: add useExportItemChat hook #203

merged 23 commits into from
Feb 16, 2023

Conversation

spaenleh
Copy link
Member

@spaenleh spaenleh commented Sep 7, 2022

This PR adds a hook to get the export chat data from the backend.

closes #202
closes #235

@spaenleh spaenleh added the feature New feature or request label Sep 7, 2022
@spaenleh spaenleh self-assigned this Sep 7, 2022
Copy link
Contributor

@pyphilia pyphilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned, I think it will be wiser to export the chat as a file directly from the back with a mutation. The logic could be included in the export data functions (export action, export as zip) as well. To discuss with @juancarlosfarah and @dialexo .

@@ -78,6 +78,8 @@ export const buildGetItemInvitationsForItemRoute = (id: UUID) =>
`${ITEMS_ROUTE}/${id}/invitations`;

export const buildGetItemChatRoute = (id: UUID) => `${ITEMS_ROUTE}/${id}/chat`;
export const buildExportItemChatRoute = (id: UUID) =>
`${ITEMS_ROUTE}/${id}/export/chat`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chat/export?

@spaenleh
Copy link
Member Author

I updated this PR with the deprecation of the immutable types exported by query-client.
These types were moved to @graasp/sdk/frontend in order to not duplicate the sources of typings.

closes #235

@spaenleh spaenleh requested a review from pyphilia February 13, 2023 08:31
Copy link
Contributor

@pyphilia pyphilia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍾

src/hooks/chat.test.ts Show resolved Hide resolved
@spaenleh spaenleh merged commit c9be56d into main Feb 16, 2023
@spaenleh spaenleh deleted the 202/exportChatHook branch February 16, 2023 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move immutable types to @graasp/sdk Add Export chat hook
2 participants