@odla-ai/chapter 0.37.0 → 0.38.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 +30 -2
- package/dist/index.cjs +311 -235
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -8
- package/dist/index.d.ts +55 -8
- package/dist/index.js +311 -235
- package/dist/index.js.map +1 -1
- package/dist/ui/member/index.d.ts +35 -1
- package/dist/worker/index.cjs +344 -260
- package/dist/worker/index.cjs.map +1 -1
- package/dist/worker/index.js +344 -260
- package/dist/worker/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import * as preact from 'preact';
|
|
|
2
2
|
import { ComponentChildren, JSX } from 'preact';
|
|
3
3
|
import { d as MemberContentProjection, e as MemberContentPageProjection, b as ChapterCopy, f as ChapterBrand } from '../../copy-context-Pbs3keLx.js';
|
|
4
4
|
export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-Pbs3keLx.js';
|
|
5
|
-
import '@odla-ai/crm';
|
|
5
|
+
import { FieldType, FieldConditions } from '@odla-ai/crm';
|
|
6
6
|
|
|
7
7
|
/** A bookable slot: a start instant in epoch milliseconds. */
|
|
8
8
|
interface Slot {
|
|
@@ -302,6 +302,38 @@ interface GiftOffer {
|
|
|
302
302
|
/** Provider-free gift offer shape rendered by Chapter and exact CMS previews. */
|
|
303
303
|
type PublicGiftOffer = Omit<GiftOffer, "stripePriceId" | "target">;
|
|
304
304
|
|
|
305
|
+
/** Current public schema version for Chapter flow-field contracts. */
|
|
306
|
+
declare const CHAPTER_FLOW_FIELDS_SCHEMA_VERSION: 1;
|
|
307
|
+
/** Configurable Chapter intake journeys that publish field contracts. */
|
|
308
|
+
type ChapterFieldFlow = "join" | "formation";
|
|
309
|
+
/** Email comparison policy advertised by an email field. */
|
|
310
|
+
type ChapterEmailIdentity = "literal";
|
|
311
|
+
/**
|
|
312
|
+
* One effective field in a Chapter intake journey.
|
|
313
|
+
*
|
|
314
|
+
* IDs, value types, and options come from the follower-declared schema. A hub
|
|
315
|
+
* or CMS may select, order, and configure only those declared fields; it cannot
|
|
316
|
+
* use this presentation document to add storage or widen follower authority.
|
|
317
|
+
*/
|
|
318
|
+
interface ChapterFlowField {
|
|
319
|
+
id: string;
|
|
320
|
+
label: string;
|
|
321
|
+
type: FieldType;
|
|
322
|
+
required: boolean;
|
|
323
|
+
order: number;
|
|
324
|
+
maxLength?: number;
|
|
325
|
+
options?: readonly string[];
|
|
326
|
+
conditions?: FieldConditions;
|
|
327
|
+
/** Present only for an email identity field. Aliases such as `+tag` remain significant. */
|
|
328
|
+
emailIdentity?: ChapterEmailIdentity;
|
|
329
|
+
}
|
|
330
|
+
/** Ordered, versioned effective field state for one Chapter journey. */
|
|
331
|
+
interface ChapterFlowFieldContract {
|
|
332
|
+
schemaVersion: typeof CHAPTER_FLOW_FIELDS_SCHEMA_VERSION;
|
|
333
|
+
flow: ChapterFieldFlow;
|
|
334
|
+
fields: readonly ChapterFlowField[];
|
|
335
|
+
}
|
|
336
|
+
|
|
305
337
|
/** The public join config (the shape `GET /api/join-config` returns). */
|
|
306
338
|
interface JoinConfig {
|
|
307
339
|
id: string;
|
|
@@ -314,6 +346,8 @@ interface JoinConfig {
|
|
|
314
346
|
/** Resolved copy for the packaged join flow. */
|
|
315
347
|
copy?: ChapterCopy["join"];
|
|
316
348
|
giftOffers?: readonly PublicGiftOffer[];
|
|
349
|
+
/** Exact ordered field state accepted by the effective server-side join flow. */
|
|
350
|
+
fieldContract?: ChapterFlowFieldContract;
|
|
317
351
|
}
|
|
318
352
|
/** Server-validated state used to resume a join journey after a redirect. */
|
|
319
353
|
type JoinFlowState = {
|