From 6f4d0d73a51748652a06f8a8d6a177f70ec43f74 Mon Sep 17 00:00:00 2001 From: Diane Huxley Date: Fri, 6 Oct 2023 15:24:47 -0700 Subject: [PATCH] Fix build --- packages/api/src/dwn-api.ts | 5 ++++- packages/api/src/record.ts | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/api/src/dwn-api.ts b/packages/api/src/dwn-api.ts index 155cae9ce..11bccc120 100644 --- a/packages/api/src/dwn-api.ts +++ b/packages/api/src/dwn-api.ts @@ -159,7 +159,10 @@ export class DwnApi { const protocols = entries.map((entry: ProtocolsQueryReplyEntry) => { const metadata = { author: this.connectedDid, }; - return new Protocol(this.agent, entry, metadata); + // FIXME: dwn-sdk-js actually returns the entire ProtocolsConfigure message, + // but the type claims that it returns the message without authorization. + // When dwn-sdk-js fixes the type, we should remove `as ProtocolsConfigureMessage` + return new Protocol(this.agent, entry as ProtocolsConfigureMessage, metadata); }); return { protocols, status }; diff --git a/packages/api/src/record.ts b/packages/api/src/record.ts index 1af6fe69e..a3a72e8fa 100644 --- a/packages/api/src/record.ts +++ b/packages/api/src/record.ts @@ -16,7 +16,7 @@ export type RecordOptions = RecordsWriteMessage & { }; export type RecordModel = RecordsWriteDescriptor - & Omit + & Omit & { author: string; recordId?: string;