cozy-dataproxy-lib
Version:
Library meant to be by Cozy Cloud's DataProxy apps for data manipulation
27 lines (22 loc) • 533 B
TypeScript
import type CozyClient from 'cozy-client'
import { CozyDoc } from '../types'
declare module 'cozy-realtime' {
export interface RealtimePluginType {
(): void
pluginName: 'realtime'
}
export const RealtimePlugin: RealtimePluginType
export default class CozyRealtime {
constructor(options: {
client: CozyClient
sharedDriveId?: string
background?: boolean
})
subscribe(
event: string,
doctype: string,
handler: (doc: CozyDoc) => void
): void
stop(): void
}
}