Allows to send requests to a Convertigo Server (or Studio), these requests are called c8o calls.
C8o calls are done thanks to a HTTP request or a CouchbaseLite usage.
An instance of C8o is connected to only one Convertigo and can't change it.
To use it, you have to first initialize the C8o instance with the Convertigo endpoint, then use call methods with Convertigo variables as parameter.
- _authenticationCookieValue
- _automaticRemoveSplashsCreen
- _clientCertificateBinaries
- _clientCertificateFiles
- _cookies
- _couchUrl
- _defaultDatabaseName
- _disableSSL
- _endpoint
- _endpointConvertigo
- _endpointHost
- _endpointIsSecure
- _endpointPort
- _endpointProject
- _endpointSettings
- _errorConvertigoIntoFail
- _fullSyncLocalSuffix
- _fullSyncPassword
- _fullSyncServerUrl
- _fullSyncUsername
- _headers
- _http
- _initalLogLevel
- _initialLogRemote
- _keepSessionAlive
- _keyStorePassword
- _logC8o
- _logLevelLocal
- _logOnFail
- _logRemote
- _normalizeParameters
- _prefixBase
- _reply
- _resetBase
- _timeout
- _trustStorePassword
- _useEncryption
- _waitingForInit
- c8oFullSync
- c8oLogger
- data
- database
- handleFullSyncLive
- httpInterface
- lives
- livesDb
- network
- promiseConstructor
- promiseFinInit
- promiseInit
- promiseManagerNetwork
- promiseReachable
- reachable
- replicationsToRestart
- session
- subscriber_login
- subscriber_network
- subscriber_session
- xsrfUsed
- ENGINE_PARAMETER_CONNECTOR
- ENGINE_PARAMETER_DEVICE_UUID
- ENGINE_PARAMETER_ENCODED
- ENGINE_PARAMETER_FROM_LIVE
- ENGINE_PARAMETER_PROGRESS
- ENGINE_PARAMETER_PROJECT
- ENGINE_PARAMETER_SEQUENCE
- ENGINE_PARAMETER_TRANSACTION
- FS_LIVE
- FS_POLICY
- FS_POLICY_CREATE
- FS_POLICY_MERGE
- FS_POLICY_NONE
- FS_POLICY_OVERRIDE
- FS_SUBKEY_SEPARATOR
- LOCAL_CACHE_DATABASE_NAME
- LOCAL_CACHE_DOCUMENT_KEY_EXPIRATION_DATE
- LOCAL_CACHE_DOCUMENT_KEY_RESPONSE
- LOCAL_CACHE_DOCUMENT_KEY_RESPONSE_TYPE
- RESPONSE_TYPE_JSON
- RESPONSE_TYPE_XML
- RE_ENDPOINT
- RE_REQUESTABLE
- SEQ_AUTO_LOGIN_OFF
- deviceUUID
- use_merge_prefix
- authenticationCookieValue
- cookies
- coreVersion
- couchUrl
- defaultDatabaseName
- deviceUUID
- endpoint
- endpointConvertigo
- endpointHost
- endpointIsSecure
- endpointPort
- endpointProject
- errorConvertigoIntoFail
- fullSyncLocalSuffix
- fullSyncPassword
- fullSyncServerUrl
- fullSyncUsername
- headers
- httpPublic
- keepSessionAlive
- log
- logC8o
- logLevelLocal
- logOnFail
- logRemote
- normalizeParameters
- prefixBase
- resetBase
- sdkVersion
- timeout
- _call
- addFullSyncChangeListener
- addLive
- call
- callJson
- callJsonObject
- cancelLive
- copy
- extractendpoint
- finalizeInit
- get_attachment
- handleAutoLoginResponse
- handleCallException
- handleNetworkEvents
- handleSessionLost
- httpGetObservable
- importLoginState
- init
- initC8oHttInterface
- removeFullSyncChangeListener
- removeNull
- toString
- toParameters
+ new C8oCore(): C8oCore
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:337
This is the base object representing a Convertigo Server end point. This object should be instantiated when the apps starts and be accessible from any class of the app. Although this is not common , you may have several C8o objects instantiated in your app.
throws C8oException In case of invalid parameter or initialization failure.
Returns: C8oCore
• _authenticationCookieValue: string = null
Inherited from C8oBase._authenticationCookieValue
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:21
• _automaticRemoveSplashsCreen: boolean = true
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:150
• _clientCertificateBinaries: Object
Inherited from C8oBase._clientCertificateBinaries
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:10
• _clientCertificateFiles: Object
Inherited from C8oBase._clientCertificateFiles
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:9
• _cookies: Object
Inherited from C8oBase._cookies
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:8
• _couchUrl: string = null
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:178
• _defaultDatabaseName: string = null
Inherited from C8oBase._defaultDatabaseName
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:20
• _disableSSL: boolean = false
Inherited from C8oBase._disableSSL
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:29
• _endpoint: string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:144
The Convertigo endpoint, syntax: <protocol>://<host>:<port>/<Convertigo web app path>/projects/<project name> (Example: http://127.0.0.1:18080/convertigo/projects/MyProject)
• _endpointConvertigo: string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:145
• _endpointHost: string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:147
• _endpointIsSecure: boolean
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:146
• _endpointPort: string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:148
• _endpointProject: string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:149
• _endpointSettings: string
Inherited from C8oBase._endpointSettings
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:5
• _errorConvertigoIntoFail: boolean = false
Inherited from C8oBase._errorConvertigoIntoFail
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:40
• _fullSyncLocalSuffix: string = null
Inherited from C8oBase._fullSyncLocalSuffix
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:22
• _fullSyncPassword: string
Inherited from C8oBase._fullSyncPassword
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:25
• _fullSyncServerUrl: string = "http://localhost:5984"
Inherited from C8oBase._fullSyncServerUrl
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:23
• _fullSyncUsername: string
Inherited from C8oBase._fullSyncUsername
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:24
• _headers: Object
Inherited from C8oBase._headers
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:46
• _http: any
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:177
• _initalLogLevel: Boolean
Inherited from C8oBase._initalLogLevel
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:48
• _initialLogRemote: boolean = true
Inherited from C8oBase._initialLogRemote
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:14
• _keepSessionAlive: boolean = true
Inherited from C8oBase._keepSessionAlive
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:38
• _keyStorePassword: string
Inherited from C8oBase._keyStorePassword
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:31
• _logC8o: boolean = false
Inherited from C8oBase._logC8o
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:16
• _logLevelLocal: C8oLogLevel = C8oLogLevel.NONE
Inherited from C8oBase._logLevelLocal
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:15
• _logOnFail: function
Inherited from C8oBase._logOnFail
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:17
▸ (exception: Error, parameters: Object): void
Parameters:
| Name | Type |
|---|---|
exception |
Error |
parameters |
Object |
• _logRemote: boolean = true
Inherited from C8oBase._logRemote
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:13
• _normalizeParameters: boolean
Inherited from C8oBase._normalizeParameters
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:36
• _prefixBase: boolean = false
Inherited from C8oBase._prefixBase
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:44
• _reply: Subject‹any› = new Subject()
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:174
• _resetBase: boolean = true
Inherited from C8oBase._resetBase
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:42
• _timeout: number = -1
Inherited from C8oBase._timeout
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:6
• _trustStorePassword: string
Inherited from C8oBase._trustStorePassword
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:33
• _useEncryption: boolean = false
Inherited from C8oBase._useEncryption
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:28
• _waitingForInit: any
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:185
• c8oFullSync: C8oFullSync
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:165
Used to run fullSync requests.
• c8oLogger: C8oLogger
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:160
Allows to log locally and remotely to the Convertigo server.
• data: any
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:176
• database: C8oManagerDatabase
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:189
• handleFullSyncLive: C8oFullSyncChangeListener = new C8oFullSyncChangeListener( (changes: Object) => { for (const task in this.lives) { (this.lives[task] as C8oCallTask).executeFromLive(); } })
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:652
• httpInterface: C8oHttpInterfaceCore
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:155
Used to run HTTP requests.
• lives: C8oCallTask[] = []
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:167
• livesDb: string[] = []
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:168
• network: C8oManagerNetwork
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:188
• promiseConstructor: Promise‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:179
• promiseFinInit: Promise‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:181
• promiseInit: Promise‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:180
• promiseManagerNetwork: Promise‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:183
• promiseReachable: Promise‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:182
• reachable: any
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:186
• replicationsToRestart: Array‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:184
• session: C8oManagerSession
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:190
• subscriber_login: Subject‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:172
• subscriber_network: Subject‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:171
• subscriber_session: Subject‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:170
• xsrfUsed: boolean = false
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:337
▪ ENGINE_PARAMETER_CONNECTOR: string = "__connector"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:57
▪ ENGINE_PARAMETER_DEVICE_UUID: string = "__uuid"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:60
▪ ENGINE_PARAMETER_ENCODED: string = "__encoded"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:59
▪ ENGINE_PARAMETER_FROM_LIVE: string = "__fromLive"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:62
▪ ENGINE_PARAMETER_PROGRESS: string = "__progress"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:61
▪ ENGINE_PARAMETER_PROJECT: string = "__project"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:55
Engine reserved parameters
▪ ENGINE_PARAMETER_SEQUENCE: string = "__sequence"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:56
▪ ENGINE_PARAMETER_TRANSACTION: string = "__transaction"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:58
▪ FS_LIVE: string = "__live"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:123
Use it with "fs://" request as parameter to enable the live request feature.
Must be followed by a string parameter, the 'liveid' that can be use to cancel the live
request using c8o.cancelLive(liveid) method.
A live request automatically recall the then or thenUI handler when the database changed.
▪ FS_POLICY: string = "_use_policy"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:79
Constant to use as a parameter for a Call of "fs://.post" and must be followed by a FS_POLICY_* constant.
{@code
c8o.callJson("fs://.post",
C8o.FS_POLICY, C8o.FS_POLICY_MERGE,
"docid", myid,
"mykey", myvalue
).sync();
}
▪ FS_POLICY_CREATE: string = "create"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:91
Use it with "fs://.post" and C8o.FS_POLICY.
This post policy remove the "_id" and "_rev" of the document before the CouchbaseLite's insertion.
▪ FS_POLICY_MERGE: string = "merge"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:103
Use it with "fs://.post" and C8o.FS_POLICY.
This post policy merge the document with an existing document with the same "_id" before the CouchbaseLite's insertion.
▪ FS_POLICY_NONE: string = "none"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:85
Use it with "fs://.post" and C8o.FS_POLICY.
This is the default post policy that don't alter the document before the CouchbaseLite's insertion.
▪ FS_POLICY_OVERRIDE: string = "override"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:97
Use it with "fs://.post" and C8o.FS_POLICY.
This post policy inserts the document in CouchbaseLite even if a document with the same "_id" already exists.
▪ FS_SUBKEY_SEPARATOR: string = "_use_subkey_separator"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:109
Use it with "fs://.post". Default value is ".".
This key allow to override the sub key separator in case of document depth modification.
▪ LOCAL_CACHE_DATABASE_NAME: string = "c8olocalcache"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:130
▪ LOCAL_CACHE_DOCUMENT_KEY_EXPIRATION_DATE: string = "expirationDate"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:128
▪ LOCAL_CACHE_DOCUMENT_KEY_RESPONSE: string = "response"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:126
Local cache keys
▪ LOCAL_CACHE_DOCUMENT_KEY_RESPONSE_TYPE: string = "responseType"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:127
▪ RESPONSE_TYPE_JSON: string = "json"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:134
▪ RESPONSE_TYPE_XML: string = "pxml"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:133
Response type
▪ RE_ENDPOINT: RegExp = /^(https?://([^:/]+)(:[0-9]+)?/?.*?)/projects/([^\/]+)$/
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:50
The regex used to get the part of the endpoint before '/projects/...'
▪ RE_REQUESTABLE: RegExp = /^([^.]*).(?:([^.]+)|(?:([^.]+).([^.]+)))$/
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:45
The regex used to handle the c8o requestable syntax ("<project>.<sequence>" or "<project>.<connector>.<transaction>")
▪ SEQ_AUTO_LOGIN_OFF: string = "__disableAutologin"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:115
Use it with "project.sequence". Default value is ".".
This key allow to disable autologin feature for a given callJson
▪ deviceUUID: string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:137
▪ use_merge_prefix: string = "_use_merge"
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:68
FULLSYNC parameters
• get authenticationCookieValue(): string
Inherited from C8oBase.authenticationCookieValue
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:149
Returns: string
• get cookies(): Object
Inherited from C8oBase.cookies
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:119
Gets initial cookies to send to the Convertigo server.
Default is null.
Returns: Object
List of cookies.
• get coreVersion(): string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:333
Returns: string
• get couchUrl(): string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:192
Returns: string
• set couchUrl(value: string): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:196
Parameters:
| Name | Type |
|---|---|
value |
string |
Returns: void
• get defaultDatabaseName(): string
Inherited from C8oBase.defaultDatabaseName
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:145
Returns: string
• get deviceUUID(): Promise‹string›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:284
Returns: Promise‹string›
• get endpoint(): string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:233
Returns: string
• set endpoint(value: string): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:237
Parameters:
| Name | Type |
|---|---|
value |
string |
Returns: void
• get endpointConvertigo(): string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:241
Returns: string
• set endpointConvertigo(value: string): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:245
Parameters:
| Name | Type |
|---|---|
value |
string |
Returns: void
• get endpointHost(): string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:259
Returns: string
• set endpointHost(value: string): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:263
Parameters:
| Name | Type |
|---|---|
value |
string |
Returns: void
• get endpointIsSecure(): boolean
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:250
Returns: boolean
• set endpointIsSecure(value: boolean): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:254
Parameters:
| Name | Type |
|---|---|
value |
boolean |
Returns: void
• get endpointPort(): string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:268
Returns: string
• set endpointPort(value: string): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:272
Parameters:
| Name | Type |
|---|---|
value |
string |
Returns: void
• get endpointProject(): string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:276
Returns: string
• set endpointProject(value: string): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:280
Parameters:
| Name | Type |
|---|---|
value |
string |
Returns: void
• get errorConvertigoIntoFail(): boolean
Inherited from C8oBase.errorConvertigoIntoFail
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:73
Gets if error convertigo are thrown into fail.
Default is false.
Returns: boolean
The errorConvertigoIntoFail status.
• get fullSyncLocalSuffix(): string
Inherited from C8oBase.fullSyncLocalSuffix
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:153
Returns: string
• get fullSyncPassword(): string
Inherited from C8oBase.fullSyncPassword
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:168
Returns: string
• get fullSyncServerUrl(): string
Inherited from C8oBase.fullSyncServerUrl
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:158
Returns: string
• get fullSyncUsername(): string
Inherited from C8oBase.fullSyncUsername
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:163
Returns: string
• get headers(): Object
Inherited from C8oBase.headers
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:184
Returns: Object
• get httpPublic(): any
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:309
Returns: any
• get keepSessionAlive(): boolean
Inherited from C8oBase.keepSessionAlive
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:64
Gets if session has to be keep alive.
Default is true.
Returns: boolean
The KeepSessionAlive status.
• get log(): C8oLogger
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:225
Returns: C8oLogger
• get logC8o(): boolean
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:200
Returns: boolean
• set logC8o(value: boolean): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:204
Parameters:
| Name | Type |
|---|---|
value |
boolean |
Returns: void
• get logLevelLocal(): C8oLogLevel
Overrides C8oBase.logLevelLocal
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:217
Returns: C8oLogLevel
• set logLevelLocal(value: C8oLogLevel): void
Overrides C8oBase.logLevelLocal
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:221
Parameters:
| Name | Type |
|---|---|
value |
C8oLogLevel |
Returns: void
• get logOnFail(): function
Inherited from C8oBase.logOnFail
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:172
Returns: function
▸ (exception: Error, parameters: Object): void
Parameters:
| Name | Type |
|---|---|
exception |
Error |
parameters |
Object |
• get logRemote(): boolean
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:208
Returns: boolean
• set logRemote(value: boolean): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:212
Parameters:
| Name | Type |
|---|---|
value |
boolean |
Returns: void
• get normalizeParameters(): boolean
Inherited from C8oBase.normalizeParameters
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:56
Gets if normalize parameters.
Default is false.
Returns: boolean
The timeout.
• get prefixBase(): boolean
Overrides C8oBase.prefixBase
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:321
Returns: boolean
• set prefixBase(resetBase: boolean): void
Overrides C8oBase.prefixBase
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:325
Parameters:
| Name | Type |
|---|---|
resetBase |
boolean |
Returns: void
• get resetBase(): boolean
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:313
Returns: boolean
• set resetBase(resetBase: boolean): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:317
Parameters:
| Name | Type |
|---|---|
resetBase |
boolean |
Returns: void
• get sdkVersion(): string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:331
Returns: string
• get timeout(): number
Inherited from C8oBase.timeout
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:101
Gets the connection timeout to Convertigo in milliseconds. A value of zero means the timeout is not used.
Default is 0.
Returns: number
The timeout.
▸ _call(parameters: Object, c8oResponseListener: C8oResponseListener, c8oExceptionListener: C8oExceptionListener): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:439
Makes a c8o call with c8o requestable in parameters ('__project' and ('__sequence' or ('__connector' and '__transaction'))).
To not use a C8oExceptionListener you can set the parameter to null.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
parameters |
Object | null | Contains c8o variables |
c8oResponseListener |
C8oResponseListener | null | Define the behavior with the c8o call response |
c8oExceptionListener |
C8oExceptionListener | null | Define the behavior when there is an exception during execution |
Returns: void
▸ addFullSyncChangeListener(db: string, listener: C8oFullSyncChangeListener, parameters: Object): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:616
Add a listener to monitor all changes of the 'db'.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
db |
string | - | the name of the fullsync database to monitor. Use the default database for a blank or a null value. |
listener |
C8oFullSyncChangeListener | - | the listener to trigger on change. |
parameters |
Object | {} | - |
Returns: void
▸ addLive(liveid: string, db: string, task: C8oCallTask): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:630
Parameters:
| Name | Type |
|---|---|
liveid |
string |
db |
string |
task |
C8oCallTask |
Returns: void
▸ call(requestable: string, parameters: Object, c8oResponseListener: C8oResponseListener, c8oExceptionListener: C8oExceptionListener): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:391
Makes a c8o call with c8o requestable out of parameters.
To not use a C8oExceptionListener you can set the parameter to null
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
requestable |
string | - | Contains the Convertigo Sequence or Transaction targeted (Syntax: "." or "..") |
parameters |
Object | null | Contains c8o variables |
c8oResponseListener |
C8oResponseListener | null | Define the behavior with the c8o call response |
c8oExceptionListener |
C8oExceptionListener | null | Define the behavior when there is an exception during execution |
Returns: void
▸ callJson(requestable: string, ...parameters: any[]): C8oPromise‹JSON›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:508
Makes a c8o call with c8o requestable out of parameters, expecting a JSON response through a C8oPromise.
The C8oPromise allow to register response handler with .then and .thenUI,
error handler with .fail and failUI,
replication handler with .progress
and synchronous response with .sync().
Parameters:
| Name | Type | Description |
|---|---|---|
requestable |
string | Contains the Convertigo Sequence or Transaction targeted (Syntax: "." or "..") |
...parameters |
any[] | Contains c8o variables as key/value |
Returns: C8oPromise‹JSON›
A C8oPromise that can deliver the JSON response
▸ callJsonObject(requestable: string, parameters: Object): C8oPromise‹JSON›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:478
Makes a c8o call with c8o requestable out of parameters, expecting a JSON response through a C8oPromise.
The C8oPromise allow to register response handler with .then and .thenUI,
error handler with .fail and failUI,
replication handler with .progress
and synchronous response with .sync().
Parameters:
| Name | Type | Description |
|---|---|---|
requestable |
string | Contains the Convertigo Sequence or Transaction targeted (Syntax: "." or "..") |
parameters |
Object | - |
Returns: C8oPromise‹JSON›
A C8oPromise that can deliver the JSON response
▸ cancelLive(liveid: string): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:637
Parameters:
| Name | Type |
|---|---|
liveid |
string |
Returns: void
▸ copy(c8oBase: C8oBase): void
Defined in c8osdk-js-core/src/c8o/c8oBase.ts:188
Parameters:
| Name | Type |
|---|---|
c8oBase |
C8oBase |
Returns: void
▸ extractendpoint(): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:366
Returns: void
▸ finalizeInit(): Promise‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:771
This should be called OnPlatform Ready to remove splashscreen if necessary
Returns: Promise‹any›
▸ get_attachment(id: string, attachment_name: string, database_name?: string): Promise‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:594
get an attachment for a given object
Parameters:
| Name | Type |
|---|---|
id |
string |
attachment_name |
string |
database_name? |
string |
Returns: Promise‹any›
a promise containing a buffer
▸ handleAutoLoginResponse(): Subject‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:582
Return an subject that call next if autologin is triggered with its result
Returns: Subject‹any›
▸ handleCallException(c8oExceptionListener: C8oExceptionListener, requestParameters: Object, exception: Error): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:550
Calls the exception listener callback if it is not null, else prints the exception stack trace.
Parameters:
| Name | Type | Description |
|---|---|---|
c8oExceptionListener |
C8oExceptionListener | - |
requestParameters |
Object | - |
exception |
Error |
Returns: void
▸ handleNetworkEvents(): Subject‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:575
Return an subject that call next if network has change
Returns: Subject‹any›
▸ handleSessionLost(): Subject‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:560
Return an subject that call next if session has been lost
Returns: Subject‹any›
▸ httpGetObservable(uri: any): Observable‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:663
Method to bastract http get
Parameters:
| Name | Type | Description |
|---|---|---|
uri |
any | the uri for given request |
Returns: Observable‹any›
▸ importLoginState(c8o: C8oCore): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:361
Parameters:
| Name | Type |
|---|---|
c8o |
C8oCore |
Returns: void
▸ init(c8oSettings?: C8oSettings): Promise‹any›
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:680
This is the base object representing a Convertigo Server end point. This object should be instantiated when the apps starts and be accessible from any class of the app. Although this is not common , you may have several C8o objects instantiated in your app.
throws C8oException In case of invalid parameter or initialization failure.
Parameters:
| Name | Type | Description |
|---|---|---|
c8oSettings? |
C8oSettings | Initialization options. Example: new C8oSettings().setLogRemote(false).setDefaultDatabaseName("sample") |
Returns: Promise‹any›
▸ initC8oHttInterface(): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:668
Init http interface in client sdk
Returns: void
▸ removeFullSyncChangeListener(db: string, listener: C8oFullSyncChangeListener): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:626
Remove a listener for changes of the 'db'.
Parameters:
| Name | Type | Description |
|---|---|---|
db |
string | the name of the fullsync database to monitor. Use the default database for a blank or a null value. |
listener |
C8oFullSyncChangeListener | the listener instance to remove. |
Returns: void
▸ removeNull(parameters: any): void
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:534
Remove null value from parameters
Parameters:
| Name | Type | Description |
|---|---|---|
parameters |
any | an object |
Returns: void
a Map that contains all parameters
▸ toString(): string
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:229
Returns: string
▸ toParameters(parameters: any): Object
Defined in c8osdk-js-core/src/c8o/c8oCore.ts:518
Transforms siblings values as key/value of a Map.
Parameters:
| Name | Type | Description |
|---|---|---|
parameters |
any | pair of values to transform a object |
Returns: Object
a Map that contains all parameters