cbl-ionic 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CblIonic.podspec +18 -0
- package/LICENSE +201 -0
- package/README.md +19 -0
- package/android/build.gradle +69 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/cbl/js/kotiln/CollectionConfigDto.kt +5 -0
- package/android/src/main/java/cbl/js/kotiln/CollectionDocumentResult.kt +7 -0
- package/android/src/main/java/cbl/js/kotiln/CollectionDto.kt +9 -0
- package/android/src/main/java/cbl/js/kotiln/CollectionManager.kt +232 -0
- package/android/src/main/java/cbl/js/kotiln/ConfigDto.kt +5 -0
- package/android/src/main/java/cbl/js/kotiln/DatabaseManager.kt +183 -0
- package/android/src/main/java/cbl/js/kotiln/DocumentDto.kt +6 -0
- package/android/src/main/java/cbl/js/kotiln/FileSystemHelper.kt +18 -0
- package/android/src/main/java/cbl/js/kotiln/LoggingManager.kt +30 -0
- package/android/src/main/java/cbl/js/kotiln/ReplicatorManager.kt +123 -0
- package/android/src/main/java/cbl/js/kotiln/ScopeDto.kt +6 -0
- package/android/src/main/java/com/couchbase/ionic/CblIonicPluginPlugin.kt +1832 -0
- package/android/src/main/java/com/couchbase/ionic/IndexDto.kt +12 -0
- package/android/src/main/java/com/couchbase/ionic/IndexHelper.kt +30 -0
- package/android/src/main/java/com/couchbase/ionic/PluginHelper.kt +283 -0
- package/android/src/main/java/com/couchbase/ionic/QueryHelper.kt +62 -0
- package/android/src/main/java/com/couchbase/ionic/ReplicatorHelper.kt +174 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/esm/cblite-js/cblite/core-types.d.ts +634 -0
- package/dist/esm/cblite-js/cblite/core-types.js +2 -0
- package/dist/esm/cblite-js/cblite/core-types.js.map +1 -0
- package/dist/esm/cblite-js/cblite/index.d.ts +2 -0
- package/dist/esm/cblite-js/cblite/index.js +4 -0
- package/dist/esm/cblite-js/cblite/index.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/abstract-index.d.ts +14 -0
- package/dist/esm/cblite-js/cblite/src/abstract-index.js +12 -0
- package/dist/esm/cblite-js/cblite/src/abstract-index.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/authenticator.d.ts +6 -0
- package/dist/esm/cblite-js/cblite/src/authenticator.js +3 -0
- package/dist/esm/cblite-js/cblite/src/authenticator.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/basic-authenticator.d.ts +42 -0
- package/dist/esm/cblite-js/cblite/src/basic-authenticator.js +59 -0
- package/dist/esm/cblite-js/cblite/src/basic-authenticator.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/blob.d.ts +58 -0
- package/dist/esm/cblite-js/cblite/src/blob.js +86 -0
- package/dist/esm/cblite-js/cblite/src/blob.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/collation.d.ts +20 -0
- package/dist/esm/cblite-js/cblite/src/collation.js +64 -0
- package/dist/esm/cblite-js/cblite/src/collation.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/collection-config.d.ts +24 -0
- package/dist/esm/cblite-js/cblite/src/collection-config.js +30 -0
- package/dist/esm/cblite-js/cblite/src/collection-config.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/collection.d.ts +189 -0
- package/dist/esm/cblite-js/cblite/src/collection.js +354 -0
- package/dist/esm/cblite-js/cblite/src/collection.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/concurrency-control.d.ts +4 -0
- package/dist/esm/cblite-js/cblite/src/concurrency-control.js +8 -0
- package/dist/esm/cblite-js/cblite/src/concurrency-control.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/couchbase-lite-exception.d.ts +6 -0
- package/dist/esm/cblite-js/cblite/src/couchbase-lite-exception.js +15 -0
- package/dist/esm/cblite-js/cblite/src/couchbase-lite-exception.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/database-configuration.d.ts +52 -0
- package/dist/esm/cblite-js/cblite/src/database-configuration.js +75 -0
- package/dist/esm/cblite-js/cblite/src/database-configuration.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/database-logging.d.ts +13 -0
- package/dist/esm/cblite-js/cblite/src/database-logging.js +13 -0
- package/dist/esm/cblite-js/cblite/src/database-logging.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/database.d.ts +254 -0
- package/dist/esm/cblite-js/cblite/src/database.js +514 -0
- package/dist/esm/cblite-js/cblite/src/database.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/definitions.d.ts +7 -0
- package/dist/esm/cblite-js/cblite/src/definitions.js +2 -0
- package/dist/esm/cblite-js/cblite/src/definitions.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/document-replication.d.ts +13 -0
- package/dist/esm/cblite-js/cblite/src/document-replication.js +34 -0
- package/dist/esm/cblite-js/cblite/src/document-replication.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/document.d.ts +199 -0
- package/dist/esm/cblite-js/cblite/src/document.js +333 -0
- package/dist/esm/cblite-js/cblite/src/document.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/endpoint.d.ts +3 -0
- package/dist/esm/cblite-js/cblite/src/endpoint.js +2 -0
- package/dist/esm/cblite-js/cblite/src/endpoint.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/engine-locator.d.ts +42 -0
- package/dist/esm/cblite-js/cblite/src/engine-locator.js +50 -0
- package/dist/esm/cblite-js/cblite/src/engine-locator.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/expression.d.ts +134 -0
- package/dist/esm/cblite-js/cblite/src/expression.js +374 -0
- package/dist/esm/cblite-js/cblite/src/expression.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/file-system.d.ts +7 -0
- package/dist/esm/cblite-js/cblite/src/file-system.js +14 -0
- package/dist/esm/cblite-js/cblite/src/file-system.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/full-text-expression.d.ts +28 -0
- package/dist/esm/cblite-js/cblite/src/full-text-expression.js +38 -0
- package/dist/esm/cblite-js/cblite/src/full-text-expression.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/full-text-index.d.ts +47 -0
- package/dist/esm/cblite-js/cblite/src/full-text-index.js +77 -0
- package/dist/esm/cblite-js/cblite/src/full-text-index.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/index-builder.d.ts +20 -0
- package/dist/esm/cblite-js/cblite/src/index-builder.js +25 -0
- package/dist/esm/cblite-js/cblite/src/index-builder.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/index.d.ts +42 -0
- package/dist/esm/cblite-js/cblite/src/index.js +43 -0
- package/dist/esm/cblite-js/cblite/src/index.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/meta-expression.d.ts +10 -0
- package/dist/esm/cblite-js/cblite/src/meta-expression.js +30 -0
- package/dist/esm/cblite-js/cblite/src/meta-expression.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/meta.d.ts +7 -0
- package/dist/esm/cblite-js/cblite/src/meta.js +8 -0
- package/dist/esm/cblite-js/cblite/src/meta.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/mutable-document.d.ts +373 -0
- package/dist/esm/cblite-js/cblite/src/mutable-document.js +481 -0
- package/dist/esm/cblite-js/cblite/src/mutable-document.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/ordering.d.ts +14 -0
- package/dist/esm/cblite-js/cblite/src/ordering.js +31 -0
- package/dist/esm/cblite-js/cblite/src/ordering.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/parameter.d.ts +18 -0
- package/dist/esm/cblite-js/cblite/src/parameter.js +38 -0
- package/dist/esm/cblite-js/cblite/src/parameter.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/parameters.d.ts +17 -0
- package/dist/esm/cblite-js/cblite/src/parameters.js +61 -0
- package/dist/esm/cblite-js/cblite/src/parameters.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/query.d.ts +83 -0
- package/dist/esm/cblite-js/cblite/src/query.js +146 -0
- package/dist/esm/cblite-js/cblite/src/query.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/replicated-document.d.ts +25 -0
- package/dist/esm/cblite-js/cblite/src/replicated-document.js +51 -0
- package/dist/esm/cblite-js/cblite/src/replicated-document.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/replicator-activity-level.d.ts +7 -0
- package/dist/esm/cblite-js/cblite/src/replicator-activity-level.js +14 -0
- package/dist/esm/cblite-js/cblite/src/replicator-activity-level.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/replicator-change.d.ts +14 -0
- package/dist/esm/cblite-js/cblite/src/replicator-change.js +14 -0
- package/dist/esm/cblite-js/cblite/src/replicator-change.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/replicator-configuration.d.ts +341 -0
- package/dist/esm/cblite-js/cblite/src/replicator-configuration.js +516 -0
- package/dist/esm/cblite-js/cblite/src/replicator-configuration.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/replicator-progress.d.ts +9 -0
- package/dist/esm/cblite-js/cblite/src/replicator-progress.js +20 -0
- package/dist/esm/cblite-js/cblite/src/replicator-progress.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/replicator-status.d.ts +13 -0
- package/dist/esm/cblite-js/cblite/src/replicator-status.js +29 -0
- package/dist/esm/cblite-js/cblite/src/replicator-status.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/replicator.d.ts +108 -0
- package/dist/esm/cblite-js/cblite/src/replicator.js +224 -0
- package/dist/esm/cblite-js/cblite/src/replicator.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/result.d.ts +4 -0
- package/dist/esm/cblite-js/cblite/src/result.js +2 -0
- package/dist/esm/cblite-js/cblite/src/result.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/scope.d.ts +31 -0
- package/dist/esm/cblite-js/cblite/src/scope.js +34 -0
- package/dist/esm/cblite-js/cblite/src/scope.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/session-authenticator.d.ts +32 -0
- package/dist/esm/cblite-js/cblite/src/session-authenticator.js +52 -0
- package/dist/esm/cblite-js/cblite/src/session-authenticator.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/url-endpoint.d.ts +8 -0
- package/dist/esm/cblite-js/cblite/src/url-endpoint.js +12 -0
- package/dist/esm/cblite-js/cblite/src/url-endpoint.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/value-index.d.ts +32 -0
- package/dist/esm/cblite-js/cblite/src/value-index.js +54 -0
- package/dist/esm/cblite-js/cblite/src/value-index.js.map +1 -0
- package/dist/esm/cblite-js/cblite/src/variable-expression.d.ts +7 -0
- package/dist/esm/cblite-js/cblite/src/variable-expression.js +15 -0
- package/dist/esm/cblite-js/cblite/src/variable-expression.js.map +1 -0
- package/dist/esm/couchbase-lite/capacitor-engine.d.ts +124 -0
- package/dist/esm/couchbase-lite/capacitor-engine.js +303 -0
- package/dist/esm/couchbase-lite/capacitor-engine.js.map +1 -0
- package/dist/esm/definitions.d.ts +12 -0
- package/dist/esm/definitions.js +4 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/ionic-couchbase-lite.d.ts +3 -0
- package/dist/esm/ionic-couchbase-lite.js +4 -0
- package/dist/esm/ionic-couchbase-lite.js.map +1 -0
- package/dist/plugin.cjs.js +4400 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +4403 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/CblIonicPlugin.swift +1583 -0
- package/ios/Plugin/CblIonicPluginPlugin.h +10 -0
- package/ios/Plugin/CblIonicPluginPlugin.m +86 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/cbl-js-swift/CollectionManager.swift +489 -0
- package/ios/Plugin/cbl-js-swift/DatabaseManager.swift +319 -0
- package/ios/Plugin/cbl-js-swift/FileSystemHelper.swift +22 -0
- package/ios/Plugin/cbl-js-swift/IndexHelper.swift +36 -0
- package/ios/Plugin/cbl-js-swift/LICENSE +201 -0
- package/ios/Plugin/cbl-js-swift/LoggingManager.swift +79 -0
- package/ios/Plugin/cbl-js-swift/MapHelper.swift +92 -0
- package/ios/Plugin/cbl-js-swift/QueryHelper.swift +74 -0
- package/ios/Plugin/cbl-js-swift/README.md +9 -0
- package/ios/Plugin/cbl-js-swift/ReplicatorHelper.swift +184 -0
- package/ios/Plugin/cbl-js-swift/ReplicatorManager.swift +157 -0
- package/package.json +86 -0
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
import { Authenticator } from './authenticator';
|
|
2
|
+
import { Collection } from './collection';
|
|
3
|
+
import { CollectionConfig } from './collection-config';
|
|
4
|
+
import { Endpoint } from './endpoint';
|
|
5
|
+
export declare enum ReplicatorType {
|
|
6
|
+
PUSH_AND_PULL = "PUSH_AND_PULL",
|
|
7
|
+
PUSH = "PUSH",
|
|
8
|
+
PULL = "PULL"
|
|
9
|
+
}
|
|
10
|
+
export declare class ReplicatorConfiguration {
|
|
11
|
+
private target;
|
|
12
|
+
static readonly ReplicatorType: typeof ReplicatorType;
|
|
13
|
+
static CBLReplicatorOptionCookies: string;
|
|
14
|
+
static CBLReplicatorAuthOption: string;
|
|
15
|
+
static CBLReplicatorAuthType: string;
|
|
16
|
+
static CBLReplicatorAuthUserName: string;
|
|
17
|
+
static CBLReplicatorAuthPassword: string;
|
|
18
|
+
static CBLReplicatorAuthClientCert: string;
|
|
19
|
+
static CBLAuthTypeBasic: string;
|
|
20
|
+
static CBLAuthTypeSession: string;
|
|
21
|
+
static CBLAuthTypeOpenIDConnect: string;
|
|
22
|
+
static CBLAuthTypeClientCert: string;
|
|
23
|
+
private continuous;
|
|
24
|
+
private replicatorType;
|
|
25
|
+
private authenticator;
|
|
26
|
+
private pinnedServerCertificate;
|
|
27
|
+
private headers;
|
|
28
|
+
private heartbeat;
|
|
29
|
+
private maxAttempts;
|
|
30
|
+
private maxAttemptWaitTime;
|
|
31
|
+
private allowReplicatingInBackground;
|
|
32
|
+
private acceptOnlySelfSignedCerts;
|
|
33
|
+
private autoPurgeEnabled;
|
|
34
|
+
private acceptParentDomainCookies;
|
|
35
|
+
private readonly collections;
|
|
36
|
+
static defaultContinuous: boolean;
|
|
37
|
+
static defaultEnableAutoPurge: boolean;
|
|
38
|
+
static defaultSelfSignedCertificateOnly: boolean;
|
|
39
|
+
static defaultAcceptParentDomainCookies: boolean;
|
|
40
|
+
static defaultAllowReplicatingInBackground: boolean;
|
|
41
|
+
static defaultHeartbeat: number;
|
|
42
|
+
static defaultMaxAttemptsSingleShot: number;
|
|
43
|
+
static defaultMaxAttemptsWaitTime: number;
|
|
44
|
+
constructor(target: Endpoint);
|
|
45
|
+
/**
|
|
46
|
+
* Add a collection used for the replication with an optional collection configuration. If the collection has
|
|
47
|
+
* been added before, the previous added and its configuration if specified will be replaced. If the config is omitted or a null or undefined configuration is specified, a default empty configuration will be applied.
|
|
48
|
+
*
|
|
49
|
+
* @function
|
|
50
|
+
*/
|
|
51
|
+
addCollection(collection: Collection): void;
|
|
52
|
+
/**
|
|
53
|
+
* Add multiple collections used for the replication with an optional shared collection configuration.
|
|
54
|
+
* If any of the collections have been added before, the previously added collections and their
|
|
55
|
+
* configuration if specified will be replaced. Adding an empty collection array will be no-ops. if
|
|
56
|
+
* specified will be replaced. If a null or undefined configuration is specified, a default empty configuration will be
|
|
57
|
+
* applied.
|
|
58
|
+
*
|
|
59
|
+
* @function
|
|
60
|
+
*/
|
|
61
|
+
addCollections(collections: Collection[], config?: CollectionConfig | null | undefined): void;
|
|
62
|
+
/**
|
|
63
|
+
* returns the setting used to specify the replicator to accept any and only self-signed certs. Any non-self-signed
|
|
64
|
+
* certs will be rejected to avoid accidentally using this mode with the non-self-signed certs in production.
|
|
65
|
+
*
|
|
66
|
+
* @function
|
|
67
|
+
*/
|
|
68
|
+
getAcceptOnlySelfSignedCerts(): boolean;
|
|
69
|
+
/**
|
|
70
|
+
* returns the setting used as the option to remove the restriction that does not allow the replicator to save the
|
|
71
|
+
* parent-domain cookies, the cookies whose domains are the parent domain of the remote host, from the HTTP
|
|
72
|
+
* response. For example, when the option is set to true, the cookies whose domain are “.foo.com”
|
|
73
|
+
* returned by “bar.foo.com” host will be permitted to save.
|
|
74
|
+
*
|
|
75
|
+
* This option is disabled by default which means that the parent-domain cookies are not permitted to save by default.
|
|
76
|
+
*
|
|
77
|
+
* @function
|
|
78
|
+
*/
|
|
79
|
+
getAcceptParentDomainCookies(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* returns the setting which is used to allow the replicator to continue replicating in the background.
|
|
82
|
+
* The default value is false, which means that the replicator will suspend itself when the
|
|
83
|
+
* replicator detects that the application is running in the background.
|
|
84
|
+
*
|
|
85
|
+
* If setting the value to true, the developer MUST ensure that the application requests
|
|
86
|
+
* for extending the background task properly in the configuration. See your platforms documentation
|
|
87
|
+
* more information.
|
|
88
|
+
*
|
|
89
|
+
* @function
|
|
90
|
+
*/
|
|
91
|
+
getAllowReplicatingInBackground(): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* return the auto purge feature setting
|
|
94
|
+
*
|
|
95
|
+
* The default value is true which means that the document will be automatically purged by the
|
|
96
|
+
* pull replicator when the user loses access to the document from both removed and revoked scenarios.
|
|
97
|
+
*
|
|
98
|
+
* When the property is set to false, this behavior is disabled and access removed event
|
|
99
|
+
* will be sent to any document listeners that are active on the replicator. For performance
|
|
100
|
+
* reasons, the document listeners must be added **before** the replicator is started, or
|
|
101
|
+
* they will not receive the events.
|
|
102
|
+
*
|
|
103
|
+
* Note: Auto purge will not be performed when documentIDs filter is specified.
|
|
104
|
+
*
|
|
105
|
+
* @function
|
|
106
|
+
*/
|
|
107
|
+
getAutoPurgeEnabled(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* returns the Authenticator to authenticate with a remote target.
|
|
110
|
+
*
|
|
111
|
+
* @function
|
|
112
|
+
*/
|
|
113
|
+
getAuthenticator(): Authenticator;
|
|
114
|
+
/**
|
|
115
|
+
* returns collections used for the replication.
|
|
116
|
+
*
|
|
117
|
+
* @function
|
|
118
|
+
*/
|
|
119
|
+
getCollections(): Collection[];
|
|
120
|
+
/**
|
|
121
|
+
* returns a copy of the collection’s config. If the config needs to be changed for the collection, the
|
|
122
|
+
* collection will need to be re-added with the updated config.
|
|
123
|
+
*
|
|
124
|
+
* @function
|
|
125
|
+
*/
|
|
126
|
+
getCollectionConfig(collection: Collection): CollectionConfig | null;
|
|
127
|
+
/**
|
|
128
|
+
* returns the continuous flag indicating whether the replicator should stay
|
|
129
|
+
* active indefinitely to replicate changed documents.
|
|
130
|
+
*
|
|
131
|
+
* @function
|
|
132
|
+
*/
|
|
133
|
+
getContinuous(): boolean;
|
|
134
|
+
/**
|
|
135
|
+
* returns extra HTTP headers to send in all requests to the remote target.
|
|
136
|
+
*
|
|
137
|
+
* @function
|
|
138
|
+
*/
|
|
139
|
+
getHeaders(): {
|
|
140
|
+
[name: string]: string;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* returns the heartbeat interval in second.
|
|
144
|
+
*
|
|
145
|
+
* The interval when the replicator sends the ping message to check whether the other peer is
|
|
146
|
+
* still alive. Default heartbeat is ``ReplicatorConfiguration.defaultHeartbeat`` secs.
|
|
147
|
+
*
|
|
148
|
+
* Note: Setting the heartbeat to negative value will result in an Exception
|
|
149
|
+
* being thrown. For backward compatibility, setting it to zero will result in
|
|
150
|
+
* default 300 secs internally.
|
|
151
|
+
*
|
|
152
|
+
* @function
|
|
153
|
+
*/
|
|
154
|
+
getHeartbeat(): number;
|
|
155
|
+
/**
|
|
156
|
+
* returns the maximum attempts to perform retry. The retry attempt will be reset when the replicator is
|
|
157
|
+
* able to connect and replicate with the remote server again.
|
|
158
|
+
*
|
|
159
|
+
* Default _maxAttempts_ is ``ReplicatorConfiguration.defaultMaxAttemptsSingleShot`` times
|
|
160
|
+
* for single shot replicators and ``ReplicatorConfiguration.defaultMaxAttemptsContinuous`` times
|
|
161
|
+
* for continuous replicators.
|
|
162
|
+
*
|
|
163
|
+
* Settings the value to 1, will perform an initial request and if there is a transient error
|
|
164
|
+
* occurs, will stop without retry.
|
|
165
|
+
*
|
|
166
|
+
* Note: For backward compatibility, setting it to zero will result in default 10 internally.
|
|
167
|
+
*
|
|
168
|
+
* @function
|
|
169
|
+
*/
|
|
170
|
+
getMaxAttempts(): number;
|
|
171
|
+
/**
|
|
172
|
+
* returns the max wait time for the next attempt(retry) in seconds.
|
|
173
|
+
*
|
|
174
|
+
* The exponential backoff for calculating the wait time will be used by default and cannot be
|
|
175
|
+
* customized. Default max attempts is `ReplicatorConfiguration.defaultMaxAttemptsWaitTime` secs.
|
|
176
|
+
*
|
|
177
|
+
* Set the maxAttemptWaitTime to negative value will result in an Exception
|
|
178
|
+
* being thrown.
|
|
179
|
+
*
|
|
180
|
+
* Note: For backward compatibility, setting it to zero will result in default secs internally.
|
|
181
|
+
*
|
|
182
|
+
* @function
|
|
183
|
+
*/
|
|
184
|
+
getMaxAttemptWaitTime(): number;
|
|
185
|
+
/**
|
|
186
|
+
* returns the string value of the remote target's SSL certificate that was previously set in the configuration.
|
|
187
|
+
*
|
|
188
|
+
* Note: The pinned cert will be evaluated against any certs in a cert chain,
|
|
189
|
+
* and the cert chain will be valid only if the cert chain contains the pinned cert.
|
|
190
|
+
*
|
|
191
|
+
* @function
|
|
192
|
+
*/
|
|
193
|
+
getPinnedServerCertificate(): string;
|
|
194
|
+
/**
|
|
195
|
+
* returns the replicator type indicating the direction of the replicator.
|
|
196
|
+
*
|
|
197
|
+
* @function
|
|
198
|
+
*/
|
|
199
|
+
getReplicatorType(): ReplicatorType;
|
|
200
|
+
/**
|
|
201
|
+
* Remove a group of collections from the configuration. If the collection doesn’t exist, this operation will be no ops.
|
|
202
|
+
*
|
|
203
|
+
* @function
|
|
204
|
+
*/
|
|
205
|
+
removeCollections(collections: Collection[]): void;
|
|
206
|
+
/**
|
|
207
|
+
* Remove the collection. If the collection doesn’t exist, this operation will be no ops.
|
|
208
|
+
*
|
|
209
|
+
* @function
|
|
210
|
+
*/
|
|
211
|
+
removeCollection(collection: Collection): void;
|
|
212
|
+
/**
|
|
213
|
+
* Specify the replicator to accept any and only self-signed certs. Any non-self-signed certs will be rejected
|
|
214
|
+
* to avoid accidentally using this mode with the non-self-signed certs in production.
|
|
215
|
+
* Default value is ``ReplicatorConfiguration.defaultSelfSignedCertificateOnly``
|
|
216
|
+
*
|
|
217
|
+
* @function
|
|
218
|
+
*/
|
|
219
|
+
setAcceptOnlySelfSignedCerts(selfSignedCerts: boolean): void;
|
|
220
|
+
/**
|
|
221
|
+
* The option to remove the restriction that does not allow the replicator to save the parent-domain
|
|
222
|
+
* cookies, the cookies whose domains are the parent domain of the remote host, from the HTTP
|
|
223
|
+
* response. For example, when the option is set to true, the cookies whose domain are “.foo.com”
|
|
224
|
+
* returned by “bar.foo.com” host will be permitted to save.
|
|
225
|
+
*
|
|
226
|
+
* This option is disabled by default (See ``ReplicatorConfiguration.defaultAcceptParentCookies``)
|
|
227
|
+
* which means that the parent-domain cookies are not permitted to save by default.
|
|
228
|
+
*
|
|
229
|
+
* @function
|
|
230
|
+
*/
|
|
231
|
+
setAcceptParentDomainCookies(acceptParentDomainCookies: boolean): void;
|
|
232
|
+
/**
|
|
233
|
+
* Allows the replicator to continue replicating in the background. The default
|
|
234
|
+
* value is false, which means that the replicator will suspend itself when the
|
|
235
|
+
* replicator detects that the application is running in the background.
|
|
236
|
+
*
|
|
237
|
+
* If setting the value to true, the developer MUST ensure that the application requests
|
|
238
|
+
* for extending the background task properly in the configuration. See your platforms documentation
|
|
239
|
+
* more information.
|
|
240
|
+
*
|
|
241
|
+
* @function
|
|
242
|
+
*/
|
|
243
|
+
setAllowReplicatingInBackground(allowReplicatingInBackground: boolean): void;
|
|
244
|
+
/**
|
|
245
|
+
* To enable/disable the auto purge feature
|
|
246
|
+
*
|
|
247
|
+
* The default value is true which means that the document will be automatically purged by the
|
|
248
|
+
* pull replicator when the user loses access to the document from both removed and revoked scenarios.
|
|
249
|
+
*
|
|
250
|
+
* When the property is set to false, this behavior is disabled and access removed event
|
|
251
|
+
* will be sent to any document listeners that are active on the replicator. For performance
|
|
252
|
+
* reasons, the document listeners must be added **before** the replicator is started, or
|
|
253
|
+
* they will not receive the events.
|
|
254
|
+
*
|
|
255
|
+
* Note: Auto purge will not be performed when documentIDs filter is specified.
|
|
256
|
+
*
|
|
257
|
+
* @function
|
|
258
|
+
*/
|
|
259
|
+
setAutoPurgeEnabled(autoPurgeEnabled: boolean): void;
|
|
260
|
+
/**
|
|
261
|
+
* The Authenticator to authenticate with a remote target.
|
|
262
|
+
*
|
|
263
|
+
* @function
|
|
264
|
+
*/
|
|
265
|
+
setAuthenticator(authenticator: Authenticator): void;
|
|
266
|
+
/**
|
|
267
|
+
* The continuous flag indicating whether the replicator should stay
|
|
268
|
+
* active indefinitely to replicate changed documents.
|
|
269
|
+
*
|
|
270
|
+
* @function
|
|
271
|
+
*/
|
|
272
|
+
setContinuous(continuous: boolean): void;
|
|
273
|
+
/**
|
|
274
|
+
* Extra HTTP headers to send in all requests to the remote target.
|
|
275
|
+
*
|
|
276
|
+
* @function
|
|
277
|
+
*/
|
|
278
|
+
setHeaders(headers: {
|
|
279
|
+
[name: string]: string;
|
|
280
|
+
}): void;
|
|
281
|
+
/**
|
|
282
|
+
* The heartbeat interval in second.
|
|
283
|
+
*
|
|
284
|
+
* The interval when the replicator sends the ping message to check whether the other peer is
|
|
285
|
+
* still alive. Default heartbeat is ``ReplicatorConfiguration.defaultHeartbeat`` secs.
|
|
286
|
+
*
|
|
287
|
+
* Note: Setting the heartbeat to negative value will result in an Exception
|
|
288
|
+
* being thrown. For backward compatibility, setting it to zero will result in
|
|
289
|
+
* default 300 secs internally.
|
|
290
|
+
*
|
|
291
|
+
* @function
|
|
292
|
+
*/
|
|
293
|
+
setHeartbeat(heartbeat: number): void;
|
|
294
|
+
/**
|
|
295
|
+
* The maximum attempts to perform retry. The retry attempt will be reset when the replicator is
|
|
296
|
+
* able to connect and replicate with the remote server again.
|
|
297
|
+
*
|
|
298
|
+
* Default _maxAttempts_ is ``ReplicatorConfiguration.defaultMaxAttemptsSingleShot`` times
|
|
299
|
+
* for single shot replicators and ``ReplicatorConfiguration.defaultMaxAttemptsContinuous`` times
|
|
300
|
+
* for continuous replicators.
|
|
301
|
+
*
|
|
302
|
+
* Settings the value to 1, will perform an initial request and if there is a transient error
|
|
303
|
+
* occurs, will stop without retry.
|
|
304
|
+
*
|
|
305
|
+
* Note: For backward compatibility, setting it to zero will result in default 10 internally.
|
|
306
|
+
*
|
|
307
|
+
* @function
|
|
308
|
+
*/
|
|
309
|
+
setMaxAttempts(maxAttempts: number): void;
|
|
310
|
+
/**
|
|
311
|
+
* Max wait time for the next attempt(retry) in seconds.
|
|
312
|
+
*
|
|
313
|
+
* The exponential backoff for calculating the wait time will be used by default and cannot be
|
|
314
|
+
* customized. Default max attempts is `ReplicatorConfiguration.defaultMaxAttemptsWaitTime` secs.
|
|
315
|
+
*
|
|
316
|
+
* Set the maxAttemptWaitTime to negative value will result in an Exception
|
|
317
|
+
* being thrown.
|
|
318
|
+
*
|
|
319
|
+
* Note: For backward compatibility, setting it to zero will result in default secs internally.
|
|
320
|
+
*
|
|
321
|
+
* @function
|
|
322
|
+
*/
|
|
323
|
+
setMaxAttemptWaitTime(maxAttemptWaitTime: number): void;
|
|
324
|
+
/**
|
|
325
|
+
* The remote target's SSL certificate.
|
|
326
|
+
*
|
|
327
|
+
* Note: The pinned cert will be evaluated against any certs in a cert chain,
|
|
328
|
+
* and the cert chain will be valid only if the cert chain contains the pinned cert.
|
|
329
|
+
*
|
|
330
|
+
* @function
|
|
331
|
+
*/
|
|
332
|
+
setPinnedServerCertificate(pinnedServerCertificate: string): void;
|
|
333
|
+
/**
|
|
334
|
+
* Replicator type indicating the direction of the replicator.
|
|
335
|
+
*
|
|
336
|
+
* @function
|
|
337
|
+
*/
|
|
338
|
+
setReplicatorType(replicatorType: ReplicatorType): void;
|
|
339
|
+
toJson(): any;
|
|
340
|
+
private checkCollectionsScopeAndDatabase;
|
|
341
|
+
}
|