inmake DOCS
Docs / SDK / Public

Public

Storefront reads with a public token.

Public (DropCorePublic)#

src/public/drop_core_public.ts. Routes at public/** — read-oriented except form.push (the only public write).

Property Path Method
store public/store get({ mask? }) -> StoreEntity
content public/content get(name, id, { locale?, mask? }), batch(name, ids, ...) (the server keys its result by full Firestore path; the SDK re-keys it by doc id), list(name, ContentQueryOptions). Name-based reads require locale — the server 400s when it is missing/invalid.
form public/form push(form, locale, data, {source?, origin?}) -> {id, status: 'new'} — submit one record to an active form. source ({collection}/{docId}, the placing document) opts into content validation against that doc's contract (declared keys only; file kinds rejected in v1; localized rejects) — without it only the 32 KB/object caps apply. origin relays the browser origin through a trusted proxy for the form doc's origins allowlist (the direct request's Origin header wins). Proxy through your server with anti-bot guards (drop-core-server FormGuard / WebSite.pushForm) rather than calling from the browser.
order public/order get(id, { mask? }) -> OrderEntity
orders public/orders list({ uid?, mask?, ...CrudListOperation }) — customer-scoped order list.
invoice public/invoice get(id, { view?: 'json' | 'html', style?: 'html' | 'email' | 'pdf' | 'web' })
slug public/slug get<T>(slug, { locale?, mask? })
promo public/promo get(id, { mask?: ('credits' | 'coupons' | 'referrals')[] })
locale public/locale get(code, { mask? }) — reference locale/country data by ISO code. Store-independent, but still behind a token.
web public/web The render-server read surface over the site-code namespace, on an ordinary {public: true} token: setup(name?, mask?) (web/design/elements setup docs), design(), element(id) (hard-masked to html/css/js), schema(id), template(schema, version?) (omitted version → latest), slug(id, mask?, collection?, category?), slugs({collection?, category?, …}), files(path?, opts?) (metadata only, hard-masked), doc(locale, collection, id). Server-side allowlist — never reaches orders/customers/tokens. Backs drop-core-server's reads: 'public' mode (the tenant hosting server).
setup public/setup get<T extends SetupEntity>(name, { mask? }) — read one setup/{name} doc that opts in with public: true on the doc itself (e.g. setup/payments, PaymentsSetupEntity — the Stripe publishable key). Anything not explicitly public answers one generic 400 (existence is not revealed).
module public/module call({module, path, method, query?, body?, locale?, ip?, origin?, referer?, identity?}) -> {status, headers, body} — the storefront leg of an installed module (/m/{id}/** on the store origin; the tenant server and the Studio bridge forward here). Rides the serving token's public: true, not the module grant.
shipping public/shipping/* options({country?, total?, origin?, locale?}) → {methods: DeliveryOption[]} (the cart's delivery methods, priced), points(carrier, {country?, type?, q?}) (only a carrier an enabled method names), track(order, tracking) (the customer tracking view — the tracking number is the proof).
payments public/payments/* options({country?, currency?, total?, locale?}) → {methods: PaymentOption[]} — the payment methods a cart may choose (the catalog rows that serve it, or the legacy Stripe services); send the chosen id as payment_method to process/order/make / process/payment/init.

ContentQueryOptions mirrors the admin CrudListOperation shape (query, limit, order_by, offset, mask) plus locale. A content.list that filters on one field and sorts on another runs on the collection's query key exactly like an admin list — see "Query keys" above.