Short links: create, change, delete, and import, with the rules every route shares (the SDK's links.ts). A link is a JavaScript object: id, site, domain ("" for the app's own), slug, name, url, createdAt, and updatedAt.
Summary
Functions
Makes a link for a site from %{"url", "name", "slug", "domain"} (the last three optional).
Creates many links at once, as from a CSV. Rows that fail are reported with their reason and the rest go in. Headers match the Umami fork's export: name or link_name, url or destination_url, slug or link_slug, domain or tracking_domain.
Six characters from an alphabet without look-alikes (no 0/o, 1/l).
Deletes a link; its clicks stay in the history.
Whether a slug may be used: letters, digits, dashes, and underscores, up to 100, starting with a letter or digit.
Changes a link: any of url, name, slug, and domain, the others as they were.
Functions
@spec create(Runlight.t(), String.t(), map()) :: Runlight.JS.Object.t()
Makes a link for a site from %{"url", "name", "slug", "domain"} (the last three optional).
@spec import(Runlight.t(), String.t(), [Runlight.JS.Object.t()]) :: Runlight.JS.Object.t()
Creates many links at once, as from a CSV. Rows that fail are reported with their reason and the rest go in. Headers match the Umami fork's export: name or link_name, url or destination_url, slug or link_slug, domain or tracking_domain.
Six characters from an alphabet without look-alikes (no 0/o, 1/l).
@spec remove(Runlight.t(), String.t()) :: :ok
Deletes a link; its clicks stay in the history.
Whether a slug may be used: letters, digits, dashes, and underscores, up to 100, starting with a letter or digit.
@spec update(Runlight.t(), String.t(), map()) :: Runlight.JS.Object.t()
Changes a link: any of url, name, slug, and domain, the others as they were.