Toolaby Wall
Reference

Objects

The User and Permit objects the client answers with, field by field.

The shapes in toolaby.d.ts. Dates are Date objects, in the background and in a page alike; amounts are in minor units of their currency; ids are as the dashboard shows them.

User

Returned by getUser() and refresh().

FieldType
paidbooleanHolds the tool by any means below.
via'subscription' | 'licence' | 'trial' | 'grant' | 'account' | 'unknown' | nullHow. account when the Wall has confirmed the account holds it but not yet by what. null when unpaid.
emailstring | nullThe signed-in account's address, else the licence's.
paidAtDate | nullWhen the entitlement began.
planPlan | nullThe plan held, as Pricing defines it.
subscription{ status, periodEnd, cancelAtPeriodEnd, cancelAt } | nullStripe's status (active, trialing, past_due…), when the period ends, and whether it is set to end there.
trial{ endsAt: Date | null, active: boolean } | nullA trial, when one is running or ran.
deviceLimit{ allowed: number, held: number | null } | nullThe account holds a plan, and this device is past its device limit: the plan unlocks allowed devices at once, and held hold it. The device has the Free plan until the buyer signs another one out on the account page. null otherwise.
account{ linked, email, name, image, linkedAt }The account signed in on this device, if any. name and image are what the account carries — Google's, when they signed in with it — from the server's last word; null until then. The account bar shows the picture, else the initial.
licenseKey{ present: boolean }A licence key was activated on this device.
token{ issuedAt, expiresAt, offlineUntil } | nullThe entitlement token's dates, epoch seconds. offlineUntil is how long it is honoured without the Wall.
accessAccessWhat the Free plan holds.
signInRequiredbooleanWhether using the tool needs an account at all. Signed out, gate() refuses with sign_in whatever the Free plan holds.
featuresstring[] | nullThe feature keys this device holds. null means everything: the tool has no features, or the entitlement lists none.
usage{ unlimited, used, limit, remaining }Free uses on this device. remaining is null when nothing is counted.
versionVersionStateWhether this build may run.
installedAtDate | nullWhen the extension was first run on this device.
installIdstring | nullThe device's id, as listed under Devices on the account page.
billing'one_time' | 'subscription'The tool's billing as configured.
toolstringThe tool's id.

Permit

Returned by gate(). One of three shapes; check allowed first.

Allowed

FieldType
allowedtrue
isPremiumbooleanA paid plan, trial or grant is behind the answer. false when a free use was spent.
unlimitedboolean?Nothing is counted: a paid plan, or a Free plan set to everything or sign-in.
remaining limit usednumber?The meter after this use, when the Free plan counts.
deviceLimit{ allowed, held }?The account holds a plan, but this device is past its device limit: the answer is the Free plan's.
offlineboolean?Answered from the device; the Wall was unreachable.

Refused

FieldType
allowedfalse
reason'sign_in' | 'paid' | 'limit' | 'feature' | 'count' | 'refused'Sign-in required; a plan required; free uses spent; the plan does not hold the feature; a count that is not a whole number from 1 to 1000; the Wall refused the request; or an answer allowed a paid use without a token signed for this device that holds the feature, or a free use the Free plan the device knows does not give.
feature needsstring? string[]?For feature: the key asked for, and the ids of the plans that hold it. Pass one to openPaymentPage().
remaining limitnumber?For limit.
deviceLimit{ allowed, held }?The account holds a plan, but this device is past its device limit. showPaywall() says so, instead of the plans.
isPremium offlineboolean?As above.

Blocked

FieldType
allowedfalse
blockedtrueThe build is below the minimum version, or on the refused list.
messagestring | nullYour message from Versions.

Plan

FieldType
idstringAs under Pricing. What openPaymentPage() takes.
namestring
billing'one_time' | 'subscription'
amountCents currencynumber | null string | nullThe price, in minor units.
interval'month' | 'year' | nullSubscriptions.

Access

What the Free plan holds, as set under Pricing.

Value
openEverything, for anyone.
free_usesA number of uses per device, then a plan.
paidNothing without a plan. gate() refuses with paid.

VersionState

FieldType
checkedbooleanThe Wall has been asked about this build. The answer is kept across the worker's restarts until the next check.
blockedbooleanThis build is below the minimum.
reason'too_old' | 'denylisted' | null
messagestring | nullYour message from Versions.

On this page