diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index 3077dfa3..f2153b6f 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## [1.9.2] - 2024-05-20 + +- feat: expose more metadata in messages feed + ## [1.9.1] - 2024-04-26 - chore: log unknown api errors diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 56737cde..f4f5fcda 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@dialectlabs/sdk", - "version": "1.9.1", + "version": "1.9.2", "type": "module", "repository": "git@github.com:dialectlabs/sdk.git", "author": "dialectlabs", diff --git a/packages/sdk/src/dialect-cloud-api/data-service-dialects-api.ts b/packages/sdk/src/dialect-cloud-api/data-service-dialects-api.ts index cec02bc0..c293cdb4 100644 --- a/packages/sdk/src/dialect-cloud-api/data-service-dialects-api.ts +++ b/packages/sdk/src/dialect-cloud-api/data-service-dialects-api.ts @@ -269,7 +269,7 @@ export class MessageMetadataDto { } export interface MessageDto { - readonly id: string + readonly id: string; readonly owner: string; readonly text: number[]; readonly timestamp: number; diff --git a/packages/sdk/src/internal/wallet/data-service-wallets.ts b/packages/sdk/src/internal/wallet/data-service-wallets.ts index 0f02b1e4..68a9420c 100644 --- a/packages/sdk/src/internal/wallet/data-service-wallets.ts +++ b/packages/sdk/src/internal/wallet/data-service-wallets.ts @@ -208,6 +208,8 @@ export class DataServiceWalletMessages implements WalletMessages { author: it.owner, timestamp: new Date(it.timestamp), text: this.textSerde.deserialize(new Uint8Array(it.text)), + id: it.id, + metadata: it.metadata, })); } diff --git a/packages/sdk/src/messaging/messaging.interface.ts b/packages/sdk/src/messaging/messaging.interface.ts index 4c5bceaa..ff686d59 100644 --- a/packages/sdk/src/messaging/messaging.interface.ts +++ b/packages/sdk/src/messaging/messaging.interface.ts @@ -52,7 +52,7 @@ export interface MessageMetadata { } export interface ThreadMessage { - id: string + id: string; text: string; timestamp: Date; author: ThreadMember; diff --git a/packages/sdk/src/wallet/wallet.interface.ts b/packages/sdk/src/wallet/wallet.interface.ts index 621826bf..f317daf9 100644 --- a/packages/sdk/src/wallet/wallet.interface.ts +++ b/packages/sdk/src/wallet/wallet.interface.ts @@ -4,7 +4,10 @@ import type { DappAddress, } from '../address/addresses.interface'; import type { AccountAddress } from '../auth/auth.interface'; -import type { ThreadsGeneralSummary } from '../messaging/messaging.interface'; +import type { + MessageMetadata, + ThreadsGeneralSummary, +} from '../messaging/messaging.interface'; export interface Wallets { readonly address: AccountAddress; @@ -113,9 +116,11 @@ export interface WalletMessages { } export interface DappMessage { + id: string; text: string; timestamp: Date; author: AccountAddress; + metadata?: MessageMetadata; } export interface FindDappMessageQuery {