Type alias BaseSyncConfiguration

BaseSyncConfiguration: {
    cancelWaitsOnNonFatalError?: boolean;
    clientReset?: ClientResetConfig;
    customHttpHeaders?: Record<string, string>;
    existingRealmFileBehavior?: OpenRealmBehaviorConfiguration;
    newRealmFileBehavior?: OpenRealmBehaviorConfiguration;
    onError?: ErrorCallback;
    proxyConfig?: SyncProxyConfig;
    ssl?: SSLConfiguration;
    user: AnyUser;
}

This describes the different options used to create a Realm instance with Atlas App Services synchronization.

Type declaration

  • Optional cancelWaitsOnNonFatalError?: boolean

    Set to true, all async operations (such as opening the Realm with Realm.open) will fail when a non-fatal error, such as a timeout, occurs.

  • Optional clientReset?: ClientResetConfig

    Configuration of Client Reset

  • Optional customHttpHeaders?: Record<string, string>

    Custom HTTP headers, which are included when making requests to the server.

  • Optional existingRealmFileBehavior?: OpenRealmBehaviorConfiguration

    Whether to open existing file and sync in background or wait for the sync of the file to complete and then open. If not set, the Realm will be downloaded before opened.

    Default

    {
    * type: OpenRealmBehaviorType.DownloadBeforeOpen,
    * timeOut: 30 * 1000,
    * timeOutBehavior: OpenRealmTimeOutBehavior.ThrowException,
    * }
  • Optional newRealmFileBehavior?: OpenRealmBehaviorConfiguration

    Whether to create a new file and sync in background or wait for the file to be synced.

    Default

    {
    * type: OpenRealmBehaviorType.DownloadBeforeOpen,
    * timeOut: 30 * 1000,
    * timeOutBehavior: OpenRealmTimeOutBehavior.ThrowException,
    * }
  • Optional onError?: ErrorCallback

    A callback function which is called in error situations. The callback is passed two arguments: session and syncError. If syncError.name == "ClientReset", syncError.path and syncError.config are set and syncError.readOnly is true (deprecated, see Realm.App.Sync~ClientResetConfiguration). Otherwise, syncError can have up to five properties: name, message, isFatal, category, and code.

  • Optional proxyConfig?: SyncProxyConfig

    HTTP proxy configuration (node.js/Electron only)

  • Optional ssl?: SSLConfiguration

    SSL configuration.

  • user: AnyUser

    A Realm.User object obtained by calling Realm.App.logIn.

Generated using TypeDoc