diff --git a/e2e/helpers/messages.ts b/e2e/helpers/messages.ts index ec0fe16c97..2ce9e30739 100644 --- a/e2e/helpers/messages.ts +++ b/e2e/helpers/messages.ts @@ -1,8 +1,11 @@ import { Page } from '@playwright/test' -import { PaginatedResults } from '@sage-bionetworks/synapse-types' +import { + MessageBundle, + MessageToUser, + PaginatedResults, +} from '@sage-bionetworks/synapse-types' import { deleteFileHandle } from './entities' import { BackendDestinationEnum, doDelete, doGet } from './http' -import { MessageBundle, MessageToUser } from './types' // Retrieves the current authenticated user's outbox. export async function getUserOutbox( diff --git a/e2e/helpers/types.ts b/e2e/helpers/types.ts index 9ba2769984..1e88b046b6 100644 --- a/e2e/helpers/types.ts +++ b/e2e/helpers/types.ts @@ -13,39 +13,6 @@ export type JwtPayload = { sub: string } -/* MESSAGES */ -export type MessageToUser = { - id: string // The unique identifier of the message or comment - createdBy: string // The unique identifier of the sender of this message - fileHandleId: string // The S3 file handle storing the body of this message. Note: The file's mime type should be 'text/plain' or 'text/html'. If no character encoding is specified, then UTF-8 is assumed. - createdOn: string // When this message was created - recipients: string[] // The unique identifiers of the intended recipients of a message - subject: string // Topic of this message. Optional - inReplyTo: string // The unique identifier of the message being replied to. Can be null - inReplyToRoot: string // The unique identifier of the root message being replied to - notificationUnsubscribeEndpoint: string // the portal prefix for one-click email unsubscription. A signed, serialized token is appended to create the complete URL. If omitted, the default endpoint will be used. - userProfileSettingEndpoint: string // the portal link to user profile setting page. If omitted, the default endpoint will be used. - withUnsubscribeLink: boolean // should the unsubscribe link be included in the email? - withProfileSettingLink: boolean // should the user profile setting link be included in the email? - isNotificationMessage: boolean // A notification message is sent from a noreply email address, delivery failures are not sent back to the sender - to: string // The email addresses in the 'to' field of the email message - cc: string // The email addresses in the 'cc' field of the email message - bcc: string // The email addresses in the 'bcc' field of the email message -} - -type MessageStatusType = 'READ' | 'UNREAD' | 'ARCHIVED' - -type MessageStatus = { - messageId: string // The unique identifier of the message. - recipientId: string // The unique identifier of the recipient of this message. - status: MessageStatusType // The status of the message, from the RECIPIENT'S standpoint -} - -export type MessageBundle = { - message: MessageToUser // JSON schema for a message to another user - status: MessageStatus // JSON schema for message status from the RECIPIENT'S standpoint -} - /* ENTITIES */ export type Project = { name: string diff --git a/package.json b/package.json index 76fa1e6f0c..147dabbd39 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@playwright/test": "^1.40.1", "@prettier/plugin-xml": "^3.1.0", - "@sage-bionetworks/synapse-types": "^0.0.1", + "@sage-bionetworks/synapse-types": "^0.0.2", "@types/node": "18.6.5", "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^6.4.0", diff --git a/yarn.lock b/yarn.lock index b9d0d5f7d7..b937c9141b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -895,10 +895,10 @@ react-virtualized-auto-sizer "^1.0.20" react-window "^1.8.9" -"@sage-bionetworks/synapse-types@^0.0.1": - version "0.0.1" - resolved "https://registry.yarnpkg.com/@sage-bionetworks/synapse-types/-/synapse-types-0.0.1.tgz#725792366731aff93b6c4341ad818dcf4d47a524" - integrity sha512-XsfOg06eKi8fMmgDtMX2BS+3e1lt4Ruq3BCEs6AKzbfCyMONDotO96e1k2KknEfPSwAKhosLTC/cZQj2aTCmbg== +"@sage-bionetworks/synapse-types@^0.0.2": + version "0.0.2" + resolved "https://registry.yarnpkg.com/@sage-bionetworks/synapse-types/-/synapse-types-0.0.2.tgz#4190a908a10f10d0cc51e304d6d1d23da41ad64e" + integrity sha512-31MxrIOnJiAUYeXsDsf2J+q9A6nVZt9pWGfG+pYoKC2vZIgUo7L3ToelYEqoufvdgHht+aWq83bnk/+Y4UNoUA== "@tanstack/react-table@^8.9.3": version "8.9.3"