feat: add services package

This commit is contained in:
Karol Sójko
2022-07-05 20:51:42 +02:00
parent b614c71e79
commit fbfed0a05c
85 changed files with 2418 additions and 28 deletions

View File

@@ -0,0 +1,24 @@
import {
PayloadInterface,
EncryptedPayloadInterface,
FullyFormedPayloadInterface,
PayloadEmitSource,
} from '@standardnotes/models'
import { IntegrityPayload } from '@standardnotes/responses'
export interface PayloadManagerInterface {
emitPayloads(
payloads: PayloadInterface[],
emitSource: PayloadEmitSource,
sourceKey?: string,
): Promise<PayloadInterface[]>
integrityPayloads: IntegrityPayload[]
get invalidPayloads(): EncryptedPayloadInterface[]
/**
* Returns a detached array of all items which are not deleted
*/
get nonDeletedItems(): FullyFormedPayloadInterface[]
}