@odla-ai/chapter 0.25.8 → 0.26.1
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 +148 -15
- package/dist/{chunk-4FW35E3P.js → chunk-4QZEAWQL.js} +170 -45
- package/dist/chunk-4QZEAWQL.js.map +1 -0
- package/dist/{chunk-WGQO4WDJ.js → chunk-OIWCKF2G.js} +20 -3
- package/dist/chunk-OIWCKF2G.js.map +1 -0
- package/dist/{chunk-WHA3MUDQ.js → chunk-QBTFQUDL.js} +2 -2
- package/dist/{copy-context-DI21CYQ3.d.ts → copy-context-Vof2eTMt.d.ts} +78 -42
- package/dist/index.cjs +335 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +175 -58
- package/dist/index.d.ts +175 -58
- package/dist/index.js +329 -20
- package/dist/index.js.map +1 -1
- package/dist/ui/admin/index.d.ts +8 -3
- package/dist/ui/admin/index.js +4 -2
- package/dist/ui/index.d.ts +2 -2
- package/dist/ui/index.js +5 -3
- package/dist/ui/member/index.d.ts +2 -2
- package/dist/ui/member/index.js +2 -2
- package/dist/worker/index.cjs +552 -216
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.d.cts +78 -42
- package/dist/worker/index.d.ts +78 -42
- package/dist/worker/index.js +557 -216
- package/dist/worker/index.js.map +1 -1
- package/package.json +3 -3
- package/runbooks/adopt-existing.md +12 -1
- package/runbooks/greenfield.md +27 -6
- package/dist/chunk-4FW35E3P.js.map +0 -1
- package/dist/chunk-WGQO4WDJ.js.map +0 -1
- /package/dist/{chunk-WHA3MUDQ.js.map → chunk-QBTFQUDL.js.map} +0 -0
package/dist/worker/index.d.cts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { CrmConfig, Crm } from '@odla-ai/crm';
|
|
2
2
|
import { initAdmin } from '@odla-ai/db';
|
|
3
3
|
|
|
4
|
+
type TextFields$1<Key extends string> = {
|
|
5
|
+
[Field in Key]: string;
|
|
6
|
+
};
|
|
7
|
+
/** User-visible language for sharing, delivery state, and leader rollups. */
|
|
8
|
+
type AdminNetworkCopy = TextFields$1<"title" | "allowlistDescription" | "sharing" | "shareWith" | "shared" | "shareFailed" | "deliveryFailed" | "loadingRollup" | "loadRollupFailed" | "overview" | "configuredFollowers" | "reachableFollowers" | "recordsAcrossFollowers" | "noFollowers" | "followers" | "available" | "unavailable" | "recordTotals" | "noRecordTotals">;
|
|
9
|
+
|
|
4
10
|
type TextFields<Key extends string> = {
|
|
5
11
|
[Field in Key]: string;
|
|
6
12
|
};
|
|
7
|
-
/**
|
|
8
|
-
* Complete user-visible language owned by Chapter's packaged surfaces.
|
|
9
|
-
*
|
|
10
|
-
* Copy is serializable text; use render slots when presentation needs markup and
|
|
11
|
-
* `formatChapterCopy()` for typed placeholders.
|
|
12
|
-
*/
|
|
13
|
+
/** Complete serializable language for Chapter surfaces; use render slots for markup and `formatChapterCopy()` for placeholders. */
|
|
13
14
|
interface ChapterCopy {
|
|
14
15
|
common: TextFields<"loading" | "saved" | "unknown">;
|
|
15
16
|
join: {
|
|
@@ -35,7 +36,7 @@ interface ChapterCopy {
|
|
|
35
36
|
admin: {
|
|
36
37
|
auth: TextFields<"checking" | "notAuthorized" | "accountNotAuthorized" | "thisAccount" | "signOut" | "loading" | "signInNotConfigured" | "missingPublishableKey" | "noWorkspaces" | "signInTagline">;
|
|
37
38
|
shell: TextFields<"adminRole" | "adminConsole" | "adminName" | "navigationLabel">;
|
|
38
|
-
workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "settings" | "calendar" | "email" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel">;
|
|
39
|
+
workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "portfolio" | "settings" | "calendar" | "email" | "chapters" | "formations" | "dealFlow" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel" | "portfolioViewsLabel">;
|
|
39
40
|
dashboard: TextFields<"loading" | "loadFailed" | "upcomingCalls" | "callsNeedAttention" | "noUpcomingCalls" | "drift" | "open" | "meet" | "applications" | "newMembers" | "newMembersUnavailable" | "revenueAdded" | "revenue" | "revenueUnavailable" | "pipeline" | "pipelineLabel" | "thisWeek" | "noChange" | "activeMemberships" | "annualRunRate" | "testMode">;
|
|
40
41
|
billing: TextFields<"loading" | "loadFailed" | "notConfigured" | "active" | "annualized" | "renewingSoon" | "pastDue" | "subscriptions" | "testMode" | "truncated" | "name" | "email" | "application" | "subscription" | "cancelling" | "amount" | "renews">;
|
|
41
42
|
availability: TextFields<"loading" | "loadFailed" | "saved" | "title" | "days" | "startHour" | "endHour" | "slotMinutes" | "minNoticeHours" | "windowDays" | "timezone" | "summaryTemplate" | "save"> & {
|
|
@@ -43,7 +44,7 @@ interface ChapterCopy {
|
|
|
43
44
|
};
|
|
44
45
|
email: TextFields<"loading" | "loadFailed" | "saved" | "sent" | "testFailed" | "delivery" | "notificationAddress" | "replyTo" | "debugInbox" | "debugInboxHint" | "sendTest" | "enabled" | "subject" | "body" | "save" | "sendLog" | "sentColumn" | "templateColumn" | "statusColumn" | "toColumn" | "failed" | "redirected" | "delivered">;
|
|
45
46
|
meetings: TextFields<"loading" | "loadFailed" | "cancelConfirm" | "newStartPrompt" | "parseFailed" | "agenda" | "empty" | "unknown" | "drift" | "meet" | "reschedule" | "cancel">;
|
|
46
|
-
network:
|
|
47
|
+
network: AdminNetworkCopy;
|
|
47
48
|
records: TextFields<"workflowMissing" | "comms" | "commsHistory" | "scheduling" | "billing" | "notes" | "access" | "sharing" | "lifecycle" | "role" | "superAdminHint" | "noAccount" | "approve" | "refund" | "approved" | "refunded" | "roleSet" | "messageSent" | "messageNotSent" | "loadingTemplates" | "template" | "chooseTemplate" | "sending" | "send" | "noMessages" | "message" | "newStartPrompt" | "parseFailed" | "cancelConfirm" | "callCancelled" | "callRescheduled" | "noApplication" | "loadingMeetings" | "noMeetings" | "joinMeeting" | "openCalendar" | "reschedule" | "cancel">;
|
|
48
49
|
};
|
|
49
50
|
}
|
|
@@ -53,6 +54,71 @@ type DeepPartial<T> = T extends readonly (infer Item)[] ? readonly Item[] : T ex
|
|
|
53
54
|
/** Recursively partial copy overrides accepted by `defineChapter({ copy })`. */
|
|
54
55
|
type ChapterCopyInput = DeepPartial<ChapterCopy>;
|
|
55
56
|
|
|
57
|
+
/** One follower site a leader can push CRM records to. The secret VALUE never
|
|
58
|
+
* lives in config: `secretName` names the leader tenant's vaulted copy of the
|
|
59
|
+
* follower's `network_share_secret`. */
|
|
60
|
+
interface ChapterNetworkTarget {
|
|
61
|
+
/** Stable lowercase slug used by the UI, audit tags, and default secret name. */
|
|
62
|
+
id: string;
|
|
63
|
+
/** Human-facing site name. Defaults to `id`. */
|
|
64
|
+
name?: string;
|
|
65
|
+
/** Absolute follower origin, e.g. `https://chapter.example.com`. */
|
|
66
|
+
url: string;
|
|
67
|
+
/** Optional Cloudflare service-binding name for Worker-to-Worker delivery.
|
|
68
|
+
* The URL still defines the signed request origin; the binding only supplies
|
|
69
|
+
* the transport when a `workers.dev` subrequest cannot enter another Worker. */
|
|
70
|
+
binding?: string;
|
|
71
|
+
/** Leader-vault key holding this follower's share secret. Defaults to
|
|
72
|
+
* `network_share_<id-with-underscores>`. */
|
|
73
|
+
secretName?: string;
|
|
74
|
+
/** Per-record-type field allowlist. If present, omitted types cannot be sent
|
|
75
|
+
* to this target. Without it, package-safe person/company defaults apply. */
|
|
76
|
+
fields?: Record<string, readonly string[]>;
|
|
77
|
+
}
|
|
78
|
+
/** Leader/follower network configuration. Followers need no code config to
|
|
79
|
+
* receive records; they only vault `network_share_secret`. */
|
|
80
|
+
interface ChapterNetwork {
|
|
81
|
+
targets?: readonly ChapterNetworkTarget[];
|
|
82
|
+
}
|
|
83
|
+
/** Public chapter-formation intake backed by one CRM record type. The host owns
|
|
84
|
+
* the branded form; Chapter owns the bounded, idempotent write contract. */
|
|
85
|
+
interface LeaderFormationConfig {
|
|
86
|
+
/** CRM type receiving submissions. Default `"chapter_application"`. */
|
|
87
|
+
type?: string;
|
|
88
|
+
/** Public fields that must be non-empty strings. */
|
|
89
|
+
required?: readonly string[];
|
|
90
|
+
/** Additional public fields accepted by the route. */
|
|
91
|
+
optional?: readonly string[];
|
|
92
|
+
maxLen?: Record<string, number>;
|
|
93
|
+
/** Per-string cap when `maxLen` has no field override. Default 4000. */
|
|
94
|
+
defaultMaxLen?: number;
|
|
95
|
+
/** Maximum JSON request size in characters. Default 32768. */
|
|
96
|
+
bodyCap?: number;
|
|
97
|
+
}
|
|
98
|
+
/** Fully resolved formation intake policy. */
|
|
99
|
+
interface ResolvedLeaderFormation {
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
type: string;
|
|
102
|
+
required: readonly string[];
|
|
103
|
+
optional: readonly string[];
|
|
104
|
+
maxLen: Record<string, number>;
|
|
105
|
+
defaultMaxLen: number;
|
|
106
|
+
bodyCap: number;
|
|
107
|
+
}
|
|
108
|
+
/** A validated network target carried on the resolved chapter engine. */
|
|
109
|
+
interface ResolvedNetworkTarget {
|
|
110
|
+
id: string;
|
|
111
|
+
name: string;
|
|
112
|
+
url: string;
|
|
113
|
+
binding?: string;
|
|
114
|
+
secretName: string;
|
|
115
|
+
fields?: Record<string, readonly string[]>;
|
|
116
|
+
}
|
|
117
|
+
/** Fully-resolved leader network configuration. */
|
|
118
|
+
interface ResolvedNetwork {
|
|
119
|
+
targets: readonly ResolvedNetworkTarget[];
|
|
120
|
+
}
|
|
121
|
+
|
|
56
122
|
/** Which feature profile a site runs. `chapter` is the full public member site
|
|
57
123
|
* (join, Stripe membership, booking, member area, admin, CRM); `hub` is
|
|
58
124
|
* admin-only and CRM-focused (a directory/registry over the same CRM). */
|
|
@@ -158,40 +224,6 @@ interface ChapterBrand {
|
|
|
158
224
|
}>>;
|
|
159
225
|
logos?: string;
|
|
160
226
|
}
|
|
161
|
-
/** One follower site a leader can push CRM records to. The secret VALUE never
|
|
162
|
-
* lives in config: `secretName` names the leader tenant's vaulted copy of the
|
|
163
|
-
* follower's `network_share_secret`. */
|
|
164
|
-
interface ChapterNetworkTarget {
|
|
165
|
-
/** Stable lowercase slug used by the UI, audit tags, and default secret name. */
|
|
166
|
-
id: string;
|
|
167
|
-
/** Human-facing site name. Defaults to `id`. */
|
|
168
|
-
name?: string;
|
|
169
|
-
/** Absolute follower origin, e.g. `https://chapter.example.com`. */
|
|
170
|
-
url: string;
|
|
171
|
-
/** Leader-vault key holding this follower's share secret. Defaults to
|
|
172
|
-
* `network_share_<id-with-underscores>`. */
|
|
173
|
-
secretName?: string;
|
|
174
|
-
/** Per-record-type field allowlist. If present, omitted types cannot be sent
|
|
175
|
-
* to this target. Without it, package-safe person/company defaults apply. */
|
|
176
|
-
fields?: Record<string, readonly string[]>;
|
|
177
|
-
}
|
|
178
|
-
/** Leader/follower network configuration. Followers need no code config to
|
|
179
|
-
* receive records; they only vault `network_share_secret`. */
|
|
180
|
-
interface ChapterNetwork {
|
|
181
|
-
targets?: readonly ChapterNetworkTarget[];
|
|
182
|
-
}
|
|
183
|
-
/** A validated network target carried on the resolved chapter engine. */
|
|
184
|
-
interface ResolvedNetworkTarget {
|
|
185
|
-
id: string;
|
|
186
|
-
name: string;
|
|
187
|
-
url: string;
|
|
188
|
-
secretName: string;
|
|
189
|
-
fields?: Record<string, readonly string[]>;
|
|
190
|
-
}
|
|
191
|
-
/** Fully-resolved leader network configuration. */
|
|
192
|
-
interface ResolvedNetwork {
|
|
193
|
-
targets: readonly ResolvedNetworkTarget[];
|
|
194
|
-
}
|
|
195
227
|
/** Membership pricing for the group row (chapter mode). */
|
|
196
228
|
interface ChapterPrices {
|
|
197
229
|
standardCents: number;
|
|
@@ -348,6 +380,8 @@ interface ChapterConfig {
|
|
|
348
380
|
/** Leader → follower delivery targets. Secret values stay in the leader
|
|
349
381
|
* tenant vault; see {@link ChapterNetworkTarget}. */
|
|
350
382
|
network?: ChapterNetwork;
|
|
383
|
+
/** Enable a public, host-rendered formation application workflow. */
|
|
384
|
+
formation?: LeaderFormationConfig;
|
|
351
385
|
thesis?: unknown;
|
|
352
386
|
/** Required in `chapter` mode. */
|
|
353
387
|
prices?: ChapterPrices;
|
|
@@ -438,6 +472,8 @@ interface Chapter {
|
|
|
438
472
|
copy: ChapterCopy;
|
|
439
473
|
/** Validated follower targets for leader-driven record pushes. */
|
|
440
474
|
network: ResolvedNetwork;
|
|
475
|
+
/** Resolved public formation intake contract (disabled when omitted). */
|
|
476
|
+
formation: ResolvedLeaderFormation;
|
|
441
477
|
/** Resolved CRM engine (from `defineCrm`). */
|
|
442
478
|
crm: Crm;
|
|
443
479
|
/** Resolved auth policy (source, claim, ladder, super-admin tier). */
|
package/dist/worker/index.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { CrmConfig, Crm } from '@odla-ai/crm';
|
|
2
2
|
import { initAdmin } from '@odla-ai/db';
|
|
3
3
|
|
|
4
|
+
type TextFields$1<Key extends string> = {
|
|
5
|
+
[Field in Key]: string;
|
|
6
|
+
};
|
|
7
|
+
/** User-visible language for sharing, delivery state, and leader rollups. */
|
|
8
|
+
type AdminNetworkCopy = TextFields$1<"title" | "allowlistDescription" | "sharing" | "shareWith" | "shared" | "shareFailed" | "deliveryFailed" | "loadingRollup" | "loadRollupFailed" | "overview" | "configuredFollowers" | "reachableFollowers" | "recordsAcrossFollowers" | "noFollowers" | "followers" | "available" | "unavailable" | "recordTotals" | "noRecordTotals">;
|
|
9
|
+
|
|
4
10
|
type TextFields<Key extends string> = {
|
|
5
11
|
[Field in Key]: string;
|
|
6
12
|
};
|
|
7
|
-
/**
|
|
8
|
-
* Complete user-visible language owned by Chapter's packaged surfaces.
|
|
9
|
-
*
|
|
10
|
-
* Copy is serializable text; use render slots when presentation needs markup and
|
|
11
|
-
* `formatChapterCopy()` for typed placeholders.
|
|
12
|
-
*/
|
|
13
|
+
/** Complete serializable language for Chapter surfaces; use render slots for markup and `formatChapterCopy()` for placeholders. */
|
|
13
14
|
interface ChapterCopy {
|
|
14
15
|
common: TextFields<"loading" | "saved" | "unknown">;
|
|
15
16
|
join: {
|
|
@@ -35,7 +36,7 @@ interface ChapterCopy {
|
|
|
35
36
|
admin: {
|
|
36
37
|
auth: TextFields<"checking" | "notAuthorized" | "accountNotAuthorized" | "thisAccount" | "signOut" | "loading" | "signInNotConfigured" | "missingPublishableKey" | "noWorkspaces" | "signInTagline">;
|
|
37
38
|
shell: TextFields<"adminRole" | "adminConsole" | "adminName" | "navigationLabel">;
|
|
38
|
-
workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "settings" | "calendar" | "email" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel">;
|
|
39
|
+
workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "portfolio" | "settings" | "calendar" | "email" | "chapters" | "formations" | "dealFlow" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel" | "portfolioViewsLabel">;
|
|
39
40
|
dashboard: TextFields<"loading" | "loadFailed" | "upcomingCalls" | "callsNeedAttention" | "noUpcomingCalls" | "drift" | "open" | "meet" | "applications" | "newMembers" | "newMembersUnavailable" | "revenueAdded" | "revenue" | "revenueUnavailable" | "pipeline" | "pipelineLabel" | "thisWeek" | "noChange" | "activeMemberships" | "annualRunRate" | "testMode">;
|
|
40
41
|
billing: TextFields<"loading" | "loadFailed" | "notConfigured" | "active" | "annualized" | "renewingSoon" | "pastDue" | "subscriptions" | "testMode" | "truncated" | "name" | "email" | "application" | "subscription" | "cancelling" | "amount" | "renews">;
|
|
41
42
|
availability: TextFields<"loading" | "loadFailed" | "saved" | "title" | "days" | "startHour" | "endHour" | "slotMinutes" | "minNoticeHours" | "windowDays" | "timezone" | "summaryTemplate" | "save"> & {
|
|
@@ -43,7 +44,7 @@ interface ChapterCopy {
|
|
|
43
44
|
};
|
|
44
45
|
email: TextFields<"loading" | "loadFailed" | "saved" | "sent" | "testFailed" | "delivery" | "notificationAddress" | "replyTo" | "debugInbox" | "debugInboxHint" | "sendTest" | "enabled" | "subject" | "body" | "save" | "sendLog" | "sentColumn" | "templateColumn" | "statusColumn" | "toColumn" | "failed" | "redirected" | "delivered">;
|
|
45
46
|
meetings: TextFields<"loading" | "loadFailed" | "cancelConfirm" | "newStartPrompt" | "parseFailed" | "agenda" | "empty" | "unknown" | "drift" | "meet" | "reschedule" | "cancel">;
|
|
46
|
-
network:
|
|
47
|
+
network: AdminNetworkCopy;
|
|
47
48
|
records: TextFields<"workflowMissing" | "comms" | "commsHistory" | "scheduling" | "billing" | "notes" | "access" | "sharing" | "lifecycle" | "role" | "superAdminHint" | "noAccount" | "approve" | "refund" | "approved" | "refunded" | "roleSet" | "messageSent" | "messageNotSent" | "loadingTemplates" | "template" | "chooseTemplate" | "sending" | "send" | "noMessages" | "message" | "newStartPrompt" | "parseFailed" | "cancelConfirm" | "callCancelled" | "callRescheduled" | "noApplication" | "loadingMeetings" | "noMeetings" | "joinMeeting" | "openCalendar" | "reschedule" | "cancel">;
|
|
48
49
|
};
|
|
49
50
|
}
|
|
@@ -53,6 +54,71 @@ type DeepPartial<T> = T extends readonly (infer Item)[] ? readonly Item[] : T ex
|
|
|
53
54
|
/** Recursively partial copy overrides accepted by `defineChapter({ copy })`. */
|
|
54
55
|
type ChapterCopyInput = DeepPartial<ChapterCopy>;
|
|
55
56
|
|
|
57
|
+
/** One follower site a leader can push CRM records to. The secret VALUE never
|
|
58
|
+
* lives in config: `secretName` names the leader tenant's vaulted copy of the
|
|
59
|
+
* follower's `network_share_secret`. */
|
|
60
|
+
interface ChapterNetworkTarget {
|
|
61
|
+
/** Stable lowercase slug used by the UI, audit tags, and default secret name. */
|
|
62
|
+
id: string;
|
|
63
|
+
/** Human-facing site name. Defaults to `id`. */
|
|
64
|
+
name?: string;
|
|
65
|
+
/** Absolute follower origin, e.g. `https://chapter.example.com`. */
|
|
66
|
+
url: string;
|
|
67
|
+
/** Optional Cloudflare service-binding name for Worker-to-Worker delivery.
|
|
68
|
+
* The URL still defines the signed request origin; the binding only supplies
|
|
69
|
+
* the transport when a `workers.dev` subrequest cannot enter another Worker. */
|
|
70
|
+
binding?: string;
|
|
71
|
+
/** Leader-vault key holding this follower's share secret. Defaults to
|
|
72
|
+
* `network_share_<id-with-underscores>`. */
|
|
73
|
+
secretName?: string;
|
|
74
|
+
/** Per-record-type field allowlist. If present, omitted types cannot be sent
|
|
75
|
+
* to this target. Without it, package-safe person/company defaults apply. */
|
|
76
|
+
fields?: Record<string, readonly string[]>;
|
|
77
|
+
}
|
|
78
|
+
/** Leader/follower network configuration. Followers need no code config to
|
|
79
|
+
* receive records; they only vault `network_share_secret`. */
|
|
80
|
+
interface ChapterNetwork {
|
|
81
|
+
targets?: readonly ChapterNetworkTarget[];
|
|
82
|
+
}
|
|
83
|
+
/** Public chapter-formation intake backed by one CRM record type. The host owns
|
|
84
|
+
* the branded form; Chapter owns the bounded, idempotent write contract. */
|
|
85
|
+
interface LeaderFormationConfig {
|
|
86
|
+
/** CRM type receiving submissions. Default `"chapter_application"`. */
|
|
87
|
+
type?: string;
|
|
88
|
+
/** Public fields that must be non-empty strings. */
|
|
89
|
+
required?: readonly string[];
|
|
90
|
+
/** Additional public fields accepted by the route. */
|
|
91
|
+
optional?: readonly string[];
|
|
92
|
+
maxLen?: Record<string, number>;
|
|
93
|
+
/** Per-string cap when `maxLen` has no field override. Default 4000. */
|
|
94
|
+
defaultMaxLen?: number;
|
|
95
|
+
/** Maximum JSON request size in characters. Default 32768. */
|
|
96
|
+
bodyCap?: number;
|
|
97
|
+
}
|
|
98
|
+
/** Fully resolved formation intake policy. */
|
|
99
|
+
interface ResolvedLeaderFormation {
|
|
100
|
+
enabled: boolean;
|
|
101
|
+
type: string;
|
|
102
|
+
required: readonly string[];
|
|
103
|
+
optional: readonly string[];
|
|
104
|
+
maxLen: Record<string, number>;
|
|
105
|
+
defaultMaxLen: number;
|
|
106
|
+
bodyCap: number;
|
|
107
|
+
}
|
|
108
|
+
/** A validated network target carried on the resolved chapter engine. */
|
|
109
|
+
interface ResolvedNetworkTarget {
|
|
110
|
+
id: string;
|
|
111
|
+
name: string;
|
|
112
|
+
url: string;
|
|
113
|
+
binding?: string;
|
|
114
|
+
secretName: string;
|
|
115
|
+
fields?: Record<string, readonly string[]>;
|
|
116
|
+
}
|
|
117
|
+
/** Fully-resolved leader network configuration. */
|
|
118
|
+
interface ResolvedNetwork {
|
|
119
|
+
targets: readonly ResolvedNetworkTarget[];
|
|
120
|
+
}
|
|
121
|
+
|
|
56
122
|
/** Which feature profile a site runs. `chapter` is the full public member site
|
|
57
123
|
* (join, Stripe membership, booking, member area, admin, CRM); `hub` is
|
|
58
124
|
* admin-only and CRM-focused (a directory/registry over the same CRM). */
|
|
@@ -158,40 +224,6 @@ interface ChapterBrand {
|
|
|
158
224
|
}>>;
|
|
159
225
|
logos?: string;
|
|
160
226
|
}
|
|
161
|
-
/** One follower site a leader can push CRM records to. The secret VALUE never
|
|
162
|
-
* lives in config: `secretName` names the leader tenant's vaulted copy of the
|
|
163
|
-
* follower's `network_share_secret`. */
|
|
164
|
-
interface ChapterNetworkTarget {
|
|
165
|
-
/** Stable lowercase slug used by the UI, audit tags, and default secret name. */
|
|
166
|
-
id: string;
|
|
167
|
-
/** Human-facing site name. Defaults to `id`. */
|
|
168
|
-
name?: string;
|
|
169
|
-
/** Absolute follower origin, e.g. `https://chapter.example.com`. */
|
|
170
|
-
url: string;
|
|
171
|
-
/** Leader-vault key holding this follower's share secret. Defaults to
|
|
172
|
-
* `network_share_<id-with-underscores>`. */
|
|
173
|
-
secretName?: string;
|
|
174
|
-
/** Per-record-type field allowlist. If present, omitted types cannot be sent
|
|
175
|
-
* to this target. Without it, package-safe person/company defaults apply. */
|
|
176
|
-
fields?: Record<string, readonly string[]>;
|
|
177
|
-
}
|
|
178
|
-
/** Leader/follower network configuration. Followers need no code config to
|
|
179
|
-
* receive records; they only vault `network_share_secret`. */
|
|
180
|
-
interface ChapterNetwork {
|
|
181
|
-
targets?: readonly ChapterNetworkTarget[];
|
|
182
|
-
}
|
|
183
|
-
/** A validated network target carried on the resolved chapter engine. */
|
|
184
|
-
interface ResolvedNetworkTarget {
|
|
185
|
-
id: string;
|
|
186
|
-
name: string;
|
|
187
|
-
url: string;
|
|
188
|
-
secretName: string;
|
|
189
|
-
fields?: Record<string, readonly string[]>;
|
|
190
|
-
}
|
|
191
|
-
/** Fully-resolved leader network configuration. */
|
|
192
|
-
interface ResolvedNetwork {
|
|
193
|
-
targets: readonly ResolvedNetworkTarget[];
|
|
194
|
-
}
|
|
195
227
|
/** Membership pricing for the group row (chapter mode). */
|
|
196
228
|
interface ChapterPrices {
|
|
197
229
|
standardCents: number;
|
|
@@ -348,6 +380,8 @@ interface ChapterConfig {
|
|
|
348
380
|
/** Leader → follower delivery targets. Secret values stay in the leader
|
|
349
381
|
* tenant vault; see {@link ChapterNetworkTarget}. */
|
|
350
382
|
network?: ChapterNetwork;
|
|
383
|
+
/** Enable a public, host-rendered formation application workflow. */
|
|
384
|
+
formation?: LeaderFormationConfig;
|
|
351
385
|
thesis?: unknown;
|
|
352
386
|
/** Required in `chapter` mode. */
|
|
353
387
|
prices?: ChapterPrices;
|
|
@@ -438,6 +472,8 @@ interface Chapter {
|
|
|
438
472
|
copy: ChapterCopy;
|
|
439
473
|
/** Validated follower targets for leader-driven record pushes. */
|
|
440
474
|
network: ResolvedNetwork;
|
|
475
|
+
/** Resolved public formation intake contract (disabled when omitted). */
|
|
476
|
+
formation: ResolvedLeaderFormation;
|
|
441
477
|
/** Resolved CRM engine (from `defineCrm`). */
|
|
442
478
|
crm: Crm;
|
|
443
479
|
/** Resolved auth policy (source, claim, ladder, super-admin tier). */
|