@segmentstream/ontology · M–P
173 public exports from @segmentstream/ontology.
Public exports
MANIFEST_VERSION
The manifest format this SDK writes. Readers accept any version and ignore unknown fields. Version 2 replaced the actions' `allow` with `permission`, and added the roles' `permissions` and the entities' `permissions`; those fields are optional when decoding, so version 1 manifests still read. `signIn` came later within version 2 and is optional too, as are the actions' `connections` and the top-level `connections`, which are written only when an action calls a connection. Version 3 added warehouse sources and metrics. Version 4 writes snake_case names on the wire. Version 5 lets relationships target warehouse-backed entities and warehouse-backed properties declare `unique`: a relationship with a warehouse-backed end carries `on` and omits `optional` and `onDelete`. Version 6 adds the `countDistinct` metric operator and lets stored entities declare `metrics`, whose columns name the stored properties' replication view columns. Version 7 adds the avg, min, max and filtered metric operators and balanceOver on metrics. Version 8 adds the top-level `metrics`, the metrics of the model, written only when the ontology declares some: each combines metrics of entities, named `entity.metric`, with its inputs and its alignment. Version 9 adds the top-level `workflows`, written only when the ontology declares some: each names its role, its input as JSON Schema, the connections its steps call and its triggers, whose input is in wire form. Within version 9, a property may have the type `list` with its `items` type: only the built-in user's managed `roles`, which has no column. Within version 9, triggers may also be `action`, `webhook` and `platform` triggers; readers ignore kinds they do not know. Version 10 adds the roles' `scopes`, written only when a role scopes some of its permissions: each names the permission and its `where` in the wire form of a query, with `me` as `{ "$me": [] }` and a path from it as `{ "$me": ["staff_member", "division"] }`. `permissions` still lists every permission the role holds, scoped or not. Version 11 adds resolved `feedback` settings and the reserved built-in `feedback_reporter` role, which is implicit for humans and never assignable. Within version 11, actions may opt in to SQL deadlock recovery with `retryOnDeadlock`; its absence disables retries and older readers may ignore it. Within version 11, the top-level `emails`, written only when the ontology declares some, holds the workspace's own emails by wire name: plain-text fields with `{{value}}` placeholders, which the platform renders when it sends a sign-in link. Older readers ignore it. Version 12 changes no field: it marks an SDK whose actions arm a recovery run for their triggers, so publication writes no sweep cron for it. For earlier versions publication keeps the five-minute sweep cron, which their service still needs. Version 13 adds optional `signIn.browser` declarations for workspace-owned browser sign-in methods, primary method, automatic redirect behavior, and local callback port. Within version 13, an entity may carry `writes: "actions"`: it has no generated writes, and its `permissions` hold only `read`, so readers that derive the generated actions from `permissions` need no change. Older readers ignore the field. Within version 13, an action may carry `writes`, the names of the entities its handler writes, which the runtime enforces; absent means it declares none. Older readers ignore the field. Version 14 gives metrics their current names: entities' and the model's `metrics`, and `metric` expression nodes (`{ op: "metric", name }`). Readers accept the earlier names, which the history above calls metrics too; `legacy.ts` names them and renames every document it decodes. Within version 14, `signIn` may carry `codeLink`, written only when declared: whether the platform's sign-in code emails also link to the app's sign-in page with the code filled in. Older readers ignore it and send the code alone. Version 15 changes no field this SDK writes. Ontology SDKs 0.86.0 to 0.88.0 introduced it with `executionCompatibility` and three workflow capabilities for a deploy guard that was withdrawn; readers ignore them. Within version 15, `chat` may carry `slack` and `whatsapp` beside `telegram`: the connections exact chat posts to Slack chats and to members' WhatsApp chats go through. Older readers ignore them, and their services post to Telegram alone. Within version 15, `signIn` may carry `signUp`, the wire names of the roles each channel open to sign-up grants, and `onSignUp`, written only when declared. Older readers ignore them and keep every channel closed to sign-up. Within version 15, `signUp` may carry `web` among its channels and `origins`, the websites whose visitors sign up on it, written only when declared. Older readers ignore both and keep `web` closed. Within version 15, `signIn` may carry `guest`, written only when declared: the `channels` guests talk to the agent on and the `origins` of their websites, and `roles` then ends with the built-in `guest` role, which holds the guests' permissions. Origins of `guest` and `signUp` may be patterns such as `https://*.example.com`. Older readers ignore `guest` and admit no guests, and leave out the patterns they cannot read. Within version 15, an email may carry `sections`, boxes below its button, and its texts may use `{{app.url}}` and `{{app.mcpUrl}}`; `signIn` may carry `invitationEmail`, written only when declared: the wire name of the email the platform sends instead of its own invitation. Older readers ignore `sections` and `invitationEmail`, leave the two values empty and send the platform's invitation. Within version 15, `guest` may carry `bot_check`, `{ scheme, secret }`, the challenge a new guest passes and the workspace secret its verification reads, and `confirmations: true`, written only when declared. Older readers ignore both: they ask new guests for no challenge, and keep refusing guests the actions that need a confirmation. Within version 15, `signIn` may also carry `linkEmail` and `codeEmail`, written only when declared: the wire names of the emails the platform sends instead of its own sign-in link and sign-in code; the code email fills `{{code}}`. Older readers ignore both and send the platform's. Within version 15, an email may instead be a document the workspace lays out itself: `subject`, `html` and `text`, whose placeholders include `{{link}}`, the sign-in link. Older readers do not decode such an email and send the platform's own in its place where they can. Within version 15, `chat` may carry `channels`, written only when declared: the agent's channels not named after their kind, such as `sales_whatsapp`, each with its `kind` and connection. Older readers ignore it and send nothing through those channels. A channel the workspace defines in its own code has kind `custom` and no connection, as the agent sends through it; sign-up may open `channel:<name>`, its people's accounts. Within version 15, the top-level `inbox`, written only when declared, holds the wire names of the `roles` whose people's private chats the agent registers as `agent_chat` records of kind `private`, and in `takeover.channels` the channels whose chats staff may take over from the agent. Older readers ignore it, register none and let none be taken over. `inbox` may carry `attribution: "none"`, written only when declared: a member's own reply in the inbox is sent and archived without their name. Older readers ignore it and sign the reply. Within version 15, a webhook trigger's `signature` may have scheme `hmac` and carry the provider's format, written only when declared. Older readers present the scheme and ignore the format; an older publication check refuses the scheme. A signature may carry `generated: true` instead of `secret`: the platform derives the webhook's secret. Older readers find no secret name; an older publication check refuses it. Version 16 changes no other field: it marks an SDK whose service keeps the chats' messages in the workspace's own database and purges them at `/api/ontology/agent/chats/purge`, so publication adds a daily cron for that route. Within version 16, `chat` may carry `retention_days`, written only when declared, and then also without a channel: how many days the workspace keeps its chats' messages. Older readers ignore it and keep them 365 days. Within version 16, `inbox` may carry `channels`, written only when declared: the channels whose chats with people who are no users the agent registers as `agent_chat` records of kind `private` without members. Older readers ignore it and register no chat without members. Within version 16, a mailbox in `chat` may carry `signature: true`, written only when declared: the ontology's replies to mail end with the mailbox's own signature. Older readers ignore it. Within version 16, an entity may carry `erase_from_warehouse_on_delete: true`, written only when declared: deleting a record erases its replicated history from the warehouse. The SDK's own replication capture acts on it; readers ignore it. Within version 16, an action may carry `anyOf`, written only when several permissions open it, as the built-in `agent_chat.send` is: any one of them runs it, and `permission` is the first. Older readers show the action as requiring `permission` alone. Within version 16, `signIn` may carry `cli: true`, written only when declared: members' SegmentStream CLI may exchange a token SegmentStream signs for them for a grant to the app, without a device link. Older readers ignore it; their services do not offer the exchange.
const MANIFEST_VERSION = 16
MANY_QUANTIFIERS
Quantifiers of a filter on a to-many relationship.
const MANY_QUANTIFIERS: readonly [
"some",
"none",
"every"
]MAXIMUM_CONNECTION_BODY_BYTES
The largest request body, except a `file`, which SegmentStream reads from file storage.
const MAXIMUM_CONNECTION_BODY_BYTES: number
MAXIMUM_CONNECTION_FILE_BYTES
The largest byte range of a file one request may send as its body.
const MAXIMUM_CONNECTION_FILE_BYTES: number
MAXIMUM_CONNECTION_RESPONSE_BYTES
The largest response body `get`, `post` and `request` collect. A larger response fails with `invalid_response`; `stream` reads a response of any size.
const MAXIMUM_CONNECTION_RESPONSE_BYTES: number
MAX_ACTION_TRIGGERS
The most action triggers, `after(…)`, one ontology may declare across its workflows. Every action evaluates the triggers on its entity inside its own transaction, so this bounds the work one action can add: about 4 to 6 ms per trigger for a batch create of 100 records, nothing measurable for a single update. It does not bound the runs a bulk action starts, one per edited record. A workflow may carry several, so it exceeds the workflows an ontology may declare.
const MAX_ACTION_TRIGGERS = 100
MAX_BLOB_BYTES
const MAX_BLOB_BYTES: number
MAX_IN_VALUES
The most values an `in` filter takes.
const MAX_IN_VALUES = 1000
MAX_META_WEBHOOK_BODY_BYTES
Meta batches messages and statuses into deliveries up to 3 MiB. Other schemes keep 1 MiB.
const MAX_META_WEBHOOK_BODY_BYTES: number
MAX_ME_HOPS
The most hops a path takes from the caller's `user` record.
const MAX_ME_HOPS = 3
MAX_PLATFORM_TRIGGERS
The most platform triggers, `platform(…)`, one ontology may declare across its workflows, as for webhooks: it bounds the runs one platform event can start.
const MAX_PLATFORM_TRIGGERS = 20
MAX_QUERY_LIMIT
const MAX_QUERY_LIMIT = 200
MAX_WEBHOOKS
The most webhook triggers one ontology may declare across its workflows.
const MAX_WEBHOOKS = 20
MAX_WEBHOOK_BODY_BYTES
The default delivery body limit, in bytes. Meta's opt-in scheme has its own limit below.
const MAX_WEBHOOK_BODY_BYTES = 1048576
MAX_WEBHOOK_HEADERS
The most request headers one webhook trigger may pass to its workflow.
const MAX_WEBHOOK_HEADERS = 10
MAX_WORKFLOWS
The most workflows one ontology may declare.
const MAX_WORKFLOWS = 50
MCP_PATH
The URL path of the ontology's MCP server, outside `/api/ontology`: one per app.
const MCP_PATH = "/mcp"
MCP_PROTOCOL_VERSIONS
The MCP revisions the server speaks, newest first.
const MCP_PROTOCOL_VERSIONS: readonly [
"2025-11-25",
"2025-06-18"
]MCP_TOOL_NAME
A tool name an MCP API may declare: lowercase snake_case of at most 64 characters, so that `<toolset>:<tool>` is an ontology permission and `<toolset>_<tool>` an MCP tool name.
const MCP_TOOL_NAME: RegExp
MCP_TOOL_NAME_MAX_LENGTH
The longest tool name that Claude and OpenAI accept.
const MCP_TOOL_NAME_MAX_LENGTH = 64
MEASURE_CONDITION_OPERATORS
const MEASURE_CONDITION_OPERATORS: readonly [
"equals",
"in",
"notEquals",
"notIn",
"isNull",
"isNotNull",
"between",
"gt",
"gte",
"lt",
"lte",
"contains",
"startsWith",
"endsWith"
]MEMBER_HISTORY_ACTIONS
The history actions of member role changes, as the generated `user` actions name them.
const MEMBER_HISTORY_ACTIONS: {
readonly invite: "user.invite";
readonly grantRoles: "user.grant_roles";
readonly revokeRoles: "user.revoke_roles";
readonly deactivate: "user.deactivate";
readonly reactivate: "user.reactivate";
}METRIC_CONDITION_OPERATORS
The operators of a metric condition: a model-level filter's, except `inPeriod`, whose dates would move with the day a request runs.
const METRIC_CONDITION_OPERATORS: readonly [
"equals",
"in",
"notEquals",
"notIn",
"isNull",
"isNotNull",
"between",
"gt",
"gte",
"lt",
"lte",
"contains",
"startsWith",
"endsWith"
]ME_KEY
The key of the wire form, `{ "$me": [...] }`.
const ME_KEY = "$me"
MIGRATION_REFUSAL_CODES
const MIGRATION_REFUSAL_CODES: readonly [
"invalid-manifest",
"type-change",
"relationship-change",
"drop-refused",
"name-collision",
"identifier-too-long",
"rename-conflict",
"replication-rebuild-required",
"replication-publication-pending"
]MIGRATION_STEP_CLASSIFICATIONS
- `additive`: creates something new; existing rows are untouched. - `rename`: renames tables, columns and the objects named after them. - `change`: changes a definition in place, removes it from the ontology while retaining data, or declares retained data again. - `destructive`: drops stored data. Planned only with `allowDrops`.
const MIGRATION_STEP_CLASSIFICATIONS: readonly [
"additive",
"rename",
"change",
"destructive"
]MIGRATION_STEP_KINDS
What a step does, at the level of the ontology.
const MIGRATION_STEP_KINDS: readonly [
"createCatalog",
"createEntity",
"restoreEntity",
"renameEntity",
"dropEntities",
"removeEntities",
"addProperty",
"restoreProperty",
"renameProperty",
"dropProperty",
"removeProperty",
"changeOptional",
"changeDefault",
"changeCheck",
"addSelectOption",
"rebuildSelect",
"addRelationship",
"restoreRelationship",
"dropRelationship",
"removeRelationship",
"changeOnDelete",
"addForeignKey",
"addIndex",
"dropIndex"
]ManyFilter
A filter on a to-many relationship: some, none or every related record matches.
interface ManyFilter {
readonly some?: Where;
readonly none?: Where;
readonly every?: Where;
}ManyOptions
interface ManyOptions {
readonly inverse: string;
readonly phrase?: Phrase;
readonly description: string;
readonly ordered?: boolean;
}ManyRelationship
A plain many-to-many relationship, stored in a hidden join table. It never carries properties.
interface ManyRelationship {
readonly [RelationshipTypeId]: typeof RelationshipTypeId;
readonly cardinality: "many";
readonly target: EntityTarget;
readonly inverse: string;
readonly phrase?: Phrase;
readonly description: string;
readonly ordered: boolean;
}MeMarker
`me` or a path on the wire: `{ "$me": [] }`, `{ "$me": ["staff_member", "division"] }`.
const MeMarker: Schema.Struct<{
readonly $me: Schema.$Array<Schema.String>;
}>type MeMarker = typeof MeMarker.Type;
MeReference
`me` or a path from it, as authored. Every string property is one more hop.
interface MeReference {
readonly [MeTypeId]: ReadonlyArray<string>;
readonly [relationship: string]: MeReference;
}MeTypeId
`me`, the caller, in the `where` of a scoped role permission. `me` alone is the id of the caller's `user` record and is compared with `eq` or `ne` (a bare `owner: me` means `eq`). `me.<relationship>.<relationship>…` is the set of ids a path of relationship names reaches from the built-in `User`, inverse names first, and is compared with `in`: ```ts { owner: me } { division: { in: me.staffMember.division } } ``` Paths are untyped, since the inverse names live on the other entities; `check` validates them. On the wire `me` is `{ "$me": [] }` and a path `{ "$me": ["staff_member", "division"] }`, with snake_case relationship names.
const MeTypeId: unique symbol
Measure
type Measure = Metric;
MeasureColumnCondition
type MeasureColumnCondition = MetricColumnCondition;
MeasureCondition
type MeasureCondition = MetricCondition;
MeasureConditionOperator
type MeasureConditionOperator = MetricConditionOperator;
MeasureExpression
type MeasureExpression = MetricExpression;
MeasureOptions
type MeasureOptions = MetricOptions;
Measures
type Measures = Metrics;
MemberKey
A member by user id, or by the email they sign in with, in any case.
type MemberKey = {
readonly id: string;
} | {
readonly email: string;
};MemberNotFound
No member has this email or id. Services are not members: their API keys are managed instead.
class MemberNotFound extends MemberNotFound_base {
}MemberOptions
What every active app user may do, beyond the roles they are given.
interface MemberOptions {
readonly permissions: ReadonlyArray<RolePermission>;
}MemberRolesChange
A change to one member's roles, by id or email. Only an email can invite a new member.
type MemberRolesChange = MemberKey & {
readonly name?: string | undefined;
readonly grant?: ReadonlyArray<string> | undefined;
readonly revoke?: ReadonlyArray<string> | "all" | undefined;
};MemberStatus
Where a member stands: invited and not signed in yet, signed in, or deactivated.
type MemberStatus = "invited" | "active" | "inactive";
MemberSummary
A member as the platform lists it: a person's `user`, with the roles assigned to it.
interface MemberSummary {
readonly id: string;
readonly email: string | undefined;
readonly name: string;
readonly active: boolean;
readonly blocked?: true;
readonly deactivated?: true;
readonly identities?: ReadonlyArray<{
readonly provider: string;
readonly subject: string;
readonly username?: string;
}>;
readonly status: MemberStatus;
readonly roles: ReadonlyArray<string>;
readonly lastSignInAt: string | undefined;
}MemoryFileStorage
File storage held in memory, for tests that run the ontology in process. The backend built on it uploads, stages, opens and downloads files as on a deployment, with the same permission checks and upload lifecycle in the database; only the bytes stay in this process.
interface MemoryFileStorage {
readonly blobStorage: Redacted.Redacted<BlobStorageBinding>;
readonly fetch: typeof fetch;
readonly upload: (input: MemoryFileUpload) => Effect.Effect<UploadedFile, ActionError, OntologyBackend>;
readonly read: (input: OpenFile & {
readonly principal: Principal;
}) => Effect.Effect<StoredFile, ActionError, OntologyBackend>;
}MemoryFileStorageOptions
interface MemoryFileStorageOptions {
readonly quotaBytes?: number;
}MemoryFileUpload
A file to upload for an action's `uploads.for(entity, property)` input.
interface MemoryFileUpload {
readonly principal: Principal;
readonly entity: string;
readonly property: string;
readonly action: string;
readonly recordId?: string;
readonly createIntent?: string;
readonly idempotencyKey?: string;
readonly filename: string;
readonly contentType: string;
readonly bytes: Uint8Array | string;
}Metric
type Metric = MetricExpression & Partial<MetricOptions> & {
readonly where?: ReadonlyArray<MetricCondition | MetricColumnCondition>;
readonly balanceOver?: string;
readonly align?: never;
};MetricColumnCondition
A condition as a `filtered` expression holds it: like a `column` expression, it names a property until `metricExpression` maps it to the property's column for the manifest.
interface MetricColumnCondition {
readonly column: string;
readonly operator: MetricConditionOperator;
readonly value?: MetricQueryValue;
readonly values?: ReadonlyArray<MetricQueryValue>;
}MetricCondition
A condition on the rows an aggregate reads: a property of the metric's own entity, in TypeScript names, and an operator with literal values, as a request filter takes them.
interface MetricCondition {
readonly property: string;
readonly operator: MetricConditionOperator;
readonly value?: MetricQueryValue;
readonly values?: ReadonlyArray<MetricQueryValue>;
}MetricConditionOperator
type MetricConditionOperator = (typeof METRIC_CONDITION_OPERATORS)[number];
MetricExpression
type MetricExpression = {
readonly op: "count";
} | {
readonly op: "column" | "metric";
readonly name: string;
} | {
readonly op: "literal";
readonly value: string;
} | {
readonly op: "sum" | "countDistinct" | "avg" | "min" | "max" | "add" | "subtract" | "multiply" | "divide";
readonly args: ReadonlyArray<MetricExpression>;
} | {
readonly op: "filtered";
readonly args: ReadonlyArray<MetricExpression>;
readonly where: ReadonlyArray<MetricColumnCondition>;
};MetricOptions
interface MetricOptions {
readonly description: string;
readonly label?: string;
readonly unit?: "number" | "currency" | "ratio" | "percent";
readonly format?: "decimal" | "currency" | "percent";
}MetricQueryGroupKey
Fields a fresh metric query groups by: declared properties and `<relationship>Id` keys.
type MetricQueryGroupKey<P, R> = Exclude<keyof P & string, BlobKeys<P>> | (keyof RelationshipIds<R> & string);
MetricQueryValue
A filter value: a literal.
type MetricQueryValue = string | number | boolean;
Metrics
type Metrics = Readonly<Record<string, Metric>>;
MigrateInput
interface MigrateInput extends ApplyMigrationOptions {
readonly target: OntologyManifest;
readonly options?: MigrationOptions;
}MigrationFailed
A step failed. A failed transactional step rolls the whole transaction back; non-transactional steps that ran before it stay applied and are safe to run again. The message names the step only; the database's own explanation, which may quote stored values, is kept in `cause`.
class MigrationFailed extends MigrationFailed_base {
}MigrationOptions
interface MigrationOptions {
readonly allowDrops?: boolean;
}MigrationPlan
The ordered steps that take a database from the applied manifest to the target. Plain data: it can be shown, journaled and applied later; the applier refuses it if the database moved on in between.
const MigrationPlan: Schema.Struct<{
readonly currentHash: Schema.optionalKey<Schema.String>;
readonly target: Schema.declareConstructor<{
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retentionDays?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly botCheck?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly confirmations?: boolean | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly autoRedirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly onNewUser?: string | undefined;
readonly codeLink?: boolean | undefined;
readonly cli?: boolean | undefined;
readonly signUp?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly onSignUp?: string | undefined;
readonly invitationEmail?: string | undefined;
readonly linkEmail?: string | undefined;
readonly codeEmail?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly replyTo?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly replyTo?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
} | {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retentionDays?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly botCheck?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly confirmations?: boolean | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly autoRedirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly onNewUser?: string | undefined;
readonly codeLink?: boolean | undefined;
readonly cli?: boolean | undefined;
readonly signUp?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly onSignUp?: string | undefined;
readonly invitationEmail?: string | undefined;
readonly linkEmail?: string | undefined;
readonly codeEmail?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly replyTo?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly replyTo?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
}, {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly built_in: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
readonly renamed_from?: string | undefined;
readonly max_length?: number | undefined;
readonly max_bytes?: number | undefined;
readonly exclude_from_replication?: boolean | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly on?: {
readonly property: string;
readonly target_property: string;
} | undefined;
readonly ordered?: boolean | undefined;
readonly on_delete?: "cascade" | "restrict" | "set_null" | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly built_in: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balance_over?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly renamed_from?: string | undefined;
readonly erase_from_warehouse_on_delete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retention_days?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly reply_to?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly reply_to?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
readonly sign_in?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly confirmations?: boolean | undefined;
readonly bot_check?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly auto_redirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly cli?: boolean | undefined;
readonly on_new_user?: string | undefined;
readonly code_link?: boolean | undefined;
readonly sign_up?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly on_sign_up?: string | undefined;
readonly invitation_email?: string | undefined;
readonly link_email?: string | undefined;
readonly code_email?: string | undefined;
} | undefined;
} | {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retention_days?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly confirmations?: boolean | undefined;
readonly bot_check?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly auto_redirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly cli?: boolean | undefined;
readonly on_new_user?: string | undefined;
readonly code_link?: boolean | undefined;
readonly sign_up?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly on_sign_up?: string | undefined;
readonly invitation_email?: string | undefined;
readonly link_email?: string | undefined;
readonly code_email?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly reply_to?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly reply_to?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
}, readonly [
Schema.Union<readonly [
Schema.encodeKeys<Schema.Struct<{
readonly entities: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly balanceOver: Schema.optionalKey<Schema.String>;
}>, {
readonly balanceOver: "balance_over";
}>>>;
readonly properties: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>, {
readonly renamedFrom: "renamed_from";
readonly maxLength: "max_length";
readonly maxBytes: "max_bytes";
readonly excludeFromReplication: "exclude_from_replication";
}>>;
readonly relationships: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly on: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly property: Schema.String;
readonly targetProperty: Schema.String;
}>, {
readonly targetProperty: "target_property";
}>>;
readonly onDelete: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly [
"setNull",
"cascade",
"restrict"
]>, Schema.Literals<readonly [
"set_null",
"cascade",
"restrict"
]>, never, never>>;
readonly name: Schema.String;
readonly to: Schema.String;
readonly inverse: Schema.String;
readonly cardinality: Schema.Literals<readonly [
"one",
"many"
]>;
readonly optional: Schema.optionalKey<Schema.Boolean>;
readonly ordered: Schema.optionalKey<Schema.Boolean>;
readonly phrase: Schema.Tuple<readonly [
Schema.String,
Schema.String
]>;
readonly description: Schema.String;
}>, {
readonly onDelete: "on_delete";
}>>;
readonly source: Schema.optionalKey<Schema.Struct<{
readonly asset: Schema.String;
readonly key: Schema.$Array<Schema.String>;
readonly currency: Schema.optionalKey<Schema.String>;
}>>;
readonly id: Schema.String;
readonly name: Schema.String;
readonly label: Schema.String;
readonly plural: Schema.String;
readonly title: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly guide: Schema.optionalKey<Schema.String>;
readonly indexes: Schema.$Array<Schema.Struct<{
readonly properties: Schema.$Array<Schema.String>;
readonly unique: Schema.Boolean;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
readonly permissions: Schema.optionalKey<Schema.Struct<{
readonly read: Schema.String;
readonly create: Schema.optionalKey<Schema.String>;
readonly update: Schema.optionalKey<Schema.String>;
readonly delete: Schema.optionalKey<Schema.String>;
readonly link: Schema.optionalKey<Schema.String>;
readonly unlink: Schema.optionalKey<Schema.String>;
}>>;
readonly writes: Schema.optionalKey<Schema.Literal<"actions">>;
readonly eraseFromWarehouseOnDelete: Schema.optionalKey<Schema.Literal<true>>;
}>, {
readonly builtIn: "built_in";
readonly renamedFrom: "renamed_from";
readonly eraseFromWarehouseOnDelete: "erase_from_warehouse_on_delete";
}>>;
readonly roles: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly permission: Schema.String;
readonly where: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
}>>>;
}>, {
readonly builtIn: "built_in";
}>>;
readonly feedback: Schema.optionalKey<Schema.Struct<{
readonly enabled: Schema.Boolean;
readonly files: Schema.Boolean;
readonly builders: Schema.$Array<Schema.String>;
readonly automaticFailureReports: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly runtimeCapabilities: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly executionCompatibility: Schema.optionalKey<Schema.Struct<{
readonly version: Schema.Int;
readonly hash: Schema.String;
}>>;
readonly version: Schema.Int;
readonly hash: Schema.String;
readonly signIn: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly browser: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly methods: Schema.$Array<Schema.String>;
readonly primary: Schema.String;
readonly autoRedirect: Schema.Boolean;
readonly local: Schema.optionalKey<Schema.Struct<{
readonly port: Schema.Int;
}>>;
}>, {
readonly autoRedirect: "auto_redirect";
}>>;
readonly policy: Schema.String;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>;
readonly onNewUser: Schema.optionalKey<Schema.String>;
readonly codeLink: Schema.optionalKey<Schema.Boolean>;
readonly cli: Schema.optionalKey<Schema.Boolean>;
readonly signUp: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Record<Schema.String, Schema.Unknown>;
readonly origins: Schema.optionalKey<Schema.$Array<Schema.String>>;
}>>;
readonly onSignUp: Schema.optionalKey<Schema.String>;
readonly guest: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly openOnInvite: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly byChannel: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
readonly channels: Schema.$Array<Schema.String>;
readonly origins: Schema.$Array<Schema.String>;
readonly botCheck: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly connection: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
readonly secret: Schema.optionalKey<Schema.String>;
}>>;
readonly confirmations: Schema.optionalKey<Schema.Boolean>;
}>, {
readonly botCheck: "bot_check";
}>>;
readonly invitationEmail: Schema.optionalKey<Schema.String>;
readonly linkEmail: Schema.optionalKey<Schema.String>;
readonly codeEmail: Schema.optionalKey<Schema.String>;
}>, {
readonly onNewUser: "on_new_user";
readonly codeLink: "code_link";
readonly signUp: "sign_up";
readonly onSignUp: "on_sign_up";
readonly invitationEmail: "invitation_email";
readonly linkEmail: "link_email";
readonly codeEmail: "code_email";
}>>;
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly html: Schema.String;
readonly text: Schema.String;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>,
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly eyebrow: Schema.optionalKey<Schema.String>;
readonly heading: Schema.String;
readonly card: Schema.optionalKey<Schema.Struct<{
readonly title: Schema.String;
readonly detail: Schema.optionalKey<Schema.String>;
}>>;
readonly note: Schema.optionalKey<Schema.String>;
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly action: Schema.String;
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly title: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly copy: Schema.optionalKey<Schema.Struct<{
readonly label: Schema.optionalKey<Schema.String>;
readonly value: Schema.String;
}>>;
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly label: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly code: Schema.optionalKey<Schema.String>;
}>>>;
readonly note: Schema.optionalKey<Schema.String>;
}>>>;
readonly footer: Schema.optionalKey<Schema.String>;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>
]>>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly key: Schema.String;
readonly description: Schema.String;
readonly delivers: Schema.optionalKey<Schema.Literal<true>>;
readonly owner: Schema.optionalKey<Schema.Literal<"user">>;
}>>>;
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly telegram: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly slack: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly email: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
readonly kind: Schema.Literals<readonly [
"telegram",
"slack",
"whatsapp",
"email",
"custom"
]>;
readonly connection: Schema.optionalKey<Schema.String>;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>>;
readonly attribution: Schema.optionalKey<Schema.Struct<{
readonly template: Schema.optionalKey<Schema.String>;
readonly separator: Schema.optionalKey<Schema.String>;
}>>;
readonly retentionDays: Schema.optionalKey<Schema.Int>;
}>, {
readonly retentionDays: "retention_days";
}>>;
readonly inbox: Schema.optionalKey<Schema.Struct<{
readonly roles: Schema.$Array<Schema.String>;
readonly channels: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly takeover: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Array<Schema.String>;
}>>;
readonly attribution: Schema.optionalKey<Schema.Literals<readonly [
"name",
"none"
]>>;
}>>;
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly inputs: Schema.$Array<Schema.String>;
readonly align: Schema.$Array<Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>>;
}>>>;
readonly workflows: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly role: Schema.String;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly connections: Schema.$Array<Schema.String>;
readonly triggers: Schema.$Array<Schema.Union<readonly [
Schema.Struct<{
readonly kind: Schema.Literal<"cron">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly cron: Schema.String;
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"action">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly entity: Schema.String;
readonly action: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"webhook">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly signature: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly secret: Schema.optionalKey<Schema.String>;
readonly generated: Schema.optionalKey<Schema.Literal<true>>;
readonly input: Schema.optionalKey<Schema.String>;
readonly algorithm: Schema.optionalKey<Schema.String>;
readonly encoding: Schema.optionalKey<Schema.String>;
readonly key: Schema.optionalKey<Schema.Struct<{
readonly decode: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
}>>;
readonly signatures: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
readonly entries: Schema.optionalKey<Schema.Struct<{
readonly separator: Schema.String;
readonly assign: Schema.String;
readonly name: Schema.String;
}>>;
}>>;
readonly timestamp: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.optionalKey<Schema.String>;
readonly entry: Schema.optionalKey<Schema.String>;
readonly unit: Schema.optionalKey<Schema.String>;
readonly tolerance: Schema.optionalKey<Schema.Number>;
}>>;
readonly message: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
Schema.String,
Schema.Struct<{
readonly body: Schema.Literals<readonly [
true,
"sorted-json"
]>;
}>,
Schema.Struct<{
readonly header: Schema.String;
}>,
Schema.Struct<{
readonly timestamp: Schema.Literal<true>;
}>
]>>>;
}>>;
readonly verification: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly verifyToken: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
}>>;
readonly headers: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connection: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"platform">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly events: Schema.$Array<Schema.String>;
}>,
Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
]>>;
readonly action: Schema.optionalKey<Schema.Struct<{
readonly entity: Schema.String;
readonly action: Schema.String;
}>>;
}>>>;
readonly toolsets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly connection: Schema.String;
readonly api: Schema.String;
readonly tools: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly access: Schema.Literals<readonly [
"read",
"write"
]>;
readonly fixed: Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.String,
Schema.Number,
Schema.Boolean
]>>;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
}>>>;
}>, {
readonly signIn: "sign_in";
}>,
Schema.Struct<{
readonly feedback: Schema.optionalKey<Schema.Struct<{
readonly enabled: Schema.Boolean;
readonly files: Schema.Boolean;
readonly builders: Schema.$Array<Schema.String>;
readonly automaticFailureReports: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly runtimeCapabilities: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly executionCompatibility: Schema.optionalKey<Schema.Struct<{
readonly version: Schema.Int;
readonly hash: Schema.String;
}>>;
readonly version: Schema.Int;
readonly hash: Schema.String;
readonly entities: Schema.$Array<Schema.Struct<{
readonly source: Schema.optionalKey<Schema.Struct<{
readonly asset: Schema.String;
readonly key: Schema.$Array<Schema.String>;
readonly currency: Schema.optionalKey<Schema.String>;
}>>;
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly balanceOver: Schema.optionalKey<Schema.String>;
}>>>;
readonly id: Schema.String;
readonly name: Schema.String;
readonly label: Schema.String;
readonly plural: Schema.String;
readonly title: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly guide: Schema.optionalKey<Schema.String>;
readonly properties: Schema.$Array<Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>>;
readonly relationships: Schema.$Array<Schema.Struct<{
readonly on: Schema.optionalKey<Schema.Struct<{
readonly property: Schema.String;
readonly targetProperty: Schema.String;
}>>;
readonly name: Schema.String;
readonly to: Schema.String;
readonly inverse: Schema.String;
readonly cardinality: Schema.Literals<readonly [
"one",
"many"
]>;
readonly optional: Schema.optionalKey<Schema.Boolean>;
readonly onDelete: Schema.optionalKey<Schema.Literals<readonly [
"setNull",
"cascade",
"restrict"
]>>;
readonly ordered: Schema.optionalKey<Schema.Boolean>;
readonly phrase: Schema.Tuple<readonly [
Schema.String,
Schema.String
]>;
readonly description: Schema.String;
}>>;
readonly indexes: Schema.$Array<Schema.Struct<{
readonly properties: Schema.$Array<Schema.String>;
readonly unique: Schema.Boolean;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
readonly permissions: Schema.optionalKey<Schema.Struct<{
readonly read: Schema.String;
readonly create: Schema.optionalKey<Schema.String>;
readonly update: Schema.optionalKey<Schema.String>;
readonly delete: Schema.optionalKey<Schema.String>;
readonly link: Schema.optionalKey<Schema.String>;
readonly unlink: Schema.optionalKey<Schema.String>;
}>>;
readonly writes: Schema.optionalKey<Schema.Literal<"actions">>;
readonly eraseFromWarehouseOnDelete: Schema.optionalKey<Schema.Literal<true>>;
}>>;
readonly roles: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly permission: Schema.String;
readonly where: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
}>>>;
}>>;
readonly signIn: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly browser: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly methods: Schema.$Array<Schema.String>;
readonly primary: Schema.String;
readonly autoRedirect: Schema.Boolean;
readonly local: Schema.optionalKey<Schema.Struct<{
readonly port: Schema.Int;
}>>;
}>, {
readonly autoRedirect: "auto_redirect";
}>>;
readonly policy: Schema.String;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>;
readonly onNewUser: Schema.optionalKey<Schema.String>;
readonly codeLink: Schema.optionalKey<Schema.Boolean>;
readonly cli: Schema.optionalKey<Schema.Boolean>;
readonly signUp: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Record<Schema.String, Schema.Unknown>;
readonly origins: Schema.optionalKey<Schema.$Array<Schema.String>>;
}>>;
readonly onSignUp: Schema.optionalKey<Schema.String>;
readonly guest: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly openOnInvite: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly byChannel: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
readonly channels: Schema.$Array<Schema.String>;
readonly origins: Schema.$Array<Schema.String>;
readonly botCheck: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly connection: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
readonly secret: Schema.optionalKey<Schema.String>;
}>>;
readonly confirmations: Schema.optionalKey<Schema.Boolean>;
}>, {
readonly botCheck: "bot_check";
}>>;
readonly invitationEmail: Schema.optionalKey<Schema.String>;
readonly linkEmail: Schema.optionalKey<Schema.String>;
readonly codeEmail: Schema.optionalKey<Schema.String>;
}>, {
readonly onNewUser: "on_new_user";
readonly codeLink: "code_link";
readonly signUp: "sign_up";
readonly onSignUp: "on_sign_up";
readonly invitationEmail: "invitation_email";
readonly linkEmail: "link_email";
readonly codeEmail: "code_email";
}>>;
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly html: Schema.String;
readonly text: Schema.String;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>,
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly eyebrow: Schema.optionalKey<Schema.String>;
readonly heading: Schema.String;
readonly card: Schema.optionalKey<Schema.Struct<{
readonly title: Schema.String;
readonly detail: Schema.optionalKey<Schema.String>;
}>>;
readonly note: Schema.optionalKey<Schema.String>;
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly action: Schema.String;
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly title: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly copy: Schema.optionalKey<Schema.Struct<{
readonly label: Schema.optionalKey<Schema.String>;
readonly value: Schema.String;
}>>;
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly label: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly code: Schema.optionalKey<Schema.String>;
}>>>;
readonly note: Schema.optionalKey<Schema.String>;
}>>>;
readonly footer: Schema.optionalKey<Schema.String>;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>
]>>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly key: Schema.String;
readonly description: Schema.String;
readonly delivers: Schema.optionalKey<Schema.Literal<true>>;
readonly owner: Schema.optionalKey<Schema.Literal<"user">>;
}>>>;
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly telegram: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly slack: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly email: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
readonly kind: Schema.Literals<readonly [
"telegram",
"slack",
"whatsapp",
"email",
"custom"
]>;
readonly connection: Schema.optionalKey<Schema.String>;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>>;
readonly attribution: Schema.optionalKey<Schema.Struct<{
readonly template: Schema.optionalKey<Schema.String>;
readonly separator: Schema.optionalKey<Schema.String>;
}>>;
readonly retentionDays: Schema.optionalKey<Schema.Int>;
}>, {
readonly retentionDays: "retention_days";
}>>;
readonly inbox: Schema.optionalKey<Schema.Struct<{
readonly roles: Schema.$Array<Schema.String>;
readonly channels: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly takeover: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Array<Schema.String>;
}>>;
readonly attribution: Schema.optionalKey<Schema.Literals<readonly [
"name",
"none"
]>>;
}>>;
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly inputs: Schema.$Array<Schema.String>;
readonly align: Schema.$Array<Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>>;
}>>>;
readonly workflows: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly role: Schema.String;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly connections: Schema.$Array<Schema.String>;
readonly triggers: Schema.$Array<Schema.Union<readonly [
Schema.Struct<{
readonly kind: Schema.Literal<"cron">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly cron: Schema.String;
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"action">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly entity: Schema.String;
readonly action: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"webhook">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly signature: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly secret: Schema.optionalKey<Schema.String>;
readonly generated: Schema.optionalKey<Schema.Literal<true>>;
readonly input: Schema.optionalKey<Schema.String>;
readonly algorithm: Schema.optionalKey<Schema.String>;
readonly encoding: Schema.optionalKey<Schema.String>;
readonly key: Schema.optionalKey<Schema.Struct<{
readonly decode: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
}>>;
readonly signatures: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
readonly entries: Schema.optionalKey<Schema.Struct<{
readonly separator: Schema.String;
readonly assign: Schema.String;
readonly name: Schema.String;
}>>;
}>>;
readonly timestamp: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.optionalKey<Schema.String>;
readonly entry: Schema.optionalKey<Schema.String>;
readonly unit: Schema.optionalKey<Schema.String>;
readonly tolerance: Schema.optionalKey<Schema.Number>;
}>>;
readonly message: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
Schema.String,
Schema.Struct<{
readonly body: Schema.Literals<readonly [
true,
"sorted-json"
]>;
}>,
Schema.Struct<{
readonly header: Schema.String;
}>,
Schema.Struct<{
readonly timestamp: Schema.Literal<true>;
}>
]>>>;
}>>;
readonly verification: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly verifyToken: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
}>>;
readonly headers: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connection: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"platform">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly events: Schema.$Array<Schema.String>;
}>,
Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
]>>;
readonly action: Schema.optionalKey<Schema.Struct<{
readonly entity: Schema.String;
readonly action: Schema.String;
}>>;
}>>>;
readonly toolsets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly connection: Schema.String;
readonly api: Schema.String;
readonly tools: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly access: Schema.Literals<readonly [
"read",
"write"
]>;
readonly fixed: Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.String,
Schema.Number,
Schema.Boolean
]>>;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
}>>>;
}>
]>
], {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retentionDays?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly botCheck?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly confirmations?: boolean | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly autoRedirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly onNewUser?: string | undefined;
readonly codeLink?: boolean | undefined;
readonly cli?: boolean | undefined;
readonly signUp?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly onSignUp?: string | undefined;
readonly invitationEmail?: string | undefined;
readonly linkEmail?: string | undefined;
readonly codeEmail?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly replyTo?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly replyTo?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
} | {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retentionDays?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly botCheck?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly confirmations?: boolean | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly autoRedirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly onNewUser?: string | undefined;
readonly codeLink?: boolean | undefined;
readonly cli?: boolean | undefined;
readonly signUp?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly onSignUp?: string | undefined;
readonly invitationEmail?: string | undefined;
readonly linkEmail?: string | undefined;
readonly codeEmail?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly replyTo?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly replyTo?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
}>;
readonly steps: Schema.$Array<Schema.Struct<{
readonly kind: Schema.Literals<readonly [
"createCatalog",
"createEntity",
"restoreEntity",
"renameEntity",
"dropEntities",
"removeEntities",
"addProperty",
"restoreProperty",
"renameProperty",
"dropProperty",
"removeProperty",
"changeOptional",
"changeDefault",
"changeCheck",
"addSelectOption",
"rebuildSelect",
"addRelationship",
"restoreRelationship",
"dropRelationship",
"removeRelationship",
"changeOnDelete",
"addForeignKey",
"addIndex",
"dropIndex"
]>;
readonly classification: Schema.Literals<readonly [
"additive",
"rename",
"change",
"destructive"
]>;
readonly path: Schema.optionalKey<Schema.String>;
readonly transactional: Schema.Boolean;
readonly validatesData: Schema.Boolean;
readonly description: Schema.String;
readonly sql: Schema.$Array<Schema.String>;
}>>;
readonly refusals: Schema.$Array<Schema.Struct<{
readonly code: Schema.Literals<readonly [
"invalid-manifest",
"type-change",
"relationship-change",
"drop-refused",
"name-collision",
"identifier-too-long",
"rename-conflict",
"replication-rebuild-required",
"replication-publication-pending"
]>;
readonly path: Schema.String;
readonly message: Schema.String;
}>>;
readonly retained: Schema.optionalKey<Schema.Struct<{
readonly current: Schema.Struct<{
readonly entities: Schema.$Array<Schema.Struct<{
readonly id: Schema.String;
readonly name: Schema.String;
readonly removed: Schema.Boolean;
readonly properties: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>, {
readonly renamedFrom: "renamed_from";
readonly maxLength: "max_length";
readonly maxBytes: "max_bytes";
readonly excludeFromReplication: "exclude_from_replication";
}>>;
readonly relationships: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly on: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly property: Schema.String;
readonly targetProperty: Schema.String;
}>, {
readonly targetProperty: "target_property";
}>>;
readonly onDelete: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly [
"setNull",
"cascade",
"restrict"
]>, Schema.Literals<readonly [
"set_null",
"cascade",
"restrict"
]>, never, never>>;
readonly name: Schema.String;
readonly to: Schema.String;
readonly inverse: Schema.String;
readonly cardinality: Schema.Literals<readonly [
"one",
"many"
]>;
readonly optional: Schema.optionalKey<Schema.Boolean>;
readonly ordered: Schema.optionalKey<Schema.Boolean>;
readonly phrase: Schema.Tuple<readonly [
Schema.String,
Schema.String
]>;
readonly description: Schema.String;
}>, {
readonly onDelete: "on_delete";
}>>;
readonly indexes: Schema.$Array<Schema.Struct<{
readonly properties: Schema.$Array<Schema.String>;
readonly unique: Schema.Boolean;
}>>;
readonly fields: Schema.Struct<{
readonly properties: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>, {
readonly renamedFrom: "renamed_from";
readonly maxLength: "max_length";
readonly maxBytes: "max_bytes";
readonly excludeFromReplication: "exclude_from_replication";
}>>;
readonly relationships: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly on: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly property: Schema.String;
readonly targetProperty: Schema.String;
}>, {
readonly targetProperty: "target_property";
}>>;
readonly onDelete: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly [
"setNull",
"cascade",
"restrict"
]>, Schema.Literals<readonly [
"set_null",
"cascade",
"restrict"
]>, never, never>>;
readonly name: Schema.String;
readonly to: Schema.String;
readonly inverse: Schema.String;
readonly cardinality: Schema.Literals<readonly [
"one",
"many"
]>;
readonly optional: Schema.optionalKey<Schema.Boolean>;
readonly ordered: Schema.optionalKey<Schema.Boolean>;
readonly phrase: Schema.Tuple<readonly [
Schema.String,
Schema.String
]>;
readonly description: Schema.String;
}>, {
readonly onDelete: "on_delete";
}>>;
}>;
}>>;
}>;
readonly target: Schema.Struct<{
readonly entities: Schema.$Array<Schema.Struct<{
readonly id: Schema.String;
readonly name: Schema.String;
readonly removed: Schema.Boolean;
readonly properties: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>, {
readonly renamedFrom: "renamed_from";
readonly maxLength: "max_length";
readonly maxBytes: "max_bytes";
readonly excludeFromReplication: "exclude_from_replication";
}>>;
readonly relationships: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly on: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly property: Schema.String;
readonly targetProperty: Schema.String;
}>, {
readonly targetProperty: "target_property";
}>>;
readonly onDelete: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly [
"setNull",
"cascade",
"restrict"
]>, Schema.Literals<readonly [
"set_null",
"cascade",
"restrict"
]>, never, never>>;
readonly name: Schema.String;
readonly to: Schema.String;
readonly inverse: Schema.String;
readonly cardinality: Schema.Literals<readonly [
"one",
"many"
]>;
readonly optional: Schema.optionalKey<Schema.Boolean>;
readonly ordered: Schema.optionalKey<Schema.Boolean>;
readonly phrase: Schema.Tuple<readonly [
Schema.String,
Schema.String
]>;
readonly description: Schema.String;
}>, {
readonly onDelete: "on_delete";
}>>;
readonly indexes: Schema.$Array<Schema.Struct<{
readonly properties: Schema.$Array<Schema.String>;
readonly unique: Schema.Boolean;
}>>;
readonly fields: Schema.Struct<{
readonly properties: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>, {
readonly renamedFrom: "renamed_from";
readonly maxLength: "max_length";
readonly maxBytes: "max_bytes";
readonly excludeFromReplication: "exclude_from_replication";
}>>;
readonly relationships: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly on: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly property: Schema.String;
readonly targetProperty: Schema.String;
}>, {
readonly targetProperty: "target_property";
}>>;
readonly onDelete: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly [
"setNull",
"cascade",
"restrict"
]>, Schema.Literals<readonly [
"set_null",
"cascade",
"restrict"
]>, never, never>>;
readonly name: Schema.String;
readonly to: Schema.String;
readonly inverse: Schema.String;
readonly cardinality: Schema.Literals<readonly [
"one",
"many"
]>;
readonly optional: Schema.optionalKey<Schema.Boolean>;
readonly ordered: Schema.optionalKey<Schema.Boolean>;
readonly phrase: Schema.Tuple<readonly [
Schema.String,
Schema.String
]>;
readonly description: Schema.String;
}>, {
readonly onDelete: "on_delete";
}>>;
}>;
}>>;
}>;
}>>;
}>type MigrationPlan = typeof MigrationPlan.Type;
MigrationRefusal
A change the planner will not make. A plan with refusals cannot be applied.
const MigrationRefusal: Schema.Struct<{
readonly code: Schema.Literals<readonly [
"invalid-manifest",
"type-change",
"relationship-change",
"drop-refused",
"name-collision",
"identifier-too-long",
"rename-conflict",
"replication-rebuild-required",
"replication-publication-pending"
]>;
readonly path: Schema.String;
readonly message: Schema.String;
}>type MigrationRefusal = typeof MigrationRefusal.Type;
MigrationRefusalCode
type MigrationRefusalCode = (typeof MIGRATION_REFUSAL_CODES)[number];
MigrationRefused
The plan has refusals; nothing was applied.
class MigrationRefused extends MigrationRefused_base {
}MigrationResult
interface MigrationResult {
readonly hash: string;
readonly appliedSteps: number;
readonly changed: boolean;
}MigrationStep
const MigrationStep: Schema.Struct<{
readonly kind: Schema.Literals<readonly [
"createCatalog",
"createEntity",
"restoreEntity",
"renameEntity",
"dropEntities",
"removeEntities",
"addProperty",
"restoreProperty",
"renameProperty",
"dropProperty",
"removeProperty",
"changeOptional",
"changeDefault",
"changeCheck",
"addSelectOption",
"rebuildSelect",
"addRelationship",
"restoreRelationship",
"dropRelationship",
"removeRelationship",
"changeOnDelete",
"addForeignKey",
"addIndex",
"dropIndex"
]>;
readonly classification: Schema.Literals<readonly [
"additive",
"rename",
"change",
"destructive"
]>;
readonly path: Schema.optionalKey<Schema.String>;
readonly transactional: Schema.Boolean;
readonly validatesData: Schema.Boolean;
readonly description: Schema.String;
readonly sql: Schema.$Array<Schema.String>;
}>type MigrationStep = typeof MigrationStep.Type;
MigrationStepClassification
type MigrationStepClassification = (typeof MIGRATION_STEP_CLASSIFICATIONS)[number];
MigrationStepKind
type MigrationStepKind = (typeof MIGRATION_STEP_KINDS)[number];
ModelMeasure
type ModelMeasure = ModelMetric;
ModelMeasureManifest
A metric of the model, `defineOntology({ metrics })`. Its expression is an entity metric's arithmetic whose `metric` nodes name `entity.metric`, with references to other model metrics expanded. Names are wire names throughout.
const ModelMetricManifest: Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly inputs: Schema.$Array<Schema.String>;
readonly align: Schema.$Array<Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>>;
}>type ModelMetricManifest = typeof ModelMetricManifest.Type;
ModelMeasureOptions
type ModelMeasureOptions = ModelMetricOptions;
ModelMeasures
type ModelMeasures = ModelMetrics;
ModelMetric
A metric of the model, declared in `defineOntology({ metrics })`: arithmetic over metrics of entities, `m.ref("entity.metric")`, and over other model metrics, `m.ref("name")`. It reads entity metrics and aggregates no rows of its own.
type ModelMetric = MetricExpression & Partial<MetricOptions> & {
readonly align?: ReadonlyArray<AlignmentGroup>;
};ModelMetricManifest
A metric of the model, `defineOntology({ metrics })`. Its expression is an entity metric's arithmetic whose `metric` nodes name `entity.metric`, with references to other model metrics expanded. Names are wire names throughout.
const ModelMetricManifest: Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly inputs: Schema.$Array<Schema.String>;
readonly align: Schema.$Array<Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>>;
}>type ModelMetricManifest = typeof ModelMetricManifest.Type;
ModelMetricOptions
The options of a model metric: a metric's options and how its entities' properties align.
interface ModelMetricOptions extends MetricOptions {
readonly align?: ReadonlyArray<AlignmentGroup>;
}ModelMetrics
type ModelMetrics = Readonly<Record<string, ModelMetric>>;
NEON_AUTH_ENVIRONMENT_VARIABLES
The workspace's Neon Auth, which signs the app's users in. Provisioning sets both on workspaces that have it; a service without them accepts SegmentStream app tokens and API keys only.
const NEON_AUTH_ENVIRONMENT_VARIABLES: {
readonly baseUrl: "NEON_AUTH_BASE_URL";
readonly jwksUrl: "NEON_AUTH_JWKS_URL";
}NeonAuthEnvironment
Where the workspace's Neon Auth issues and publishes the keys of its users' tokens.
interface NeonAuthEnvironment {
readonly baseUrl: string;
readonly jwksUrl: string;
}NoActions
The actions of an entity before `.actions(…)` adds any.
type NoActions = Readonly<Record<never, never>>;
NotFound
The record does not exist.
class NotFound extends NotFound_base {
}NotInvited
The sign-in policy is `invited` and nobody invited this person: no user has their identity or their email. Unlike other rejections the caller is told, so that the app can say what to do.
class NotInvited extends NotInvited_base {
}NumberOptions
interface NumberOptions extends PropertyOptions<number> {
readonly min?: number;
readonly max?: number;
}OAuthClient
A client that registered itself to connect an agent (RFC 7591 dynamic registration).
interface OAuthClient {
readonly id: string;
readonly name: string;
readonly redirectUris: ReadonlyArray<string>;
readonly authMethod: OAuthClientAuthMethod;
readonly secretHash: string | null;
readonly clientUri: string | null;
}OAuthClientAuthMethod
How a client proves itself at the token endpoint; `none` for a public client, with PKCE only.
type OAuthClientAuthMethod = "none" | "client_secret_post" | "client_secret_basic";
OAuthDevice
RFC 8628 authorization. Both codes are stored as hashes.
interface OAuthDevice {
readonly hash: string;
readonly userCodeHash: string;
readonly clientId: string;
readonly scope: string;
readonly resource: string;
readonly expiresAt: Date;
readonly interval: number;
readonly status: "pending" | "approved" | "denied" | "consumed";
readonly userId: string | null;
}OAuthGrant
What a member allowed a client to do. Its tokens stop working once it is revoked.
interface OAuthGrant {
readonly id: string;
readonly clientId: string;
readonly userId: string | null;
readonly scope: string;
readonly resource: string;
readonly expiresAt?: Date;
readonly identityProvider?: string;
}OAuthRequest
An authorization request waiting, for a few minutes, for a member's consent.
interface OAuthRequest {
readonly id: string;
readonly clientId: string;
readonly redirectUri: string;
readonly state: string | null;
readonly codeChallenge: string;
readonly scope: string;
readonly resource: string;
readonly expiresAt: Date;
}OAuthStore
Where the MCP server's authorization server keeps clients, pending requests, grants and tokens: the runtime's OAuth tables in the workspace database. Expiry is checked against the database's clock; failures are defects.
interface OAuthStore {
readonly withTokenLock: <A>(hash: string, effect: Effect.Effect<A>) => Effect.Effect<A>;
readonly refreshReplay: (hash: string, graceMs: number) => Effect.Effect<string | undefined>;
readonly saveRefreshReplay: (hash: string, encrypted: string, successorHash: string) => Effect.Effect<void>;
readonly saveDevice: (device: OAuthDevice) => Effect.Effect<boolean>;
readonly findDevice: (userCodeHash: string) => Effect.Effect<OAuthDevice | undefined>;
readonly deviceAttempt: (memberId: string) => Effect.Effect<boolean>;
readonly decideDevice: (userCodeHash: string, userId: string, scope: string | undefined, decision: "approve" | "deny") => Effect.Effect<boolean>;
readonly pollDevice: (hash: string, clientId: string, resource: string | undefined) => Effect.Effect<DevicePoll>;
readonly saveClient: (client: OAuthClient) => Effect.Effect<void>;
readonly findClient: (id: string) => Effect.Effect<OAuthClient | undefined>;
readonly saveRequest: (request: OAuthRequest) => Effect.Effect<void>;
readonly findRequest: (id: string) => Effect.Effect<OAuthRequest | undefined>;
readonly takeRequest: (id: string) => Effect.Effect<OAuthRequest | undefined>;
readonly saveGrant: (grant: OAuthGrant & {
readonly userId: string;
}, code?: OAuthToken) => Effect.Effect<void>;
readonly useToken: (hash: string, kind: "code" | "refresh") => Effect.Effect<UsedOAuthToken>;
readonly saveTokens: (tokens: ReadonlyArray<OAuthToken>) => Effect.Effect<void>;
readonly findAccess: (hash: string) => Effect.Effect<OAuthGrant | undefined>;
readonly findGrantOfToken: (hash: string) => Effect.Effect<OAuthGrant | undefined>;
readonly revokeGrant: (id: string) => Effect.Effect<void>;
readonly memberPrincipal: (userId: string) => Effect.Effect<Principal | undefined>;
readonly guestPrincipal?: (grant: OAuthGrant) => Effect.Effect<Principal | undefined>;
}OAuthToken
A code or token of a grant, stored only as the SHA-256 of its value.
interface OAuthToken {
readonly hash: string;
readonly grantId: string;
readonly kind: OAuthTokenKind;
readonly expiresAt: Date;
readonly redirectUri?: string;
readonly codeChallenge?: string;
}OAuthTokenKind
type OAuthTokenKind = "code" | "access" | "refresh";
OIDC_TOKEN_HEADER
The header Vercel sets on each function request: the deployment's OIDC token.
const OIDC_TOKEN_HEADER = "x-vercel-oidc-token"
ONTOLOGY_DEPLOYMENT_HEADER
The header the agent of a preview names its own deployment in, as the ontology's own calls to the platform do. Vercel's function tokens name a project and its environment, never a deployment, and every preview of a workspace shares one hosting project, so a preview's ontology checks the header against its own deployment before it trusts a runtime token: an agent of another preview of the same workspace is refused rather than served another branch's data.
const ONTOLOGY_DEPLOYMENT_HEADER = "x-segmentstream-ontology-deployment-id"
ONTOLOGY_HASH_HEADER
The header every response carries: the hash of the manifest the service serves.
const ONTOLOGY_HASH_HEADER = "x-ontology-hash"
ON_DELETE
const ON_DELETE: readonly [
"setNull",
"cascade",
"restrict"
]OWNED_CONNECTIONS_PAGE
The app page where each user connects their own connections. The platform sends every consent back to it, and the app SDK's `CONNECTIONS_PATH` names the same path.
const OWNED_CONNECTIONS_PAGE = "/account/connections"
OnDelete
What happens to the declaring record when the record it points at is deleted.
type OnDelete = (typeof ON_DELETE)[number];
OneOptions
interface OneOptions {
readonly on?: Readonly<Record<string, string>>;
readonly optional?: boolean;
readonly inverse: string;
readonly onDelete?: OnDelete;
readonly phrase?: Phrase;
readonly description: string;
}OneRelationship
A many-to-one relationship. Between stored entities it is declared on the side that holds the key (`owner_id` on `lead`). When either end is warehouse-backed it is value-matched: it declares `on`, one pair of an own property and a target property, and has no key column, delete rule or optionality of its own.
interface OneRelationship<Optional extends boolean = boolean, Matched extends boolean = boolean, Target extends string = string> {
readonly [RelationshipTypeId]: typeof RelationshipTypeId;
readonly cardinality: "one";
readonly on?: Readonly<Record<string, string>>;
readonly target: EntityTarget;
readonly optional: Optional;
readonly inverse: string;
readonly onDelete?: OnDelete;
readonly phrase?: Phrase;
readonly description: string;
readonly "~ontology.matched": Matched;
readonly "~ontology.target": Target;
}Ontology
A checked ontology: the resolved definitions and the manifest built from them.
interface Ontology<Entities extends ReadonlyArray<AnyEntity> = ReadonlyArray<AnyEntity>, Metrics extends ModelMetrics = ModelMetrics> {
readonly config: OntologyConfig<Entities, Metrics>;
readonly entities: ReadonlyArray<ResolvedEntity>;
readonly roles: ReadonlyArray<Role>;
readonly signIn: ResolvedSignInOptions;
readonly connections: ReadonlyArray<ResolvedConnection>;
readonly workflows: ReadonlyArray<WorkflowManifest>;
readonly toolsets: ReadonlyArray<ResolvedToolset>;
readonly manifest: OntologyManifest;
readonly warnings: ReadonlyArray<Diagnostic>;
}OntologyActions
Runs an authored action as the current caller, through the same path as the action's HTTP route: its permission check, validation, transaction, history and after-commit hook. What `Lead.actions.addNote(input)` requires. A workflow step's `run` provides it; action handlers do not have it, since an action never runs another action.
class OntologyActions extends OntologyActions_base {
}OntologyApi
The API of one ontology: its groups are the entities' names and {@link SERVICE_GROUP}.
type OntologyApi = HttpApi.HttpApi<"ontology", HttpApiGroup.Top>;
OntologyBackend
The runtime as the HTTP service sees it, with its database and ontology already bound. Failures outside the declared errors are defects and become a sanitized 500.
class OntologyBackend extends OntologyBackend_base {
}OntologyConfig
The input of `defineOntology` and `check`.
interface OntologyConfig<Entities extends ReadonlyArray<AnyEntity> = ReadonlyArray<AnyEntity>, Metrics extends ModelMetrics = ModelMetrics> extends EarlierMetricsField<Metrics> {
readonly entities: Entities;
readonly feedback?: boolean | FeedbackOptions;
readonly hooks?: {
readonly role: string;
};
readonly roles?: ReadonlyArray<Role>;
readonly workflows?: ReadonlyArray<AnyWorkflow>;
readonly triggers?: ReadonlyArray<WorkflowTrigger>;
readonly member?: MemberOptions;
readonly guest?: GuestOptions<RolePermission, Role | string>;
readonly signIn?: SignInOptions;
readonly signUp?: SignUpOptions<Role | string>;
readonly onSignUp?: string;
readonly discovery?: DiscoveryOptions;
readonly emails?: Readonly<Record<string, EmailTemplate>>;
readonly connections?: ReadonlyArray<AnyConnectionHandle>;
readonly toolsets?: ReadonlyArray<Toolset>;
readonly chat?: ChatConfig;
readonly inbox?: InboxOptions<Role | string>;
readonly metrics?: Metrics;
}OntologyEnvironment
What the service reads from its environment.
interface OntologyEnvironment {
readonly deployment?: DeploymentObservation;
readonly channels?: {
readonly telegram?: TelegramPreviewSettings & {
readonly miniApp?: {
readonly testPublicKeyHex?: string;
readonly emailPairing?: boolean;
};
};
};
readonly appOrigins?: readonly string[];
readonly browserRevisionClientId?: string;
readonly browserRevisionIssuer?: string;
readonly browserAuth?: unknown;
readonly browserEnvironment?: "local";
readonly oidc?: {
readonly issuer: string;
readonly clientId: string;
};
readonly databaseUrl: Redacted.Redacted<string>;
readonly blobStorage?: Redacted.Redacted<BlobStorageBinding>;
readonly storageMaintenanceKey?: Redacted.Redacted<string>;
readonly segmentstreamUrl: string;
readonly applicationId: string;
readonly workspaceId: string;
readonly organizationId: string;
readonly appCredential?: Redacted.Redacted<string>;
readonly workloadTarget?: {
readonly deploymentId: string;
};
readonly cronSecret?: Redacted.Redacted<string>;
readonly webhookSecret?: Redacted.Redacted<string>;
readonly neonAuth?: NeonAuthEnvironment;
readonly runtimeIdentity?: RuntimeIdentityConfig;
readonly localConnections?: LocalConnectionContext;
readonly agentOrigin?: string;
}OntologyManifest
Historical readers accept either metadata spelling and any manifest version, with the names of metrics before version 14: every decode, of the type side too, reads a document through `withCurrentManifestNames`.
const OntologyManifest: Schema.declareConstructor<{
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retentionDays?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly botCheck?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly confirmations?: boolean | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly autoRedirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly onNewUser?: string | undefined;
readonly codeLink?: boolean | undefined;
readonly cli?: boolean | undefined;
readonly signUp?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly onSignUp?: string | undefined;
readonly invitationEmail?: string | undefined;
readonly linkEmail?: string | undefined;
readonly codeEmail?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly replyTo?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly replyTo?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
} | {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retentionDays?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly botCheck?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly confirmations?: boolean | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly autoRedirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly onNewUser?: string | undefined;
readonly codeLink?: boolean | undefined;
readonly cli?: boolean | undefined;
readonly signUp?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly onSignUp?: string | undefined;
readonly invitationEmail?: string | undefined;
readonly linkEmail?: string | undefined;
readonly codeEmail?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly replyTo?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly replyTo?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
}, {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly built_in: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
readonly renamed_from?: string | undefined;
readonly max_length?: number | undefined;
readonly max_bytes?: number | undefined;
readonly exclude_from_replication?: boolean | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly on?: {
readonly property: string;
readonly target_property: string;
} | undefined;
readonly ordered?: boolean | undefined;
readonly on_delete?: "cascade" | "restrict" | "set_null" | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly built_in: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balance_over?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly renamed_from?: string | undefined;
readonly erase_from_warehouse_on_delete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retention_days?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly reply_to?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly reply_to?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
readonly sign_in?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly confirmations?: boolean | undefined;
readonly bot_check?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly auto_redirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly cli?: boolean | undefined;
readonly on_new_user?: string | undefined;
readonly code_link?: boolean | undefined;
readonly sign_up?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly on_sign_up?: string | undefined;
readonly invitation_email?: string | undefined;
readonly link_email?: string | undefined;
readonly code_email?: string | undefined;
} | undefined;
} | {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retention_days?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly confirmations?: boolean | undefined;
readonly bot_check?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly auto_redirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly cli?: boolean | undefined;
readonly on_new_user?: string | undefined;
readonly code_link?: boolean | undefined;
readonly sign_up?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly on_sign_up?: string | undefined;
readonly invitation_email?: string | undefined;
readonly link_email?: string | undefined;
readonly code_email?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly reply_to?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly reply_to?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
}, readonly [
Schema.Union<readonly [
Schema.encodeKeys<Schema.Struct<{
readonly entities: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly balanceOver: Schema.optionalKey<Schema.String>;
}>, {
readonly balanceOver: "balance_over";
}>>>;
readonly properties: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>, {
readonly renamedFrom: "renamed_from";
readonly maxLength: "max_length";
readonly maxBytes: "max_bytes";
readonly excludeFromReplication: "exclude_from_replication";
}>>;
readonly relationships: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly on: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly property: Schema.String;
readonly targetProperty: Schema.String;
}>, {
readonly targetProperty: "target_property";
}>>;
readonly onDelete: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly [
"setNull",
"cascade",
"restrict"
]>, Schema.Literals<readonly [
"set_null",
"cascade",
"restrict"
]>, never, never>>;
readonly name: Schema.String;
readonly to: Schema.String;
readonly inverse: Schema.String;
readonly cardinality: Schema.Literals<readonly [
"one",
"many"
]>;
readonly optional: Schema.optionalKey<Schema.Boolean>;
readonly ordered: Schema.optionalKey<Schema.Boolean>;
readonly phrase: Schema.Tuple<readonly [
Schema.String,
Schema.String
]>;
readonly description: Schema.String;
}>, {
readonly onDelete: "on_delete";
}>>;
readonly source: Schema.optionalKey<Schema.Struct<{
readonly asset: Schema.String;
readonly key: Schema.$Array<Schema.String>;
readonly currency: Schema.optionalKey<Schema.String>;
}>>;
readonly id: Schema.String;
readonly name: Schema.String;
readonly label: Schema.String;
readonly plural: Schema.String;
readonly title: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly guide: Schema.optionalKey<Schema.String>;
readonly indexes: Schema.$Array<Schema.Struct<{
readonly properties: Schema.$Array<Schema.String>;
readonly unique: Schema.Boolean;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
readonly permissions: Schema.optionalKey<Schema.Struct<{
readonly read: Schema.String;
readonly create: Schema.optionalKey<Schema.String>;
readonly update: Schema.optionalKey<Schema.String>;
readonly delete: Schema.optionalKey<Schema.String>;
readonly link: Schema.optionalKey<Schema.String>;
readonly unlink: Schema.optionalKey<Schema.String>;
}>>;
readonly writes: Schema.optionalKey<Schema.Literal<"actions">>;
readonly eraseFromWarehouseOnDelete: Schema.optionalKey<Schema.Literal<true>>;
}>, {
readonly builtIn: "built_in";
readonly renamedFrom: "renamed_from";
readonly eraseFromWarehouseOnDelete: "erase_from_warehouse_on_delete";
}>>;
readonly roles: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly permission: Schema.String;
readonly where: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
}>>>;
}>, {
readonly builtIn: "built_in";
}>>;
readonly feedback: Schema.optionalKey<Schema.Struct<{
readonly enabled: Schema.Boolean;
readonly files: Schema.Boolean;
readonly builders: Schema.$Array<Schema.String>;
readonly automaticFailureReports: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly runtimeCapabilities: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly executionCompatibility: Schema.optionalKey<Schema.Struct<{
readonly version: Schema.Int;
readonly hash: Schema.String;
}>>;
readonly version: Schema.Int;
readonly hash: Schema.String;
readonly signIn: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly browser: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly methods: Schema.$Array<Schema.String>;
readonly primary: Schema.String;
readonly autoRedirect: Schema.Boolean;
readonly local: Schema.optionalKey<Schema.Struct<{
readonly port: Schema.Int;
}>>;
}>, {
readonly autoRedirect: "auto_redirect";
}>>;
readonly policy: Schema.String;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>;
readonly onNewUser: Schema.optionalKey<Schema.String>;
readonly codeLink: Schema.optionalKey<Schema.Boolean>;
readonly cli: Schema.optionalKey<Schema.Boolean>;
readonly signUp: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Record<Schema.String, Schema.Unknown>;
readonly origins: Schema.optionalKey<Schema.$Array<Schema.String>>;
}>>;
readonly onSignUp: Schema.optionalKey<Schema.String>;
readonly guest: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly openOnInvite: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly byChannel: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
readonly channels: Schema.$Array<Schema.String>;
readonly origins: Schema.$Array<Schema.String>;
readonly botCheck: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly connection: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
readonly secret: Schema.optionalKey<Schema.String>;
}>>;
readonly confirmations: Schema.optionalKey<Schema.Boolean>;
}>, {
readonly botCheck: "bot_check";
}>>;
readonly invitationEmail: Schema.optionalKey<Schema.String>;
readonly linkEmail: Schema.optionalKey<Schema.String>;
readonly codeEmail: Schema.optionalKey<Schema.String>;
}>, {
readonly onNewUser: "on_new_user";
readonly codeLink: "code_link";
readonly signUp: "sign_up";
readonly onSignUp: "on_sign_up";
readonly invitationEmail: "invitation_email";
readonly linkEmail: "link_email";
readonly codeEmail: "code_email";
}>>;
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly html: Schema.String;
readonly text: Schema.String;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>,
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly eyebrow: Schema.optionalKey<Schema.String>;
readonly heading: Schema.String;
readonly card: Schema.optionalKey<Schema.Struct<{
readonly title: Schema.String;
readonly detail: Schema.optionalKey<Schema.String>;
}>>;
readonly note: Schema.optionalKey<Schema.String>;
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly action: Schema.String;
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly title: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly copy: Schema.optionalKey<Schema.Struct<{
readonly label: Schema.optionalKey<Schema.String>;
readonly value: Schema.String;
}>>;
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly label: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly code: Schema.optionalKey<Schema.String>;
}>>>;
readonly note: Schema.optionalKey<Schema.String>;
}>>>;
readonly footer: Schema.optionalKey<Schema.String>;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>
]>>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly key: Schema.String;
readonly description: Schema.String;
readonly delivers: Schema.optionalKey<Schema.Literal<true>>;
readonly owner: Schema.optionalKey<Schema.Literal<"user">>;
}>>>;
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly telegram: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly slack: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly email: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
readonly kind: Schema.Literals<readonly [
"telegram",
"slack",
"whatsapp",
"email",
"custom"
]>;
readonly connection: Schema.optionalKey<Schema.String>;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>>;
readonly attribution: Schema.optionalKey<Schema.Struct<{
readonly template: Schema.optionalKey<Schema.String>;
readonly separator: Schema.optionalKey<Schema.String>;
}>>;
readonly retentionDays: Schema.optionalKey<Schema.Int>;
}>, {
readonly retentionDays: "retention_days";
}>>;
readonly inbox: Schema.optionalKey<Schema.Struct<{
readonly roles: Schema.$Array<Schema.String>;
readonly channels: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly takeover: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Array<Schema.String>;
}>>;
readonly attribution: Schema.optionalKey<Schema.Literals<readonly [
"name",
"none"
]>>;
}>>;
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly inputs: Schema.$Array<Schema.String>;
readonly align: Schema.$Array<Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>>;
}>>>;
readonly workflows: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly role: Schema.String;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly connections: Schema.$Array<Schema.String>;
readonly triggers: Schema.$Array<Schema.Union<readonly [
Schema.Struct<{
readonly kind: Schema.Literal<"cron">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly cron: Schema.String;
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"action">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly entity: Schema.String;
readonly action: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"webhook">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly signature: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly secret: Schema.optionalKey<Schema.String>;
readonly generated: Schema.optionalKey<Schema.Literal<true>>;
readonly input: Schema.optionalKey<Schema.String>;
readonly algorithm: Schema.optionalKey<Schema.String>;
readonly encoding: Schema.optionalKey<Schema.String>;
readonly key: Schema.optionalKey<Schema.Struct<{
readonly decode: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
}>>;
readonly signatures: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
readonly entries: Schema.optionalKey<Schema.Struct<{
readonly separator: Schema.String;
readonly assign: Schema.String;
readonly name: Schema.String;
}>>;
}>>;
readonly timestamp: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.optionalKey<Schema.String>;
readonly entry: Schema.optionalKey<Schema.String>;
readonly unit: Schema.optionalKey<Schema.String>;
readonly tolerance: Schema.optionalKey<Schema.Number>;
}>>;
readonly message: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
Schema.String,
Schema.Struct<{
readonly body: Schema.Literals<readonly [
true,
"sorted-json"
]>;
}>,
Schema.Struct<{
readonly header: Schema.String;
}>,
Schema.Struct<{
readonly timestamp: Schema.Literal<true>;
}>
]>>>;
}>>;
readonly verification: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly verifyToken: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
}>>;
readonly headers: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connection: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"platform">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly events: Schema.$Array<Schema.String>;
}>,
Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
]>>;
readonly action: Schema.optionalKey<Schema.Struct<{
readonly entity: Schema.String;
readonly action: Schema.String;
}>>;
}>>>;
readonly toolsets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly connection: Schema.String;
readonly api: Schema.String;
readonly tools: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly access: Schema.Literals<readonly [
"read",
"write"
]>;
readonly fixed: Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.String,
Schema.Number,
Schema.Boolean
]>>;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
}>>>;
}>, {
readonly signIn: "sign_in";
}>,
Schema.Struct<{
readonly feedback: Schema.optionalKey<Schema.Struct<{
readonly enabled: Schema.Boolean;
readonly files: Schema.Boolean;
readonly builders: Schema.$Array<Schema.String>;
readonly automaticFailureReports: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly runtimeCapabilities: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly executionCompatibility: Schema.optionalKey<Schema.Struct<{
readonly version: Schema.Int;
readonly hash: Schema.String;
}>>;
readonly version: Schema.Int;
readonly hash: Schema.String;
readonly entities: Schema.$Array<Schema.Struct<{
readonly source: Schema.optionalKey<Schema.Struct<{
readonly asset: Schema.String;
readonly key: Schema.$Array<Schema.String>;
readonly currency: Schema.optionalKey<Schema.String>;
}>>;
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly balanceOver: Schema.optionalKey<Schema.String>;
}>>>;
readonly id: Schema.String;
readonly name: Schema.String;
readonly label: Schema.String;
readonly plural: Schema.String;
readonly title: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly guide: Schema.optionalKey<Schema.String>;
readonly properties: Schema.$Array<Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>>;
readonly relationships: Schema.$Array<Schema.Struct<{
readonly on: Schema.optionalKey<Schema.Struct<{
readonly property: Schema.String;
readonly targetProperty: Schema.String;
}>>;
readonly name: Schema.String;
readonly to: Schema.String;
readonly inverse: Schema.String;
readonly cardinality: Schema.Literals<readonly [
"one",
"many"
]>;
readonly optional: Schema.optionalKey<Schema.Boolean>;
readonly onDelete: Schema.optionalKey<Schema.Literals<readonly [
"setNull",
"cascade",
"restrict"
]>>;
readonly ordered: Schema.optionalKey<Schema.Boolean>;
readonly phrase: Schema.Tuple<readonly [
Schema.String,
Schema.String
]>;
readonly description: Schema.String;
}>>;
readonly indexes: Schema.$Array<Schema.Struct<{
readonly properties: Schema.$Array<Schema.String>;
readonly unique: Schema.Boolean;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
readonly permissions: Schema.optionalKey<Schema.Struct<{
readonly read: Schema.String;
readonly create: Schema.optionalKey<Schema.String>;
readonly update: Schema.optionalKey<Schema.String>;
readonly delete: Schema.optionalKey<Schema.String>;
readonly link: Schema.optionalKey<Schema.String>;
readonly unlink: Schema.optionalKey<Schema.String>;
}>>;
readonly writes: Schema.optionalKey<Schema.Literal<"actions">>;
readonly eraseFromWarehouseOnDelete: Schema.optionalKey<Schema.Literal<true>>;
}>>;
readonly roles: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly permission: Schema.String;
readonly where: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
}>>>;
}>>;
readonly signIn: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly browser: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly methods: Schema.$Array<Schema.String>;
readonly primary: Schema.String;
readonly autoRedirect: Schema.Boolean;
readonly local: Schema.optionalKey<Schema.Struct<{
readonly port: Schema.Int;
}>>;
}>, {
readonly autoRedirect: "auto_redirect";
}>>;
readonly policy: Schema.String;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>;
readonly onNewUser: Schema.optionalKey<Schema.String>;
readonly codeLink: Schema.optionalKey<Schema.Boolean>;
readonly cli: Schema.optionalKey<Schema.Boolean>;
readonly signUp: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Record<Schema.String, Schema.Unknown>;
readonly origins: Schema.optionalKey<Schema.$Array<Schema.String>>;
}>>;
readonly onSignUp: Schema.optionalKey<Schema.String>;
readonly guest: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly openOnInvite: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly byChannel: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
readonly channels: Schema.$Array<Schema.String>;
readonly origins: Schema.$Array<Schema.String>;
readonly botCheck: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly connection: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
readonly secret: Schema.optionalKey<Schema.String>;
}>>;
readonly confirmations: Schema.optionalKey<Schema.Boolean>;
}>, {
readonly botCheck: "bot_check";
}>>;
readonly invitationEmail: Schema.optionalKey<Schema.String>;
readonly linkEmail: Schema.optionalKey<Schema.String>;
readonly codeEmail: Schema.optionalKey<Schema.String>;
}>, {
readonly onNewUser: "on_new_user";
readonly codeLink: "code_link";
readonly signUp: "sign_up";
readonly onSignUp: "on_sign_up";
readonly invitationEmail: "invitation_email";
readonly linkEmail: "link_email";
readonly codeEmail: "code_email";
}>>;
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly html: Schema.String;
readonly text: Schema.String;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>,
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly eyebrow: Schema.optionalKey<Schema.String>;
readonly heading: Schema.String;
readonly card: Schema.optionalKey<Schema.Struct<{
readonly title: Schema.String;
readonly detail: Schema.optionalKey<Schema.String>;
}>>;
readonly note: Schema.optionalKey<Schema.String>;
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly action: Schema.String;
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly title: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly copy: Schema.optionalKey<Schema.Struct<{
readonly label: Schema.optionalKey<Schema.String>;
readonly value: Schema.String;
}>>;
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly label: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly code: Schema.optionalKey<Schema.String>;
}>>>;
readonly note: Schema.optionalKey<Schema.String>;
}>>>;
readonly footer: Schema.optionalKey<Schema.String>;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>
]>>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly key: Schema.String;
readonly description: Schema.String;
readonly delivers: Schema.optionalKey<Schema.Literal<true>>;
readonly owner: Schema.optionalKey<Schema.Literal<"user">>;
}>>>;
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly telegram: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly slack: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly email: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
readonly kind: Schema.Literals<readonly [
"telegram",
"slack",
"whatsapp",
"email",
"custom"
]>;
readonly connection: Schema.optionalKey<Schema.String>;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>>;
readonly attribution: Schema.optionalKey<Schema.Struct<{
readonly template: Schema.optionalKey<Schema.String>;
readonly separator: Schema.optionalKey<Schema.String>;
}>>;
readonly retentionDays: Schema.optionalKey<Schema.Int>;
}>, {
readonly retentionDays: "retention_days";
}>>;
readonly inbox: Schema.optionalKey<Schema.Struct<{
readonly roles: Schema.$Array<Schema.String>;
readonly channels: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly takeover: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Array<Schema.String>;
}>>;
readonly attribution: Schema.optionalKey<Schema.Literals<readonly [
"name",
"none"
]>>;
}>>;
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly inputs: Schema.$Array<Schema.String>;
readonly align: Schema.$Array<Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>>;
}>>>;
readonly workflows: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly role: Schema.String;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly connections: Schema.$Array<Schema.String>;
readonly triggers: Schema.$Array<Schema.Union<readonly [
Schema.Struct<{
readonly kind: Schema.Literal<"cron">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly cron: Schema.String;
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"action">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly entity: Schema.String;
readonly action: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"webhook">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly signature: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly secret: Schema.optionalKey<Schema.String>;
readonly generated: Schema.optionalKey<Schema.Literal<true>>;
readonly input: Schema.optionalKey<Schema.String>;
readonly algorithm: Schema.optionalKey<Schema.String>;
readonly encoding: Schema.optionalKey<Schema.String>;
readonly key: Schema.optionalKey<Schema.Struct<{
readonly decode: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
}>>;
readonly signatures: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
readonly entries: Schema.optionalKey<Schema.Struct<{
readonly separator: Schema.String;
readonly assign: Schema.String;
readonly name: Schema.String;
}>>;
}>>;
readonly timestamp: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.optionalKey<Schema.String>;
readonly entry: Schema.optionalKey<Schema.String>;
readonly unit: Schema.optionalKey<Schema.String>;
readonly tolerance: Schema.optionalKey<Schema.Number>;
}>>;
readonly message: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
Schema.String,
Schema.Struct<{
readonly body: Schema.Literals<readonly [
true,
"sorted-json"
]>;
}>,
Schema.Struct<{
readonly header: Schema.String;
}>,
Schema.Struct<{
readonly timestamp: Schema.Literal<true>;
}>
]>>>;
}>>;
readonly verification: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly verifyToken: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
}>>;
readonly headers: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connection: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"platform">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly events: Schema.$Array<Schema.String>;
}>,
Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
]>>;
readonly action: Schema.optionalKey<Schema.Struct<{
readonly entity: Schema.String;
readonly action: Schema.String;
}>>;
}>>>;
readonly toolsets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly connection: Schema.String;
readonly api: Schema.String;
readonly tools: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly access: Schema.Literals<readonly [
"read",
"write"
]>;
readonly fixed: Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.String,
Schema.Number,
Schema.Boolean
]>>;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
}>>>;
}>
]>
], {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retentionDays?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly botCheck?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly confirmations?: boolean | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly autoRedirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly onNewUser?: string | undefined;
readonly codeLink?: boolean | undefined;
readonly cli?: boolean | undefined;
readonly signUp?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly onSignUp?: string | undefined;
readonly invitationEmail?: string | undefined;
readonly linkEmail?: string | undefined;
readonly codeEmail?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly replyTo?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly replyTo?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
} | {
readonly roles: readonly {
readonly description: string;
readonly name: string;
readonly builtIn: boolean;
readonly scopes?: readonly {
readonly permission: string;
readonly where: {
readonly [x: string]: Schema.Json;
};
}[] | undefined;
readonly permissions?: readonly string[] | undefined;
}[];
readonly version: number;
readonly hash: string;
readonly entities: readonly {
readonly id: string;
readonly description: string;
readonly name: string;
readonly label: string;
readonly title: string;
readonly properties: readonly {
readonly optional: boolean;
readonly name: string;
readonly label: string;
readonly unique: boolean;
readonly managed: boolean;
readonly type: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob";
readonly max?: number | undefined;
readonly description?: string | undefined;
readonly options?: readonly {
readonly value: string;
readonly label: string;
readonly description: string;
}[] | undefined;
readonly min?: number | undefined;
readonly column?: string | undefined;
readonly maxLength?: number | undefined;
readonly scope?: readonly string[] | undefined;
readonly default?: Schema.Json | undefined;
readonly renamedFrom?: string | undefined;
readonly excludeFromReplication?: boolean | undefined;
readonly display?: string | undefined;
readonly accept?: readonly string[] | undefined;
readonly maxBytes?: number | undefined;
readonly items?: "number" | "boolean" | "email" | "text" | "list" | "date" | "timestamp" | "url" | "select" | "integer" | "json" | "blob" | undefined;
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
readonly relationships: readonly {
readonly description: string;
readonly name: string;
readonly to: string;
readonly phrase: readonly [
string,
string
];
readonly cardinality: "one" | "many";
readonly inverse: string;
readonly optional?: boolean | undefined;
readonly onDelete?: "setNull" | "cascade" | "restrict" | undefined;
readonly on?: {
readonly property: string;
readonly targetProperty: string;
} | undefined;
readonly ordered?: boolean | undefined;
}[];
readonly indexes: readonly {
readonly properties: readonly string[];
readonly unique: boolean;
}[];
readonly plural: string;
readonly builtIn: boolean;
readonly permissions?: {
readonly read: string;
readonly create?: string | undefined;
readonly update?: string | undefined;
readonly delete?: string | undefined;
readonly link?: string | undefined;
readonly unlink?: string | undefined;
} | undefined;
readonly renamedFrom?: string | undefined;
readonly source?: {
readonly key: readonly string[];
readonly asset: string;
readonly currency?: string | undefined;
} | undefined;
readonly metrics?: readonly {
readonly description: string;
readonly name: string;
readonly label: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly balanceOver?: string | undefined;
}[] | undefined;
readonly guide?: string | undefined;
readonly writes?: "actions" | undefined;
readonly eraseFromWarehouseOnDelete?: true | undefined;
}[];
readonly chat?: {
readonly telegram?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly slack?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly whatsapp?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly email?: {
readonly connection: string;
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly signature?: boolean | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: {
readonly kind: "telegram" | "slack" | "whatsapp" | "email" | "custom";
readonly files?: {
readonly keep: boolean;
} | undefined;
readonly connection?: string | undefined;
readonly signature?: boolean | undefined;
};
} | undefined;
readonly attribution?: {
readonly separator?: string | undefined;
readonly template?: string | undefined;
} | undefined;
readonly retentionDays?: number | undefined;
} | undefined;
readonly workflows?: readonly {
readonly description: string;
readonly name: string;
readonly connections: readonly string[];
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly triggers: readonly ({
readonly [x: string]: Schema.Json;
} | {
readonly kind: "cron";
readonly name: string;
readonly description: string;
readonly cron: string;
readonly input: Schema.Json;
} | {
readonly kind: "action";
readonly entity: string;
readonly description: string;
readonly name: string;
readonly action?: string | undefined;
} | {
readonly kind: "webhook";
readonly description: string;
readonly name: string;
readonly connection?: string | undefined;
readonly headers?: readonly string[] | undefined;
readonly signature?: {
readonly scheme: string;
readonly message?: readonly (string | {
readonly body: true | "sorted-json";
} | {
readonly header: string;
} | {
readonly timestamp: true;
})[] | undefined;
readonly key?: {
readonly decode: string;
readonly prefix?: string | undefined;
} | undefined;
readonly timestamp?: {
readonly unit?: string | undefined;
readonly entry?: string | undefined;
readonly tolerance?: number | undefined;
readonly header?: string | undefined;
} | undefined;
readonly generated?: true | undefined;
readonly input?: string | undefined;
readonly algorithm?: string | undefined;
readonly encoding?: string | undefined;
readonly signatures?: {
readonly header: string;
readonly entries?: {
readonly separator: string;
readonly assign: string;
readonly name: string;
} | undefined;
readonly prefix?: string | undefined;
} | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly verification?: {
readonly scheme: string;
readonly input?: string | undefined;
readonly verifyToken?: string | undefined;
} | undefined;
} | {
readonly kind: "platform";
readonly name: string;
readonly description: string;
readonly events: readonly string[];
})[];
readonly role: string;
readonly action?: {
readonly entity: string;
readonly action: string;
} | undefined;
}[] | undefined;
readonly feedback?: {
readonly files: boolean;
readonly builders: readonly string[];
readonly enabled: boolean;
readonly automaticFailureReports?: boolean | undefined;
} | undefined;
readonly connections?: readonly {
readonly description: string;
readonly key: string;
readonly owner?: "user" | undefined;
readonly delivers?: true | undefined;
}[] | undefined;
readonly metrics?: readonly {
readonly name: string;
readonly label: string;
readonly description: string;
readonly unit: "number" | "currency" | "ratio" | "percent";
readonly format: "decimal" | "currency" | "percent";
readonly expression: Schema.Json;
readonly inputs: readonly string[];
readonly align: readonly {
readonly [x: string]: string | null;
}[];
}[] | undefined;
readonly runtimeCapabilities?: readonly string[] | undefined;
readonly executionCompatibility?: {
readonly version: number;
readonly hash: string;
} | undefined;
readonly signIn?: {
readonly policy: string;
readonly guest?: {
readonly channels: readonly string[];
readonly origins: readonly string[];
readonly openOnInvite?: readonly string[] | undefined;
readonly byChannel?: {
readonly [x: string]: readonly string[];
} | undefined;
readonly botCheck?: {
readonly scheme: string;
readonly connection?: string | undefined;
readonly input?: string | undefined;
readonly secret?: string | undefined;
} | undefined;
readonly confirmations?: boolean | undefined;
} | undefined;
readonly browser?: {
readonly methods: readonly string[];
readonly primary: string;
readonly autoRedirect: boolean;
readonly local?: {
readonly port: number;
} | undefined;
} | undefined;
readonly channels?: {
readonly [x: string]: unknown;
} | undefined;
readonly onNewUser?: string | undefined;
readonly codeLink?: boolean | undefined;
readonly cli?: boolean | undefined;
readonly signUp?: {
readonly channels: {
readonly [x: string]: unknown;
};
readonly origins?: readonly string[] | undefined;
} | undefined;
readonly onSignUp?: string | undefined;
readonly invitationEmail?: string | undefined;
readonly linkEmail?: string | undefined;
readonly codeEmail?: string | undefined;
} | undefined;
readonly emails?: {
readonly [x: string]: {
readonly subject: string;
readonly text: string;
readonly html: string;
readonly replyTo?: string | undefined;
} | {
readonly subject: string;
readonly heading: string;
readonly action: string;
readonly replyTo?: string | undefined;
readonly eyebrow?: string | undefined;
readonly card?: {
readonly title: string;
readonly detail?: string | undefined;
} | undefined;
readonly note?: string | undefined;
readonly paragraphs?: readonly string[] | undefined;
readonly sections?: readonly {
readonly title: string;
readonly text?: string | undefined;
readonly items?: readonly {
readonly label: string;
readonly code?: string | undefined;
readonly text?: string | undefined;
}[] | undefined;
readonly note?: string | undefined;
readonly copy?: {
readonly value: string;
readonly label?: string | undefined;
} | undefined;
}[] | undefined;
readonly footer?: string | undefined;
};
} | undefined;
readonly inbox?: {
readonly roles: readonly string[];
readonly channels?: readonly string[] | undefined;
readonly attribution?: "name" | "none" | undefined;
readonly takeover?: {
readonly channels: readonly string[];
} | undefined;
} | undefined;
readonly toolsets?: readonly {
readonly name: string;
readonly description: string;
readonly connection: string;
readonly api: string;
readonly tools: readonly {
readonly name: string;
readonly access: "read" | "write";
readonly fixed: {
readonly [x: string]: string | number | boolean;
};
}[];
readonly actions: readonly {
readonly description: string;
readonly name: string;
readonly input: {
readonly [x: string]: Schema.Json;
};
readonly permission?: string | undefined;
readonly files?: readonly {
readonly entity: string;
readonly property: string;
}[] | undefined;
readonly connections?: readonly string[] | undefined;
readonly anyOf?: readonly string[] | undefined;
readonly retryOnDeadlock?: boolean | undefined;
readonly writes?: readonly string[] | undefined;
readonly hints?: {
readonly readOnly?: boolean | undefined;
readonly connectionsReadOnly?: boolean | undefined;
readonly destructive?: boolean | undefined;
readonly irreversible?: boolean | undefined;
readonly idempotent?: boolean | undefined;
} | undefined;
}[];
}[] | undefined;
}>type OntologyManifest = typeof OntologyManifest.Type;
OntologyManifestWire
The JSON contract written since version 4; decoded SDK models remain camelCase.
const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
readonly entities: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly balanceOver: Schema.optionalKey<Schema.String>;
}>, {
readonly balanceOver: "balance_over";
}>>>;
readonly properties: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>, {
readonly renamedFrom: "renamed_from";
readonly maxLength: "max_length";
readonly maxBytes: "max_bytes";
readonly excludeFromReplication: "exclude_from_replication";
}>>;
readonly relationships: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly on: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly property: Schema.String;
readonly targetProperty: Schema.String;
}>, {
readonly targetProperty: "target_property";
}>>;
readonly onDelete: Schema.optionalKey<Schema.decodeTo<Schema.Literals<readonly [
"setNull",
"cascade",
"restrict"
]>, Schema.Literals<readonly [
"set_null",
"cascade",
"restrict"
]>, never, never>>;
readonly name: Schema.String;
readonly to: Schema.String;
readonly inverse: Schema.String;
readonly cardinality: Schema.Literals<readonly [
"one",
"many"
]>;
readonly optional: Schema.optionalKey<Schema.Boolean>;
readonly ordered: Schema.optionalKey<Schema.Boolean>;
readonly phrase: Schema.Tuple<readonly [
Schema.String,
Schema.String
]>;
readonly description: Schema.String;
}>, {
readonly onDelete: "on_delete";
}>>;
readonly source: Schema.optionalKey<Schema.Struct<{
readonly asset: Schema.String;
readonly key: Schema.$Array<Schema.String>;
readonly currency: Schema.optionalKey<Schema.String>;
}>>;
readonly id: Schema.String;
readonly name: Schema.String;
readonly label: Schema.String;
readonly plural: Schema.String;
readonly title: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly guide: Schema.optionalKey<Schema.String>;
readonly indexes: Schema.$Array<Schema.Struct<{
readonly properties: Schema.$Array<Schema.String>;
readonly unique: Schema.Boolean;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
readonly permissions: Schema.optionalKey<Schema.Struct<{
readonly read: Schema.String;
readonly create: Schema.optionalKey<Schema.String>;
readonly update: Schema.optionalKey<Schema.String>;
readonly delete: Schema.optionalKey<Schema.String>;
readonly link: Schema.optionalKey<Schema.String>;
readonly unlink: Schema.optionalKey<Schema.String>;
}>>;
readonly writes: Schema.optionalKey<Schema.Literal<"actions">>;
readonly eraseFromWarehouseOnDelete: Schema.optionalKey<Schema.Literal<true>>;
}>, {
readonly builtIn: "built_in";
readonly renamedFrom: "renamed_from";
readonly eraseFromWarehouseOnDelete: "erase_from_warehouse_on_delete";
}>>;
readonly roles: Schema.$Array<Schema.encodeKeys<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly builtIn: Schema.Boolean;
readonly permissions: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly scopes: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly permission: Schema.String;
readonly where: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
}>>>;
}>, {
readonly builtIn: "built_in";
}>>;
readonly feedback: Schema.optionalKey<Schema.Struct<{
readonly enabled: Schema.Boolean;
readonly files: Schema.Boolean;
readonly builders: Schema.$Array<Schema.String>;
readonly automaticFailureReports: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly runtimeCapabilities: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly executionCompatibility: Schema.optionalKey<Schema.Struct<{
readonly version: Schema.Int;
readonly hash: Schema.String;
}>>;
readonly version: Schema.Int;
readonly hash: Schema.String;
readonly signIn: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly browser: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly methods: Schema.$Array<Schema.String>;
readonly primary: Schema.String;
readonly autoRedirect: Schema.Boolean;
readonly local: Schema.optionalKey<Schema.Struct<{
readonly port: Schema.Int;
}>>;
}>, {
readonly autoRedirect: "auto_redirect";
}>>;
readonly policy: Schema.String;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>;
readonly onNewUser: Schema.optionalKey<Schema.String>;
readonly codeLink: Schema.optionalKey<Schema.Boolean>;
readonly cli: Schema.optionalKey<Schema.Boolean>;
readonly signUp: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Record<Schema.String, Schema.Unknown>;
readonly origins: Schema.optionalKey<Schema.$Array<Schema.String>>;
}>>;
readonly onSignUp: Schema.optionalKey<Schema.String>;
readonly guest: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly openOnInvite: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly byChannel: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
readonly channels: Schema.$Array<Schema.String>;
readonly origins: Schema.$Array<Schema.String>;
readonly botCheck: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly connection: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
readonly secret: Schema.optionalKey<Schema.String>;
}>>;
readonly confirmations: Schema.optionalKey<Schema.Boolean>;
}>, {
readonly botCheck: "bot_check";
}>>;
readonly invitationEmail: Schema.optionalKey<Schema.String>;
readonly linkEmail: Schema.optionalKey<Schema.String>;
readonly codeEmail: Schema.optionalKey<Schema.String>;
}>, {
readonly onNewUser: "on_new_user";
readonly codeLink: "code_link";
readonly signUp: "sign_up";
readonly onSignUp: "on_sign_up";
readonly invitationEmail: "invitation_email";
readonly linkEmail: "link_email";
readonly codeEmail: "code_email";
}>>;
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly html: Schema.String;
readonly text: Schema.String;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>,
Schema.encodeKeys<Schema.Struct<{
readonly subject: Schema.String;
readonly eyebrow: Schema.optionalKey<Schema.String>;
readonly heading: Schema.String;
readonly card: Schema.optionalKey<Schema.Struct<{
readonly title: Schema.String;
readonly detail: Schema.optionalKey<Schema.String>;
}>>;
readonly note: Schema.optionalKey<Schema.String>;
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly action: Schema.String;
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly title: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly copy: Schema.optionalKey<Schema.Struct<{
readonly label: Schema.optionalKey<Schema.String>;
readonly value: Schema.String;
}>>;
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly label: Schema.String;
readonly text: Schema.optionalKey<Schema.String>;
readonly code: Schema.optionalKey<Schema.String>;
}>>>;
readonly note: Schema.optionalKey<Schema.String>;
}>>>;
readonly footer: Schema.optionalKey<Schema.String>;
readonly replyTo: Schema.optionalKey<Schema.String>;
}>, {
readonly replyTo: "reply_to";
}>
]>>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly key: Schema.String;
readonly description: Schema.String;
readonly delivers: Schema.optionalKey<Schema.Literal<true>>;
readonly owner: Schema.optionalKey<Schema.Literal<"user">>;
}>>>;
readonly chat: Schema.optionalKey<Schema.encodeKeys<Schema.Struct<{
readonly telegram: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly slack: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly whatsapp: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly email: Schema.optionalKey<Schema.Struct<{
readonly connection: Schema.String;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>;
readonly channels: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{
readonly kind: Schema.Literals<readonly [
"telegram",
"slack",
"whatsapp",
"email",
"custom"
]>;
readonly connection: Schema.optionalKey<Schema.String>;
readonly files: Schema.optionalKey<Schema.Struct<{
readonly keep: Schema.Boolean;
}>>;
readonly signature: Schema.optionalKey<Schema.Boolean>;
}>>>;
readonly attribution: Schema.optionalKey<Schema.Struct<{
readonly template: Schema.optionalKey<Schema.String>;
readonly separator: Schema.optionalKey<Schema.String>;
}>>;
readonly retentionDays: Schema.optionalKey<Schema.Int>;
}>, {
readonly retentionDays: "retention_days";
}>>;
readonly inbox: Schema.optionalKey<Schema.Struct<{
readonly roles: Schema.$Array<Schema.String>;
readonly channels: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly takeover: Schema.optionalKey<Schema.Struct<{
readonly channels: Schema.$Array<Schema.String>;
}>>;
readonly attribution: Schema.optionalKey<Schema.Literals<readonly [
"name",
"none"
]>>;
}>>;
readonly metrics: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
readonly unit: Schema.Literals<readonly [
"number",
"currency",
"ratio",
"percent"
]>;
readonly format: Schema.Literals<readonly [
"decimal",
"currency",
"percent"
]>;
readonly expression: Schema.Codec<Schema.Json, Schema.Json, never, never>;
readonly inputs: Schema.$Array<Schema.String>;
readonly align: Schema.$Array<Schema.$Record<Schema.String, Schema.NullOr<Schema.String>>>;
}>>>;
readonly workflows: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly role: Schema.String;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly connections: Schema.$Array<Schema.String>;
readonly triggers: Schema.$Array<Schema.Union<readonly [
Schema.Struct<{
readonly kind: Schema.Literal<"cron">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly cron: Schema.String;
readonly input: Schema.Codec<Schema.Json, Schema.Json, never, never>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"action">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly entity: Schema.String;
readonly action: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"webhook">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly signature: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly secret: Schema.optionalKey<Schema.String>;
readonly generated: Schema.optionalKey<Schema.Literal<true>>;
readonly input: Schema.optionalKey<Schema.String>;
readonly algorithm: Schema.optionalKey<Schema.String>;
readonly encoding: Schema.optionalKey<Schema.String>;
readonly key: Schema.optionalKey<Schema.Struct<{
readonly decode: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
}>>;
readonly signatures: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.String;
readonly prefix: Schema.optionalKey<Schema.String>;
readonly entries: Schema.optionalKey<Schema.Struct<{
readonly separator: Schema.String;
readonly assign: Schema.String;
readonly name: Schema.String;
}>>;
}>>;
readonly timestamp: Schema.optionalKey<Schema.Struct<{
readonly header: Schema.optionalKey<Schema.String>;
readonly entry: Schema.optionalKey<Schema.String>;
readonly unit: Schema.optionalKey<Schema.String>;
readonly tolerance: Schema.optionalKey<Schema.Number>;
}>>;
readonly message: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [
Schema.String,
Schema.Struct<{
readonly body: Schema.Literals<readonly [
true,
"sorted-json"
]>;
}>,
Schema.Struct<{
readonly header: Schema.String;
}>,
Schema.Struct<{
readonly timestamp: Schema.Literal<true>;
}>
]>>>;
}>>;
readonly verification: Schema.optionalKey<Schema.Struct<{
readonly scheme: Schema.String;
readonly verifyToken: Schema.optionalKey<Schema.String>;
readonly input: Schema.optionalKey<Schema.String>;
}>>;
readonly headers: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connection: Schema.optionalKey<Schema.String>;
}>,
Schema.Struct<{
readonly kind: Schema.Literal<"platform">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly events: Schema.$Array<Schema.String>;
}>,
Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
]>>;
readonly action: Schema.optionalKey<Schema.Struct<{
readonly entity: Schema.String;
readonly action: Schema.String;
}>>;
}>>>;
readonly toolsets: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly connection: Schema.String;
readonly api: Schema.String;
readonly tools: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly access: Schema.Literals<readonly [
"read",
"write"
]>;
readonly fixed: Schema.$Record<Schema.String, Schema.Union<readonly [
Schema.String,
Schema.Number,
Schema.Boolean
]>>;
}>>;
readonly actions: Schema.$Array<Schema.Struct<{
readonly name: Schema.String;
readonly description: Schema.String;
readonly permission: Schema.optionalKey<Schema.String>;
readonly anyOf: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly input: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly retryOnDeadlock: Schema.optionalKey<Schema.Boolean>;
readonly writes: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly connections: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly files: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly entity: Schema.String;
readonly property: Schema.String;
}>>>;
readonly hints: Schema.optionalKey<Schema.Struct<{
readonly readOnly: Schema.optionalKey<Schema.Boolean>;
readonly connectionsReadOnly: Schema.optionalKey<Schema.Boolean>;
readonly destructive: Schema.optionalKey<Schema.Boolean>;
readonly irreversible: Schema.optionalKey<Schema.Boolean>;
readonly idempotent: Schema.optionalKey<Schema.Boolean>;
}>>;
}>>;
}>>>;
}>, {
readonly signIn: "sign_in";
}>OntologyReads
The reads an action runs against: `get`, `find` and `queryMetrics` of entity handles require it. An action's `prepare` has the reads alone, outside any transaction; its `handler` has them inside the transaction, with {@link OntologyWrites}.
class OntologyReads extends OntologyReads_base {
}OntologyRuntime
The data access an action handler runs against, inside the action's transaction: the reads and the writes. The ontology service provides it; this package declares only the contract. Entity handles (`Lead.get`, `Lead.create`, …) call it with their entity's name and type the records it returns, so the runtime must decode every record against that entity's definition before returning it.
type OntologyRuntime = OntologyReads | OntologyWrites;
const OntologyRuntime: {
of: (service: OntologyRuntimeService) => OntologyRuntimeService;
context: (service: OntologyRuntimeService) => Context.Context<OntologyRuntime>;
provide: (service: OntologyRuntimeService) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, Exclude<R, OntologyRuntime>>;
}OntologyRuntimeService
One implementation of both the reads and the writes, as the SQL runtime provides them.
type OntologyRuntimeService = ReadsService & WritesService;
OntologyService
interface OntologyService {
readonly handler: (request: Request) => Promise<Response>;
readonly api: OntologyApi;
readonly dispose: () => Promise<void>;
}OntologyServiceConfig
interface OntologyServiceConfig extends OntologyEnvironment {
readonly navigation?: PageCatalog;
readonly warehouseQueries?: import("./warehouse-platform.js").WarehouseReadTransport;
readonly channelAppProviders?: readonly import("./channel/provider.js").ChannelAppProvider[];
readonly chatArchive?: DeliveryArchive;
readonly chatHistoryArchive?: HistoryArchive;
readonly oauthRefreshReuseGraceMs?: number;
readonly runtime?: OntologyServiceRuntime;
readonly afterCommit?: Readonly<Record<string, AfterCommitHook>>;
readonly connections?: ConnectionTransportFactory;
readonly ownedConnectionsFetch?: typeof fetch;
readonly mcp?: boolean;
readonly mcpStreamMaxDurationMs?: number;
readonly workflowEngine?: import("./workflows.js").WorkflowEngine;
readonly webhookVerifier?: import("./webhooks.js").WebhookVerifier;
readonly webhookTokenVerifier?: import("./webhooks.js").WebhookTokenVerifier;
readonly botCheckVerifier?: import("./agent/bot-check.js").BotCheckVerifier;
readonly emailCodes?: import("./agent/guest-sign-up.js").EmailCodes;
readonly agentTaskTransport?: import("./agent/task-start.js").AgentTransport;
readonly decisions?: import("./decisions.js").Decide;
}OntologyServiceConfigError
The service cannot start: its configuration is incomplete or invalid.
class OntologyServiceConfigError extends OntologyServiceConfigError_base {
}OntologyServiceRuntime
The runtime binding `createOntologyService` runs against: the generated actions, and a layer that connects the runtime to the workspace database as `ontology_app`. `sqlServiceRuntime` is the default.
interface OntologyServiceRuntime {
readonly generatedActions: GeneratedActionsProvider;
readonly connect: (input: {
readonly deployment?: import("../deployment.js").DeploymentObservation;
readonly ontology: Ontology;
readonly databaseUrl: Redacted.Redacted<string>;
readonly blobStorage?: Redacted.Redacted<BlobStorageBinding>;
readonly workflowStarter?: WorkflowStarter["Service"];
readonly signInLinks?: import("../runtime/sign-in-links.js").SignInLinks["Service"];
}) => Layer.Layer<OntologyBackend, unknown>;
}OntologyStorage
OntologyWrites
The writes an action handler runs, inside the action's transaction: `create`, `update`, `upsertBy`, the batch methods, `delete`, `link` and `unlink` of entity handles require it, and the member writes of the `User` handle. `prepare` never has it.
class OntologyWrites extends OntologyWrites_base {
}OpenFile
interface OpenFile {
readonly entity: string;
readonly id: string;
readonly property: string;
readonly revisionId?: string;
}OrderBy
const OrderBy: Schema.Struct<{
readonly field: Schema.String;
readonly direction: Schema.optionalKey<Schema.Literals<readonly [
"asc",
"desc"
]>>;
}>type OrderBy = typeof OrderBy.Type;
OtherTriggerManifest
A trigger of a kind this reader does not know, kept as written: a manifest a later SDK built keeps its hash, and readers that present triggers drop it.
const OtherTriggerManifest: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>
type OtherTriggerManifest = typeof OtherTriggerManifest.Type;
PLATFORM_CHANNEL_LIMITS
Platform ceilings. A limit on one person can only be lowered: its ceiling is its default. A limit on the whole workspace may be raised up to its ceiling.
const PLATFORM_CHANNEL_LIMITS: AgentLimits
PLATFORM_EVENT_TYPES
The catalog of platform events: what the platform recorded for a workspace that a platform trigger, `platform(name, { events })`, starts a workflow for. The platform decides which exist. An event carries ids and codes, never text: the console and the CLI explain them by the same ids. It names no workspace or organization, since it is delivered only to the workspace it is about. A type gains fields compatibly; a change to a field is a new type.
const PLATFORM_EVENT_TYPES: readonly [
"deployment.succeeded",
"deployment.failed"
]PREPARE_TIMEOUT
How long `prepare` may take, connection calls included; each call has its own 30 s deadline.
const PREPARE_TIMEOUT: Duration.Duration
PROPERTY_TYPES
The closed set of storage types. Each has a known column, JSON Schema, filters and rendering.
const PROPERTY_TYPES: readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]ParsedPermission
interface ParsedPermission {
readonly entity: string;
readonly verb: string;
}PermissionDenied
The principal's roles do not grant a permission the request requires. The service answers 403 with `<permission> is required.`; the message stays in the logs.
class PermissionDenied extends PermissionDenied_base {
}PermissionHolder
Anything that holds permissions: a principal, or the reader of a catalog.
interface PermissionHolder {
readonly execution?: import("./runtime/workload.js").WorkloadExecution;
readonly permissions: ReadonlyArray<string>;
readonly scopes?: ReadonlyArray<ScopedPermission>;
}Phrase
Names a relationship in both directions, for example `["is owned by", "owns"]`.
type Phrase = readonly [
forward: string,
inverse: string
];PlanMigrationInput
interface PlanMigrationInput {
readonly current: OntologyManifest | undefined;
readonly target: OntologyManifest;
readonly options?: MigrationOptions;
readonly existingTables?: ReadonlySet<string>;
readonly existingHistoryActivityIndexes?: ReadonlySet<string>;
readonly retained?: RetainedStorage;
readonly existingStorage?: StorageNames;
}PlatformEvent
Any event of the catalog, by `type`. Fields a later platform adds are ignored.
const PlatformEvent: Schema.Union<readonly [
Schema.Struct<{
readonly id: Schema.String;
readonly type: Schema.Literal<"deployment.succeeded">;
readonly at: Schema.String;
readonly deployment: Schema.Struct<{
readonly id: Schema.String;
readonly commit: Schema.NullOr<Schema.String>;
}>;
}>,
Schema.Struct<{
readonly id: Schema.String;
readonly type: Schema.Literal<"deployment.failed">;
readonly at: Schema.String;
readonly deployment: Schema.Struct<{
readonly id: Schema.String;
readonly commit: Schema.NullOr<Schema.String>;
}>;
readonly failure: Schema.Struct<{
readonly code: Schema.String;
readonly reference: Schema.String;
}>;
}>
]>type PlatformEvent = typeof PlatformEvent.Type;
PlatformEventOf
The event of one catalog type.
type PlatformEventOf<T extends PlatformEventType> = Extract<PlatformEvent, {
readonly type: T;
}>;PlatformEventType
type PlatformEventType = (typeof PLATFORM_EVENT_TYPES)[number];
PlatformOptions
interface PlatformOptions<T extends PlatformEventType, Input> {
readonly description: string;
readonly events: readonly [
T,
...ReadonlyArray<T>
];
readonly when?: (event: PlatformEventOf<T>) => boolean;
readonly input?: (event: PlatformEventOf<T>) => Input;
}PlatformTrigger
A platform trigger, `platform(name, { description, events, when, input })`: starts the workflow for each event of the listed catalog types that the platform records for this workspace, such as a production deployment that failed. `when` and `input` are code: the manifest records the kind, the name, the description and the event types, never the functions.
interface PlatformTrigger<Name extends string = string, Input = unknown> {
readonly [WorkflowTriggerTypeId]: typeof WorkflowTriggerTypeId;
readonly kind: "platform";
readonly name: Name;
readonly description: string;
readonly events: ReadonlyArray<string>;
readonly when: ((event: PlatformEvent) => boolean) | undefined;
readonly input: ((event: PlatformEvent) => Input) | undefined;
}PlatformTriggerManifest
A platform trigger of a workflow: the ontology service starts the workflow for each event of the listed catalog types that the platform delivers for this workspace. The trigger's predicate and input mapping are code and never in the manifest.
const PlatformTriggerManifest: Schema.Struct<{
readonly kind: Schema.Literal<"platform">;
readonly name: Schema.String;
readonly description: Schema.String;
readonly events: Schema.$Array<Schema.String>;
}>type PlatformTriggerManifest = typeof PlatformTriggerManifest.Type;
PrepareContext
What `prepare` runs with.
interface PrepareContext<Input> {
readonly input: Input;
readonly principal: Principal;
readonly runtime?: ActionRuntime;
readonly requestId: string;
}PrepareError
What `prepare` may fail with: the action errors, and connection calls that failed.
type PrepareError = ActionError | ConnectionError;
Principal
interface Principal {
readonly telegramEvaluation?: {
readonly attemptId: string;
readonly groups: readonly string[];
readonly source?: {
readonly chatId: string;
readonly messageId: string;
readonly threadId: string;
readonly sentAt: string;
readonly senderId: string;
};
readonly photo?: {
readonly chatId: string;
readonly messageId: string;
readonly threadId: string;
readonly sentAt: string;
readonly senderId: string;
readonly fileId: string;
readonly uniqueId: string;
readonly sourceRef: string;
};
};
readonly execution?: WorkloadExecution;
readonly chat?: ChatProvenance;
readonly workflow?: {
readonly name: string;
readonly subject: string;
};
readonly authenticatedVia?: string;
readonly id: string;
readonly kind: "member" | "service" | "guest";
readonly roles: ReadonlyArray<string>;
readonly permissions: ReadonlyArray<string>;
readonly scopes?: ReadonlyArray<ScopedPermission>;
}PrincipalRejected
A credential does not resolve to an active principal. `reason` is for operator logs; callers see an authentication failure without it, except `not_invited`: a person the `invited` sign-in policy turns away is told to ask for an invitation.
class PrincipalRejected extends PrincipalRejected_base {
}PrincipalsManifest
The roles and the built-in user of a deployed ontology, as its manifest lists them.
interface PrincipalsManifest {
readonly feedback?: ResolvedFeedback;
readonly roles: ReadonlyArray<{
readonly name: string;
readonly description: string;
readonly builtIn: boolean;
readonly permissions?: ReadonlyArray<string> | undefined;
readonly scopes?: ReadonlyArray<ScopeManifest> | undefined;
}>;
readonly entities?: ReadonlyArray<{
readonly name?: string;
readonly builtIn: boolean;
readonly properties: ReadonlyArray<{
readonly name: string;
}>;
}>;
readonly workflows?: ReadonlyArray<WorkflowManifest> | undefined;
}Properties
type Properties = {
readonly [name: string]: AnyProperty;
};Property
A property: an Effect Schema of its value, usable in action inputs, with its storage metadata in the schema's annotations. The two `~ontology` members exist only in the type. They record whether the property has a default (which makes it optional in `create`) and whether it is unique (which makes it a key for `upsertBy`).
interface Property<T, Defaulted extends boolean = boolean, Unique extends boolean = boolean> extends Schema.Codec<T> {
readonly "~ontology.defaulted": Defaulted;
readonly "~ontology.unique": Unique;
}PropertyDefinition
Storage metadata of a property, kept in the schema's annotations under {@link PROPERTY_ANNOTATION}.
interface PropertyDefinition {
readonly column?: string;
readonly scope?: ReadonlyArray<string>;
readonly type: PropertyType;
readonly optional: boolean;
readonly unique: boolean;
readonly managed: boolean;
readonly excludeFromReplication?: boolean;
readonly default?: unknown;
readonly label?: string;
readonly description?: string;
readonly renamedFrom?: string;
readonly display?: string;
readonly min?: number;
readonly max?: number;
readonly maxLength?: number;
readonly options?: ReadonlyArray<SelectOption>;
readonly accept?: ReadonlyArray<string>;
readonly maxBytes?: number;
readonly items?: PropertyType;
}PropertyManifest
const PropertyManifest: Schema.Struct<{
readonly column: Schema.optionalKey<Schema.String>;
readonly scope: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly name: Schema.String;
readonly type: Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>;
readonly label: Schema.String;
readonly description: Schema.optionalKey<Schema.String>;
readonly optional: Schema.Boolean;
readonly unique: Schema.Boolean;
readonly managed: Schema.Boolean;
readonly excludeFromReplication: Schema.optionalKey<Schema.Boolean>;
readonly default: Schema.optionalKey<Schema.Codec<Schema.Json, Schema.Json, never, never>>;
readonly display: Schema.optionalKey<Schema.String>;
readonly renamedFrom: Schema.optionalKey<Schema.String>;
readonly min: Schema.optionalKey<Schema.Number>;
readonly max: Schema.optionalKey<Schema.Number>;
readonly maxLength: Schema.optionalKey<Schema.Number>;
readonly accept: Schema.optionalKey<Schema.$Array<Schema.String>>;
readonly maxBytes: Schema.optionalKey<Schema.Number>;
readonly options: Schema.optionalKey<Schema.$Array<Schema.Struct<{
readonly value: Schema.String;
readonly label: Schema.String;
readonly description: Schema.String;
}>>>;
readonly items: Schema.optionalKey<Schema.Literals<readonly [
"text",
"email",
"url",
"integer",
"number",
"boolean",
"date",
"timestamp",
"select",
"json",
"blob",
"list"
]>>;
}>type PropertyManifest = typeof PropertyManifest.Type;
PropertyOf
The schema type a property constructor returns for the given options.
type PropertyOf<T, O> = O extends {
readonly optional: true;
} ? Schema.optionalKey<Property<T, HasDefault<O>, IsUnique<O>>> : Property<T, HasDefault<O>, IsUnique<O>>;PropertyOptions
interface PropertyOptions<T> {
readonly column?: string;
readonly scope?: ReadonlyArray<string>;
readonly optional?: boolean;
readonly default?: T;
readonly unique?: boolean;
readonly label?: string;
readonly description?: string;
readonly renamedFrom?: string;
readonly managed?: boolean;
readonly excludeFromReplication?: boolean;
readonly display?: string;
}PropertyType
type PropertyType = (typeof PROPERTY_TYPES)[number];
m
Arithmetic combines aggregates; references name another metric of the same entity. Every aggregate takes `where`, conditions on properties of the entity that the rows it reads must meet, and `balanceOver`, the date its rows are snapshots over. In `defineOntology({ metrics })`, references name metrics of entities, `m.ref("sales.revenue")`, or other model metrics, and arithmetic and references take `align`.
const m: {
readonly count: (options?: AggregateOptions) => Metric;
readonly sum: (property: string, options?: AggregateOptions) => Metric;
readonly countDistinct: (property: string, options?: AggregateOptions) => Metric;
readonly avg: (property: string, options?: AggregateOptions) => Metric;
readonly min: (property: string, options?: AggregateOptions) => Metric;
readonly max: (property: string, options?: AggregateOptions) => Metric;
readonly ref: Reference;
readonly literal: (value: number | string, options?: MetricOptions) => Metric;
readonly add: Arithmetic;
readonly subtract: Arithmetic;
readonly multiply: Arithmetic;
readonly divide: Arithmetic;
}makeOntologyRuntime
The runtime over one SQL client, normally `@effect/sql-pg`'s. Statements are parameterised; the client runs them on the transaction of the calling fiber, so a runtime made for an action shares the action's transaction. Reads work without a scope. Writes need one: each write runs in its own savepoint (or its own transaction outside an action), so that the write and its history rows land together and a failed write, such as a Conflict a handler catches, leaves the action's transaction usable.
function makeOntologyRuntime(ontology: Ontology, sql: SqlClient.SqlClient, scope?: WriteScope): SqlOntologyRuntime;
manifestHash
The hash of a manifest, computed over its canonical JSON without the `hash` field.
function manifestHash(manifest: Readonly<Record<string, unknown>>): string;
matchesWebsite
Whether a browser's `Origin` is one of the declared websites, each an origin {@link websiteOrigin} accepted: equal to an exact one, or an `https` origin on the default port whose host is one label and a pattern's domain.
function matchesWebsite(declared: ReadonlyArray<string>, origin: unknown): boolean;
mcpToolName
The MCP tool of an entity's read or action: `lead_find`, `lead_change_status`.
function mcpToolName(entity: string, operation: string): string;
me
The caller. `me.staffMember.division` is the set of divisions of the caller's staff member rows.
const me: MeReference
mePathOf
The hops of `me` or of a path, as the value holds them: authored names for an authored reference, wire names for a wire marker. An empty list is `me` itself; `undefined` means the value is neither.
function mePathOf(value: unknown): ReadonlyArray<string> | undefined;
meToWire
The wire form of `me` or of a path, from its hops or an authored reference.
function meToWire(value: MeReference | ReadonlyArray<string>): MeMarker;
member
The earlier built-in role with its default permissions, `*:read`, which an ontology declaring `defineOntology({ member })` lists. An ontology without `member` declares roles of its own, such as `role("team", { … })`, instead.
const member: Role<"member">
memoryFileStorage
File storage held in memory, for tests that run an ontology's actions with files in process: `uploads.for` inputs, `Files.stage`, `Files.open`, downloads and the agent's attachments. Each call makes an empty store. ```ts const files = memoryFileStorage(); const backend = backendLayer(ontology, files.blobStorage).pipe(Layer.provide(database)); ```
function memoryFileStorage(options?: MemoryFileStorageOptions): MemoryFileStorage;
migrate
const migrate: (input: MigrateInput) => Effect.Effect<{
readonly plan: MigrationPlan;
readonly result: MigrationResult;
}, ApplyMigrationError>nextCronTime
The first minute after `after` at which the expression fires, in UTC, within the next 366 days; `undefined` for an invalid expression or one that does not fire in that time.
function nextCronTime(expression: string, after: Date): Date | undefined;
ownedConnectionLink
Where the user connects an owned connection they have not connected: an app path.
function ownedConnectionLink(key: string): string;
p
const p: {
readonly text: typeof text;
readonly email: typeof email;
readonly url: typeof url;
readonly integer: typeof integer;
readonly number: typeof number;
readonly boolean: typeof boolean;
readonly date: typeof date;
readonly timestamp: typeof timestamp;
readonly select: typeof select;
readonly json: typeof json;
readonly blob: typeof blob;
readonly list: typeof list;
readonly ref: typeof ref;
}parseApiKey
The key id and secret of a key, or `undefined` when it is not one.
function parseApiKey(key: string): ApiKeyParts | undefined;
parseLocalConnectionContext
Parses the context the CLI wrote, as the pipeline SDK does.
function parseLocalConnectionContext(text: string): LocalConnectionContext;
parsePermission
The entity and verb of a permission, or `undefined` when the value is not one.
function parsePermission(value: unknown): ParsedPermission | undefined;
permissionsOf
The union of the permissions of the roles a principal holds, in the order the ontology declares them. A held role the ontology does not declare grants nothing.
function permissionsOf(roles: ReadonlyArray<RolePermissions>, held: ReadonlyArray<string>): ReadonlyArray<string>;
planMigration
Plans the migration from the applied manifest, the storage the catalog keeps and the observed storage to the target. It is pure: the same inputs give the same plan. An unchanged manifest can still need runtime storage upgrades.
function planMigration(input: PlanMigrationInput): MigrationPlan;
platform
Declares a platform trigger; list it in `workflow(name, { triggers })`. The workflow starts for each listed event the platform records for this workspace, and its runs act as the workflow's own user. A workflow that follows a deployment declares one; work that follows another workflow stays in that workflow, since workflow runs are not events.
function platform<const Name extends string, const T extends PlatformEventType, Input = unknown>(name: Name, options: PlatformOptions<T, Input>): PlatformTrigger<Name, Input>;
platformMethods
function platformMethods(holder: PermissionHolder): string[];
postgresLayer
`@effect/sql-pg` on the pooled `ontology_app` connection string, with the TLS server name a Neon endpoint needs.
function postgresLayer(databaseUrl: Redacted.Redacted<string>): Layer.Layer<SqlClient.SqlClient, SqlError>;
preparePreviewDatabase
Invalidate copied SDK credentials and runnable state on a verified, unexposed child database. The caller owns branch verification and provider-side Neon Auth invalidation/configuration. No provider-owned schema, business record, history, user, role assignment or member block is changed; of the `user_identity` records, only channel accounts are deleted, as their legacy rows are. Safe to repeat, including databases created by older SDKs with fewer runtime tables.
function preparePreviewDatabase({ sql, }: {
readonly sql: SqlClient.SqlClient;
}): Effect.Effect<void, SqlError>;previewRunsAgent
Whether the platform runs the workspace's agent, without channels, in this hosted preview.
function previewRunsAgent(deployment: DeploymentObservation | undefined): boolean;
principalScopes
{@link scopesOf} as a principal carries it: absent when no held role scopes a permission, so that a principal of an ontology without scoped permissions is what it was before them.
function principalScopes(roles: ReadonlyArray<RolePermissions>, held: ReadonlyArray<string>): {
readonly scopes?: ReadonlyArray<ScopedPermission>;
};principalsOntology
An ontology with only the built-in `User` and the manifest's roles, with their permissions: what managing principals needs. The platform holds a deployed ontology's manifest, not its code, and users, roles and API keys live in tables the ontology's own entities do not shape. The roles' permissions name entities this ontology does not have; they were checked when the manifest was built, so they are not checked again, and neither are its workflows, which it carries for their users. The user keeps only the properties the deployed table has.
function principalsOntology(manifest: PrincipalsManifest): Ontology;
propertyDefinition
The storage metadata of a schema built with a `p.*` constructor, or `undefined` for any other value.
function propertyDefinition(value: unknown): PropertyDefinition | undefined;