feat: Added resourceExists method to ResourceStore

* feat: added resourceExists method to ResourceStore

* Merge remote-tracking branch 'origin/main' into feat/add-resourceExists-method-to-ResourceStore

* fix: adapted to review

* fix: adapted to review
This commit is contained in:
Arne Vandoorslaer
2021-02-25 13:43:58 +01:00
committed by GitHub
parent e5b7d99da4
commit b3f292d718
24 changed files with 136 additions and 67 deletions

View File

@@ -16,6 +16,15 @@ import type { Conditions } from './Conditions';
* should those be relevant to the store.
*/
export interface ResourceStore {
/**
* Check if a resource exists.
* @param identifier - Identifier of resource to check.
*
* @returns A promise resolving if the resource already exists
*/
resourceExists: (identifier: ResourceIdentifier, conditions?: Conditions) => Promise<boolean>;
/**
* Retrieves a representation of a resource.
* @param identifier - Identifier of the resource to read.