From 463432b20cc71fd73fe3b7bc73e970978f3d5380 Mon Sep 17 00:00:00 2001 From: Thibault Reidy <147397675+ReidyT@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:33:42 +0100 Subject: [PATCH] feat(refactor): update ShortLink types from SDK (#1562) --- cypress/e2e/item/share/shareItem.cy.ts | 18 ++-- cypress/e2e/item/share/shortLink.cy.ts | 99 ++++++------------- cypress/fixtures/shortLinks.ts | 11 +++ cypress/support/server.ts | 39 +++----- package.json | 4 +- .../shortLink/ShortLinkDialogContent.tsx | 13 ++- .../sharing/shortLink/ShortLinkDisplay.tsx | 4 +- .../item/sharing/shortLink/ShortLinkMenu.tsx | 4 +- .../sharing/shortLink/ShortLinksRenderer.tsx | 34 +++---- yarn.lock | 33 +++---- 10 files changed, 109 insertions(+), 150 deletions(-) create mode 100644 cypress/fixtures/shortLinks.ts diff --git a/cypress/e2e/item/share/shareItem.cy.ts b/cypress/e2e/item/share/shareItem.cy.ts index 4a9dfef32..812462e3c 100644 --- a/cypress/e2e/item/share/shareItem.cy.ts +++ b/cypress/e2e/item/share/shareItem.cy.ts @@ -11,6 +11,7 @@ import { buildShortLinkUrlTextId, } from '../../../../src/config/selectors'; import { PUBLISHED_ITEM } from '../../../fixtures/items'; +import { expectNumberOfShortLinks } from '../../../fixtures/shortLinks'; import { GRAASP_REDIRECTION_HOST, buildGraaspBuilderView, @@ -129,20 +130,17 @@ describe('Share Item Link', () => { { alias: 'test-1', platform: Context.Builder, - item: { id: item.id }, - createdAt: new Date().toISOString(), + itemId: item.id, }, { alias: 'test-2', platform: Context.Player, - item: { id: item.id }, - createdAt: new Date().toISOString(), + itemId: item.id, }, { alias: 'test-3', platform: Context.Library, - item: { id: item.id }, - createdAt: new Date().toISOString(), + itemId: item.id, }, ]; @@ -154,7 +152,7 @@ describe('Share Item Link', () => { cy.visit(buildItemPath(item.id)); cy.get(`#${buildShareButtonId(item.id)}`).click(); - cy.wait('@getShortLinksItem').its('response.body.length').should('eq', 3); + expectNumberOfShortLinks(3); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 3); const context = Context.Builder; @@ -166,7 +164,7 @@ describe('Share Item Link', () => { cy.visit(buildItemPath(item.id)); cy.get(`#${buildShareButtonId(item.id)}`).click(); - cy.wait('@getShortLinksItem').its('response.body.length').should('eq', 3); + expectNumberOfShortLinks(3); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 3); const context = Context.Player; @@ -178,7 +176,7 @@ describe('Share Item Link', () => { cy.visit(buildItemPath(item.id)); cy.get(`#${buildShareButtonId(item.id)}`).click(); - cy.wait('@getShortLinksItem').its('response.body.length').should('eq', 3); + expectNumberOfShortLinks(3); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 3); const context = Context.Library; @@ -190,7 +188,7 @@ describe('Share Item Link', () => { cy.visit(buildItemPath(item.id)); cy.get(`#${buildShareButtonId(item.id)}`).click(); - cy.wait('@getShortLinksItem').its('response.body.length').should('eq', 3); + expectNumberOfShortLinks(3); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 3); cy.get(`#${SHARE_ITEM_QR_BTN_ID}`).click(); diff --git a/cypress/e2e/item/share/shortLink.cy.ts b/cypress/e2e/item/share/shortLink.cy.ts index 77f1a9bdf..ba3d5b172 100644 --- a/cypress/e2e/item/share/shortLink.cy.ts +++ b/cypress/e2e/item/share/shortLink.cy.ts @@ -24,6 +24,10 @@ import { } from '@/config/selectors'; import { PUBLISHED_ITEM } from '../../../fixtures/items'; +import { + expectNumberOfShortLinks, + expectShortLinksEquals, +} from '../../../fixtures/shortLinks'; const items = [PackedFolderItemFactory(), PackedFolderItemFactory()]; @@ -49,9 +53,7 @@ describe('Short links', () => { cy.get(`#${buildShareButtonId(itemId)}`).click(); // there is no shortlinks for the moment - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 0); + expectNumberOfShortLinks(0); // but because the shortlinks "replace" the link, // there is one link per platform @@ -77,9 +79,7 @@ describe('Short links', () => { }, ); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 1); + expectNumberOfShortLinks(1); }); it('Add a custom short link', () => { @@ -90,9 +90,7 @@ describe('Short links', () => { cy.get(`#${buildShareButtonId(itemId)}`).click(); // there is no shortlinks for the moment - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 0); + expectNumberOfShortLinks(0); // but because the shortlinks "replace" the link, // there is one link per platform @@ -120,9 +118,7 @@ describe('Short links', () => { expect(postBody.alias).equals(SHORT_LINK_ALIAS); }, ); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 1); + expectNumberOfShortLinks(1); }); }); @@ -136,14 +132,12 @@ describe('Short links', () => { { alias: 'test-1', platform: Context.Player, - item: { id: itemId }, - createdAt: new Date().toISOString(), + itemId, }, { alias: 'test-2', platform: Context.Builder, - item: { id: itemId }, - createdAt: new Date().toISOString(), + itemId, }, ]; @@ -162,9 +156,7 @@ describe('Short links', () => { cy.visit(buildItemPath(itemId)); cy.get(`#${buildShareButtonId(itemId)}`).click(); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 2); + expectNumberOfShortLinks(2); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 2); cy.get(`#${buildShortLinkMenuBtnId(PATCH_ALIAS)}`).click(); cy.get(`#${buildShortLinkEditBtnId(PATCH_ALIAS)}`).click(); @@ -185,16 +177,11 @@ describe('Short links', () => { cy.wait('@patchShortLink').then( ({ response: { statusCode: postCode, body: postBody } }) => { expect(postCode).equals(StatusCodes.OK); - expect(postBody.platform).equals(shortLinks[0].platform); expect(postBody.alias).equals(NEW_SHORT_LINK); }, ); - cy.wait('@getShortLinksItem').then(({ response: { body } }) => { - expect(body.length).equals(2); - expect(body[0].alias).equals(NEW_SHORT_LINK); - expect(body[1].alias).equals(shortLinks[1].alias); - }); + expectShortLinksEquals([NEW_SHORT_LINK, shortLinks[1].alias]); }); it('Patch short link with random alias', () => { @@ -203,9 +190,7 @@ describe('Short links', () => { cy.visit(buildItemPath(itemId)); cy.get(`#${buildShareButtonId(itemId)}`).click(); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 2); + expectNumberOfShortLinks(2); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 2); cy.get(`#${buildShortLinkMenuBtnId(PATCH_ALIAS)}`).click(); cy.get(`#${buildShortLinkEditBtnId(PATCH_ALIAS)}`).click(); @@ -226,29 +211,24 @@ describe('Short links', () => { cy.wait('@patchShortLink').then( ({ response: { statusCode: postCode, body: postBody } }) => { expect(postCode).equals(StatusCodes.OK); - expect(postBody.platform).equals(shortLinks[0].platform); expect(postBody.alias).not.equals(PATCH_ALIAS); + + const randomAlias = postBody.alias; + + // We are checking the shortlinks here to have access to the random alias. + expectShortLinksEquals([randomAlias, shortLinks[1].alias]); }, ); - - cy.wait('@getShortLinksItem').then(({ response: { body } }) => { - expect(body.length).equals(2); - expect(body[0].alias).not.equals(PATCH_ALIAS); - expect(body[1].alias).equals(shortLinks[1].alias); - }); }); it('Delete short link', () => { const DELETE_ALIAS = shortLinks[0].alias; - const DELETE_PLATFORM = shortLinks[0].platform; const KEEP_SHORT_LINK = shortLinks[1]; cy.visit(buildItemPath(itemId)); cy.get(`#${buildShareButtonId(itemId)}`).click(); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 2); + expectNumberOfShortLinks(2); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 2); cy.get(`#${buildShortLinkMenuBtnId(DELETE_ALIAS)}`).click(); cy.get(`#${buildShortLinkDeleteBtnId(DELETE_ALIAS)}`).click(); @@ -258,15 +238,11 @@ describe('Short links', () => { cy.wait('@deleteShortLink').then( ({ response: { statusCode: postCode, body: postBody } }) => { expect(postCode).equals(StatusCodes.OK); - expect(postBody.platform).equals(DELETE_PLATFORM); expect(postBody.alias).equals(DELETE_ALIAS); }, ); - cy.wait('@getShortLinksItem').then(({ response: { body } }) => { - expect(body.length).equals(1); - expect(body[0].alias).equals(KEEP_SHORT_LINK.alias); - }); + expectShortLinksEquals([KEEP_SHORT_LINK.alias]); }); }); @@ -282,14 +258,12 @@ describe('Short links', () => { { alias: 'test-1', platform: Context.Player, - item: { id: itemId }, - createdAt: new Date().toISOString(), + itemId, }, { alias: 'test-2', platform: Context.Builder, - item: { id: itemId }, - createdAt: new Date().toISOString(), + itemId, }, ]; @@ -307,9 +281,7 @@ describe('Short links', () => { cy.visit(buildItemPath(itemId)); cy.get(`#${buildShareButtonId(itemId)}`).click(); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 2); + expectNumberOfShortLinks(2); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 2); cy.get(`#${buildShortLinkMenuBtnId(patchAlias)}`).click(); cy.get(`#${buildShortLinkEditBtnId(patchAlias)}`).click(); @@ -325,9 +297,7 @@ describe('Short links', () => { cy.visit(buildItemPath(itemId)); cy.get(`#${buildShareButtonId(itemId)}`).click(); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 2); + expectNumberOfShortLinks(2); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 2); cy.get(`#${buildShortLinkMenuBtnId(patchAlias)}`).click(); cy.get(`#${buildShortLinkEditBtnId(patchAlias)}`).click(); @@ -343,9 +313,7 @@ describe('Short links', () => { cy.visit(buildItemPath(itemId)); cy.get(`#${buildShareButtonId(itemId)}`).click(); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 2); + expectNumberOfShortLinks(2); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 2); cy.get(`#${buildShortLinkMenuBtnId(patchAlias)}`).click(); cy.get(`#${buildShortLinkEditBtnId(patchAlias)}`).click(); @@ -361,9 +329,7 @@ describe('Short links', () => { cy.visit(buildItemPath(itemId)); cy.get(`#${buildShareButtonId(itemId)}`).click(); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 2); + expectNumberOfShortLinks(2); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 2); cy.get(`#${buildShortLinkMenuBtnId(patchAlias)}`).click(); cy.get(`#${buildShortLinkEditBtnId(patchAlias)}`).click(); @@ -394,9 +360,7 @@ describe('Short links', () => { cy.get(`#${buildShareButtonId(itemId)}`).click(); // there is no shortlinks for the moment - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 0); + expectNumberOfShortLinks(0); // but because the shortlinks "replace" the link, // there is one link per platform @@ -422,9 +386,7 @@ describe('Short links', () => { }, ); - cy.wait('@getShortLinksItem') - .its('response.body.length') - .should('eq', 1); + expectNumberOfShortLinks(1); }); }); }); @@ -445,8 +407,7 @@ describe('Short links', () => { { alias: 'test-1', platform: Context.Player, - item: { id: itemId }, - createdAt: new Date().toISOString(), + itemId, }, ]; @@ -461,7 +422,7 @@ describe('Short links', () => { it('Short links are read only', () => { cy.visit(buildItemPath(itemId)); cy.get(`#${buildShareButtonId(itemId)}`).click(); - cy.wait('@getShortLinksItem').its('response.body.length').should('eq', 1); + expectNumberOfShortLinks(1); cy.get(`.${SHORT_LINK_COMPONENT}`).should('have.length', 2); // This wait is necessary to be sure that the UI render the short links with add and/or menu buttons cy.wait(1000); diff --git a/cypress/fixtures/shortLinks.ts b/cypress/fixtures/shortLinks.ts new file mode 100644 index 000000000..7d0ca1f8a --- /dev/null +++ b/cypress/fixtures/shortLinks.ts @@ -0,0 +1,11 @@ +export const expectNumberOfShortLinks = (expectedNumber: number): void => { + cy.wait('@getShortLinksItem').then(({ response: { body } }) => { + expect(Object.keys(body).length).equals(expectedNumber); + }); +}; + +export const expectShortLinksEquals = (expectedAlias: string[]): void => { + cy.wait('@getShortLinksItem').then(({ response: { body } }) => { + expectedAlias.forEach((a) => expect(Object.values(body)).includes(a)); + }); +}; diff --git a/cypress/support/server.ts b/cypress/support/server.ts index 42af45f1f..ad98e593e 100644 --- a/cypress/support/server.ts +++ b/cypress/support/server.ts @@ -19,7 +19,7 @@ import { PublicationStatus, RecycledItemData, ShortLink, - ShortLinkPayload, + ShortLinksOfItem, buildPathFromIds, getIdsFromPath, isRootItem, @@ -2069,7 +2069,19 @@ export const mockGetShortLinksItem = ( return reply({ statusCode: StatusCodes.BAD_REQUEST }); } - return reply(shortLinks.filter(({ item }) => item?.id === itemId)); + return reply( + shortLinks + .filter(({ itemId: id }) => id === itemId) + .reduce((acc, s) => { + if (acc[s.platform]) { + throw new Error( + `Duplication of platform ${s} in shortlinks for item ${itemId}!`, + ); + } + + return { ...acc, [s.platform]: s.alias }; + }, {}), + ); }, ).as('getShortLinksItem'); }; @@ -2092,21 +2104,6 @@ export const mockCheckShortLink = (shouldAliasBeAvailable: boolean): void => { ).as('checkShortLink'); }; -/** - * Convert short link payload to short link object to mock server response. - * @param payload The payload of the short link when posting new short link for example. - * @returns The short link object converted from the payload. - */ -function payloadToShortLink(payload: ShortLinkPayload): ShortLink { - const { itemId, ...restOfPayload } = payload; - - return { - ...restOfPayload, - item: { id: itemId }, - createdAt: new Date().toISOString(), - }; -} - export const mockPostShortLink = ( shortLinks: ShortLink[], shouldThrowError: boolean, @@ -2121,12 +2118,9 @@ export const mockPostShortLink = ( return reply({ statusCode: StatusCodes.BAD_REQUEST }); } - // Because the payload contains itemId and short link object contains item: { id } - // it is necessary to transform the post request to short link to mock server response. - const shortLink = payloadToShortLink(body); - shortLinks.push(shortLink); + shortLinks.push(body); - return reply(shortLink); + return reply(body); }, ).as('postShortLink'); }; @@ -2156,7 +2150,6 @@ export const mockPatchShortLink = ( // This works only because of JS referenced object. It is for a mocked db only. shortLink.alias = body.alias; - shortLink.platform = body.platform; return reply(shortLink); }, diff --git a/package.json b/package.json index f4c79dfc7..a11701364 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "@emotion/styled": "11.13.0", "@graasp/chatbox": "3.3.0", "@graasp/map": "1.19.0", - "@graasp/query-client": "5.2.0", - "@graasp/sdk": "4.32.1", + "@graasp/query-client": "5.3.0", + "@graasp/sdk": "4.35.0", "@graasp/stylis-plugin-rtl": "2.2.0", "@graasp/translations": "1.40.0", "@graasp/ui": "5.4.0", diff --git a/src/components/item/sharing/shortLink/ShortLinkDialogContent.tsx b/src/components/item/sharing/shortLink/ShortLinkDialogContent.tsx index 0b5bc6604..4002dffa8 100644 --- a/src/components/item/sharing/shortLink/ShortLinkDialogContent.tsx +++ b/src/components/item/sharing/shortLink/ShortLinkDialogContent.tsx @@ -30,7 +30,7 @@ const { useShortLinkAvailable } = hooks; type Props = { itemId: string; initialAlias: string; - initialPlatform: ShortLink['platform']; + platform: ShortLink['platform']; isNew: boolean; handleClose: () => void; }; @@ -38,7 +38,7 @@ type Props = { const ShortLinkDialogContent = ({ itemId, initialAlias, - initialPlatform, + platform, handleClose, isNew, }: Props): JSX.Element => { @@ -55,7 +55,7 @@ const ShortLinkDialogContent = ({ const [alias, setAlias] = useState(initialAlias); const [search, setSearch] = useState(); - const [sendApi, setSendAPI] = useState(); + const [sendAPI, setSendAPI] = useState(); const [saved, setSaved] = useState(false); const [hasError, setHasError] = useState(false); const [isValidAlias, setIsValidAlias] = useState(false); @@ -72,7 +72,7 @@ const ShortLinkDialogContent = ({ SHORT_LINK_API_CALL_DEBOUNCE_MS, ); const { data: shortLinkAvailable, isFetching: isAvailableLoading } = - useShortLinkAvailable(sendApi); + useShortLinkAvailable(sendAPI); const isLoading = isDebounced || isAvailableLoading; const mutateIsLoading = loadingDelete || loadingPost; @@ -85,15 +85,14 @@ const ShortLinkDialogContent = ({ if (isNew) { await postShortLink({ alias, - platform: initialPlatform, + platform, itemId, }); } else { await patchShortLink({ - alias: initialAlias, // old alias name use to find the shortLink to patch + alias: initialAlias, // old alias name used to find the shortLink to patch shortLink: { alias, - platform: initialPlatform, }, }); } diff --git a/src/components/item/sharing/shortLink/ShortLinkDisplay.tsx b/src/components/item/sharing/shortLink/ShortLinkDisplay.tsx index 0cd219e16..50adbbe9a 100644 --- a/src/components/item/sharing/shortLink/ShortLinkDisplay.tsx +++ b/src/components/item/sharing/shortLink/ShortLinkDisplay.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { Link, Stack, styled } from '@mui/material'; -import { ShortLink, ShortLinkPayload } from '@graasp/sdk'; +import { ShortLink } from '@graasp/sdk'; import { AccentColors } from '@graasp/ui'; import { @@ -25,7 +25,7 @@ const { useDeleteShortLink } = mutations; type Props = { url: string; - shortLink: ShortLinkPayload; + shortLink: ShortLink; isShorten: boolean; canAdminShortLink: boolean; onUpdate: () => void; diff --git a/src/components/item/sharing/shortLink/ShortLinkMenu.tsx b/src/components/item/sharing/shortLink/ShortLinkMenu.tsx index 9688784d2..6669435f9 100644 --- a/src/components/item/sharing/shortLink/ShortLinkMenu.tsx +++ b/src/components/item/sharing/shortLink/ShortLinkMenu.tsx @@ -10,7 +10,7 @@ import { Tooltip, } from '@mui/material'; -import { ShortLink, ShortLinkPayload } from '@graasp/sdk'; +import { ShortLink } from '@graasp/sdk'; import { FAILURE_MESSAGES, SUCCESS_MESSAGES } from '@graasp/translations'; import { CopyIcon, MoreVerticalIcon, PenIcon, TrashIcon } from 'lucide-react'; @@ -29,7 +29,7 @@ import { COPY_ITEM_LINK_TO_CLIPBOARD } from '@/types/clipboard'; import { copyToClipboard } from '@/utils/clipboard'; type Props = { - shortLink: ShortLinkPayload; + shortLink: ShortLink; url: string; isShorten: boolean; canAdminShortLink: boolean; diff --git a/src/components/item/sharing/shortLink/ShortLinksRenderer.tsx b/src/components/item/sharing/shortLink/ShortLinksRenderer.tsx index 4c6fda232..2e0037b36 100644 --- a/src/components/item/sharing/shortLink/ShortLinksRenderer.tsx +++ b/src/components/item/sharing/shortLink/ShortLinksRenderer.tsx @@ -41,10 +41,10 @@ const ShortLinksRenderer = ({ const { mode } = useLayoutContext(); const { data: apiLinks, isLoading } = useShortLinksItem(itemId); const { data: publishedEntry } = useItemPublishedInformation({ itemId }); - const [modalOpen, setOpen] = useState(false); + const [modalOpen, setModalOpen] = useState(false); const [isNew, setIsNew] = useState(false); - const [initialAlias, setInitAlias] = useState(''); - const [initialPlatform, setInitPlatform] = useState( + const [initialAlias, setInitialAlias] = useState(''); + const [shortLinkPlatform, setShortLinkPlatform] = useState( Context.Player, ); @@ -75,15 +75,13 @@ const ShortLinksRenderer = ({ isShorten: false, }; - const apiShortLink = apiLinks?.find( - (short) => short.platform === platform, - ); - if (apiShortLink) { - shortLink.alias = apiShortLink.alias; + const apiShortLinkAlias = apiLinks?.[platform]; + if (apiShortLinkAlias) { + shortLink.alias = apiShortLinkAlias; shortLink.isShorten = true; shortLink.url = appendPathToUrl({ baseURL: GRAASP_REDIRECTION_HOST, - pathname: apiShortLink.alias, + pathname: apiShortLinkAlias, }); } @@ -92,13 +90,13 @@ const ShortLinksRenderer = ({ .filter((short): short is ShortLinkType => Boolean(short)); const handleNewAlias = (platform: ShortLinkPlatform) => { - setInitAlias(randomAlias()); - setInitPlatform(platform); + setInitialAlias(randomAlias()); + setShortLinkPlatform(platform); setIsNew(true); - setOpen(true); + setModalOpen(true); }; - const handleClose = () => setOpen(false); + const handleClose = () => setModalOpen(false); const onClose = (_event: Event, reason: string) => { // handle on backdrop click to close only with buttons if (reason === 'backdropClick') { @@ -109,10 +107,10 @@ const ShortLinksRenderer = ({ }; const handleUpdate = (shortLink: ShortLinkType) => { - setInitAlias(shortLink.alias); - setInitPlatform(shortLink.platform); + setInitialAlias(shortLink.alias); + setShortLinkPlatform(shortLink.platform); setIsNew(false); - setOpen(true); + setModalOpen(true); }; return ( @@ -123,7 +121,7 @@ const ShortLinksRenderer = ({ itemId={itemId} handleClose={handleClose} initialAlias={initialAlias} - initialPlatform={initialPlatform} + platform={shortLinkPlatform} isNew={isNew} /> @@ -151,7 +149,7 @@ const ShortLinksRenderer = ({ )} - {isLoading && shortLinks.map((_) => )} + {isLoading && shortLinks.map((s) => )} ); }; diff --git a/yarn.lock b/yarn.lock index 16917ec59..0ebbd93cb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1509,10 +1509,10 @@ __metadata: languageName: node linkType: hard -"@faker-js/faker@npm:9.0.3": - version: 9.0.3 - resolution: "@faker-js/faker@npm:9.0.3" - checksum: 10/60ea71c31d6bd6317184736de17daee415e229cab5e10a4146a19622f3eb22f49f42345ff339dc9261f0214ca1f9b019c63fd9aac842a2d359f135102788ec90 +"@faker-js/faker@npm:9.2.0": + version: 9.2.0 + resolution: "@faker-js/faker@npm:9.2.0" + checksum: 10/c233aaa41ebc4f4bed36c1304c399c424b9e5abca9cb8fe54ce73d4162ec7acd66f294b90c85ed7a5df774400e44f0a10364bdd41f49e72cb519a48b5948939f languageName: node linkType: hard @@ -1625,9 +1625,9 @@ __metadata: languageName: node linkType: hard -"@graasp/query-client@npm:5.2.0": - version: 5.2.0 - resolution: "@graasp/query-client@npm:5.2.0" +"@graasp/query-client@npm:5.3.0": + version: 5.3.0 + resolution: "@graasp/query-client@npm:5.3.0" dependencies: "@tanstack/react-query": "npm:5.59.8" "@tanstack/react-query-devtools": "npm:5.59.8" @@ -1637,22 +1637,21 @@ __metadata: "@graasp/sdk": ^4.0.0 "@graasp/translations": "*" react: ^18.0.0 - checksum: 10/442ac0b18656210584d4be90672b9f9bfc054e719b9bbc60ec23ac40e8501acf0d51f0485abb6b4d8822d68766c38235fa54685ad5ead55ae1ce1f922e5c4d4f + checksum: 10/6711a3a1043b7c2793e7bebcf5a69ebb31c9f5d72304f541a914772285d76686698b0025129ade9c285f37d906c21b30ef19ce1b0ed5b7c495cb27f060f65226 languageName: node linkType: hard -"@graasp/sdk@npm:4.32.1": - version: 4.32.1 - resolution: "@graasp/sdk@npm:4.32.1" +"@graasp/sdk@npm:4.35.0": + version: 4.35.0 + resolution: "@graasp/sdk@npm:4.35.0" dependencies: - "@faker-js/faker": "npm:9.0.3" + "@faker-js/faker": "npm:9.2.0" filesize: "npm:10.1.6" js-cookie: "npm:3.0.5" - validator: "npm:13.12.0" peerDependencies: date-fns: ^3 || ^4.0.0 - uuid: ^9 || ^10 - checksum: 10/74125fa4c2aed104142cccc77e8a8a90d2ae303dcaae83e40198f7d30d6615ad3136532789b0d1c2f7034847937f238c046b9aee5fcee5d319bbe7be8cb4f257 + uuid: ^9 || ^10 || ^11.0.0 + checksum: 10/72f4ad5c689f94fb0bd99696b7b18d7a7d893df5117b6b39e019d7943cd48c909e11a80bc5de0c0cf66fd4f0f7ffb79fc29fad244ff5070d9a1699538c8ea5d2 languageName: node linkType: hard @@ -6402,8 +6401,8 @@ __metadata: "@emotion/styled": "npm:11.13.0" "@graasp/chatbox": "npm:3.3.0" "@graasp/map": "npm:1.19.0" - "@graasp/query-client": "npm:5.2.0" - "@graasp/sdk": "npm:4.32.1" + "@graasp/query-client": "npm:5.3.0" + "@graasp/sdk": "npm:4.35.0" "@graasp/stylis-plugin-rtl": "npm:2.2.0" "@graasp/translations": "npm:1.40.0" "@graasp/ui": "npm:5.4.0"