Skip to content

Commit

Permalink
feat(type): storage
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD committed Dec 30, 2022
1 parent 0fa8a3e commit d4b3a95
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions core/type/src/storage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import {AlwatrServiceResponseSuccessWithMeta} from './service-response.js';

export type AlwatrDocumentObject = {
id: string;
meta?: {
rev: number;
created: number;
updated: number;
};
};

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

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

0 comments on commit d4b3a95

Please sign in to comment.