refactor: native feature management (#2350)

This commit is contained in:
Mo
2023-07-12 12:56:08 -05:00
committed by GitHub
parent 49f7581cd8
commit 078ef3772c
223 changed files with 3996 additions and 3438 deletions

View File

@@ -1,19 +1,19 @@
import { isErrorResponse } from '@standardnotes/responses'
import { UserRolesChangedEvent } from '@standardnotes/domain-events'
import { AbstractService, InternalEventBusInterface, StorageKey } from '@standardnotes/services'
import {
AbstractService,
InternalEventBusInterface,
StorageKey,
StorageServiceInterface,
} from '@standardnotes/services'
import { WebSocketApiServiceInterface } from '@standardnotes/api'
import { DiskStorageService } from '../Storage/DiskStorageService'
export enum WebSocketsServiceEvent {
UserRoleMessageReceived = 'WebSocketMessageReceived',
}
import { WebSocketsServiceEvent } from './WebSocketsServiceEvent'
export class SNWebSocketsService extends AbstractService<WebSocketsServiceEvent, UserRolesChangedEvent> {
private webSocket?: WebSocket
constructor(
private storageService: DiskStorageService,
private storageService: StorageServiceInterface,
private webSocketUrl: string | undefined,
private webSocketApiService: WebSocketApiServiceInterface,
protected override internalEventBus: InternalEventBusInterface,