@odla-ai/chapter 0.60.0 → 0.62.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/README.md +138 -0
- package/dist/{chunk-QNP3UEIL.js → chunk-7CVP6VSO.js} +61 -1
- package/dist/chunk-7CVP6VSO.js.map +1 -0
- package/dist/{chunk-J7ES2OWN.js → chunk-MUUBATZJ.js} +899 -707
- package/dist/chunk-MUUBATZJ.js.map +1 -0
- package/dist/{chunk-D5UR5H6R.js → chunk-ZIYK3OV2.js} +869 -239
- package/dist/chunk-ZIYK3OV2.js.map +1 -0
- package/dist/copy-context-BJUkVUjE.d.ts +364 -0
- package/dist/index.cjs +3847 -3186
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +435 -89
- package/dist/index.d.ts +435 -89
- package/dist/index.js +3851 -3190
- package/dist/index.js.map +1 -1
- package/dist/ui/admin/index.d.ts +672 -3
- package/dist/ui/admin/index.js +2 -2
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.js +49 -3
- package/dist/ui/member/index.d.ts +254 -3
- package/dist/ui/member/index.js +48 -2
- package/dist/worker/index.cjs +1641 -477
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.d.cts +222 -82
- package/dist/worker/index.d.ts +222 -82
- package/dist/worker/index.js +1572 -408
- package/dist/worker/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-D5UR5H6R.js.map +0 -1
- package/dist/chunk-J7ES2OWN.js.map +0 -1
- package/dist/chunk-QNP3UEIL.js.map +0 -1
- package/dist/copy-context-BP3G1iBd.d.ts +0 -899
package/dist/worker/index.d.ts
CHANGED
|
@@ -61,11 +61,24 @@ interface ChapterEmailEvent {
|
|
|
61
61
|
requiresTier?: boolean;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
type TextFields$
|
|
64
|
+
type TextFields$2<Key extends string> = {
|
|
65
65
|
[Field in Key]: string;
|
|
66
66
|
};
|
|
67
67
|
/** User-visible language for sharing, delivery state, and leader rollups. */
|
|
68
|
-
type AdminNetworkCopy = TextFields$
|
|
68
|
+
type AdminNetworkCopy = TextFields$2<"title" | "allowlistDescription" | "sharing" | "shareWith" | "shared" | "shareFailed" | "deliveryFailed" | "loadingRollup" | "loadRollupFailed" | "overview" | "configuredFollowers" | "reachableFollowers" | "recordsAcrossFollowers" | "noFollowers" | "followers" | "available" | "unavailable" | "transportReachable" | "transportUnavailable" | "transportNotChecked" | "edgeUnpaired" | "edgeUnpairedHint" | "bindingTransport" | "urlTransport" | "activeConfiguration" | "noActiveConfiguration" | "publicSiteAvailable" | "publicSiteUnavailable" | "publicSiteNotChecked" | "recordTotals" | "noRecordTotals">;
|
|
69
|
+
|
|
70
|
+
type TextFields$1<Key extends string> = {
|
|
71
|
+
[Field in Key]: string;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Member portal language. Placeholders in braces are filled by
|
|
75
|
+
* `formatChapterCopy()`. Sites override any field through `copy.portal`.
|
|
76
|
+
*/
|
|
77
|
+
interface PortalCopy {
|
|
78
|
+
shell: TextFields$1<"navLabel" | "welcomeBack" | "home" | "backHome" | "yourProfile" | "signedInAs" | "signOut" | "adminConsole" | "openMenu" | "closeMenu" | "locked" | "loading" | "loadFailed" | "notFound">;
|
|
79
|
+
pages: TextFields$1<"comingSoon" | "comingIn" | "includedWith" | "upgrade" | "comingToPortal" | "tagNew" | "tagSoon">;
|
|
80
|
+
profile: TextFields$1<"eyebrow" | "editProfile" | "saveProfile" | "saving" | "cancel" | "uploadPhoto" | "changePhoto" | "photoUploading" | "photoFailed" | "memberSince" | "promptsTitle" | "promptsNote" | "answerEmpty" | "addPrompt" | "howYouFoundUs" | "referredBy" | "referredByNote" | "introducedBy" | "introducedByPlaceholder" | "namePlaceholder" | "locationPlaceholder" | "saved" | "conflict" | "saveFailed">;
|
|
81
|
+
}
|
|
69
82
|
|
|
70
83
|
/** Copy for the person record panels: lifecycle actions, comms, scheduling, billing and meetings. */
|
|
71
84
|
type AdminRecordsCopy = {
|
|
@@ -108,11 +121,13 @@ interface ChapterCopy {
|
|
|
108
121
|
members: {
|
|
109
122
|
loadFailed: string;
|
|
110
123
|
account: TextFields<"signOut" | "adminConsole">;
|
|
111
|
-
provisional: TextFields<"cardLabel" | "applicationNeeded" | "applicationNeededBody" | "apply" | "refunded" | "refundedBody" | "active" | "renews" | "introductionCall" | "calendarInvite" | "joinCall" | "bookCall" | "bookCallBody" | "chooseTime">;
|
|
124
|
+
provisional: TextFields<"cardLabel" | "applicationNeeded" | "applicationNeededBody" | "apply" | "refunded" | "refundedBody" | "declined" | "declinedBody" | "active" | "renews" | "introductionCall" | "calendarInvite" | "joinCall" | "bookCall" | "bookCallBody" | "chooseTime">;
|
|
112
125
|
full: TextFields<"welcome">;
|
|
113
126
|
gifts: TextFields<"title" | "body" | "noneAvailable" | "paid" | "saveCode" | "purchases" | "noPurchases" | "pending" | "redeemed" | "expired" | "revoked" | "rotate" | "rotated" | "rotateFailed" | "redeemTitle" | "code" | "redeem" | "redeemFailed">;
|
|
114
127
|
reschedule: TextFields<"changeTime" | "unavailable" | "loadFailed" | "slotGone" | "loading" | "noTimes" | "rescheduling" | "keepTime">;
|
|
115
128
|
};
|
|
129
|
+
/** Signed-in member portal: shell, pages, profile. */
|
|
130
|
+
portal: PortalCopy;
|
|
116
131
|
admin: {
|
|
117
132
|
auth: TextFields<"checking" | "notAuthorized" | "accountNotAuthorized" | "thisAccount" | "signOut" | "loading" | "signInNotConfigured" | "missingPublishableKey" | "noWorkspaces" | "signInTagline">;
|
|
118
133
|
shell: TextFields<"adminRole" | "adminConsole" | "adminName" | "navigationLabel">;
|
|
@@ -122,7 +137,7 @@ interface ChapterCopy {
|
|
|
122
137
|
availability: TextFields<"loading" | "loadFailed" | "saved" | "title" | "days" | "startHour" | "endHour" | "slotMinutes" | "minNoticeHours" | "windowDays" | "timezone" | "summaryTemplate" | "save"> & {
|
|
123
138
|
dayLabels: readonly string[];
|
|
124
139
|
};
|
|
125
|
-
email: TextFields<"loading" | "loadFailed" | "saved" | "sent" | "testFailed" | "delivery" | "notificationAddress" | "replyTo" | "fromName" | "fromNameHint" | "spamRisk" | "debugInbox" | "debugInboxHint" | "sendTest" | "enabled" | "subject" | "body" | "save" | "sendLog" | "sentColumn" | "templateColumn" | "statusColumn" | "toColumn" | "failed" | "redirected" | "delivered">;
|
|
140
|
+
email: TextFields<"loading" | "loadFailed" | "saved" | "sent" | "testFailed" | "delivery" | "notificationAddress" | "replyTo" | "fromName" | "fromNameHint" | "spamRisk" | "debugInbox" | "debugInboxHint" | "sendTest" | "enabled" | "subject" | "body" | "htmlBody" | "htmlBodyHint" | "save" | "sendLog" | "sentColumn" | "templateColumn" | "statusColumn" | "toColumn" | "failed" | "redirected" | "delivered">;
|
|
126
141
|
meetings: TextFields<"loading" | "loadFailed" | "cancelConfirm" | "newStartPrompt" | "parseFailed" | "agenda" | "empty" | "unknown" | "drift" | "meet" | "reschedule" | "cancel">;
|
|
127
142
|
admission: TextFields<"title" | "description" | "email" | "decision" | "expires" | "note" | "waive" | "require" | "add" | "ledger" | "loading" | "consumed" | "revoked" | "expired" | "active" | "local" | "parent" | "revoke">;
|
|
128
143
|
network: AdminNetworkCopy;
|
|
@@ -175,6 +190,51 @@ interface ResolvedMemberContent {
|
|
|
175
190
|
} | null;
|
|
176
191
|
}
|
|
177
192
|
|
|
193
|
+
/** Invite links and referral credit for a chapter-mode site. */
|
|
194
|
+
interface ChapterMemberReferrals {
|
|
195
|
+
/** Public path that invite links live under; `<path>/<code>`. Defaults to `/join`. */
|
|
196
|
+
path?: string;
|
|
197
|
+
/** Where an invite link sends a visitor (absolute https URL or site path). `?ref=<code>` is appended. */
|
|
198
|
+
membershipUrl: string;
|
|
199
|
+
/** Lifetime of the first-party referral cookie, in days. Defaults to 90. */
|
|
200
|
+
cookieDays?: number;
|
|
201
|
+
/**
|
|
202
|
+
* Credit a dues-paying referrer earns when a friend they referred is approved
|
|
203
|
+
* on a dues-paying tier. Omit or `false` for invite links without credit.
|
|
204
|
+
*/
|
|
205
|
+
credit?: {
|
|
206
|
+
valueCents: number;
|
|
207
|
+
} | false;
|
|
208
|
+
}
|
|
209
|
+
/** The signed-in member portal. Its navigation and access come from the member-content catalog. */
|
|
210
|
+
interface ChapterMemberPortal {
|
|
211
|
+
/** Prompts a member may answer on their profile, in display order. */
|
|
212
|
+
profilePrompts?: readonly string[];
|
|
213
|
+
/** How many prompts a member may answer. Defaults to 3. */
|
|
214
|
+
maxPrompts?: number;
|
|
215
|
+
/** Member profile photos in odla-db file storage. Defaults to true. */
|
|
216
|
+
photos?: boolean;
|
|
217
|
+
/** Cohort courses on one recurring Google Calendar event. Chapter mode only. */
|
|
218
|
+
courses?: boolean;
|
|
219
|
+
/** Personal invite links, Referred by, and optional credit. Chapter mode only. */
|
|
220
|
+
referrals?: ChapterMemberReferrals;
|
|
221
|
+
}
|
|
222
|
+
/** Resolved invite-link settings. */
|
|
223
|
+
interface ResolvedMemberReferrals {
|
|
224
|
+
path: string;
|
|
225
|
+
membershipUrl: string;
|
|
226
|
+
cookieDays: number;
|
|
227
|
+
creditCents: number | null;
|
|
228
|
+
}
|
|
229
|
+
/** Resolved member portal settings. */
|
|
230
|
+
interface ResolvedMemberPortal {
|
|
231
|
+
profilePrompts: readonly string[];
|
|
232
|
+
maxPrompts: number;
|
|
233
|
+
photos: boolean;
|
|
234
|
+
courses: boolean;
|
|
235
|
+
referrals: ResolvedMemberReferrals | null;
|
|
236
|
+
}
|
|
237
|
+
|
|
178
238
|
/** Optional private Builder Library shared across Built Not Found and Chapters. */
|
|
179
239
|
interface ChapterBuilderLibrary {
|
|
180
240
|
/** Keep local admin authoring enabled. Defaults to true. */
|
|
@@ -391,6 +451,82 @@ interface ResolvedNetwork {
|
|
|
391
451
|
readers: readonly ResolvedNetworkReader[];
|
|
392
452
|
}
|
|
393
453
|
|
|
454
|
+
/** Brand identity and build-time tokens from the checked-in Chapter config. */
|
|
455
|
+
/** Typed semantic roles shared by the public site and application surfaces. */
|
|
456
|
+
interface ChapterBrandTokens {
|
|
457
|
+
background?: string;
|
|
458
|
+
surface?: string;
|
|
459
|
+
surface2?: string;
|
|
460
|
+
text?: string;
|
|
461
|
+
textMuted?: string;
|
|
462
|
+
textFaint?: string;
|
|
463
|
+
border?: string;
|
|
464
|
+
borderStrong?: string;
|
|
465
|
+
accent?: string;
|
|
466
|
+
accentStrong?: string;
|
|
467
|
+
accentSoft?: string;
|
|
468
|
+
onAccent?: string;
|
|
469
|
+
good?: string;
|
|
470
|
+
warn?: string;
|
|
471
|
+
danger?: string;
|
|
472
|
+
chart1?: string;
|
|
473
|
+
chart2?: string;
|
|
474
|
+
chart3?: string;
|
|
475
|
+
chart4?: string;
|
|
476
|
+
chart5?: string;
|
|
477
|
+
chart6?: string;
|
|
478
|
+
chartPositive?: string;
|
|
479
|
+
chartNegative?: string;
|
|
480
|
+
/** Admin/application content width, e.g. `"960px"`. */
|
|
481
|
+
contentWidth?: string;
|
|
482
|
+
panelRadius?: string;
|
|
483
|
+
panelShadow?: string;
|
|
484
|
+
masterDetailColumns?: string;
|
|
485
|
+
masterDetailMinHeight?: string;
|
|
486
|
+
/** Chapter-admin page padding shorthand. */
|
|
487
|
+
pagePadding?: string;
|
|
488
|
+
/** Chapter-admin workspace-tab padding shorthand. */
|
|
489
|
+
workspacePadding?: string;
|
|
490
|
+
}
|
|
491
|
+
/** Brand tokens that theme the site: theme, semantic roles, fonts, and logos. */
|
|
492
|
+
interface ChapterBrand {
|
|
493
|
+
/** Preloaded @odla-ai/ui theme name used by ThemeScope. */
|
|
494
|
+
theme?: string;
|
|
495
|
+
/** Named accent family supplied by the selected @odla-ai/ui theme. */
|
|
496
|
+
accent?: string;
|
|
497
|
+
/** Admin/application color mode. Explicit light is the safe default. */
|
|
498
|
+
colorScheme?: "light" | "dark" | "system";
|
|
499
|
+
tokens?: ChapterBrandTokens;
|
|
500
|
+
tokensDark?: ChapterBrandTokens;
|
|
501
|
+
/** Palette overrides written into styles.css :root (e.g. `{ moss: "#2F3E34" }`
|
|
502
|
+
* or `--ui-*` token names). Applies in BOTH light and dark unless overridden
|
|
503
|
+
* by {@link paletteDark}. */
|
|
504
|
+
palette?: Record<string, string>;
|
|
505
|
+
/** Dark-mode palette overrides. Same shape as {@link palette}; emitted under
|
|
506
|
+
* `:root[data-theme="dark"]` and `@media (prefers-color-scheme: dark)`, so a
|
|
507
|
+
* site brands both modes. */
|
|
508
|
+
paletteDark?: Record<string, string>;
|
|
509
|
+
/** Full token map for `.ui-invert` islands. A compiled custom theme normally
|
|
510
|
+
* uses its dark map here so inverted content never inherits stale composites. */
|
|
511
|
+
paletteInvert?: Record<string, string>;
|
|
512
|
+
fonts?: {
|
|
513
|
+
display?: string;
|
|
514
|
+
body?: string;
|
|
515
|
+
numeral?: string;
|
|
516
|
+
};
|
|
517
|
+
/** Short glyph used in compact admin chrome. Defaults to the first three
|
|
518
|
+
* letters of the chapter name. */
|
|
519
|
+
badge?: string;
|
|
520
|
+
wordmark?: string;
|
|
521
|
+
tagline?: string;
|
|
522
|
+
/** Header/footer nav sections for the web-component chrome: label → entries. */
|
|
523
|
+
nav?: Record<string, ReadonlyArray<{
|
|
524
|
+
label: string;
|
|
525
|
+
href: string;
|
|
526
|
+
}>>;
|
|
527
|
+
logos?: string;
|
|
528
|
+
}
|
|
529
|
+
|
|
394
530
|
/**
|
|
395
531
|
* Membership pricing for the group row (chapter mode).
|
|
396
532
|
*
|
|
@@ -477,80 +613,18 @@ interface ChapterDb {
|
|
|
477
613
|
secrets: {
|
|
478
614
|
get(name: string): Promise<string>;
|
|
479
615
|
};
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
accent?: string;
|
|
492
|
-
accentStrong?: string;
|
|
493
|
-
accentSoft?: string;
|
|
494
|
-
onAccent?: string;
|
|
495
|
-
good?: string;
|
|
496
|
-
warn?: string;
|
|
497
|
-
danger?: string;
|
|
498
|
-
chart1?: string;
|
|
499
|
-
chart2?: string;
|
|
500
|
-
chart3?: string;
|
|
501
|
-
chart4?: string;
|
|
502
|
-
chart5?: string;
|
|
503
|
-
chart6?: string;
|
|
504
|
-
chartPositive?: string;
|
|
505
|
-
chartNegative?: string;
|
|
506
|
-
/** Admin/application content width, e.g. `"960px"`. */
|
|
507
|
-
contentWidth?: string;
|
|
508
|
-
panelRadius?: string;
|
|
509
|
-
panelShadow?: string;
|
|
510
|
-
masterDetailColumns?: string;
|
|
511
|
-
masterDetailMinHeight?: string;
|
|
512
|
-
/** Chapter-admin page padding shorthand. */
|
|
513
|
-
pagePadding?: string;
|
|
514
|
-
/** Chapter-admin workspace-tab padding shorthand. */
|
|
515
|
-
workspacePadding?: string;
|
|
516
|
-
}
|
|
517
|
-
/** Brand tokens that theme the site: theme, semantic roles, fonts, and logos. */
|
|
518
|
-
interface ChapterBrand {
|
|
519
|
-
/** Preloaded @odla-ai/ui theme name used by ThemeScope. */
|
|
520
|
-
theme?: string;
|
|
521
|
-
/** Named accent family supplied by the selected @odla-ai/ui theme. */
|
|
522
|
-
accent?: string;
|
|
523
|
-
/** Admin/application color mode. Explicit light is the safe default. */
|
|
524
|
-
colorScheme?: "light" | "dark" | "system";
|
|
525
|
-
tokens?: ChapterBrandTokens;
|
|
526
|
-
tokensDark?: ChapterBrandTokens;
|
|
527
|
-
/** Palette overrides written into styles.css :root (e.g. `{ moss: "#2F3E34" }`
|
|
528
|
-
* or `--ui-*` token names). Applies in BOTH light and dark unless overridden
|
|
529
|
-
* by {@link paletteDark}. */
|
|
530
|
-
palette?: Record<string, string>;
|
|
531
|
-
/** Dark-mode palette overrides. Same shape as {@link palette}; emitted under
|
|
532
|
-
* `:root[data-theme="dark"]` and `@media (prefers-color-scheme: dark)`, so a
|
|
533
|
-
* site brands both modes. */
|
|
534
|
-
paletteDark?: Record<string, string>;
|
|
535
|
-
/** Full token map for `.ui-invert` islands. A compiled custom theme normally
|
|
536
|
-
* uses its dark map here so inverted content never inherits stale composites. */
|
|
537
|
-
paletteInvert?: Record<string, string>;
|
|
538
|
-
fonts?: {
|
|
539
|
-
display?: string;
|
|
540
|
-
body?: string;
|
|
541
|
-
numeral?: string;
|
|
616
|
+
/** odla-db file storage (present on the real client). Member photos use it. */
|
|
617
|
+
storage?: {
|
|
618
|
+
upload(path: string, data: BodyInit, contentType?: string, opts?: {
|
|
619
|
+
private?: boolean;
|
|
620
|
+
}): Promise<{
|
|
621
|
+
path: string;
|
|
622
|
+
size: number;
|
|
623
|
+
contentType: string;
|
|
624
|
+
}>;
|
|
625
|
+
sign(path: string, ttlSeconds?: number): Promise<string>;
|
|
626
|
+
delete(path: string): Promise<void>;
|
|
542
627
|
};
|
|
543
|
-
/** Short glyph used in compact admin chrome. Defaults to the first three
|
|
544
|
-
* letters of the chapter name. */
|
|
545
|
-
badge?: string;
|
|
546
|
-
wordmark?: string;
|
|
547
|
-
tagline?: string;
|
|
548
|
-
/** Header/footer nav sections for the web-component chrome: label → entries. */
|
|
549
|
-
nav?: Record<string, ReadonlyArray<{
|
|
550
|
-
label: string;
|
|
551
|
-
href: string;
|
|
552
|
-
}>>;
|
|
553
|
-
logos?: string;
|
|
554
628
|
}
|
|
555
629
|
|
|
556
630
|
/** One owner-editable transactional email template. Automatic sends require explicit `enabled: true`. */
|
|
@@ -612,6 +686,8 @@ interface ChapterAuth {
|
|
|
612
686
|
* app allowlist; `"odla"` reads protected `$users.role` by exact subject ID.
|
|
613
687
|
* Default `"odla"` for private Clerk mode, `"table"` for legacy modes. */
|
|
614
688
|
superAdminSource?: "table" | "odla";
|
|
689
|
+
/** Require a second sign-in factor on admin routes: `off` (default), `report` (allow and log), `enforce`. */
|
|
690
|
+
adminSecondFactor?: "off" | "report" | "enforce";
|
|
615
691
|
}
|
|
616
692
|
/** The fully-resolved auth policy (defaults applied) carried on the {@link Chapter}. */
|
|
617
693
|
interface ResolvedAuth {
|
|
@@ -622,6 +698,7 @@ interface ResolvedAuth {
|
|
|
622
698
|
adminRole: string;
|
|
623
699
|
superAdmins: boolean;
|
|
624
700
|
superAdminSource: "none" | "table" | "odla";
|
|
701
|
+
adminSecondFactor: "off" | "report" | "enforce";
|
|
625
702
|
}
|
|
626
703
|
/** The application status pipeline. Which statuses exist, and the subsets a site
|
|
627
704
|
* allows a call to be booked from / an application approved from. Defaults to
|
|
@@ -717,6 +794,8 @@ interface ChapterConfig {
|
|
|
717
794
|
signupControl?: ChapterSignupControl;
|
|
718
795
|
/** Authenticated parent + chapter member pages with server-enforced tier access. */
|
|
719
796
|
memberContent?: ChapterMemberContent;
|
|
797
|
+
/** Signed-in member portal: profile, photos, courses, invite links and credit. */
|
|
798
|
+
memberPortal?: ChapterMemberPortal;
|
|
720
799
|
/** Private docs, Brand asset references, and links for authorized site-building agents. */
|
|
721
800
|
builderLibrary?: ChapterBuilderLibrary;
|
|
722
801
|
/** Network-scoped canonical Person registry. Shadow mode is additive only:
|
|
@@ -822,6 +901,8 @@ interface Chapter {
|
|
|
822
901
|
signupControl: ResolvedSignupControl | null;
|
|
823
902
|
/** Null unless the standard authenticated member-content surface is enabled. */
|
|
824
903
|
memberContent: ResolvedMemberContent | null;
|
|
904
|
+
/** Null unless the member portal is enabled. */
|
|
905
|
+
memberPortal: ResolvedMemberPortal | null;
|
|
825
906
|
/** Null unless the private scoped Builder Library is enabled. */
|
|
826
907
|
builderLibrary: ResolvedBuilderLibrary | null;
|
|
827
908
|
/** Null unless this hub explicitly enables the shadow Person registry. */
|
|
@@ -2130,8 +2211,54 @@ interface SignupControlDeliveryOptions {
|
|
|
2130
2211
|
/** Build and send one signed desired-state delivery. Durable retry belongs to the hub outbox. */
|
|
2131
2212
|
declare function deliverSignupControl(options: SignupControlDeliveryOptions): Promise<SignupControlReceipt>;
|
|
2132
2213
|
|
|
2133
|
-
/**
|
|
2134
|
-
|
|
2214
|
+
/**
|
|
2215
|
+
* Member catalog schema version 2: ordered navigation sections, page kinds,
|
|
2216
|
+
* navigation tags and icons. Version 1 documents remain valid and keep their
|
|
2217
|
+
* alphabetical section order; every field here requires `schemaVersion: 2`.
|
|
2218
|
+
*/
|
|
2219
|
+
/** Packaged member features a catalog page can stand for. */
|
|
2220
|
+
declare const MEMBER_PAGE_FEATURES: readonly ["course", "share"];
|
|
2221
|
+
/** A packaged member feature: `course` (cohort course) or `share` (invite kit). */
|
|
2222
|
+
type MemberPageFeatureName = typeof MEMBER_PAGE_FEATURES[number];
|
|
2223
|
+
/** Fixed icon vocabulary. Content never carries SVG, URLs or markup. */
|
|
2224
|
+
declare const MEMBER_PAGE_ICONS: readonly ["home", "course", "library", "deals", "training", "events", "members", "share", "profile", "document", "calendar", "chat", "star"];
|
|
2225
|
+
/** One icon from {@link MEMBER_PAGE_ICONS}. */
|
|
2226
|
+
type MemberPageIcon = typeof MEMBER_PAGE_ICONS[number];
|
|
2227
|
+
/** Authored navigation tags. "Soon" and year tags are derived from placeholder pages. */
|
|
2228
|
+
declare const MEMBER_PAGE_TAGS: readonly ["new"];
|
|
2229
|
+
/** One tag from {@link MEMBER_PAGE_TAGS}. */
|
|
2230
|
+
type MemberPageTag = typeof MEMBER_PAGE_TAGS[number];
|
|
2231
|
+
/** How a page renders: authored Markdown, a not-yet-open placeholder, or a packaged feature. */
|
|
2232
|
+
type MemberPageKind = "markdown" | "placeholder" | "feature";
|
|
2233
|
+
/**
|
|
2234
|
+
* A page that is announced but not open. Without `availableYear` it reads as
|
|
2235
|
+
* "Coming soon"; with one, as "Coming in <year>".
|
|
2236
|
+
*/
|
|
2237
|
+
interface MemberPagePlaceholder {
|
|
2238
|
+
/** Calendar year the page is expected to open. */
|
|
2239
|
+
availableYear?: number;
|
|
2240
|
+
/** Replaces the derived "Coming soon" / "Coming in <year>" badge text. */
|
|
2241
|
+
badge?: string;
|
|
2242
|
+
/** Label of a disabled call to action, e.g. "Investor form opens in 2027". */
|
|
2243
|
+
actionLabel?: string;
|
|
2244
|
+
}
|
|
2245
|
+
/** A catalog page backed by a packaged feature, gated by the page's audience. */
|
|
2246
|
+
interface MemberPageFeature {
|
|
2247
|
+
name: MemberPageFeatureName;
|
|
2248
|
+
/** Feature-specific identity, e.g. the course id for `course`. */
|
|
2249
|
+
ref?: string;
|
|
2250
|
+
}
|
|
2251
|
+
/**
|
|
2252
|
+
* One navigation group. A section without a label renders without a heading.
|
|
2253
|
+
* Section order is the order of the document's `sections` array.
|
|
2254
|
+
*/
|
|
2255
|
+
interface MemberContentSection {
|
|
2256
|
+
id: string;
|
|
2257
|
+
label?: string;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
/** Every member-content schema version this release validates. */
|
|
2261
|
+
type MemberContentSchemaVersion = 1 | 2;
|
|
2135
2262
|
/** Authority that authored one independently stored member-content layer. */
|
|
2136
2263
|
type MemberContentSourceType = "parent" | "chapter";
|
|
2137
2264
|
/** Stable author identity attached to every member-content document and page. */
|
|
@@ -2146,9 +2273,14 @@ interface MemberContentTarget {
|
|
|
2146
2273
|
}
|
|
2147
2274
|
/** Navigation is data, so agents do not have to coordinate route code. */
|
|
2148
2275
|
interface MemberPageNavigation {
|
|
2276
|
+
/** A section id declared in `sections`, or (without `sections`) the section's display label. */
|
|
2149
2277
|
section: string;
|
|
2150
2278
|
order: number;
|
|
2151
2279
|
parentId?: string;
|
|
2280
|
+
/** Schema version 2. */
|
|
2281
|
+
tag?: MemberPageTag;
|
|
2282
|
+
/** Schema version 2. */
|
|
2283
|
+
icon?: MemberPageIcon;
|
|
2152
2284
|
}
|
|
2153
2285
|
/** Explicit sets avoid unsafe assumptions that commercial tiers form a ladder. */
|
|
2154
2286
|
type MemberPageAudience = {
|
|
@@ -2182,9 +2314,15 @@ interface MemberContentPage {
|
|
|
2182
2314
|
audience: MemberPageAudience;
|
|
2183
2315
|
/** Safe Markdown shown while the body is withheld. */
|
|
2184
2316
|
teaserMarkdown?: string;
|
|
2185
|
-
/** Never serialized to a viewer whose audience does not match. */
|
|
2186
|
-
bodyMarkdown
|
|
2317
|
+
/** Never serialized to a viewer whose audience does not match. Required for Markdown pages. */
|
|
2318
|
+
bodyMarkdown?: string;
|
|
2187
2319
|
upsell?: MemberPageUpsell;
|
|
2320
|
+
/** Schema version 2; defaults to `markdown`. */
|
|
2321
|
+
kind?: MemberPageKind;
|
|
2322
|
+
/** Schema version 2; present exactly when `kind` is `placeholder`. */
|
|
2323
|
+
placeholder?: MemberPagePlaceholder;
|
|
2324
|
+
/** Schema version 2; present exactly when `kind` is `feature`. */
|
|
2325
|
+
feature?: MemberPageFeature;
|
|
2188
2326
|
}
|
|
2189
2327
|
/** Chapter-owned offer attached to a Parent page that delegated offer authority. */
|
|
2190
2328
|
interface MemberPageUpsellOverride {
|
|
@@ -2193,13 +2331,15 @@ interface MemberPageUpsellOverride {
|
|
|
2193
2331
|
}
|
|
2194
2332
|
/** One complete source layer. Parent and Chapter layers are stored independently. */
|
|
2195
2333
|
interface MemberContentDocument {
|
|
2196
|
-
schemaVersion:
|
|
2334
|
+
schemaVersion: MemberContentSchemaVersion;
|
|
2197
2335
|
revision: number;
|
|
2198
2336
|
generatedAt: number;
|
|
2199
2337
|
source: MemberContentSource;
|
|
2200
2338
|
target?: MemberContentTarget;
|
|
2201
2339
|
pages: readonly MemberContentPage[];
|
|
2202
2340
|
upsellOverrides?: readonly MemberPageUpsellOverride[];
|
|
2341
|
+
/** Schema version 2: navigation groups in display order. */
|
|
2342
|
+
sections?: readonly MemberContentSection[];
|
|
2203
2343
|
}
|
|
2204
2344
|
/** Canonical parent document and digest transmitted over the signed control edge. */
|
|
2205
2345
|
interface MemberContentEnvelope {
|