generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR builds on top of the existing `EventStream` and adds a subscription specifically for the `Records` interface which follows similar rules as those for `RecordsQuery`. Currently the subscription does not evict or re-authorize subscriptions after the initial processing of the message. So if a revocation of permissions happens after the subscription is live, the user will continue getting notified until they close the connection. This will be addressed in a separate PR to keep things more concise and easier to follow. #668
- Loading branch information
1 parent
4e89df6
commit 8f6e01e
Showing
36 changed files
with
1,805 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,7 @@ | |
"enum": [ | ||
"delete", | ||
"query", | ||
"subscribe", | ||
"read", | ||
"update", | ||
"write" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://identity.foundation/dwn/json-schemas/records-subscribe.json", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"descriptor" | ||
], | ||
"properties": { | ||
"authorization": { | ||
"$ref": "https://identity.foundation/dwn/json-schemas/authorization-delegated-grant.json" | ||
}, | ||
"descriptor": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"required": [ | ||
"interface", | ||
"method", | ||
"messageTimestamp", | ||
"filter" | ||
], | ||
"properties": { | ||
"interface": { | ||
"enum": [ | ||
"Records" | ||
], | ||
"type": "string" | ||
}, | ||
"method": { | ||
"enum": [ | ||
"Subscribe" | ||
], | ||
"type": "string" | ||
}, | ||
"messageTimestamp": { | ||
"$ref": "https://identity.foundation/dwn/json-schemas/defs.json#/definitions/date-time" | ||
}, | ||
"filter": { | ||
"$ref": "https://identity.foundation/dwn/json-schemas/records-filter.json" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,4 +65,4 @@ export class EventsSubscribeHandler implements MethodHandler { | |
subscription, | ||
}; | ||
} | ||
} | ||
} |
Oops, something went wrong.