Skip to content

makeElectricUrl

makeElectricUrl(__namedParameters): object

Defined in: packages/@livestore/sync-electric/src/make-electric-url.ts:9

This function should be called in a trusted environment (e.g. a proxy server) as it requires access to senstive information (e.g. apiSecret / sourceSecret).

string

For self-hosted ElectricSQL

string

URLSearchParams

Needed to extract information from the search params which the @livestore/sync-electric client implementation automatically adds:

  • handle: the ElectricSQL handle
  • storeId: the Livestore storeId

string

Needed for Electric Cloud

string

Needed for Electric Cloud

needsInit: boolean

Whether the Postgres table needs to be created.

payload: undefined | JsonValue

Sync payload provided by the client

storeId: string

The Livestore storeId

url: string

The URL to the ElectricSQL API endpoint with needed search params.