@idpass/data-collect-core / SyncAdapterImpl
Class: SyncAdapterImpl
Defined in: components/SyncAdapter.ts:22
Sync adapter interface for external system synchronization.
Provides integration with external systems for bi-directional data sync. Implementations include OpenSppSyncAdapter and MockSyncServerAdapter.
Implements
Constructors
Constructor
new SyncAdapterImpl(
apiUrl):SyncAdapterImpl
Defined in: components/SyncAdapter.ts:31
Parameters
apiUrl
string
Returns
SyncAdapterImpl
Methods
pushEvents()
pushEvents(
events):Promise<void>
Defined in: components/SyncAdapter.ts:33
Push events to external system
Parameters
events
Returns
Promise<void>
Implementation of
pushEntities()
pushEntities(
entities):Promise<void>
Defined in: components/SyncAdapter.ts:56
Push entities to external system
Parameters
entities
Returns
Promise<void>
Implementation of
pullEntities()
pullEntities():
Promise<void>
Defined in: components/SyncAdapter.ts:79
Pull entities from external system
Returns
Promise<void>
Implementation of
onSyncComplete()
onSyncComplete(
callback):void
Defined in: components/SyncAdapter.ts:104
Map the response from the server to the expected format
Parameters
callback
(status) => void
Returns
void
Implementation of
startAutoSync()
startAutoSync(
interval):void
Defined in: components/SyncAdapter.ts:108
Start automatic synchronization at specified interval
Parameters
interval
number
Returns
void
Implementation of
stopAutoSync()
stopAutoSync():
void
Defined in: components/SyncAdapter.ts:115
Stop automatic synchronization
Returns
void
Implementation of
getServerTimestamp()
getServerTimestamp():
Promise<string>
Defined in: components/SyncAdapter.ts:146
Get the server timestamp to prevent clock differences between clients and server
Returns
Promise<string>