Skip to content

Commit

Permalink
feat(fetch): add AlwatrDocumentStorage type
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Dec 17, 2022
1 parent c40da9c commit 44b84f0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/fetch/src/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,15 @@ export type AlwatrServiceResponse<TData = Record<string, unknown>, TMeta = Recor
| AlwatrServiceResponseSuccess<TData>
| AlwatrServiceResponseSuccessWithMeta<TData, TMeta>
| AlwatrServiceResponseFailed;

export type AlwatrDocumentMeta = {
formatVersion: number;
reversion: number;
lastUpdated: number;
lastAutoId: number;
};

export type AlwatrDocumentStorage<T extends AlwatrDocumentObject> = Omit<
AlwatrServiceResponseSuccessWithMeta<Record<string, T | undefined>, AlwatrDocumentMeta>,
'statusCode' | 'errorCode'
>;

0 comments on commit 44b84f0

Please sign in to comment.