SHADE is young: 0.1.0-next.2 is a pre-release, and 0.1.0 isn't out yet.

SHADE
Writing a plugin

Experimental parts

Every part of the module SDK and of core's services that may still change in a minor version is listed here. An experimental part works and is tested, but its shape may change without notice, and it may be removed one minor version after its deprecation. A module that uses one gets a notice from shade-module build and in the API's log (The SDK's promise).

A part becomes stable once two different official modules use it. Until then its first user shapes it, and a second one shows whether the shape holds. A part only one module uses can change to fit the next. The contract (shade/module-sdk/contract.json) is the source for what is marked experimental, and the changelog says which version marked it.

How to read the tables:

  • Part is the feature, with its main names. The page that describes it is linked.
  • Used by lists the official modules whose code uses the part today: appointments, analytics, commerce, editorial, error-forwarding, forms, import, nl, payments and website. Tests and fixtures don't count. None yet means the part is built and tested, and no official module uses it.
  • Status is Experimental for every row. A part that is not listed is stable.

Manifest parts

PartWhat it isUsed byStatus
provides, defineModuleCalls, callModuleA module offers typed calls, another calls them (Calls between modules)commerce, nl, paymentsExperimental
requiresThe modules this one needs, each with the versions it works with (The manifest)commerceExperimental
emits, emitEvents a module publishes in the transaction of its change (Publishing events)commerce, forms, paymentsExperimental
onHearing core's events and other modules' events (Hearing events)analytics, appointments, commerce, editorial, error-forwarding, forms, websiteExperimental
consentConsent categories a module adds to the site's banner (Consent)analytics, websiteExperimental
alertsSecurity alert rules of a trusted module (The manifest)paymentsExperimental
exportWhat a module adds to an instance exportcommerceExperimental
linksThe purposes of signed links and codes a module sends (Signed links and codes)appointments, formsExperimental
taxSalesSales a module reports to core's tax service (Tax)commerceExperimental
keptVersionsVersions of entries kept as they were published (Content)editorialExperimental
previewSetsPreviews of a set of versions, such as a release (Content)editorialExperimental
oauthThe OAuth2 client for connecting accounts (OAuth2)None yetExperimental
processesPrograms a module runs next to the API (Processes)None yetExperimental
sandboxWhat a module's sandboxed part may useNone yetExperimental
searchTextText a module adds to core's searchNone yetExperimental
sharesCollections a module lets the modules that require it useNone yetExperimental
contractAfterData migrations that must be done before a version runsNone yetExperimental
dataMigrationsData migrations that run once, from the manifest (Data migrations)None yetExperimental

Core's business services

These are the parts core keeps once for the business, so that modules agree on the same facts.

PartWhat it isUsed byStatus
Money: money, addMoney, sumMoney, allocateMoney, formatMoney, parseMoneyAmounts in minor units with a currency, with VAT and rounding helpers (The SDK's promise)commerce, paymentsExperimental
Contacts: findOrAddContact, contactReference, contactEmail, ownedByContact, contact panelsOne contact per email address a module met, with its privacy finds, exports and erases (Contacts)appointments, commerce, formsExperimental
Organisations: organisationReference, organisationsOf, accountsWithRole, ownedByOrganisation, organisation panelsOrganisations and the roles given in them (Account roles)commerceExperimental
Holds: hold, confirmHold, releaseHold, heldCount, groupHoldsHold N of a resource until an expiry (Holds)appointments, commerceExperimental
Waitlists: claim, offerNext, acceptOffer, withdrawClaimA holder waits in line when a resource is full (Waitlists)appointmentsExperimental
Time rules: TimeRules, saveTimeRules, periodsOn, formatDateRangeWhen something is open, kept by core (Time rules)appointmentsExperimental
Locations: mainLocation, formatAddress, checkPostcode, COUNTRIESThe business's places and their addresses (Locations)commerceExperimental
Tax: VAT_CATEGORIES, vatBreakdown, vatRatesAt, checkVatNumberVAT categories, dated rates, number checks and the reverse-charge rules (Tax)commerceExperimental
Numbering: nextNumberA gap-free number series per module per year (Numbering)commerceExperimental
Fiscal records: issueFiscalRecord, fiscalRecordFileDocuments the law keeps, such as invoices (Fiscal records)commerceExperimental
Lifecycle guard: defineLifecycleOne table of where a status may go next (Lifecycle guard)commerceExperimental
Terms acceptance: acceptTerms, acceptedText, termsVersionThe proof that a person accepted terms (Terms acceptance)appointments, commerceExperimental
The country of an IP address: countryOfIp, ipCountriesMonthThe two-letter country of an address, looked up without keeping the address (The country of an IP address)analyticsExperimental
Visitor keys and bots: visitorKey, isBotTelling visitors apart without keeping who they are (Visitor keys and bots)analytics, appointments, commerce, formsExperimental
Texts for visitors: messages, textsIn, pickLanguage, formattingLocaleWhat visitors read, in the language they use (Texts for visitors)appointments, commerce, forms, nl, websiteExperimental
PartWhat it isUsed byStatus
Editable emails: emailTemplates, composeModuleEmailAdmins edit the wording of a module's emails (Editable emails)appointments, commerce, formsExperimental
Signed links and codes: issueLink, issueCode, peekCode, redeemCode, releaseCodeA link or code mailed to someone to confirm or open something (Signed links and codes)appointments, forms (links only), commerce (codes)Experimental
Mailing lists: requestBulkSubscription, sendBulkEmail, unsubscribeBulkSubscriptions and bulk mail with a consent record (Mailing lists)None yetExperimental
Channels: sendChannelMessage, contactConfirmedMessages to a contact over a channel other than email (Channels)formsExperimental
Notification methods: notifyChoices, chooseNotificationMethodsA signed-in account chooses how they are notified (Notifications)appointmentsExperimental
Spam checks on public forms: SpamCheckFields, isSpam, SPAM_CHECK_RATE_LIMITA honeypot and a minimum time for forms visitors fill in (Routes)appointments, formsExperimental

Content and the editor

PartWhat it isUsed byStatus
Entry actions and chips: entryActions, entryChips, ModuleEntrySlot, ModuleEntrySlotsComponents next to Publish in the entry editor (Admin screens)editorial (the website module's editor shows them)Experimental
Entry columns: entryColumns, ModuleEntryColumnA column in core's entry list (Admin screens)editorialExperimental
Contact and organisation panels: contactPanels, organisationPanelsA panel on the People and Organisations screens (Admin screens)appointments, commerceExperimental
List actions: listActionsA button on every collection's list (Admin screens)importExperimental
Admin components: SettingRow, ConnectionCardRows and cards for a module's settings (Admin screens)error-forwarding (SettingRow)Experimental
Admin components for statistics: StatCard, StatRow, BarChart, RankList, CopyFieldCards, charts and lists for a module's own figuresanalyticsExperimental
Publishing several at once: publishMany, lockLatestVersionPublish and unpublish entries in one transaction (Content)editorialExperimental
Kept versions and checks: KeptVersions, assertMayChangeEntryKeeping a version only while nothing else changed it (Content)editorialExperimental
Preview sets: createSetPreview, listSetPreviewShares, revokePreviewShareSigned previews of a set of versions (Content)editorialExperimental
Published summaries: listPublishedSummariesThe published entries' title, slug and dates for a module's own pages (Content)websiteExperimental
Drawing a PNG: svgToPngA module's own SVG, checked as an SVG upload is and drawn as a PNG of a given size (Content)websiteExperimental
Build hooks: reportBuildHooks, callBuildHook, listBuildHooksReports from a site build to the modules that follow itwebsiteExperimental
Realtime in the website editorAn interactive part listens and sends over a socket (Realtime)websiteExperimental
Entry helpers for imports: checkEntryWrite, fieldFromText, fieldToText, findEntriesBySlug, roomForEntriesWriting entries from text the way core does (Content)importExperimental
CSV: csvCell, parseCsvReading CSV, and writing a cell with the formula guardforms, importExperimental
Finishing work as a team member: startMemberRun, actAsTeamMember, endMemberRun, QueueHandBackA job acts as the member who started it (Background work)editorial, importExperimental

Routes, accounts and the network

PartWhat it isUsed byStatus
bodyLimitA session route that takes a body of up to 10 MB (Routes)importExperimental
The default customer role and the account profile tableA role every confirmed account has; one row per account (Account roles)appointments (default role), commerce (profile)Experimental
scope: 'organisation'A role given in one organisation (Account roles)commerceExperimental
entries conditions: EntriesCondition, conditionsOfGrants that cover only the rows a member created (The manifest)None yetExperimental
The outbound limitToo many calls to one host are refused at once (The network)Applies to every module that uses moduleFetch: error-forwarding, nl, payments, websiteExperimental
Calls and refusals: recordModuleRefusal, providerUrlA module records why it refused a call, and finds the provider's address (Calls between modules)nl, paymentsExperimental
scrub(text, max, { strict: true })The strict level of scrubbing before text leaves (Background work)error-forwardingExperimental
defineMcpTool, ModuleMcpToolSpecBuilds a manifest's MCP tool with its exposure (Admin screens)analytics, appointments, commerce, editorial, forms, payments, websiteExperimental
siteUrl, accountApiUrlThe addresses of the site and of the account API (The SDK reference)commerce (siteUrl), analytics and appointments (accountApiUrl)Experimental
previewLinkForA signed preview link for a module's own recordsNone yetExperimental
settleDeliverySettle a delivery table's rows and sweep the restNone yetExperimental
slugifyThe one way to turn a title into a slugwebsiteExperimental

Testing helpers

PartWhat it isUsed byStatus
openLink, followLinkOpen and follow a signed link in a module's testappointments, forms (tests)Experimental
stubVies, stubIpCountries, packIpCountriesStand-ins for the VAT number check and the country lookupcommerce, analytics (tests)Experimental
setModuleLocalesLoad a module's locale files for a testappointments, commerce, website (tests)Experimental
createChannel, setChannelSeamsA channel for a testforms (tests)Experimental

When a part becomes stable

When a second official module uses an experimental part and its shape has held, the batch that moves it removes experimental from the contract, takes the part out of this page and says so in the changelog. Until then, read the changelog's experimental list before you update, and give a module that uses one a shade range within the minor version you tested.