Appearance
hailer.public
Endpoints that work without a Hailer session. Unlike every other module, these do not go through the host frame — they fetch directly against the public backend (options.publicBackendUrl, default https://api.hailer.com). This is the only namespace usable in outside mode.
hailer.public.app
| Method | Endpoint | Returns |
|---|---|---|
config() | reads local manifest.json, then POST /api/v3/app/public | Promise<Config> |
ts
const config = await hailer.public.app.config();Loads the app's public config. Used internally during startup to detect outside mode.
hailer.public.form
| Method | Endpoint | Returns |
|---|---|---|
data(formsKey) | POST /api/v2/forms/process/get | Promise<FormsResponse> |
submit(formsKey, formsData) | POST /api/v2/forms/activity/create | Promise<FormCreateResponse> |
ts
const form = await hailer.public.form.data(formsKey);
const result = await hailer.public.form.submit(formsKey, formsData);data reads a public form's definition; submit creates an activity from a public form submission. See FormsResponse / FormsData / FormCreateResponse.
hailer.public.insight
| Method | Endpoint | Returns |
|---|---|---|
data(insightKey) | POST /api/v3/insight/public | Promise<InsightResponse> |
dataAsObject(insightKey) | (calls data, maps rows) | Promise<InsightResponseAsObjects> |
ts
const insight = await hailer.public.insight.data(insightKey);
const rows = await hailer.public.insight.dataAsObject(insightKey); // rows as objectsdataAsObject runs data and maps the header/row arrays into row objects client-side. See InsightResponse / InsightResponseAsObjects.
hailer.public.product
| Method | Endpoint | Returns |
|---|---|---|
list(filter?, options?) | POST /api/v3/product/list | Promise<ProductListResponse> |
get(id) | POST /api/v3/product/get | Promise<Product | undefined> |
ts
const { products } = await hailer.public.product.list({ type: 'app' });
const product = await hailer.public.product.get(productId);Public marketplace reads. Same shapes as hailer.product.