diff --git a/package-lock.json b/package-lock.json index 41bc9df0d..713c5625a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@tbd54566975/dwn-sdk-js", - "version": "0.5.0", + "version": "0.5.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@tbd54566975/dwn-sdk-js", - "version": "0.5.0", + "version": "0.5.1", "license": "Apache-2.0", "dependencies": { "@ipld/dag-cbor": "9.0.3", diff --git a/package.json b/package.json index 41d2fdf4c..4b7330ec6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tbd54566975/dwn-sdk-js", - "version": "0.5.0", + "version": "0.5.1", "description": "A reference implementation of https://identity.foundation/decentralized-web-node/spec/", "repository": { "type": "git", diff --git a/src/core/message-reply.ts b/src/core/message-reply.ts index 2a6a93233..c49ea884f 100644 --- a/src/core/message-reply.ts +++ b/src/core/message-reply.ts @@ -1,8 +1,7 @@ import type { MessagesReadReplyEntry } from '../types/messages-types.js'; import type { PaginationCursor } from '../types/query-types.js'; import type { ProtocolsConfigureMessage } from '../types/protocols-types.js'; -import type { Readable } from 'readable-stream'; -import type { RecordsWriteMessage } from '../types/records-types.js'; +import type { RecordsReadReply } from '../types/records-types.js'; import type { GenericMessageReply, MessageSubscription, QueryResultEntry } from '../types/message-types.js'; export function messageReplyFromError(e: unknown, code: number): GenericMessageReply { @@ -15,7 +14,7 @@ export function messageReplyFromError(e: unknown, code: number): GenericMessageR /** * Catch-all message reply type. It is recommended to use GenericMessageReply or a message-specific reply type wherever possible. */ -export type UnionMessageReply = GenericMessageReply & { +export type UnionMessageReply = GenericMessageReply & RecordsReadReply &{ /** * Resulting message entries or events returned from the invocation of the corresponding message. * e.g. the resulting messages from a RecordsQuery, or array of messageCid strings for MessagesQuery @@ -29,18 +28,6 @@ export type UnionMessageReply = GenericMessageReply & { */ entry?: MessagesReadReplyEntry; - /** - * Record corresponding to the message received if applicable (e.g. RecordsRead). - * Mutually exclusive with `entries` and `cursor`. - */ - record?: RecordsWriteMessage & { - /** - * The initial write of the record if the returned RecordsWrite message itself is not the initial write. - */ - initialWrite?: RecordsWriteMessage; - data: Readable; - }; - /** * A cursor for pagination if applicable (e.g. RecordsQuery). * Mutually exclusive with `record`.