Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Aug 23, 2024
1 parent 0dcfebb commit ba5f435
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/api/src/dwn-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export type RecordsReadResponse = DwnResponseStatus & {
record: Record;
}

/** Subscription handler for Records */
export type RecordsSubscriptionHandler = (record: Record) => void;

/**
Expand All @@ -226,8 +227,12 @@ export type RecordsSubscribeRequest = {
subscriptionHandler: RecordsSubscriptionHandler;
}


/** Encapsulates the response from a DWN RecordsSubscriptionRequest */
export type RecordsSubscribeResponse = DwnResponseStatus & {
/**
* Represents the subscription that was created. Includes an ID and the close method to stop the subscription.
*
* */
subscription?: DwnMessageSubscription;
}

Expand Down

0 comments on commit ba5f435

Please sign in to comment.