tassyir.app.toml: its name and handle,
the scopes it asks for and why, where it runs, its page in the dashboard, the
webhooks it receives and the values it keeps in Tassyir. You upload the file
as a version; merchants consent to a version, and their installation
stays on it until they accept a newer one.
An example
An app on your own server with a page in the dashboard:auth.callback_url, and may send a webhook to another host:
Fields
- Every table is strict: a key that is not a manifest field is an error,
and the error’s
fixnames the field you probably meant. - Size: at most 64 KB once parsed into JSON. Lengths count UTF-16 code units.
- Paths are joined to
hosting.url, its own path kept: withurl = "https://sync.example.com/tassyir",uri = "/hooks"ishttps://sync.example.com/tassyir/hooks. A hosted app’s paths are joined to its own address,https://{handle}.tassyir-apps.com. - Every host your data reaches (
hosting.url, an absolute webhookuri,auth.callback_url) is shown to the merchant on the install screen.
Offer types
An app that runs offers of its own (Write offers and codes) can declare kinds of offer the merchant creates from your app, under “From your apps” on the Offers page:
Declaring any type needs the
write_offers scope, in scopes or in
optional_scopes (MANIFEST_OFFER_TYPES_SCOPE_MISSING). The type declares
what the merchant can pick; the rule that prices each offer is written through
the Admin API, with kind = "app" (Your own offer
types).
Marketplace fields (not live yet)
These fields belong to the marketplace, which is not live yet. The validator in@tassyir/app-manifest already checks them, so you can prepare
a manifest now, but the API refuses an upload that uses any of them until the
marketplace opens: the fields are unknown to it, or write_storefront is not
offered yet. This page will say when that changes.
Labels
Text a merchant reads in the dashboard or the store builder is a table with both languages,{ ar = "…", en = "…" }: a block’s name, a setting’s and an
option’s label, an admin action’s label and a data definition’s label.
Each language follows the name rules (1 to 50 characters on one line, no
invisible character, no spaces around it), and no other key is accepted.
Storefront blocks
A block is a template that Tassyir renders on the store’s pages, where the merchant places it from the store builder. It runs no JavaScript: a block holds no script, and any key that would add code (script, html, src,
on…) is refused. Blocks need the write_storefront scope, at most 20 a
version.
Block settings
The template reads a setting asblock.settings.<key>. The store builder
draws the form from the declaration and checks every value against it.
Admin actions
[[admin.actions]] adds a menu entry on an order, product or customer page,
or on a selection in the orders or products list. Choosing it opens one of
the app’s pages in the dashboard’s app window, with the ids added to its
address (?id= or ?ids=, at most 50): read them again through the Admin
API, where your scopes and the installation’s stores apply. At most 10.
An app with actions does not need
admin.page.
The app proxy
[app_proxy] names the path on your app where Tassyir forwards requests made
to the store’s own address, https://{store}/apps/{handle}/…. It needs the
write_storefront scope, and its path follows the admin.page rules. It is
part of the format but refused until the app proxy opens
(MANIFEST_PROXY_NOT_AVAILABLE), even by the validator.
Validate before you upload
@tassyir/app-manifest is the validator the Tassyir API runs on every upload,
so a manifest it accepts is one the API accepts, with the same errors in the
same order. Parse the TOML with any TOML 1.0 parser, then validate:
create-tassyir-app runs this as npm run validate
(-- --json for tools).
It returns every error at once, never throws, and reads no file, clock or
network. Each error has:
MANIFEST_TOO_MANY_ERRORS. The package README lists every
error code.
To check one field as it is typed (a handle in a form, say), use
validateManifestField('handle', value).
In your editor
The JSON Schema of the manifest ships with the package. In an editor that reads schema directives (Taplo, Even Better TOML), start the file with:Upload a version
In the developer console, open your app’s Versions tab and upload the file. The console sends the parsed manifest to the API, which validates it again and:- refuses it with every validator error (
APP_MANIFEST_INVALID, each error in the shape above); - refuses a
handleother than the app’s (APP_MANIFEST_HANDLE_MISMATCH), a manifest identical to the latest version (APP_VERSION_UNCHANGED), andhosting.mode = "tassyir"while hosting is closed (APP_HOSTING_NOT_AVAILABLE); - otherwise numbers it (
1,2, …) and makes it current at once. Custom apps are not reviewed: they install only on your own businesses and the one business you name.
tassyir deploy builds it, checks
it and uploads both, then follows the scan every hosted version goes through
(Tassyir Hosting).
Installations do not move by themselves. A new version is offered to each
installation as an update, and applies only when a member of that business
accepts it. A version that adds a scope or a new host asks for consent again.
See Scopes and consent.
Versions of the format
The manifest’s shape belongs to an API version. Within a version, only new optional fields can be added; a release of@tassyir/app-manifest ships them,
and an older release refuses them until you update it.