@odla-ai/chapter 0.25.8 → 0.26.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 +118 -13
- 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-CLvhJhrF.d.ts} +73 -42
- package/dist/index.cjs +327 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +170 -58
- package/dist/index.d.ts +170 -58
- package/dist/index.js +321 -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 +496 -205
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.d.cts +73 -42
- package/dist/worker/index.d.ts +73 -42
- package/dist/worker/index.js +502 -206
- 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
|
@@ -2,15 +2,16 @@ import { CrmConfig, Crm } from '@odla-ai/crm';
|
|
|
2
2
|
import * as preact from 'preact';
|
|
3
3
|
import { ComponentChildren } from 'preact';
|
|
4
4
|
|
|
5
|
+
type TextFields$1<Key extends string> = {
|
|
6
|
+
[Field in Key]: string;
|
|
7
|
+
};
|
|
8
|
+
/** User-visible language for sharing, delivery state, and leader rollups. */
|
|
9
|
+
type AdminNetworkCopy = TextFields$1<"title" | "allowlistDescription" | "sharing" | "shareWith" | "shared" | "shareFailed" | "deliveryFailed" | "loadingRollup" | "loadRollupFailed" | "overview" | "configuredFollowers" | "reachableFollowers" | "recordsAcrossFollowers" | "noFollowers" | "followers" | "available" | "unavailable" | "recordTotals" | "noRecordTotals">;
|
|
10
|
+
|
|
5
11
|
type TextFields<Key extends string> = {
|
|
6
12
|
[Field in Key]: string;
|
|
7
13
|
};
|
|
8
|
-
/**
|
|
9
|
-
* Complete user-visible language owned by Chapter's packaged surfaces.
|
|
10
|
-
*
|
|
11
|
-
* Copy is serializable text; use render slots when presentation needs markup and
|
|
12
|
-
* `formatChapterCopy()` for typed placeholders.
|
|
13
|
-
*/
|
|
14
|
+
/** Complete serializable language for Chapter surfaces; use render slots for markup and `formatChapterCopy()` for placeholders. */
|
|
14
15
|
interface ChapterCopy {
|
|
15
16
|
common: TextFields<"loading" | "saved" | "unknown">;
|
|
16
17
|
join: {
|
|
@@ -36,7 +37,7 @@ interface ChapterCopy {
|
|
|
36
37
|
admin: {
|
|
37
38
|
auth: TextFields<"checking" | "notAuthorized" | "accountNotAuthorized" | "thisAccount" | "signOut" | "loading" | "signInNotConfigured" | "missingPublishableKey" | "noWorkspaces" | "signInTagline">;
|
|
38
39
|
shell: TextFields<"adminRole" | "adminConsole" | "adminName" | "navigationLabel">;
|
|
39
|
-
workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "settings" | "calendar" | "email" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel">;
|
|
40
|
+
workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "portfolio" | "settings" | "calendar" | "email" | "chapters" | "formations" | "dealFlow" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel" | "portfolioViewsLabel">;
|
|
40
41
|
dashboard: TextFields<"loading" | "loadFailed" | "upcomingCalls" | "callsNeedAttention" | "noUpcomingCalls" | "drift" | "open" | "meet" | "applications" | "newMembers" | "newMembersUnavailable" | "revenueAdded" | "revenue" | "revenueUnavailable" | "pipeline" | "pipelineLabel" | "thisWeek" | "noChange" | "activeMemberships" | "annualRunRate" | "testMode">;
|
|
41
42
|
billing: TextFields<"loading" | "loadFailed" | "notConfigured" | "active" | "annualized" | "renewingSoon" | "pastDue" | "subscriptions" | "testMode" | "truncated" | "name" | "email" | "application" | "subscription" | "cancelling" | "amount" | "renews">;
|
|
42
43
|
availability: TextFields<"loading" | "loadFailed" | "saved" | "title" | "days" | "startHour" | "endHour" | "slotMinutes" | "minNoticeHours" | "windowDays" | "timezone" | "summaryTemplate" | "save"> & {
|
|
@@ -44,7 +45,7 @@ interface ChapterCopy {
|
|
|
44
45
|
};
|
|
45
46
|
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">;
|
|
46
47
|
meetings: TextFields<"loading" | "loadFailed" | "cancelConfirm" | "newStartPrompt" | "parseFailed" | "agenda" | "empty" | "unknown" | "drift" | "meet" | "reschedule" | "cancel">;
|
|
47
|
-
network:
|
|
48
|
+
network: AdminNetworkCopy;
|
|
48
49
|
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">;
|
|
49
50
|
};
|
|
50
51
|
}
|
|
@@ -54,6 +55,66 @@ type DeepPartial<T> = T extends readonly (infer Item)[] ? readonly Item[] : T ex
|
|
|
54
55
|
/** Recursively partial copy overrides accepted by `defineChapter({ copy })`. */
|
|
55
56
|
type ChapterCopyInput = DeepPartial<ChapterCopy>;
|
|
56
57
|
|
|
58
|
+
/** One follower site a leader can push CRM records to. The secret VALUE never
|
|
59
|
+
* lives in config: `secretName` names the leader tenant's vaulted copy of the
|
|
60
|
+
* follower's `network_share_secret`. */
|
|
61
|
+
interface ChapterNetworkTarget {
|
|
62
|
+
/** Stable lowercase slug used by the UI, audit tags, and default secret name. */
|
|
63
|
+
id: string;
|
|
64
|
+
/** Human-facing site name. Defaults to `id`. */
|
|
65
|
+
name?: string;
|
|
66
|
+
/** Absolute follower origin, e.g. `https://chapter.example.com`. */
|
|
67
|
+
url: string;
|
|
68
|
+
/** Leader-vault key holding this follower's share secret. Defaults to
|
|
69
|
+
* `network_share_<id-with-underscores>`. */
|
|
70
|
+
secretName?: string;
|
|
71
|
+
/** Per-record-type field allowlist. If present, omitted types cannot be sent
|
|
72
|
+
* to this target. Without it, package-safe person/company defaults apply. */
|
|
73
|
+
fields?: Record<string, readonly string[]>;
|
|
74
|
+
}
|
|
75
|
+
/** Leader/follower network configuration. Followers need no code config to
|
|
76
|
+
* receive records; they only vault `network_share_secret`. */
|
|
77
|
+
interface ChapterNetwork {
|
|
78
|
+
targets?: readonly ChapterNetworkTarget[];
|
|
79
|
+
}
|
|
80
|
+
/** Public chapter-formation intake backed by one CRM record type. The host owns
|
|
81
|
+
* the branded form; Chapter owns the bounded, idempotent write contract. */
|
|
82
|
+
interface LeaderFormationConfig {
|
|
83
|
+
/** CRM type receiving submissions. Default `"chapter_application"`. */
|
|
84
|
+
type?: string;
|
|
85
|
+
/** Public fields that must be non-empty strings. */
|
|
86
|
+
required?: readonly string[];
|
|
87
|
+
/** Additional public fields accepted by the route. */
|
|
88
|
+
optional?: readonly string[];
|
|
89
|
+
maxLen?: Record<string, number>;
|
|
90
|
+
/** Per-string cap when `maxLen` has no field override. Default 4000. */
|
|
91
|
+
defaultMaxLen?: number;
|
|
92
|
+
/** Maximum JSON request size in characters. Default 32768. */
|
|
93
|
+
bodyCap?: number;
|
|
94
|
+
}
|
|
95
|
+
/** Fully resolved formation intake policy. */
|
|
96
|
+
interface ResolvedLeaderFormation {
|
|
97
|
+
enabled: boolean;
|
|
98
|
+
type: string;
|
|
99
|
+
required: readonly string[];
|
|
100
|
+
optional: readonly string[];
|
|
101
|
+
maxLen: Record<string, number>;
|
|
102
|
+
defaultMaxLen: number;
|
|
103
|
+
bodyCap: number;
|
|
104
|
+
}
|
|
105
|
+
/** A validated network target carried on the resolved chapter engine. */
|
|
106
|
+
interface ResolvedNetworkTarget {
|
|
107
|
+
id: string;
|
|
108
|
+
name: string;
|
|
109
|
+
url: string;
|
|
110
|
+
secretName: string;
|
|
111
|
+
fields?: Record<string, readonly string[]>;
|
|
112
|
+
}
|
|
113
|
+
/** Fully-resolved leader network configuration. */
|
|
114
|
+
interface ResolvedNetwork {
|
|
115
|
+
targets: readonly ResolvedNetworkTarget[];
|
|
116
|
+
}
|
|
117
|
+
|
|
57
118
|
/** Which feature profile a site runs. `chapter` is the full public member site
|
|
58
119
|
* (join, Stripe membership, booking, member area, admin, CRM); `hub` is
|
|
59
120
|
* admin-only and CRM-focused (a directory/registry over the same CRM). */
|
|
@@ -159,40 +220,6 @@ interface ChapterBrand {
|
|
|
159
220
|
}>>;
|
|
160
221
|
logos?: string;
|
|
161
222
|
}
|
|
162
|
-
/** One follower site a leader can push CRM records to. The secret VALUE never
|
|
163
|
-
* lives in config: `secretName` names the leader tenant's vaulted copy of the
|
|
164
|
-
* follower's `network_share_secret`. */
|
|
165
|
-
interface ChapterNetworkTarget {
|
|
166
|
-
/** Stable lowercase slug used by the UI, audit tags, and default secret name. */
|
|
167
|
-
id: string;
|
|
168
|
-
/** Human-facing site name. Defaults to `id`. */
|
|
169
|
-
name?: string;
|
|
170
|
-
/** Absolute follower origin, e.g. `https://chapter.example.com`. */
|
|
171
|
-
url: string;
|
|
172
|
-
/** Leader-vault key holding this follower's share secret. Defaults to
|
|
173
|
-
* `network_share_<id-with-underscores>`. */
|
|
174
|
-
secretName?: string;
|
|
175
|
-
/** Per-record-type field allowlist. If present, omitted types cannot be sent
|
|
176
|
-
* to this target. Without it, package-safe person/company defaults apply. */
|
|
177
|
-
fields?: Record<string, readonly string[]>;
|
|
178
|
-
}
|
|
179
|
-
/** Leader/follower network configuration. Followers need no code config to
|
|
180
|
-
* receive records; they only vault `network_share_secret`. */
|
|
181
|
-
interface ChapterNetwork {
|
|
182
|
-
targets?: readonly ChapterNetworkTarget[];
|
|
183
|
-
}
|
|
184
|
-
/** A validated network target carried on the resolved chapter engine. */
|
|
185
|
-
interface ResolvedNetworkTarget {
|
|
186
|
-
id: string;
|
|
187
|
-
name: string;
|
|
188
|
-
url: string;
|
|
189
|
-
secretName: string;
|
|
190
|
-
fields?: Record<string, readonly string[]>;
|
|
191
|
-
}
|
|
192
|
-
/** Fully-resolved leader network configuration. */
|
|
193
|
-
interface ResolvedNetwork {
|
|
194
|
-
targets: readonly ResolvedNetworkTarget[];
|
|
195
|
-
}
|
|
196
223
|
/** Membership pricing for the group row (chapter mode). */
|
|
197
224
|
interface ChapterPrices {
|
|
198
225
|
standardCents: number;
|
|
@@ -349,6 +376,8 @@ interface ChapterConfig {
|
|
|
349
376
|
/** Leader → follower delivery targets. Secret values stay in the leader
|
|
350
377
|
* tenant vault; see {@link ChapterNetworkTarget}. */
|
|
351
378
|
network?: ChapterNetwork;
|
|
379
|
+
/** Enable a public, host-rendered formation application workflow. */
|
|
380
|
+
formation?: LeaderFormationConfig;
|
|
352
381
|
thesis?: unknown;
|
|
353
382
|
/** Required in `chapter` mode. */
|
|
354
383
|
prices?: ChapterPrices;
|
|
@@ -439,6 +468,8 @@ interface Chapter {
|
|
|
439
468
|
copy: ChapterCopy;
|
|
440
469
|
/** Validated follower targets for leader-driven record pushes. */
|
|
441
470
|
network: ResolvedNetwork;
|
|
471
|
+
/** Resolved public formation intake contract (disabled when omitted). */
|
|
472
|
+
formation: ResolvedLeaderFormation;
|
|
442
473
|
/** Resolved CRM engine (from `defineCrm`). */
|
|
443
474
|
crm: Crm;
|
|
444
475
|
/** Resolved auth policy (source, claim, ladder, super-admin tier). */
|