@segmentstream/ontology 0.107.0 → 0.108.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +7 -3
- package/dist/analyze.js +34 -3
- package/dist/emails.d.ts +36 -5
- package/dist/emails.js +139 -2
- package/dist/index.d.ts +1 -1
- package/dist/manifest.d.ts +193 -0
- package/dist/manifest.js +22 -0
- package/dist/migrate/model.d.ts +122 -0
- package/dist/service/schemas.d.ts +32 -0
- package/dist/sign-in.d.ts +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.108.0
|
|
4
|
+
|
|
5
|
+
A workspace can send its own invitation. `signIn.invitationEmail` names one of the ontology's
|
|
6
|
+
`emails`, which the platform then sends instead of its own invitation to a member who has not signed
|
|
7
|
+
in yet: when they are invited from `segmentstream ontology member invite` or the console, and from
|
|
8
|
+
`User.sendSignInLink` without a template. It may use only the built-in values; `check` reports
|
|
9
|
+
`invalid-email` for any other, and `invalid-sign-in` when the name is not a declared email.
|
|
10
|
+
|
|
11
|
+
Emails can use two more built-in values, `{{app.url}}`, the app's production address, and
|
|
12
|
+
`{{app.mcpUrl}}`, its MCP server's, and `sections`: boxes below the button with a title, text, a
|
|
13
|
+
value to copy shown large in a monospace box, labelled items with text or a command, and a note.
|
|
14
|
+
The starter's invitation, in `ontology/emails.ts`, uses them to give the MCP server's address and how
|
|
15
|
+
Claude, ChatGPT, Claude Code and Codex connect. Older platform deployments ignore both and send their
|
|
16
|
+
own invitation.
|
|
17
|
+
|
|
3
18
|
## 0.107.0
|
|
4
19
|
|
|
5
20
|
The agent's own tools are permissions: `agent_tool:sandbox` (the sandbox's shell and file tools,
|
package/README.md
CHANGED
|
@@ -483,14 +483,18 @@ export default defineOntology({
|
|
|
483
483
|
policy, grants, hook content, notice text, and lower limits. Nothing defaults to open.
|
|
484
484
|
`check(config, { agentConfig })` warns if open channels lack `firstContact.notice` or `limits` when
|
|
485
485
|
agent config is supplied. The ontology CLI cannot see that config and says those checks are skipped.
|
|
486
|
-
- `emails: { agreementReview: { subject, eyebrow?, heading, card?, note?, paragraphs?, action, footer?, replyTo? } }`
|
|
486
|
+
- `emails: { agreementReview: { subject, eyebrow?, heading, card?, note?, paragraphs?, action, sections?, footer?, replyTo? } }`
|
|
487
487
|
declares the workspace's own emails, in plain text with `{{value}}` placeholders and the
|
|
488
|
-
built-in `{{member.name}}`, `{{member.firstName}}
|
|
488
|
+
built-in `{{member.name}}`, `{{member.firstName}}`, `{{workspace.name}}`, `{{app.url}}` and
|
|
489
|
+
`{{app.mcpUrl}}`. `sections` are boxes below the button, each
|
|
490
|
+
`{ title, text?, copy?: { label?, value }, items?: [{ label, text?, code? }], note? }`.
|
|
491
|
+
`signIn.invitationEmail: "memberInvitation"` names the one the platform sends instead of its
|
|
492
|
+
own invitation; it may use only built-in values. A handler sends
|
|
489
493
|
one with `User.sendSignInLink(user, { template: "agreementReview", returnTo: "/shared/1", values })`:
|
|
490
494
|
after the commit, in production, the platform emails the member a link that signs them in and
|
|
491
495
|
opens `returnTo`, laid out in its design, from the workspace's name, with replies to `replyTo`
|
|
492
496
|
or else the member who ran the action. Without `template` the
|
|
493
|
-
member gets the platform's
|
|
497
|
+
member gets the invitation, or the platform's sign-in email. `check` reports `invalid-email`.
|
|
494
498
|
- `defineOntology` checks the definition and builds the manifest. It throws
|
|
495
499
|
`InvalidOntology` with every diagnostic when the definition has errors. Entities,
|
|
496
500
|
actions and select options need a description.
|
package/dist/analyze.js
CHANGED
|
@@ -12,7 +12,7 @@ import { AGENT_TOOL, AGENT_TOOL_VERBS, EXPLICIT_GRANT_ENTITIES, generatedActionP
|
|
|
12
12
|
import { ON_DELETE, isRelationship } from "./relationship.js";
|
|
13
13
|
import { isRole, member, role } from "./role.js";
|
|
14
14
|
import { CHANNEL_PROVIDERS, DEFAULT_SIGN_IN_POLICY, GUEST_CHANNELS, SIGN_UP_CHANNELS, SIGN_UP_CHAT_CHANNELS, isGuestChannel, isSignInPolicy, isSignUpChannel, websiteOrigin, } from "./sign-in.js";
|
|
15
|
-
import { emailOptions } from "./emails.js";
|
|
15
|
+
import { BUILT_IN_EMAIL_VALUES, emailOptions, emailValueNames, } from "./emails.js";
|
|
16
16
|
import { AgentChat } from "./agent-chat.js";
|
|
17
17
|
import { AgentReview } from "./agent-review.js";
|
|
18
18
|
import { APP_FEEDBACK_ENTITIES } from "./app-feedback.js";
|
|
@@ -75,12 +75,15 @@ export function analyze(config, options = {}) {
|
|
|
75
75
|
!declaredRoles.some((candidate) => candidate.name === nameToWire(config.hooks.role)))) {
|
|
76
76
|
report("invalid-permission", "hooks.role", "hooks.role must name a declared ontology role.");
|
|
77
77
|
}
|
|
78
|
+
const emails = emailOptions(config.emails, report, (name, path) => camelCaseName(name, path, "agreementReview", "Email", report));
|
|
78
79
|
const signInDeclared = signInOptions(config, report);
|
|
79
80
|
const guest = guestOptions(config, report);
|
|
81
|
+
const invitationEmail = invitationEmailOption(config, emails, report);
|
|
80
82
|
const signIn = {
|
|
81
83
|
...signInDeclared,
|
|
82
84
|
...signUpOptions(config, signInDeclared, declaredRoles, report),
|
|
83
85
|
...(guest === undefined ? {} : { guest: guest.resolved }),
|
|
86
|
+
...(invitationEmail === undefined ? {} : { invitationEmail }),
|
|
84
87
|
};
|
|
85
88
|
const discovery = config.discovery;
|
|
86
89
|
if (discovery !== undefined &&
|
|
@@ -91,7 +94,6 @@ export function analyze(config, options = {}) {
|
|
|
91
94
|
report("invalid-discovery", "discovery", 'discovery takes { model: "<provider>/<model>" }, a decision model on AI Gateway such as ' +
|
|
92
95
|
'"typesafe-ai/jev-1.14.0".');
|
|
93
96
|
}
|
|
94
|
-
const emails = emailOptions(config.emails, report, (name, path) => camelCaseName(name, path, "agreementReview", "Email", report));
|
|
95
97
|
const connections = collectConnections(config, report);
|
|
96
98
|
const entitiesByName = new Map();
|
|
97
99
|
for (const candidate of entities) {
|
|
@@ -1232,7 +1234,7 @@ function signInOptions(config, report) {
|
|
|
1232
1234
|
return fallback;
|
|
1233
1235
|
}
|
|
1234
1236
|
for (const key of Object.keys(options)) {
|
|
1235
|
-
if (!["policy", "channels", "onNewUser", "browser", "codeLink"].includes(key)) {
|
|
1237
|
+
if (!["policy", "channels", "onNewUser", "browser", "codeLink", "invitationEmail"].includes(key)) {
|
|
1236
1238
|
report("invalid-sign-in", `signIn.${key}`, `Unknown signIn key: ${key}.`);
|
|
1237
1239
|
}
|
|
1238
1240
|
}
|
|
@@ -1291,6 +1293,35 @@ function signInOptions(config, report) {
|
|
|
1291
1293
|
...(typeof codeLink === "boolean" ? { codeLink } : {}),
|
|
1292
1294
|
};
|
|
1293
1295
|
}
|
|
1296
|
+
/**
|
|
1297
|
+
* `signIn.invitationEmail`: the wire name of the declared email the platform sends instead of its
|
|
1298
|
+
* own invitation. Nothing fills an invitation's values, so the email may use only built-in ones.
|
|
1299
|
+
*/
|
|
1300
|
+
function invitationEmailOption(config, emails, report) {
|
|
1301
|
+
const options = config.signIn;
|
|
1302
|
+
const name = isPlainObject(options) ? options.invitationEmail : undefined;
|
|
1303
|
+
const path = "signIn.invitationEmail";
|
|
1304
|
+
if (name === undefined) {
|
|
1305
|
+
return undefined;
|
|
1306
|
+
}
|
|
1307
|
+
if (typeof name !== "string" || !/^[a-z][a-zA-Z0-9]*$/.test(name)) {
|
|
1308
|
+
report("invalid-sign-in", path, "invitationEmail names one of the ontology's emails, such as memberInvitation.");
|
|
1309
|
+
return undefined;
|
|
1310
|
+
}
|
|
1311
|
+
const wire = nameToWire(name);
|
|
1312
|
+
const template = emails[wire];
|
|
1313
|
+
if (template === undefined) {
|
|
1314
|
+
report("invalid-sign-in", path, `${name} is not one of the ontology's emails.`);
|
|
1315
|
+
return undefined;
|
|
1316
|
+
}
|
|
1317
|
+
const values = emailValueNames(template);
|
|
1318
|
+
if (values.length > 0) {
|
|
1319
|
+
report("invalid-email", `emails.${name}`, `${name} is the invitation, and nothing fills ${values.map((value) => `{{${value}}}`).join(", ")}: ` +
|
|
1320
|
+
`use only ${BUILT_IN_EMAIL_VALUES.map((value) => `{{${value}}}`).join(", ")}.`);
|
|
1321
|
+
return undefined;
|
|
1322
|
+
}
|
|
1323
|
+
return wire;
|
|
1324
|
+
}
|
|
1294
1325
|
/**
|
|
1295
1326
|
* Where strangers may sign up and the wire names of the roles each open channel grants, and the
|
|
1296
1327
|
* `onSignUp` action. Every role must be a declared one other than `member`. A channel opened both
|
package/dist/emails.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { Diagnostic } from "./diagnostics.js";
|
|
2
2
|
/**
|
|
3
3
|
* An email the workspace writes and the platform sends with a sign-in link, named by
|
|
4
|
-
* `User.sendSignInLink`. Every field is plain text, in which
|
|
5
|
-
* action passes, and `{{member.name}}`, `{{member.firstName}}
|
|
6
|
-
*
|
|
4
|
+
* `User.sendSignInLink` or by `signIn.invitationEmail`. Every field is plain text, in which
|
|
5
|
+
* `{{name}}` stands for a value the action passes, and `{{member.name}}`, `{{member.firstName}}`,
|
|
6
|
+
* `{{workspace.name}}`, `{{app.url}}` and `{{app.mcpUrl}}` for the recipient, the workspace, the
|
|
7
|
+
* app's address and its MCP server's. The platform lays the fields out, escapes them and adds the
|
|
7
8
|
* plain-text part; `action` labels the one button, which signs the person in and opens the path
|
|
8
9
|
* the action names. A field whose text is empty once filled in is left out.
|
|
9
10
|
*/
|
|
@@ -22,6 +23,8 @@ export interface EmailTemplate {
|
|
|
22
23
|
readonly paragraphs?: ReadonlyArray<string>;
|
|
23
24
|
/** The button's label. */
|
|
24
25
|
readonly action: string;
|
|
26
|
+
/** Boxes below the button, such as how to connect an AI assistant to the app. */
|
|
27
|
+
readonly sections?: ReadonlyArray<EmailSection>;
|
|
25
28
|
/** Small print at the bottom, such as why the person received the email. */
|
|
26
29
|
readonly footer?: string;
|
|
27
30
|
/**
|
|
@@ -31,8 +34,32 @@ export interface EmailTemplate {
|
|
|
31
34
|
*/
|
|
32
35
|
readonly replyTo?: string;
|
|
33
36
|
}
|
|
34
|
-
/**
|
|
35
|
-
|
|
37
|
+
/**
|
|
38
|
+
* A box below an email's button: a title, a line of text, a value to copy shown large in a
|
|
39
|
+
* monospace box, such as an address, labelled items with text or a command, and a closing note.
|
|
40
|
+
*/
|
|
41
|
+
export interface EmailSection {
|
|
42
|
+
readonly title: string;
|
|
43
|
+
readonly text?: string;
|
|
44
|
+
/** A value the person copies into another app, such as an address. */
|
|
45
|
+
readonly copy?: {
|
|
46
|
+
readonly label?: string;
|
|
47
|
+
readonly value: string;
|
|
48
|
+
};
|
|
49
|
+
/** Labelled items, such as one per app: text, a command shown in a monospace box, or both. */
|
|
50
|
+
readonly items?: ReadonlyArray<EmailSectionItem>;
|
|
51
|
+
readonly note?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface EmailSectionItem {
|
|
54
|
+
readonly label: string;
|
|
55
|
+
readonly text?: string;
|
|
56
|
+
readonly code?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The values every email may use besides those the action passes: the recipient, the workspace,
|
|
60
|
+
* the app's production address and its MCP server's address, `/mcp` on the same domain.
|
|
61
|
+
*/
|
|
62
|
+
export declare const BUILT_IN_EMAIL_VALUES: readonly ["member.name", "member.firstName", "workspace.name", "app.url", "app.mcpUrl"];
|
|
36
63
|
/**
|
|
37
64
|
* The query parameter of the callback a sign-in link is requested with, naming the queued email it
|
|
38
65
|
* delivers. The platform reads it from Neon Auth's link and leaves it out of the path the person
|
|
@@ -51,6 +78,10 @@ export declare const MAX_EMAIL_PARAGRAPHS = 20;
|
|
|
51
78
|
export declare const MAX_EMAIL_VALUES = 50;
|
|
52
79
|
/** The longest path a sign-in link returns to. */
|
|
53
80
|
export declare const MAX_RETURN_PATH = 1024;
|
|
81
|
+
/** The most sections of one email. */
|
|
82
|
+
export declare const MAX_EMAIL_SECTIONS = 5;
|
|
83
|
+
/** The most items of one section. */
|
|
84
|
+
export declare const MAX_EMAIL_SECTION_ITEMS = 10;
|
|
54
85
|
type Report = (code: Diagnostic["code"], path: string, message: string, severity?: Diagnostic["severity"]) => void;
|
|
55
86
|
/** The values an action must pass for this email: its placeholders that are not built in. */
|
|
56
87
|
export declare function emailValueNames(template: EmailTemplate): ReadonlyArray<string>;
|
package/dist/emails.js
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { isRecord } from "./authoring-names.js";
|
|
2
|
-
/**
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The values every email may use besides those the action passes: the recipient, the workspace,
|
|
4
|
+
* the app's production address and its MCP server's address, `/mcp` on the same domain.
|
|
5
|
+
*/
|
|
6
|
+
export const BUILT_IN_EMAIL_VALUES = [
|
|
7
|
+
"member.name",
|
|
8
|
+
"member.firstName",
|
|
9
|
+
"workspace.name",
|
|
10
|
+
"app.url",
|
|
11
|
+
"app.mcpUrl",
|
|
12
|
+
];
|
|
4
13
|
/**
|
|
5
14
|
* The query parameter of the callback a sign-in link is requested with, naming the queued email it
|
|
6
15
|
* delivers. The platform reads it from Neon Auth's link and leaves it out of the path the person
|
|
@@ -19,6 +28,10 @@ export const MAX_EMAIL_PARAGRAPHS = 20;
|
|
|
19
28
|
export const MAX_EMAIL_VALUES = 50;
|
|
20
29
|
/** The longest path a sign-in link returns to. */
|
|
21
30
|
export const MAX_RETURN_PATH = 1024;
|
|
31
|
+
/** The most sections of one email. */
|
|
32
|
+
export const MAX_EMAIL_SECTIONS = 5;
|
|
33
|
+
/** The most items of one section. */
|
|
34
|
+
export const MAX_EMAIL_SECTION_ITEMS = 10;
|
|
22
35
|
const FIELDS = [
|
|
23
36
|
"subject",
|
|
24
37
|
"eyebrow",
|
|
@@ -27,9 +40,12 @@ const FIELDS = [
|
|
|
27
40
|
"note",
|
|
28
41
|
"paragraphs",
|
|
29
42
|
"action",
|
|
43
|
+
"sections",
|
|
30
44
|
"footer",
|
|
31
45
|
"replyTo",
|
|
32
46
|
];
|
|
47
|
+
const SECTION_FIELDS = ["title", "text", "copy", "items", "note"];
|
|
48
|
+
const ITEM_FIELDS = ["label", "text", "code"];
|
|
33
49
|
const REQUIRED = ["subject", "heading", "action"];
|
|
34
50
|
const OPTIONAL_TEXT = ["eyebrow", "note", "footer"];
|
|
35
51
|
const PLACEHOLDER = /\{\{\s*([^{}]*?)\s*\}\}/g;
|
|
@@ -51,9 +67,27 @@ function emailTexts(template) {
|
|
|
51
67
|
...(template.note === undefined ? [] : [["note", template.note]]),
|
|
52
68
|
...(template.paragraphs ?? []).map((text, index) => [`paragraphs.${index}`, text]),
|
|
53
69
|
["action", template.action],
|
|
70
|
+
...(template.sections ?? []).flatMap((section, index) => sectionTexts(section, index)),
|
|
54
71
|
...(template.footer === undefined ? [] : [["footer", template.footer]]),
|
|
55
72
|
];
|
|
56
73
|
}
|
|
74
|
+
/** Every text of one section, with the path of its field. */
|
|
75
|
+
function sectionTexts(section, index) {
|
|
76
|
+
const at = `sections.${index}`;
|
|
77
|
+
const optional = (path, text) => text === undefined ? [] : [[path, text]];
|
|
78
|
+
return [
|
|
79
|
+
[`${at}.title`, section.title],
|
|
80
|
+
...optional(`${at}.text`, section.text),
|
|
81
|
+
...optional(`${at}.copy.label`, section.copy?.label),
|
|
82
|
+
...optional(`${at}.copy.value`, section.copy?.value),
|
|
83
|
+
...(section.items ?? []).flatMap((item, itemIndex) => [
|
|
84
|
+
[`${at}.items.${itemIndex}.label`, item.label],
|
|
85
|
+
...optional(`${at}.items.${itemIndex}.text`, item.text),
|
|
86
|
+
...optional(`${at}.items.${itemIndex}.code`, item.code),
|
|
87
|
+
]),
|
|
88
|
+
...optional(`${at}.note`, section.note),
|
|
89
|
+
];
|
|
90
|
+
}
|
|
57
91
|
/** The placeholders of one text, in order. */
|
|
58
92
|
function placeholders(text) {
|
|
59
93
|
return [...text.matchAll(PLACEHOLDER)].map((match) => match[1]);
|
|
@@ -167,6 +201,9 @@ function emailTemplate(value, path, report) {
|
|
|
167
201
|
});
|
|
168
202
|
}
|
|
169
203
|
}
|
|
204
|
+
if (value.sections !== undefined) {
|
|
205
|
+
valid = checkSections(value.sections, `${path}.sections`, report) && valid;
|
|
206
|
+
}
|
|
170
207
|
if (!valid) {
|
|
171
208
|
return undefined;
|
|
172
209
|
}
|
|
@@ -188,10 +225,110 @@ function emailTemplate(value, path, report) {
|
|
|
188
225
|
? {}
|
|
189
226
|
: { paragraphs: [...value.paragraphs] }),
|
|
190
227
|
action: value.action,
|
|
228
|
+
...(value.sections === undefined
|
|
229
|
+
? {}
|
|
230
|
+
: { sections: value.sections.map(normalSection) }),
|
|
191
231
|
...(value.footer === undefined ? {} : { footer: value.footer }),
|
|
192
232
|
...(value.replyTo === undefined ? {} : { replyTo: value.replyTo }),
|
|
193
233
|
};
|
|
194
234
|
}
|
|
235
|
+
/** Whether every key of `value` is one of `fields`, reporting the others. */
|
|
236
|
+
function knownKeys(value, fields, path, report) {
|
|
237
|
+
let valid = true;
|
|
238
|
+
for (const key of Object.keys(value)) {
|
|
239
|
+
if (!fields.includes(key)) {
|
|
240
|
+
report("invalid-email", `${path}.${key}`, `Unknown field ${key}; use ${fields.join(", ")}.`);
|
|
241
|
+
valid = false;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return valid;
|
|
245
|
+
}
|
|
246
|
+
/** Checks `sections`: at most a few boxes, each with a title and its optional parts. */
|
|
247
|
+
function checkSections(value, path, report) {
|
|
248
|
+
if (!Array.isArray(value) || value.length > MAX_EMAIL_SECTIONS) {
|
|
249
|
+
report("invalid-email", path, `sections is a list of at most ${MAX_EMAIL_SECTIONS} { title, text?, copy?, items?, note? }.`);
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
let valid = true;
|
|
253
|
+
value.forEach((section, index) => {
|
|
254
|
+
const at = `${path}.${index}`;
|
|
255
|
+
if (!isRecord(section)) {
|
|
256
|
+
report("invalid-email", at, "A section is { title, text?, copy?, items?, note? }.");
|
|
257
|
+
valid = false;
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
valid = knownKeys(section, SECTION_FIELDS, at, report) && valid;
|
|
261
|
+
valid = checkText(section.title, `${at}.title`, MAX_EMAIL_TEXT, report) && valid;
|
|
262
|
+
for (const key of ["text", "note"]) {
|
|
263
|
+
if (section[key] !== undefined) {
|
|
264
|
+
valid = checkText(section[key], `${at}.${key}`, MAX_EMAIL_TEXT, report) && valid;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (section.copy !== undefined) {
|
|
268
|
+
const copy = section.copy;
|
|
269
|
+
if (!isRecord(copy)) {
|
|
270
|
+
report("invalid-email", `${at}.copy`, "copy is { label?, value }.");
|
|
271
|
+
valid = false;
|
|
272
|
+
}
|
|
273
|
+
else {
|
|
274
|
+
valid = knownKeys(copy, ["label", "value"], `${at}.copy`, report) && valid;
|
|
275
|
+
valid = checkText(copy.value, `${at}.copy.value`, MAX_EMAIL_TEXT, report) && valid;
|
|
276
|
+
if (copy.label !== undefined) {
|
|
277
|
+
valid = checkText(copy.label, `${at}.copy.label`, MAX_EMAIL_TEXT, report) && valid;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
if (section.items !== undefined) {
|
|
282
|
+
if (!Array.isArray(section.items) || section.items.length > MAX_EMAIL_SECTION_ITEMS) {
|
|
283
|
+
report("invalid-email", `${at}.items`, `items is a list of at most ${MAX_EMAIL_SECTION_ITEMS} { label, text?, code? }.`);
|
|
284
|
+
valid = false;
|
|
285
|
+
}
|
|
286
|
+
else {
|
|
287
|
+
section.items.forEach((item, itemIndex) => {
|
|
288
|
+
const itemAt = `${at}.items.${itemIndex}`;
|
|
289
|
+
if (!isRecord(item)) {
|
|
290
|
+
report("invalid-email", itemAt, "An item is { label, text?, code? }.");
|
|
291
|
+
valid = false;
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
valid = knownKeys(item, ITEM_FIELDS, itemAt, report) && valid;
|
|
295
|
+
valid = checkText(item.label, `${itemAt}.label`, MAX_EMAIL_TEXT, report) && valid;
|
|
296
|
+
for (const key of ["text", "code"]) {
|
|
297
|
+
if (item[key] !== undefined) {
|
|
298
|
+
valid = checkText(item[key], `${itemAt}.${key}`, MAX_EMAIL_TEXT, report) && valid;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
return valid;
|
|
306
|
+
}
|
|
307
|
+
/** A checked section with only its declared fields, in order. */
|
|
308
|
+
function normalSection(section) {
|
|
309
|
+
return {
|
|
310
|
+
title: section.title,
|
|
311
|
+
...(section.text === undefined ? {} : { text: section.text }),
|
|
312
|
+
...(section.copy === undefined
|
|
313
|
+
? {}
|
|
314
|
+
: {
|
|
315
|
+
copy: {
|
|
316
|
+
...(section.copy.label === undefined ? {} : { label: section.copy.label }),
|
|
317
|
+
value: section.copy.value,
|
|
318
|
+
},
|
|
319
|
+
}),
|
|
320
|
+
...(section.items === undefined
|
|
321
|
+
? {}
|
|
322
|
+
: {
|
|
323
|
+
items: section.items.map((item) => ({
|
|
324
|
+
label: item.label,
|
|
325
|
+
...(item.text === undefined ? {} : { text: item.text }),
|
|
326
|
+
...(item.code === undefined ? {} : { code: item.code }),
|
|
327
|
+
})),
|
|
328
|
+
}),
|
|
329
|
+
...(section.note === undefined ? {} : { note: section.note }),
|
|
330
|
+
};
|
|
331
|
+
}
|
|
195
332
|
/**
|
|
196
333
|
* The declared emails by wire name, each checked: its fields, their lengths and their
|
|
197
334
|
* placeholders. `wireName` turns a camelCase name into its wire form, reporting one that cannot
|
package/dist/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export type { WebhookDelivery, WebhookSignatureScheme } from "./webhooks.js";
|
|
|
50
50
|
export type { ActionEvent, ActionTrigger, AfterOptions, AnyActionHandle, AnyWorkflow, ChangedBounds, CronOptions, CronProblem, CronTrigger, TriggerFunction, TriggerRecord, WebhookOptions, WebhookSignature, WebhookVerification, WebhookTrigger, Workflow, WorkflowFunction, WorkflowOptions, WorkflowRunContext, WorkflowTrigger, } from "./workflow.js";
|
|
51
51
|
export { CHANNEL_PROVIDERS, DEFAULT_SIGN_IN_POLICY, SIGN_IN_METHODS, SIGN_IN_POLICIES, SIGN_UP_CHANNELS, GUEST_CHANNELS, matchesWebsite, signUpOrigin, websiteOrigin, } from "./sign-in.js";
|
|
52
52
|
export type { ChannelProvider, GuestChannel, GuestOptions, ResolvedGuest, ResolvedSignInOptions, ResolvedSignUp, SignInCheck, SignInMethod, SignInOptions, SignInPolicy, SignUpChannel, SignUpOptions, } from "./sign-in.js";
|
|
53
|
-
export type { EmailTemplate } from "./emails.js";
|
|
53
|
+
export type { EmailSection, EmailSectionItem, EmailTemplate } from "./emails.js";
|
|
54
54
|
export { OntologyActions, OntologyReads, OntologyRuntime, OntologyWrites } from "./runtime.js";
|
|
55
55
|
export type { ActionRunOptions } from "./runtime.js";
|
|
56
56
|
export type { BatchOptions, BatchRecordResult, BatchResult, BatchReturning, BatchSummaryResult, CreateManyInput, FieldCondition, OntologyRuntimeService, FindOptions, FreshMetricQueryOptions, GetOptions, Principal, RecordWhere, StoredRecord, StoredValues, UpsertResult, UpdateManyInput, UpsertManyInput, } from "./runtime.js";
|
package/dist/manifest.d.ts
CHANGED
|
@@ -68,6 +68,11 @@ import { type ResolvedGuest, type ResolvedSignInOptions, type SignInPolicy } fro
|
|
|
68
68
|
* `guest` role, which holds the guests' permissions. Origins of `guest` and `signUp` may be patterns
|
|
69
69
|
* such as `https://*.example.com`. Older readers ignore `guest` and admit no guests, and leave out
|
|
70
70
|
* the patterns they cannot read.
|
|
71
|
+
* Within version 15, an email may carry `sections`, boxes below its button, and its texts may use
|
|
72
|
+
* `{{app.url}}` and `{{app.mcpUrl}}`; `signIn` may carry `invitationEmail`, written only when
|
|
73
|
+
* declared: the wire name of the email the platform sends instead of its own invitation. Older
|
|
74
|
+
* readers ignore `sections` and `invitationEmail`, leave the two values empty and send the
|
|
75
|
+
* platform's invitation.
|
|
71
76
|
*/
|
|
72
77
|
export declare const MANIFEST_VERSION = 15;
|
|
73
78
|
/** The phrase used for a direction the author did not phrase. */
|
|
@@ -657,11 +662,14 @@ export declare const SignInManifest: Schema.encodeKeys<Schema.Struct<{
|
|
|
657
662
|
readonly channels: Schema.$Array<Schema.String>;
|
|
658
663
|
readonly origins: Schema.$Array<Schema.String>;
|
|
659
664
|
}>>;
|
|
665
|
+
/** The wire name of the email the platform sends instead of its own invitation. */
|
|
666
|
+
readonly invitationEmail: Schema.optionalKey<Schema.String>;
|
|
660
667
|
}>, {
|
|
661
668
|
readonly onNewUser: "on_new_user";
|
|
662
669
|
readonly codeLink: "code_link";
|
|
663
670
|
readonly signUp: "sign_up";
|
|
664
671
|
readonly onSignUp: "on_sign_up";
|
|
672
|
+
readonly invitationEmail: "invitation_email";
|
|
665
673
|
}>;
|
|
666
674
|
export type SignInManifest = typeof SignInManifest.Type;
|
|
667
675
|
/** One of the workspace's emails, as `defineOntology({ emails })` declares it; see `EmailTemplate`. */
|
|
@@ -676,6 +684,20 @@ export declare const EmailTemplateManifest: Schema.encodeKeys<Schema.Struct<{
|
|
|
676
684
|
readonly note: Schema.optionalKey<Schema.String>;
|
|
677
685
|
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
678
686
|
readonly action: Schema.String;
|
|
687
|
+
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
688
|
+
readonly title: Schema.String;
|
|
689
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
690
|
+
readonly copy: Schema.optionalKey<Schema.Struct<{
|
|
691
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
692
|
+
readonly value: Schema.String;
|
|
693
|
+
}>>;
|
|
694
|
+
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
695
|
+
readonly label: Schema.String;
|
|
696
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
697
|
+
readonly code: Schema.optionalKey<Schema.String>;
|
|
698
|
+
}>>>;
|
|
699
|
+
readonly note: Schema.optionalKey<Schema.String>;
|
|
700
|
+
}>>>;
|
|
679
701
|
readonly footer: Schema.optionalKey<Schema.String>;
|
|
680
702
|
readonly replyTo: Schema.optionalKey<Schema.String>;
|
|
681
703
|
}>, {
|
|
@@ -942,11 +964,14 @@ export declare const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
|
|
|
942
964
|
readonly channels: Schema.$Array<Schema.String>;
|
|
943
965
|
readonly origins: Schema.$Array<Schema.String>;
|
|
944
966
|
}>>;
|
|
967
|
+
/** The wire name of the email the platform sends instead of its own invitation. */
|
|
968
|
+
readonly invitationEmail: Schema.optionalKey<Schema.String>;
|
|
945
969
|
}>, {
|
|
946
970
|
readonly onNewUser: "on_new_user";
|
|
947
971
|
readonly codeLink: "code_link";
|
|
948
972
|
readonly signUp: "sign_up";
|
|
949
973
|
readonly onSignUp: "on_sign_up";
|
|
974
|
+
readonly invitationEmail: "invitation_email";
|
|
950
975
|
}>>;
|
|
951
976
|
/** The workspace's own emails by wire name. Written only when there are some; absent reads as none. */
|
|
952
977
|
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.encodeKeys<Schema.Struct<{
|
|
@@ -960,6 +985,20 @@ export declare const OntologyManifestWire: Schema.encodeKeys<Schema.Struct<{
|
|
|
960
985
|
readonly note: Schema.optionalKey<Schema.String>;
|
|
961
986
|
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
962
987
|
readonly action: Schema.String;
|
|
988
|
+
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
989
|
+
readonly title: Schema.String;
|
|
990
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
991
|
+
readonly copy: Schema.optionalKey<Schema.Struct<{
|
|
992
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
993
|
+
readonly value: Schema.String;
|
|
994
|
+
}>>;
|
|
995
|
+
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
996
|
+
readonly label: Schema.String;
|
|
997
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
998
|
+
readonly code: Schema.optionalKey<Schema.String>;
|
|
999
|
+
}>>>;
|
|
1000
|
+
readonly note: Schema.optionalKey<Schema.String>;
|
|
1001
|
+
}>>>;
|
|
963
1002
|
readonly footer: Schema.optionalKey<Schema.String>;
|
|
964
1003
|
readonly replyTo: Schema.optionalKey<Schema.String>;
|
|
965
1004
|
}>, {
|
|
@@ -1338,6 +1377,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1338
1377
|
readonly origins?: readonly string[] | undefined;
|
|
1339
1378
|
} | undefined;
|
|
1340
1379
|
readonly onSignUp?: string | undefined;
|
|
1380
|
+
readonly invitationEmail?: string | undefined;
|
|
1341
1381
|
} | undefined;
|
|
1342
1382
|
readonly emails?: {
|
|
1343
1383
|
readonly [x: string]: {
|
|
@@ -1352,6 +1392,20 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1352
1392
|
} | undefined;
|
|
1353
1393
|
readonly note?: string | undefined;
|
|
1354
1394
|
readonly paragraphs?: readonly string[] | undefined;
|
|
1395
|
+
readonly sections?: readonly {
|
|
1396
|
+
readonly title: string;
|
|
1397
|
+
readonly text?: string | undefined;
|
|
1398
|
+
readonly items?: readonly {
|
|
1399
|
+
readonly label: string;
|
|
1400
|
+
readonly code?: string | undefined;
|
|
1401
|
+
readonly text?: string | undefined;
|
|
1402
|
+
}[] | undefined;
|
|
1403
|
+
readonly note?: string | undefined;
|
|
1404
|
+
readonly copy?: {
|
|
1405
|
+
readonly value: string;
|
|
1406
|
+
readonly label?: string | undefined;
|
|
1407
|
+
} | undefined;
|
|
1408
|
+
}[] | undefined;
|
|
1355
1409
|
readonly footer?: string | undefined;
|
|
1356
1410
|
};
|
|
1357
1411
|
} | undefined;
|
|
@@ -1614,6 +1668,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1614
1668
|
readonly origins?: readonly string[] | undefined;
|
|
1615
1669
|
} | undefined;
|
|
1616
1670
|
readonly onSignUp?: string | undefined;
|
|
1671
|
+
readonly invitationEmail?: string | undefined;
|
|
1617
1672
|
} | undefined;
|
|
1618
1673
|
readonly emails?: {
|
|
1619
1674
|
readonly [x: string]: {
|
|
@@ -1628,6 +1683,20 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1628
1683
|
} | undefined;
|
|
1629
1684
|
readonly note?: string | undefined;
|
|
1630
1685
|
readonly paragraphs?: readonly string[] | undefined;
|
|
1686
|
+
readonly sections?: readonly {
|
|
1687
|
+
readonly title: string;
|
|
1688
|
+
readonly text?: string | undefined;
|
|
1689
|
+
readonly items?: readonly {
|
|
1690
|
+
readonly label: string;
|
|
1691
|
+
readonly code?: string | undefined;
|
|
1692
|
+
readonly text?: string | undefined;
|
|
1693
|
+
}[] | undefined;
|
|
1694
|
+
readonly note?: string | undefined;
|
|
1695
|
+
readonly copy?: {
|
|
1696
|
+
readonly value: string;
|
|
1697
|
+
readonly label?: string | undefined;
|
|
1698
|
+
} | undefined;
|
|
1699
|
+
}[] | undefined;
|
|
1631
1700
|
readonly footer?: string | undefined;
|
|
1632
1701
|
};
|
|
1633
1702
|
} | undefined;
|
|
@@ -1876,6 +1945,20 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1876
1945
|
} | undefined;
|
|
1877
1946
|
readonly note?: string | undefined;
|
|
1878
1947
|
readonly paragraphs?: readonly string[] | undefined;
|
|
1948
|
+
readonly sections?: readonly {
|
|
1949
|
+
readonly title: string;
|
|
1950
|
+
readonly text?: string | undefined;
|
|
1951
|
+
readonly items?: readonly {
|
|
1952
|
+
readonly label: string;
|
|
1953
|
+
readonly code?: string | undefined;
|
|
1954
|
+
readonly text?: string | undefined;
|
|
1955
|
+
}[] | undefined;
|
|
1956
|
+
readonly note?: string | undefined;
|
|
1957
|
+
readonly copy?: {
|
|
1958
|
+
readonly value: string;
|
|
1959
|
+
readonly label?: string | undefined;
|
|
1960
|
+
} | undefined;
|
|
1961
|
+
}[] | undefined;
|
|
1879
1962
|
readonly footer?: string | undefined;
|
|
1880
1963
|
readonly reply_to?: string | undefined;
|
|
1881
1964
|
};
|
|
@@ -1941,6 +2024,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
1941
2024
|
readonly origins?: readonly string[] | undefined;
|
|
1942
2025
|
} | undefined;
|
|
1943
2026
|
readonly on_sign_up?: string | undefined;
|
|
2027
|
+
readonly invitation_email?: string | undefined;
|
|
1944
2028
|
} | undefined;
|
|
1945
2029
|
} | {
|
|
1946
2030
|
readonly version: number;
|
|
@@ -2166,6 +2250,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2166
2250
|
readonly origins?: readonly string[] | undefined;
|
|
2167
2251
|
} | undefined;
|
|
2168
2252
|
readonly on_sign_up?: string | undefined;
|
|
2253
|
+
readonly invitation_email?: string | undefined;
|
|
2169
2254
|
} | undefined;
|
|
2170
2255
|
readonly emails?: {
|
|
2171
2256
|
readonly [x: string]: {
|
|
@@ -2179,6 +2264,20 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2179
2264
|
} | undefined;
|
|
2180
2265
|
readonly note?: string | undefined;
|
|
2181
2266
|
readonly paragraphs?: readonly string[] | undefined;
|
|
2267
|
+
readonly sections?: readonly {
|
|
2268
|
+
readonly title: string;
|
|
2269
|
+
readonly text?: string | undefined;
|
|
2270
|
+
readonly items?: readonly {
|
|
2271
|
+
readonly label: string;
|
|
2272
|
+
readonly code?: string | undefined;
|
|
2273
|
+
readonly text?: string | undefined;
|
|
2274
|
+
}[] | undefined;
|
|
2275
|
+
readonly note?: string | undefined;
|
|
2276
|
+
readonly copy?: {
|
|
2277
|
+
readonly value: string;
|
|
2278
|
+
readonly label?: string | undefined;
|
|
2279
|
+
} | undefined;
|
|
2280
|
+
}[] | undefined;
|
|
2182
2281
|
readonly footer?: string | undefined;
|
|
2183
2282
|
readonly reply_to?: string | undefined;
|
|
2184
2283
|
};
|
|
@@ -2423,11 +2522,14 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2423
2522
|
readonly channels: Schema.$Array<Schema.String>;
|
|
2424
2523
|
readonly origins: Schema.$Array<Schema.String>;
|
|
2425
2524
|
}>>;
|
|
2525
|
+
/** The wire name of the email the platform sends instead of its own invitation. */
|
|
2526
|
+
readonly invitationEmail: Schema.optionalKey<Schema.String>;
|
|
2426
2527
|
}>, {
|
|
2427
2528
|
readonly onNewUser: "on_new_user";
|
|
2428
2529
|
readonly codeLink: "code_link";
|
|
2429
2530
|
readonly signUp: "sign_up";
|
|
2430
2531
|
readonly onSignUp: "on_sign_up";
|
|
2532
|
+
readonly invitationEmail: "invitation_email";
|
|
2431
2533
|
}>>;
|
|
2432
2534
|
/** The workspace's own emails by wire name. Written only when there are some; absent reads as none. */
|
|
2433
2535
|
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.encodeKeys<Schema.Struct<{
|
|
@@ -2441,6 +2543,20 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2441
2543
|
readonly note: Schema.optionalKey<Schema.String>;
|
|
2442
2544
|
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
2443
2545
|
readonly action: Schema.String;
|
|
2546
|
+
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
2547
|
+
readonly title: Schema.String;
|
|
2548
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
2549
|
+
readonly copy: Schema.optionalKey<Schema.Struct<{
|
|
2550
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
2551
|
+
readonly value: Schema.String;
|
|
2552
|
+
}>>;
|
|
2553
|
+
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
2554
|
+
readonly label: Schema.String;
|
|
2555
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
2556
|
+
readonly code: Schema.optionalKey<Schema.String>;
|
|
2557
|
+
}>>>;
|
|
2558
|
+
readonly note: Schema.optionalKey<Schema.String>;
|
|
2559
|
+
}>>>;
|
|
2444
2560
|
readonly footer: Schema.optionalKey<Schema.String>;
|
|
2445
2561
|
readonly replyTo: Schema.optionalKey<Schema.String>;
|
|
2446
2562
|
}>, {
|
|
@@ -2787,11 +2903,14 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2787
2903
|
readonly channels: Schema.$Array<Schema.String>;
|
|
2788
2904
|
readonly origins: Schema.$Array<Schema.String>;
|
|
2789
2905
|
}>>;
|
|
2906
|
+
/** The wire name of the email the platform sends instead of its own invitation. */
|
|
2907
|
+
readonly invitationEmail: Schema.optionalKey<Schema.String>;
|
|
2790
2908
|
}>, {
|
|
2791
2909
|
readonly onNewUser: "on_new_user";
|
|
2792
2910
|
readonly codeLink: "code_link";
|
|
2793
2911
|
readonly signUp: "sign_up";
|
|
2794
2912
|
readonly onSignUp: "on_sign_up";
|
|
2913
|
+
readonly invitationEmail: "invitation_email";
|
|
2795
2914
|
}>>;
|
|
2796
2915
|
/** The workspace's own emails by wire name. Written only when there are some; absent reads as none. */
|
|
2797
2916
|
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.encodeKeys<Schema.Struct<{
|
|
@@ -2805,6 +2924,20 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
2805
2924
|
readonly note: Schema.optionalKey<Schema.String>;
|
|
2806
2925
|
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
2807
2926
|
readonly action: Schema.String;
|
|
2927
|
+
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
2928
|
+
readonly title: Schema.String;
|
|
2929
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
2930
|
+
readonly copy: Schema.optionalKey<Schema.Struct<{
|
|
2931
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
2932
|
+
readonly value: Schema.String;
|
|
2933
|
+
}>>;
|
|
2934
|
+
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
2935
|
+
readonly label: Schema.String;
|
|
2936
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
2937
|
+
readonly code: Schema.optionalKey<Schema.String>;
|
|
2938
|
+
}>>>;
|
|
2939
|
+
readonly note: Schema.optionalKey<Schema.String>;
|
|
2940
|
+
}>>>;
|
|
2808
2941
|
readonly footer: Schema.optionalKey<Schema.String>;
|
|
2809
2942
|
readonly replyTo: Schema.optionalKey<Schema.String>;
|
|
2810
2943
|
}>, {
|
|
@@ -3175,6 +3308,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3175
3308
|
readonly origins?: readonly string[] | undefined;
|
|
3176
3309
|
} | undefined;
|
|
3177
3310
|
readonly onSignUp?: string | undefined;
|
|
3311
|
+
readonly invitationEmail?: string | undefined;
|
|
3178
3312
|
} | undefined;
|
|
3179
3313
|
readonly emails?: {
|
|
3180
3314
|
readonly [x: string]: {
|
|
@@ -3189,6 +3323,20 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3189
3323
|
} | undefined;
|
|
3190
3324
|
readonly note?: string | undefined;
|
|
3191
3325
|
readonly paragraphs?: readonly string[] | undefined;
|
|
3326
|
+
readonly sections?: readonly {
|
|
3327
|
+
readonly title: string;
|
|
3328
|
+
readonly text?: string | undefined;
|
|
3329
|
+
readonly items?: readonly {
|
|
3330
|
+
readonly label: string;
|
|
3331
|
+
readonly code?: string | undefined;
|
|
3332
|
+
readonly text?: string | undefined;
|
|
3333
|
+
}[] | undefined;
|
|
3334
|
+
readonly note?: string | undefined;
|
|
3335
|
+
readonly copy?: {
|
|
3336
|
+
readonly value: string;
|
|
3337
|
+
readonly label?: string | undefined;
|
|
3338
|
+
} | undefined;
|
|
3339
|
+
}[] | undefined;
|
|
3192
3340
|
readonly footer?: string | undefined;
|
|
3193
3341
|
};
|
|
3194
3342
|
} | undefined;
|
|
@@ -3451,6 +3599,7 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3451
3599
|
readonly origins?: readonly string[] | undefined;
|
|
3452
3600
|
} | undefined;
|
|
3453
3601
|
readonly onSignUp?: string | undefined;
|
|
3602
|
+
readonly invitationEmail?: string | undefined;
|
|
3454
3603
|
} | undefined;
|
|
3455
3604
|
readonly emails?: {
|
|
3456
3605
|
readonly [x: string]: {
|
|
@@ -3465,6 +3614,20 @@ export declare const OntologyManifest: Schema.declareConstructor<{
|
|
|
3465
3614
|
} | undefined;
|
|
3466
3615
|
readonly note?: string | undefined;
|
|
3467
3616
|
readonly paragraphs?: readonly string[] | undefined;
|
|
3617
|
+
readonly sections?: readonly {
|
|
3618
|
+
readonly title: string;
|
|
3619
|
+
readonly text?: string | undefined;
|
|
3620
|
+
readonly items?: readonly {
|
|
3621
|
+
readonly label: string;
|
|
3622
|
+
readonly code?: string | undefined;
|
|
3623
|
+
readonly text?: string | undefined;
|
|
3624
|
+
}[] | undefined;
|
|
3625
|
+
readonly note?: string | undefined;
|
|
3626
|
+
readonly copy?: {
|
|
3627
|
+
readonly value: string;
|
|
3628
|
+
readonly label?: string | undefined;
|
|
3629
|
+
} | undefined;
|
|
3630
|
+
}[] | undefined;
|
|
3468
3631
|
readonly footer?: string | undefined;
|
|
3469
3632
|
};
|
|
3470
3633
|
} | undefined;
|
|
@@ -3733,6 +3896,7 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
3733
3896
|
readonly origins?: readonly string[] | undefined;
|
|
3734
3897
|
} | undefined;
|
|
3735
3898
|
readonly onSignUp?: string | undefined;
|
|
3899
|
+
readonly invitationEmail?: string | undefined;
|
|
3736
3900
|
} | undefined;
|
|
3737
3901
|
readonly emails?: {
|
|
3738
3902
|
readonly [x: string]: {
|
|
@@ -3747,6 +3911,20 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
3747
3911
|
} | undefined;
|
|
3748
3912
|
readonly note?: string | undefined;
|
|
3749
3913
|
readonly paragraphs?: readonly string[] | undefined;
|
|
3914
|
+
readonly sections?: readonly {
|
|
3915
|
+
readonly title: string;
|
|
3916
|
+
readonly text?: string | undefined;
|
|
3917
|
+
readonly items?: readonly {
|
|
3918
|
+
readonly label: string;
|
|
3919
|
+
readonly code?: string | undefined;
|
|
3920
|
+
readonly text?: string | undefined;
|
|
3921
|
+
}[] | undefined;
|
|
3922
|
+
readonly note?: string | undefined;
|
|
3923
|
+
readonly copy?: {
|
|
3924
|
+
readonly value: string;
|
|
3925
|
+
readonly label?: string | undefined;
|
|
3926
|
+
} | undefined;
|
|
3927
|
+
}[] | undefined;
|
|
3750
3928
|
readonly footer?: string | undefined;
|
|
3751
3929
|
};
|
|
3752
3930
|
} | undefined;
|
|
@@ -4009,6 +4187,7 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
4009
4187
|
readonly origins?: readonly string[] | undefined;
|
|
4010
4188
|
} | undefined;
|
|
4011
4189
|
readonly onSignUp?: string | undefined;
|
|
4190
|
+
readonly invitationEmail?: string | undefined;
|
|
4012
4191
|
} | undefined;
|
|
4013
4192
|
readonly emails?: {
|
|
4014
4193
|
readonly [x: string]: {
|
|
@@ -4023,6 +4202,20 @@ export declare const decodeManifestDocument: (value: unknown) => Effect.Effect<{
|
|
|
4023
4202
|
} | undefined;
|
|
4024
4203
|
readonly note?: string | undefined;
|
|
4025
4204
|
readonly paragraphs?: readonly string[] | undefined;
|
|
4205
|
+
readonly sections?: readonly {
|
|
4206
|
+
readonly title: string;
|
|
4207
|
+
readonly text?: string | undefined;
|
|
4208
|
+
readonly items?: readonly {
|
|
4209
|
+
readonly label: string;
|
|
4210
|
+
readonly code?: string | undefined;
|
|
4211
|
+
readonly text?: string | undefined;
|
|
4212
|
+
}[] | undefined;
|
|
4213
|
+
readonly note?: string | undefined;
|
|
4214
|
+
readonly copy?: {
|
|
4215
|
+
readonly value: string;
|
|
4216
|
+
readonly label?: string | undefined;
|
|
4217
|
+
} | undefined;
|
|
4218
|
+
}[] | undefined;
|
|
4026
4219
|
readonly footer?: string | undefined;
|
|
4027
4220
|
};
|
|
4028
4221
|
} | undefined;
|
package/dist/manifest.js
CHANGED
|
@@ -68,6 +68,11 @@ import { CHANNEL_PROVIDERS, DEFAULT_SIGN_IN_POLICY, isGuestChannel, isSignInPoli
|
|
|
68
68
|
* `guest` role, which holds the guests' permissions. Origins of `guest` and `signUp` may be patterns
|
|
69
69
|
* such as `https://*.example.com`. Older readers ignore `guest` and admit no guests, and leave out
|
|
70
70
|
* the patterns they cannot read.
|
|
71
|
+
* Within version 15, an email may carry `sections`, boxes below its button, and its texts may use
|
|
72
|
+
* `{{app.url}}` and `{{app.mcpUrl}}`; `signIn` may carry `invitationEmail`, written only when
|
|
73
|
+
* declared: the wire name of the email the platform sends instead of its own invitation. Older
|
|
74
|
+
* readers ignore `sections` and `invitationEmail`, leave the two values empty and send the
|
|
75
|
+
* platform's invitation.
|
|
71
76
|
*/
|
|
72
77
|
export const MANIFEST_VERSION = 15;
|
|
73
78
|
/** The first version whose documents use snake_case names on the wire. */
|
|
@@ -420,11 +425,14 @@ export const SignInManifest = Schema.Struct({
|
|
|
420
425
|
signUp: Schema.optionalKey(SignUpManifest),
|
|
421
426
|
onSignUp: Schema.optionalKey(Schema.String),
|
|
422
427
|
guest: Schema.optionalKey(GuestManifest),
|
|
428
|
+
/** The wire name of the email the platform sends instead of its own invitation. */
|
|
429
|
+
invitationEmail: Schema.optionalKey(Schema.String),
|
|
423
430
|
}).pipe(Schema.encodeKeys({
|
|
424
431
|
onNewUser: "on_new_user",
|
|
425
432
|
codeLink: "code_link",
|
|
426
433
|
signUp: "sign_up",
|
|
427
434
|
onSignUp: "on_sign_up",
|
|
435
|
+
invitationEmail: "invitation_email",
|
|
428
436
|
}));
|
|
429
437
|
/** One of the workspace's emails, as `defineOntology({ emails })` declares it; see `EmailTemplate`. */
|
|
430
438
|
export const EmailTemplateManifest = Schema.Struct({
|
|
@@ -435,6 +443,17 @@ export const EmailTemplateManifest = Schema.Struct({
|
|
|
435
443
|
note: Schema.optionalKey(Schema.String),
|
|
436
444
|
paragraphs: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
437
445
|
action: Schema.String,
|
|
446
|
+
sections: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
447
|
+
title: Schema.String,
|
|
448
|
+
text: Schema.optionalKey(Schema.String),
|
|
449
|
+
copy: Schema.optionalKey(Schema.Struct({ label: Schema.optionalKey(Schema.String), value: Schema.String })),
|
|
450
|
+
items: Schema.optionalKey(Schema.Array(Schema.Struct({
|
|
451
|
+
label: Schema.String,
|
|
452
|
+
text: Schema.optionalKey(Schema.String),
|
|
453
|
+
code: Schema.optionalKey(Schema.String),
|
|
454
|
+
}))),
|
|
455
|
+
note: Schema.optionalKey(Schema.String),
|
|
456
|
+
}))),
|
|
438
457
|
footer: Schema.optionalKey(Schema.String),
|
|
439
458
|
replyTo: Schema.optionalKey(Schema.String),
|
|
440
459
|
}).pipe(Schema.encodeKeys({ replyTo: "reply_to" }));
|
|
@@ -854,6 +873,9 @@ export function buildManifest(input) {
|
|
|
854
873
|
...(input.signIn.browser === undefined ? {} : { browser: input.signIn.browser }),
|
|
855
874
|
...(input.signIn.onNewUser === undefined ? {} : { onNewUser: input.signIn.onNewUser }),
|
|
856
875
|
...(input.signIn.codeLink === undefined ? {} : { codeLink: input.signIn.codeLink }),
|
|
876
|
+
...(input.signIn.invitationEmail === undefined
|
|
877
|
+
? {}
|
|
878
|
+
: { invitationEmail: input.signIn.invitationEmail }),
|
|
857
879
|
...(Object.keys(input.signIn.channels ?? {}).length > 0
|
|
858
880
|
? { channels: input.signIn.channels }
|
|
859
881
|
: {}),
|
package/dist/migrate/model.d.ts
CHANGED
|
@@ -505,6 +505,7 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
505
505
|
readonly origins?: readonly string[] | undefined;
|
|
506
506
|
} | undefined;
|
|
507
507
|
readonly onSignUp?: string | undefined;
|
|
508
|
+
readonly invitationEmail?: string | undefined;
|
|
508
509
|
} | undefined;
|
|
509
510
|
readonly emails?: {
|
|
510
511
|
readonly [x: string]: {
|
|
@@ -519,6 +520,20 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
519
520
|
} | undefined;
|
|
520
521
|
readonly note?: string | undefined;
|
|
521
522
|
readonly paragraphs?: readonly string[] | undefined;
|
|
523
|
+
readonly sections?: readonly {
|
|
524
|
+
readonly title: string;
|
|
525
|
+
readonly text?: string | undefined;
|
|
526
|
+
readonly items?: readonly {
|
|
527
|
+
readonly label: string;
|
|
528
|
+
readonly code?: string | undefined;
|
|
529
|
+
readonly text?: string | undefined;
|
|
530
|
+
}[] | undefined;
|
|
531
|
+
readonly note?: string | undefined;
|
|
532
|
+
readonly copy?: {
|
|
533
|
+
readonly value: string;
|
|
534
|
+
readonly label?: string | undefined;
|
|
535
|
+
} | undefined;
|
|
536
|
+
}[] | undefined;
|
|
522
537
|
readonly footer?: string | undefined;
|
|
523
538
|
};
|
|
524
539
|
} | undefined;
|
|
@@ -781,6 +796,7 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
781
796
|
readonly origins?: readonly string[] | undefined;
|
|
782
797
|
} | undefined;
|
|
783
798
|
readonly onSignUp?: string | undefined;
|
|
799
|
+
readonly invitationEmail?: string | undefined;
|
|
784
800
|
} | undefined;
|
|
785
801
|
readonly emails?: {
|
|
786
802
|
readonly [x: string]: {
|
|
@@ -795,6 +811,20 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
795
811
|
} | undefined;
|
|
796
812
|
readonly note?: string | undefined;
|
|
797
813
|
readonly paragraphs?: readonly string[] | undefined;
|
|
814
|
+
readonly sections?: readonly {
|
|
815
|
+
readonly title: string;
|
|
816
|
+
readonly text?: string | undefined;
|
|
817
|
+
readonly items?: readonly {
|
|
818
|
+
readonly label: string;
|
|
819
|
+
readonly code?: string | undefined;
|
|
820
|
+
readonly text?: string | undefined;
|
|
821
|
+
}[] | undefined;
|
|
822
|
+
readonly note?: string | undefined;
|
|
823
|
+
readonly copy?: {
|
|
824
|
+
readonly value: string;
|
|
825
|
+
readonly label?: string | undefined;
|
|
826
|
+
} | undefined;
|
|
827
|
+
}[] | undefined;
|
|
798
828
|
readonly footer?: string | undefined;
|
|
799
829
|
};
|
|
800
830
|
} | undefined;
|
|
@@ -1043,6 +1073,20 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
1043
1073
|
} | undefined;
|
|
1044
1074
|
readonly note?: string | undefined;
|
|
1045
1075
|
readonly paragraphs?: readonly string[] | undefined;
|
|
1076
|
+
readonly sections?: readonly {
|
|
1077
|
+
readonly title: string;
|
|
1078
|
+
readonly text?: string | undefined;
|
|
1079
|
+
readonly items?: readonly {
|
|
1080
|
+
readonly label: string;
|
|
1081
|
+
readonly code?: string | undefined;
|
|
1082
|
+
readonly text?: string | undefined;
|
|
1083
|
+
}[] | undefined;
|
|
1084
|
+
readonly note?: string | undefined;
|
|
1085
|
+
readonly copy?: {
|
|
1086
|
+
readonly value: string;
|
|
1087
|
+
readonly label?: string | undefined;
|
|
1088
|
+
} | undefined;
|
|
1089
|
+
}[] | undefined;
|
|
1046
1090
|
readonly footer?: string | undefined;
|
|
1047
1091
|
readonly reply_to?: string | undefined;
|
|
1048
1092
|
};
|
|
@@ -1108,6 +1152,7 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
1108
1152
|
readonly origins?: readonly string[] | undefined;
|
|
1109
1153
|
} | undefined;
|
|
1110
1154
|
readonly on_sign_up?: string | undefined;
|
|
1155
|
+
readonly invitation_email?: string | undefined;
|
|
1111
1156
|
} | undefined;
|
|
1112
1157
|
} | {
|
|
1113
1158
|
readonly version: number;
|
|
@@ -1333,6 +1378,7 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
1333
1378
|
readonly origins?: readonly string[] | undefined;
|
|
1334
1379
|
} | undefined;
|
|
1335
1380
|
readonly on_sign_up?: string | undefined;
|
|
1381
|
+
readonly invitation_email?: string | undefined;
|
|
1336
1382
|
} | undefined;
|
|
1337
1383
|
readonly emails?: {
|
|
1338
1384
|
readonly [x: string]: {
|
|
@@ -1346,6 +1392,20 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
1346
1392
|
} | undefined;
|
|
1347
1393
|
readonly note?: string | undefined;
|
|
1348
1394
|
readonly paragraphs?: readonly string[] | undefined;
|
|
1395
|
+
readonly sections?: readonly {
|
|
1396
|
+
readonly title: string;
|
|
1397
|
+
readonly text?: string | undefined;
|
|
1398
|
+
readonly items?: readonly {
|
|
1399
|
+
readonly label: string;
|
|
1400
|
+
readonly code?: string | undefined;
|
|
1401
|
+
readonly text?: string | undefined;
|
|
1402
|
+
}[] | undefined;
|
|
1403
|
+
readonly note?: string | undefined;
|
|
1404
|
+
readonly copy?: {
|
|
1405
|
+
readonly value: string;
|
|
1406
|
+
readonly label?: string | undefined;
|
|
1407
|
+
} | undefined;
|
|
1408
|
+
}[] | undefined;
|
|
1349
1409
|
readonly footer?: string | undefined;
|
|
1350
1410
|
readonly reply_to?: string | undefined;
|
|
1351
1411
|
};
|
|
@@ -1546,11 +1606,13 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
1546
1606
|
readonly channels: Schema.$Array<Schema.String>;
|
|
1547
1607
|
readonly origins: Schema.$Array<Schema.String>;
|
|
1548
1608
|
}>>;
|
|
1609
|
+
readonly invitationEmail: Schema.optionalKey<Schema.String>;
|
|
1549
1610
|
}>, {
|
|
1550
1611
|
readonly onNewUser: "on_new_user";
|
|
1551
1612
|
readonly codeLink: "code_link";
|
|
1552
1613
|
readonly signUp: "sign_up";
|
|
1553
1614
|
readonly onSignUp: "on_sign_up";
|
|
1615
|
+
readonly invitationEmail: "invitation_email";
|
|
1554
1616
|
}>>;
|
|
1555
1617
|
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.encodeKeys<Schema.Struct<{
|
|
1556
1618
|
readonly subject: Schema.String;
|
|
@@ -1563,6 +1625,20 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
1563
1625
|
readonly note: Schema.optionalKey<Schema.String>;
|
|
1564
1626
|
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1565
1627
|
readonly action: Schema.String;
|
|
1628
|
+
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1629
|
+
readonly title: Schema.String;
|
|
1630
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
1631
|
+
readonly copy: Schema.optionalKey<Schema.Struct<{
|
|
1632
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
1633
|
+
readonly value: Schema.String;
|
|
1634
|
+
}>>;
|
|
1635
|
+
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1636
|
+
readonly label: Schema.String;
|
|
1637
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
1638
|
+
readonly code: Schema.optionalKey<Schema.String>;
|
|
1639
|
+
}>>>;
|
|
1640
|
+
readonly note: Schema.optionalKey<Schema.String>;
|
|
1641
|
+
}>>>;
|
|
1566
1642
|
readonly footer: Schema.optionalKey<Schema.String>;
|
|
1567
1643
|
readonly replyTo: Schema.optionalKey<Schema.String>;
|
|
1568
1644
|
}>, {
|
|
@@ -1813,11 +1889,13 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
1813
1889
|
readonly channels: Schema.$Array<Schema.String>;
|
|
1814
1890
|
readonly origins: Schema.$Array<Schema.String>;
|
|
1815
1891
|
}>>;
|
|
1892
|
+
readonly invitationEmail: Schema.optionalKey<Schema.String>;
|
|
1816
1893
|
}>, {
|
|
1817
1894
|
readonly onNewUser: "on_new_user";
|
|
1818
1895
|
readonly codeLink: "code_link";
|
|
1819
1896
|
readonly signUp: "sign_up";
|
|
1820
1897
|
readonly onSignUp: "on_sign_up";
|
|
1898
|
+
readonly invitationEmail: "invitation_email";
|
|
1821
1899
|
}>>;
|
|
1822
1900
|
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.encodeKeys<Schema.Struct<{
|
|
1823
1901
|
readonly subject: Schema.String;
|
|
@@ -1830,6 +1908,20 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
1830
1908
|
readonly note: Schema.optionalKey<Schema.String>;
|
|
1831
1909
|
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
1832
1910
|
readonly action: Schema.String;
|
|
1911
|
+
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1912
|
+
readonly title: Schema.String;
|
|
1913
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
1914
|
+
readonly copy: Schema.optionalKey<Schema.Struct<{
|
|
1915
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
1916
|
+
readonly value: Schema.String;
|
|
1917
|
+
}>>;
|
|
1918
|
+
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
1919
|
+
readonly label: Schema.String;
|
|
1920
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
1921
|
+
readonly code: Schema.optionalKey<Schema.String>;
|
|
1922
|
+
}>>>;
|
|
1923
|
+
readonly note: Schema.optionalKey<Schema.String>;
|
|
1924
|
+
}>>>;
|
|
1833
1925
|
readonly footer: Schema.optionalKey<Schema.String>;
|
|
1834
1926
|
readonly replyTo: Schema.optionalKey<Schema.String>;
|
|
1835
1927
|
}>, {
|
|
@@ -2156,6 +2248,7 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
2156
2248
|
readonly origins?: readonly string[] | undefined;
|
|
2157
2249
|
} | undefined;
|
|
2158
2250
|
readonly onSignUp?: string | undefined;
|
|
2251
|
+
readonly invitationEmail?: string | undefined;
|
|
2159
2252
|
} | undefined;
|
|
2160
2253
|
readonly emails?: {
|
|
2161
2254
|
readonly [x: string]: {
|
|
@@ -2170,6 +2263,20 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
2170
2263
|
} | undefined;
|
|
2171
2264
|
readonly note?: string | undefined;
|
|
2172
2265
|
readonly paragraphs?: readonly string[] | undefined;
|
|
2266
|
+
readonly sections?: readonly {
|
|
2267
|
+
readonly title: string;
|
|
2268
|
+
readonly text?: string | undefined;
|
|
2269
|
+
readonly items?: readonly {
|
|
2270
|
+
readonly label: string;
|
|
2271
|
+
readonly code?: string | undefined;
|
|
2272
|
+
readonly text?: string | undefined;
|
|
2273
|
+
}[] | undefined;
|
|
2274
|
+
readonly note?: string | undefined;
|
|
2275
|
+
readonly copy?: {
|
|
2276
|
+
readonly value: string;
|
|
2277
|
+
readonly label?: string | undefined;
|
|
2278
|
+
} | undefined;
|
|
2279
|
+
}[] | undefined;
|
|
2173
2280
|
readonly footer?: string | undefined;
|
|
2174
2281
|
};
|
|
2175
2282
|
} | undefined;
|
|
@@ -2432,6 +2539,7 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
2432
2539
|
readonly origins?: readonly string[] | undefined;
|
|
2433
2540
|
} | undefined;
|
|
2434
2541
|
readonly onSignUp?: string | undefined;
|
|
2542
|
+
readonly invitationEmail?: string | undefined;
|
|
2435
2543
|
} | undefined;
|
|
2436
2544
|
readonly emails?: {
|
|
2437
2545
|
readonly [x: string]: {
|
|
@@ -2446,6 +2554,20 @@ export declare const MigrationPlan: Schema.Struct<{
|
|
|
2446
2554
|
} | undefined;
|
|
2447
2555
|
readonly note?: string | undefined;
|
|
2448
2556
|
readonly paragraphs?: readonly string[] | undefined;
|
|
2557
|
+
readonly sections?: readonly {
|
|
2558
|
+
readonly title: string;
|
|
2559
|
+
readonly text?: string | undefined;
|
|
2560
|
+
readonly items?: readonly {
|
|
2561
|
+
readonly label: string;
|
|
2562
|
+
readonly code?: string | undefined;
|
|
2563
|
+
readonly text?: string | undefined;
|
|
2564
|
+
}[] | undefined;
|
|
2565
|
+
readonly note?: string | undefined;
|
|
2566
|
+
readonly copy?: {
|
|
2567
|
+
readonly value: string;
|
|
2568
|
+
readonly label?: string | undefined;
|
|
2569
|
+
} | undefined;
|
|
2570
|
+
}[] | undefined;
|
|
2449
2571
|
readonly footer?: string | undefined;
|
|
2450
2572
|
};
|
|
2451
2573
|
} | undefined;
|
|
@@ -432,11 +432,13 @@ export declare const Catalog: Schema.decodeTo<Schema.Struct<{
|
|
|
432
432
|
readonly channels: Schema.$Array<Schema.String>;
|
|
433
433
|
readonly origins: Schema.$Array<Schema.String>;
|
|
434
434
|
}>>;
|
|
435
|
+
readonly invitationEmail: Schema.optionalKey<Schema.String>;
|
|
435
436
|
}>, {
|
|
436
437
|
readonly onNewUser: "on_new_user";
|
|
437
438
|
readonly codeLink: "code_link";
|
|
438
439
|
readonly signUp: "sign_up";
|
|
439
440
|
readonly onSignUp: "on_sign_up";
|
|
441
|
+
readonly invitationEmail: "invitation_email";
|
|
440
442
|
}>>;
|
|
441
443
|
readonly emails: Schema.optionalKey<Schema.$Record<Schema.String, Schema.encodeKeys<Schema.Struct<{
|
|
442
444
|
readonly subject: Schema.String;
|
|
@@ -449,6 +451,20 @@ export declare const Catalog: Schema.decodeTo<Schema.Struct<{
|
|
|
449
451
|
readonly note: Schema.optionalKey<Schema.String>;
|
|
450
452
|
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
451
453
|
readonly action: Schema.String;
|
|
454
|
+
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
455
|
+
readonly title: Schema.String;
|
|
456
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
457
|
+
readonly copy: Schema.optionalKey<Schema.Struct<{
|
|
458
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
459
|
+
readonly value: Schema.String;
|
|
460
|
+
}>>;
|
|
461
|
+
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
462
|
+
readonly label: Schema.String;
|
|
463
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
464
|
+
readonly code: Schema.optionalKey<Schema.String>;
|
|
465
|
+
}>>>;
|
|
466
|
+
readonly note: Schema.optionalKey<Schema.String>;
|
|
467
|
+
}>>>;
|
|
452
468
|
readonly footer: Schema.optionalKey<Schema.String>;
|
|
453
469
|
readonly replyTo: Schema.optionalKey<Schema.String>;
|
|
454
470
|
}>, {
|
|
@@ -712,11 +728,13 @@ export declare const Catalog: Schema.decodeTo<Schema.Struct<{
|
|
|
712
728
|
readonly channels: Schema.$Array<Schema.String>;
|
|
713
729
|
readonly origins: Schema.$Array<Schema.String>;
|
|
714
730
|
}>>;
|
|
731
|
+
readonly invitationEmail: Schema.optionalKey<Schema.String>;
|
|
715
732
|
}>, {
|
|
716
733
|
readonly onNewUser: "on_new_user";
|
|
717
734
|
readonly codeLink: "code_link";
|
|
718
735
|
readonly signUp: "sign_up";
|
|
719
736
|
readonly onSignUp: "on_sign_up";
|
|
737
|
+
readonly invitationEmail: "invitation_email";
|
|
720
738
|
}>>>;
|
|
721
739
|
readonly emails: Schema.toEncoded<Schema.optionalKey<Schema.$Record<Schema.String, Schema.encodeKeys<Schema.Struct<{
|
|
722
740
|
readonly subject: Schema.String;
|
|
@@ -729,6 +747,20 @@ export declare const Catalog: Schema.decodeTo<Schema.Struct<{
|
|
|
729
747
|
readonly note: Schema.optionalKey<Schema.String>;
|
|
730
748
|
readonly paragraphs: Schema.optionalKey<Schema.$Array<Schema.String>>;
|
|
731
749
|
readonly action: Schema.String;
|
|
750
|
+
readonly sections: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
751
|
+
readonly title: Schema.String;
|
|
752
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
753
|
+
readonly copy: Schema.optionalKey<Schema.Struct<{
|
|
754
|
+
readonly label: Schema.optionalKey<Schema.String>;
|
|
755
|
+
readonly value: Schema.String;
|
|
756
|
+
}>>;
|
|
757
|
+
readonly items: Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
758
|
+
readonly label: Schema.String;
|
|
759
|
+
readonly text: Schema.optionalKey<Schema.String>;
|
|
760
|
+
readonly code: Schema.optionalKey<Schema.String>;
|
|
761
|
+
}>>>;
|
|
762
|
+
readonly note: Schema.optionalKey<Schema.String>;
|
|
763
|
+
}>>>;
|
|
732
764
|
readonly footer: Schema.optionalKey<Schema.String>;
|
|
733
765
|
readonly replyTo: Schema.optionalKey<Schema.String>;
|
|
734
766
|
}>, {
|
package/dist/sign-in.d.ts
CHANGED
|
@@ -111,6 +111,14 @@ export interface SignInOptions {
|
|
|
111
111
|
* person to confirm. The link signs in whichever browser opens it.
|
|
112
112
|
*/
|
|
113
113
|
readonly codeLink?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* One of the ontology's `emails`, by its camelCase name, that the platform sends instead of its
|
|
116
|
+
* own invitation: when a member is invited from the CLI or the console, and when
|
|
117
|
+
* `User.sendSignInLink` names no template for a member who has not signed in yet. It may use only
|
|
118
|
+
* the built-in values, such as `{{app.mcpUrl}}`, since nothing fills others. The platform's own
|
|
119
|
+
* invitation when omitted. A checked ontology holds the email's wire name.
|
|
120
|
+
*/
|
|
121
|
+
readonly invitationEmail?: string;
|
|
114
122
|
}
|
|
115
123
|
/** The sign-in options of a checked ontology, with the sign-up its definition declares. */
|
|
116
124
|
export interface ResolvedSignInOptions extends SignInOptions {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream/ontology",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.108.0",
|
|
4
4
|
"description": "Define a SegmentStream workspace app's ontology: entities, relationships, roles and actions, written with Effect.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SegmentStream",
|