Skip to content

Interface: AppManifestSpec<C, A> ​

What an author declares. The host reads it as JSON from the module's manifest export: configSchema and each action's input are serialised with z.toJSONSchema(schema, { io: 'input' }) (defaulted fields optional), each output with { io: 'output' }.

Type Parameters ​

C ​

C extends z.ZodType = z.ZodType

A ​

A extends Record<string, ActionSpec> = Record<string, ActionSpec>

Properties ​

actions ​

ts
actions: A;

capabilities? ​

ts
optional capabilities?: string[];

Capability tags, e.g. ['sanctions.screen'].


category? ​

ts
optional category?: string;

Where the console's catalogue files the app, e.g. 'Sanctions & PEP'.


configSchema ​

ts
configSchema: C;

The tenant's non-secret configuration; the module parses it with this schema.


description? ​

ts
optional description?: string;

docsUrl? ​

ts
optional docsUrl?: string;

An https address.


documentsFromConfig? ​

ts
optional documentsFromConfig?: string;

The install's documents switch, with needs: ['documents']: a JSON Pointer to a boolean config field ('/documents'). Calls through an install read documents only while the config it saved holds true there; the field may not have a default (no .default()).


hosts? ​

ts
optional hosts?: string[];

The hosts the app sends requests to (api.vendor.example, *.vendor.example).


hostsFromConfig? ​

ts
optional hostsFromConfig?: string[];

The config fields that hold URLs, as JSON Pointers (['/baseUrl']), at most five: each install also calls the exact hostname of the URL its config gives there, approved when the install is saved. The field may not have a default (no .default() in configSchema).


memoryMiB? ​

ts
optional memoryMiB?: number;

The module's memory, 16 to 256 MiB (64 by default).


name ​

ts
name: string;

acme-screening: lower case, digits and dashes.


needs? ​

ts
optional needs?: "documents"[];

['documents']: calls may read the tenant's documents (ctx.documents.read, bodies).


pricingNote? ​

ts
optional pricingNote?: string;

How the vendor charges, in one line.


secrets? ​

ts
optional secrets?: (string | SecretSpec)[];

The secrets a tenant provides when installing; the module names them in requests.


secretsFromConfig? ​

ts
optional secretsFromConfig?: string;

The config array of variables { key, value?, secret?, stepPlaces? }, as a JSON Pointer ('/variables'): the key of each secret variable is a secret of the install, its value stored as one and never in the config, and required once the config uses it (<<key>>) or lists places a step may use it in (stepPlaces: path, query, headers, body).


title? ​

ts
optional title?: string;

How the console names the app where its name would not do, 'ChatGPT (OpenAI API)': 1 to 60 characters.


vendor? ​

ts
optional vendor?: string;

Who runs the service the app calls, e.g. 'Acme'; omit for apps that call no vendor.


version ​

ts
version: string;

1.2.0.


webhookExternalId? ​

ts
optional webhookExternalId?: WebhookExternalIdSource;

How the API finds the external id of a webhook whose URL names none.


webhookExternalIdFromConfig? ​

ts
optional webhookExternalIdFromConfig?: string;

In place of webhookExternalId, for a vendor whose webhooks differ per install: a JSON Pointer to the config field that holds the source ('/webhook/externalId', a WebhookExternalIdSource), which the API reads from the config as saved. An install whose config holds none receives no webhooks; the field may not have a default.

Released under the Apache-2.0 License.