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;