From f931f128622c622748200ded075704e88fd2659d Mon Sep 17 00:00:00 2001 From: Robin Jespersen Date: Wed, 13 Dec 2017 21:42:43 +0100 Subject: [PATCH] Added missing definitions --- couchbase.d.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/couchbase.d.ts b/couchbase.d.ts index b26a734..ca9b1e1 100644 --- a/couchbase.d.ts +++ b/couchbase.d.ts @@ -1,5 +1,5 @@ declare module "nativescript-couchbase" { - + export class Couchbase { constructor(databaseName: string); createDocument(data: Object, documentId?: string); @@ -9,9 +9,24 @@ declare module "nativescript-couchbase" { destroyDatabase(); createView(viewName: string, viewRevision: string, callback: any); executeQuery(viewName: string, options?: any); - createPullReplication(remoteUrl: string); - createPushReplication(remoteUrl: string); + createPullReplication(remoteUrl: string):Replicator; + createPushReplication(remoteUrl: string):Replicator; addDatabaseChangeListener(callback: any); } + export class Replicator { + constructor(replicator: any); + start(); + stop(); + isRunning():boolean; + setContinuous(isContinuous: boolean); + setCookie(name: String, value: String, path: String, expirationDate: Date, secure: boolean, httpOnly: boolean); + deleteCookie(name: String); + } + + export class Emitter { + constructor(emitter: any); + emit(key: Object, value: Object); + } + }