@odla-ai/chapter 0.31.3 → 0.32.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/dist/index.d.cts CHANGED
@@ -481,9 +481,9 @@ interface ResolvedPipeline {
481
481
  }
482
482
  /** The application (join form) validation surface — which string fields are
483
483
  * required vs accepted, their max lengths, and the request body cap. Drives
484
- * submit validation + the CRM slot projection; defaults to the reference form.
485
- * The `applications` schema attrs stay fixed; this is
486
- * validation config, not schema generation. */
484
+ * submit validation, the generated `applications` schema, and the CRM slot
485
+ * projection; defaults to the reference form. Built-in fields retain their
486
+ * declared schema types/indexes, and site-defined fields become string attrs. */
487
487
  interface ChapterApplication {
488
488
  required?: readonly string[];
489
489
  optional?: readonly string[];
@@ -761,6 +761,11 @@ interface ChapterRunbookHints {
761
761
  declare function createChapterIntegration(chapter: Chapter, options?: ChapterIntegrationOptions): ChapterIntegrationDescriptor;
762
762
 
763
763
  /** The chapter's own schema + deny-all rules for a mode + auth policy.
764
+ *
765
+ * In chapter mode, the optional {@link ResolvedApplication} supplies the exact
766
+ * required/optional application string attrs. Omit it for the reference form.
767
+ * Built-in attrs retain their types/indexes; site-defined fields become string
768
+ * attrs, while package-owned operational attrs cannot be repurposed as inputs.
764
769
  *
765
770
  * Operational tables (`applications`/`groups`/`meetings`/`emailLog`) are added in
766
771
  * `chapter` mode only. The auth tables follow {@link ResolvedAuth}: `source:
@@ -768,7 +773,7 @@ declare function createChapterIntegration(chapter: Chapter, options?: ChapterInt
768
773
  * read-only super-admin tier (default on for the `"claim"` ladder). A `"claim"`
769
774
  * chapter therefore emits the reference namespace set — `applications`,
770
775
  * `groups`, `meetings`, `emailLog`, `superAdmins` — with no `admins` table. */
771
- declare function chapterDb(mode: ChapterMode, auth: ResolvedAuth, includeNetworkNotes?: boolean): {
776
+ declare function chapterDb(mode: ChapterMode, auth: ResolvedAuth, includeNetworkNotes?: boolean, application?: ResolvedApplication): {
772
777
  schema: DbSchema;
773
778
  rules: DbRules;
774
779
  };
@@ -1847,4 +1852,73 @@ declare function loadTiers(db: ChapterDb, group: TierGroupRow): Promise<ChapterT
1847
1852
  /** The tiers a join page may show: active, and joinable as configured. */
1848
1853
  declare function loadOfferableTiers(db: ChapterDb, group: TierGroupRow, hasSecretKey: boolean): Promise<ChapterTier[]>;
1849
1854
 
1850
- export { type AccountModel, type AdminNotificationTrigger, type Applicant, type ApplicationBookingPatch, type ApplicationRecord, type ApplicationSummary, type Attr, type AttrType, type Chapter, type ChapterApplication, type ChapterAuth, type ChapterBrand, type ChapterConfig, type ChapterCopy, type ChapterCopyInput, type ChapterDb, type ChapterEmails, type ChapterIntegrationDescriptor, type ChapterIntegrationOptions, type ChapterMode, type ChapterNetwork, type ChapterNetworkReader, type ChapterNetworkTarget, type ChapterOperations, type ChapterPipeline, type ChapterPolicy, type ChapterPrices, type ChapterRunbookHints, type ChapterScheduling, type ChapterSends, type ChapterTier, type ChapterTierConfig, type ClerkInviteInput, type ClerkMetadataInput, type ClerkResult, type ClerkUserInput, type ClerkUserRecord, type CompiledChapterBrandTokens, DEFAULT_CHAPTER_COPY, DEFAULT_SHARE_FIELDS, type DashboardMetricData, type DashboardMetricSeries, type DbOp, type DbRules, type DbSchema, type DeliveryDecision, type EmailGroup, type EmailTemplate, type EmailTemplateRow, type Entity, type ExistingMeeting, type GuardResult, type IntegrationDescriptor, type IntegrationProvision, type IntegrationSecret, type IntegrationSetting, type IntegrationSync, type JoinConfigGroup, type JoinConfigTier, type LeaderCrmOptions, type LeaderFormationConfig, type LiveEvent, type MailSender, type MeetingForReconcile, type MeetingRecord, type MeetingReschedulePatch, type MemberApplication, type MemberSession, type NetworkRecord, type NetworkRecordNote, type NetworkRecordPage, type NetworkRollup, type NetworkRollupTarget, type NetworkSharedNote, type NetworkSnapshot, type NewMeetingRow, type NotifyDeps, type NotifyInput, type NotifyResult, type PaymentsGroup, type ProjectionDeps, type ReconcileDecision, type ResolvedApplication, type ResolvedAuth, type ResolvedLeaderFormation, type ResolvedNetwork, type ResolvedNetworkReader, type ResolvedNetworkTarget, type ResolvedOperations, type ResolvedPipeline, type ResolvedScheduling, type ResolvedSends, type RoleChangeContext, type Rule, SCHEDULING_DEFAULTS, type SchedulingErrors, type SecretMode, type SecretStore, type SessionUser, type SharedBusiness, type SharedPerson, type SharedRecord, type SharedRecordV1, type SharedRecordV2, type StripeEvent, type StripeResult, type SubmitResult, type TierGroup, type TierGroupRow, type WebhookEvent, applicantProfile, applicationBookingUpdate, applicationSummary, backfillCrm, bookingDecision, brandTokens, bucketSeries, buildGroupSeed, buildTierSeeds, canApprove, canBook, canChangeRole, canTransition, canceledPatch, chapterBrandFromTokens, chapterDb, clampArray, clerkGetUser, clerkGetUserByEmail, clerkIntegration, clerkInviteRequest, clerkListUsers, clerkSetRole, clerkUserRequest, createChapterIntegration, createClerkInvitation, createClerkUser, dashboardMetricData, defaultCrm, defineChapter, emailGroupFrom, endForSlot, findApplicationRef, findTier, firstPaymentPatch, formatChapterCopy, formationFields, getVaultSecret, hasDisclaimerAck, introIdempotencyKey, isAdminRole, isAlreadySent, isReconcilable, isSlotAvailable, isValidEmail, joinConfig, joinConfigTiers, leaderCrmConfig, loadOfferableTiers, loadTiers, meetingCreateRow, meetingRescheduleUpdate, memberApplication, memberSession, networkSourceTag, normalizeSharedRecord, normalizeWebhookEvent, offerableTiers, paymentsReady, personInputFromApp, planDelivery, projectApplicant, projectSharedRecord, reconcileMeetings, refundedPatch, render, renderSummary, renderTemplateBody, renewalPatch, resolveApplication, resolveAuth, resolveChapterCopy, resolveLeaderFormation, resolvePipeline, resolveScheduling, resolveTiers, roleFromClaim, sendTemplated, sharedPersonInput, sharedRecordFromCrm, slotWindow, stageIndex, stripeCall, subAnnualCents, submitApplication, subscriptionIdempotencyKey, syncApplicationToCrm, tierIsFree, tierPayable, updateClerkUserMetadata, updateClerkUserMetadataByEmail, validateScheduling, webhookMutationId };
1855
+ /** The first stable, shared Chapter membership-page renderer contract. */
1856
+ declare const MEMBERSHIP_PAGE_RENDERER: "membership-cards-v1";
1857
+ /** Fixed visual emphasis choices supported by the versioned card renderer. */
1858
+ type MembershipTierVariant = "standard" | "featured" | "supporting";
1859
+ /** A bounded, token-rendered aside within one membership card. */
1860
+ interface MembershipTierCallout {
1861
+ label?: string;
1862
+ bodyMarkdown: string;
1863
+ }
1864
+ /** Scarcity copy displayed without changing tier availability or checkout. */
1865
+ interface MembershipTierCapacity {
1866
+ total: number;
1867
+ label?: string;
1868
+ }
1869
+ /**
1870
+ * Presentation attached to one server-authoritative membership tier.
1871
+ *
1872
+ * Price, free/paid state, identity, and application targeting deliberately do
1873
+ * not live here. They are resolved from the public Chapter join config so
1874
+ * authored marketing copy can never change what checkout charges.
1875
+ */
1876
+ interface MembershipTierPresentation {
1877
+ tierId: string;
1878
+ variant?: MembershipTierVariant;
1879
+ badge?: string;
1880
+ summaryMarkdown?: string;
1881
+ priceEyebrow?: string;
1882
+ compareAtPriceCents?: number;
1883
+ billingLabel?: string;
1884
+ priceNoteMarkdown?: string;
1885
+ capacity?: MembershipTierCapacity;
1886
+ benefits?: readonly string[];
1887
+ callout?: MembershipTierCallout;
1888
+ ctaLabel?: string;
1889
+ }
1890
+ /** A bounded document that can be reviewed once and rendered by any Chapter host. */
1891
+ interface MembershipPageDocument {
1892
+ schemaVersion: 1;
1893
+ renderer: typeof MEMBERSHIP_PAGE_RENDERER;
1894
+ tiers: readonly MembershipTierPresentation[];
1895
+ footnoteMarkdown?: string;
1896
+ }
1897
+ /** Minimal server-authoritative tier identity and charged amount used during validation. */
1898
+ interface MembershipTierAuthority {
1899
+ id: string;
1900
+ priceCents: number;
1901
+ }
1902
+ /** Live tier authority used to reject missing, unknown, or misleading presentation. */
1903
+ interface MembershipPageValidationOptions {
1904
+ /** When supplied, every live tier must occur exactly once in the document. */
1905
+ tiers?: readonly MembershipTierAuthority[];
1906
+ }
1907
+ /** A normalized document or the complete actionable list of validation failures. */
1908
+ type MembershipPageValidationResult = {
1909
+ ok: true;
1910
+ value: MembershipPageDocument;
1911
+ } | {
1912
+ ok: false;
1913
+ errors: readonly string[];
1914
+ };
1915
+ /**
1916
+ * Validate and normalize a membership-page document without evaluating code,
1917
+ * accepting HTML, or allowing authored links/styles. Markdown slots are later
1918
+ * rendered by @odla-ai/ui's bounded safe Markdown component.
1919
+ */
1920
+ declare function validateMembershipPageDocument(input: unknown, options?: MembershipPageValidationOptions): MembershipPageValidationResult;
1921
+ /** Validate a document or fail closed with all actionable validation errors. */
1922
+ declare function membershipPageDocument(input: unknown, options?: MembershipPageValidationOptions): MembershipPageDocument;
1923
+
1924
+ export { type AccountModel, type AdminNotificationTrigger, type Applicant, type ApplicationBookingPatch, type ApplicationRecord, type ApplicationSummary, type Attr, type AttrType, type Chapter, type ChapterApplication, type ChapterAuth, type ChapterBrand, type ChapterConfig, type ChapterCopy, type ChapterCopyInput, type ChapterDb, type ChapterEmails, type ChapterIntegrationDescriptor, type ChapterIntegrationOptions, type ChapterMode, type ChapterNetwork, type ChapterNetworkReader, type ChapterNetworkTarget, type ChapterOperations, type ChapterPipeline, type ChapterPolicy, type ChapterPrices, type ChapterRunbookHints, type ChapterScheduling, type ChapterSends, type ChapterTier, type ChapterTierConfig, type ClerkInviteInput, type ClerkMetadataInput, type ClerkResult, type ClerkUserInput, type ClerkUserRecord, type CompiledChapterBrandTokens, DEFAULT_CHAPTER_COPY, DEFAULT_SHARE_FIELDS, type DashboardMetricData, type DashboardMetricSeries, type DbOp, type DbRules, type DbSchema, type DeliveryDecision, type EmailGroup, type EmailTemplate, type EmailTemplateRow, type Entity, type ExistingMeeting, type GuardResult, type IntegrationDescriptor, type IntegrationProvision, type IntegrationSecret, type IntegrationSetting, type IntegrationSync, type JoinConfigGroup, type JoinConfigTier, type LeaderCrmOptions, type LeaderFormationConfig, type LiveEvent, MEMBERSHIP_PAGE_RENDERER, type MailSender, type MeetingForReconcile, type MeetingRecord, type MeetingReschedulePatch, type MemberApplication, type MemberSession, type MembershipPageDocument, type MembershipPageValidationOptions, type MembershipPageValidationResult, type MembershipTierAuthority, type MembershipTierCallout, type MembershipTierCapacity, type MembershipTierPresentation, type MembershipTierVariant, type NetworkRecord, type NetworkRecordNote, type NetworkRecordPage, type NetworkRollup, type NetworkRollupTarget, type NetworkSharedNote, type NetworkSnapshot, type NewMeetingRow, type NotifyDeps, type NotifyInput, type NotifyResult, type PaymentsGroup, type ProjectionDeps, type ReconcileDecision, type ResolvedApplication, type ResolvedAuth, type ResolvedLeaderFormation, type ResolvedNetwork, type ResolvedNetworkReader, type ResolvedNetworkTarget, type ResolvedOperations, type ResolvedPipeline, type ResolvedScheduling, type ResolvedSends, type RoleChangeContext, type Rule, SCHEDULING_DEFAULTS, type SchedulingErrors, type SecretMode, type SecretStore, type SessionUser, type SharedBusiness, type SharedPerson, type SharedRecord, type SharedRecordV1, type SharedRecordV2, type StripeEvent, type StripeResult, type SubmitResult, type TierGroup, type TierGroupRow, type WebhookEvent, applicantProfile, applicationBookingUpdate, applicationSummary, backfillCrm, bookingDecision, brandTokens, bucketSeries, buildGroupSeed, buildTierSeeds, canApprove, canBook, canChangeRole, canTransition, canceledPatch, chapterBrandFromTokens, chapterDb, clampArray, clerkGetUser, clerkGetUserByEmail, clerkIntegration, clerkInviteRequest, clerkListUsers, clerkSetRole, clerkUserRequest, createChapterIntegration, createClerkInvitation, createClerkUser, dashboardMetricData, defaultCrm, defineChapter, emailGroupFrom, endForSlot, findApplicationRef, findTier, firstPaymentPatch, formatChapterCopy, formationFields, getVaultSecret, hasDisclaimerAck, introIdempotencyKey, isAdminRole, isAlreadySent, isReconcilable, isSlotAvailable, isValidEmail, joinConfig, joinConfigTiers, leaderCrmConfig, loadOfferableTiers, loadTiers, meetingCreateRow, meetingRescheduleUpdate, memberApplication, memberSession, membershipPageDocument, networkSourceTag, normalizeSharedRecord, normalizeWebhookEvent, offerableTiers, paymentsReady, personInputFromApp, planDelivery, projectApplicant, projectSharedRecord, reconcileMeetings, refundedPatch, render, renderSummary, renderTemplateBody, renewalPatch, resolveApplication, resolveAuth, resolveChapterCopy, resolveLeaderFormation, resolvePipeline, resolveScheduling, resolveTiers, roleFromClaim, sendTemplated, sharedPersonInput, sharedRecordFromCrm, slotWindow, stageIndex, stripeCall, subAnnualCents, submitApplication, subscriptionIdempotencyKey, syncApplicationToCrm, tierIsFree, tierPayable, updateClerkUserMetadata, updateClerkUserMetadataByEmail, validateMembershipPageDocument, validateScheduling, webhookMutationId };
package/dist/index.d.ts CHANGED
@@ -481,9 +481,9 @@ interface ResolvedPipeline {
481
481
  }
482
482
  /** The application (join form) validation surface — which string fields are
483
483
  * required vs accepted, their max lengths, and the request body cap. Drives
484
- * submit validation + the CRM slot projection; defaults to the reference form.
485
- * The `applications` schema attrs stay fixed; this is
486
- * validation config, not schema generation. */
484
+ * submit validation, the generated `applications` schema, and the CRM slot
485
+ * projection; defaults to the reference form. Built-in fields retain their
486
+ * declared schema types/indexes, and site-defined fields become string attrs. */
487
487
  interface ChapterApplication {
488
488
  required?: readonly string[];
489
489
  optional?: readonly string[];
@@ -761,6 +761,11 @@ interface ChapterRunbookHints {
761
761
  declare function createChapterIntegration(chapter: Chapter, options?: ChapterIntegrationOptions): ChapterIntegrationDescriptor;
762
762
 
763
763
  /** The chapter's own schema + deny-all rules for a mode + auth policy.
764
+ *
765
+ * In chapter mode, the optional {@link ResolvedApplication} supplies the exact
766
+ * required/optional application string attrs. Omit it for the reference form.
767
+ * Built-in attrs retain their types/indexes; site-defined fields become string
768
+ * attrs, while package-owned operational attrs cannot be repurposed as inputs.
764
769
  *
765
770
  * Operational tables (`applications`/`groups`/`meetings`/`emailLog`) are added in
766
771
  * `chapter` mode only. The auth tables follow {@link ResolvedAuth}: `source:
@@ -768,7 +773,7 @@ declare function createChapterIntegration(chapter: Chapter, options?: ChapterInt
768
773
  * read-only super-admin tier (default on for the `"claim"` ladder). A `"claim"`
769
774
  * chapter therefore emits the reference namespace set — `applications`,
770
775
  * `groups`, `meetings`, `emailLog`, `superAdmins` — with no `admins` table. */
771
- declare function chapterDb(mode: ChapterMode, auth: ResolvedAuth, includeNetworkNotes?: boolean): {
776
+ declare function chapterDb(mode: ChapterMode, auth: ResolvedAuth, includeNetworkNotes?: boolean, application?: ResolvedApplication): {
772
777
  schema: DbSchema;
773
778
  rules: DbRules;
774
779
  };
@@ -1847,4 +1852,73 @@ declare function loadTiers(db: ChapterDb, group: TierGroupRow): Promise<ChapterT
1847
1852
  /** The tiers a join page may show: active, and joinable as configured. */
1848
1853
  declare function loadOfferableTiers(db: ChapterDb, group: TierGroupRow, hasSecretKey: boolean): Promise<ChapterTier[]>;
1849
1854
 
1850
- export { type AccountModel, type AdminNotificationTrigger, type Applicant, type ApplicationBookingPatch, type ApplicationRecord, type ApplicationSummary, type Attr, type AttrType, type Chapter, type ChapterApplication, type ChapterAuth, type ChapterBrand, type ChapterConfig, type ChapterCopy, type ChapterCopyInput, type ChapterDb, type ChapterEmails, type ChapterIntegrationDescriptor, type ChapterIntegrationOptions, type ChapterMode, type ChapterNetwork, type ChapterNetworkReader, type ChapterNetworkTarget, type ChapterOperations, type ChapterPipeline, type ChapterPolicy, type ChapterPrices, type ChapterRunbookHints, type ChapterScheduling, type ChapterSends, type ChapterTier, type ChapterTierConfig, type ClerkInviteInput, type ClerkMetadataInput, type ClerkResult, type ClerkUserInput, type ClerkUserRecord, type CompiledChapterBrandTokens, DEFAULT_CHAPTER_COPY, DEFAULT_SHARE_FIELDS, type DashboardMetricData, type DashboardMetricSeries, type DbOp, type DbRules, type DbSchema, type DeliveryDecision, type EmailGroup, type EmailTemplate, type EmailTemplateRow, type Entity, type ExistingMeeting, type GuardResult, type IntegrationDescriptor, type IntegrationProvision, type IntegrationSecret, type IntegrationSetting, type IntegrationSync, type JoinConfigGroup, type JoinConfigTier, type LeaderCrmOptions, type LeaderFormationConfig, type LiveEvent, type MailSender, type MeetingForReconcile, type MeetingRecord, type MeetingReschedulePatch, type MemberApplication, type MemberSession, type NetworkRecord, type NetworkRecordNote, type NetworkRecordPage, type NetworkRollup, type NetworkRollupTarget, type NetworkSharedNote, type NetworkSnapshot, type NewMeetingRow, type NotifyDeps, type NotifyInput, type NotifyResult, type PaymentsGroup, type ProjectionDeps, type ReconcileDecision, type ResolvedApplication, type ResolvedAuth, type ResolvedLeaderFormation, type ResolvedNetwork, type ResolvedNetworkReader, type ResolvedNetworkTarget, type ResolvedOperations, type ResolvedPipeline, type ResolvedScheduling, type ResolvedSends, type RoleChangeContext, type Rule, SCHEDULING_DEFAULTS, type SchedulingErrors, type SecretMode, type SecretStore, type SessionUser, type SharedBusiness, type SharedPerson, type SharedRecord, type SharedRecordV1, type SharedRecordV2, type StripeEvent, type StripeResult, type SubmitResult, type TierGroup, type TierGroupRow, type WebhookEvent, applicantProfile, applicationBookingUpdate, applicationSummary, backfillCrm, bookingDecision, brandTokens, bucketSeries, buildGroupSeed, buildTierSeeds, canApprove, canBook, canChangeRole, canTransition, canceledPatch, chapterBrandFromTokens, chapterDb, clampArray, clerkGetUser, clerkGetUserByEmail, clerkIntegration, clerkInviteRequest, clerkListUsers, clerkSetRole, clerkUserRequest, createChapterIntegration, createClerkInvitation, createClerkUser, dashboardMetricData, defaultCrm, defineChapter, emailGroupFrom, endForSlot, findApplicationRef, findTier, firstPaymentPatch, formatChapterCopy, formationFields, getVaultSecret, hasDisclaimerAck, introIdempotencyKey, isAdminRole, isAlreadySent, isReconcilable, isSlotAvailable, isValidEmail, joinConfig, joinConfigTiers, leaderCrmConfig, loadOfferableTiers, loadTiers, meetingCreateRow, meetingRescheduleUpdate, memberApplication, memberSession, networkSourceTag, normalizeSharedRecord, normalizeWebhookEvent, offerableTiers, paymentsReady, personInputFromApp, planDelivery, projectApplicant, projectSharedRecord, reconcileMeetings, refundedPatch, render, renderSummary, renderTemplateBody, renewalPatch, resolveApplication, resolveAuth, resolveChapterCopy, resolveLeaderFormation, resolvePipeline, resolveScheduling, resolveTiers, roleFromClaim, sendTemplated, sharedPersonInput, sharedRecordFromCrm, slotWindow, stageIndex, stripeCall, subAnnualCents, submitApplication, subscriptionIdempotencyKey, syncApplicationToCrm, tierIsFree, tierPayable, updateClerkUserMetadata, updateClerkUserMetadataByEmail, validateScheduling, webhookMutationId };
1855
+ /** The first stable, shared Chapter membership-page renderer contract. */
1856
+ declare const MEMBERSHIP_PAGE_RENDERER: "membership-cards-v1";
1857
+ /** Fixed visual emphasis choices supported by the versioned card renderer. */
1858
+ type MembershipTierVariant = "standard" | "featured" | "supporting";
1859
+ /** A bounded, token-rendered aside within one membership card. */
1860
+ interface MembershipTierCallout {
1861
+ label?: string;
1862
+ bodyMarkdown: string;
1863
+ }
1864
+ /** Scarcity copy displayed without changing tier availability or checkout. */
1865
+ interface MembershipTierCapacity {
1866
+ total: number;
1867
+ label?: string;
1868
+ }
1869
+ /**
1870
+ * Presentation attached to one server-authoritative membership tier.
1871
+ *
1872
+ * Price, free/paid state, identity, and application targeting deliberately do
1873
+ * not live here. They are resolved from the public Chapter join config so
1874
+ * authored marketing copy can never change what checkout charges.
1875
+ */
1876
+ interface MembershipTierPresentation {
1877
+ tierId: string;
1878
+ variant?: MembershipTierVariant;
1879
+ badge?: string;
1880
+ summaryMarkdown?: string;
1881
+ priceEyebrow?: string;
1882
+ compareAtPriceCents?: number;
1883
+ billingLabel?: string;
1884
+ priceNoteMarkdown?: string;
1885
+ capacity?: MembershipTierCapacity;
1886
+ benefits?: readonly string[];
1887
+ callout?: MembershipTierCallout;
1888
+ ctaLabel?: string;
1889
+ }
1890
+ /** A bounded document that can be reviewed once and rendered by any Chapter host. */
1891
+ interface MembershipPageDocument {
1892
+ schemaVersion: 1;
1893
+ renderer: typeof MEMBERSHIP_PAGE_RENDERER;
1894
+ tiers: readonly MembershipTierPresentation[];
1895
+ footnoteMarkdown?: string;
1896
+ }
1897
+ /** Minimal server-authoritative tier identity and charged amount used during validation. */
1898
+ interface MembershipTierAuthority {
1899
+ id: string;
1900
+ priceCents: number;
1901
+ }
1902
+ /** Live tier authority used to reject missing, unknown, or misleading presentation. */
1903
+ interface MembershipPageValidationOptions {
1904
+ /** When supplied, every live tier must occur exactly once in the document. */
1905
+ tiers?: readonly MembershipTierAuthority[];
1906
+ }
1907
+ /** A normalized document or the complete actionable list of validation failures. */
1908
+ type MembershipPageValidationResult = {
1909
+ ok: true;
1910
+ value: MembershipPageDocument;
1911
+ } | {
1912
+ ok: false;
1913
+ errors: readonly string[];
1914
+ };
1915
+ /**
1916
+ * Validate and normalize a membership-page document without evaluating code,
1917
+ * accepting HTML, or allowing authored links/styles. Markdown slots are later
1918
+ * rendered by @odla-ai/ui's bounded safe Markdown component.
1919
+ */
1920
+ declare function validateMembershipPageDocument(input: unknown, options?: MembershipPageValidationOptions): MembershipPageValidationResult;
1921
+ /** Validate a document or fail closed with all actionable validation errors. */
1922
+ declare function membershipPageDocument(input: unknown, options?: MembershipPageValidationOptions): MembershipPageDocument;
1923
+
1924
+ export { type AccountModel, type AdminNotificationTrigger, type Applicant, type ApplicationBookingPatch, type ApplicationRecord, type ApplicationSummary, type Attr, type AttrType, type Chapter, type ChapterApplication, type ChapterAuth, type ChapterBrand, type ChapterConfig, type ChapterCopy, type ChapterCopyInput, type ChapterDb, type ChapterEmails, type ChapterIntegrationDescriptor, type ChapterIntegrationOptions, type ChapterMode, type ChapterNetwork, type ChapterNetworkReader, type ChapterNetworkTarget, type ChapterOperations, type ChapterPipeline, type ChapterPolicy, type ChapterPrices, type ChapterRunbookHints, type ChapterScheduling, type ChapterSends, type ChapterTier, type ChapterTierConfig, type ClerkInviteInput, type ClerkMetadataInput, type ClerkResult, type ClerkUserInput, type ClerkUserRecord, type CompiledChapterBrandTokens, DEFAULT_CHAPTER_COPY, DEFAULT_SHARE_FIELDS, type DashboardMetricData, type DashboardMetricSeries, type DbOp, type DbRules, type DbSchema, type DeliveryDecision, type EmailGroup, type EmailTemplate, type EmailTemplateRow, type Entity, type ExistingMeeting, type GuardResult, type IntegrationDescriptor, type IntegrationProvision, type IntegrationSecret, type IntegrationSetting, type IntegrationSync, type JoinConfigGroup, type JoinConfigTier, type LeaderCrmOptions, type LeaderFormationConfig, type LiveEvent, MEMBERSHIP_PAGE_RENDERER, type MailSender, type MeetingForReconcile, type MeetingRecord, type MeetingReschedulePatch, type MemberApplication, type MemberSession, type MembershipPageDocument, type MembershipPageValidationOptions, type MembershipPageValidationResult, type MembershipTierAuthority, type MembershipTierCallout, type MembershipTierCapacity, type MembershipTierPresentation, type MembershipTierVariant, type NetworkRecord, type NetworkRecordNote, type NetworkRecordPage, type NetworkRollup, type NetworkRollupTarget, type NetworkSharedNote, type NetworkSnapshot, type NewMeetingRow, type NotifyDeps, type NotifyInput, type NotifyResult, type PaymentsGroup, type ProjectionDeps, type ReconcileDecision, type ResolvedApplication, type ResolvedAuth, type ResolvedLeaderFormation, type ResolvedNetwork, type ResolvedNetworkReader, type ResolvedNetworkTarget, type ResolvedOperations, type ResolvedPipeline, type ResolvedScheduling, type ResolvedSends, type RoleChangeContext, type Rule, SCHEDULING_DEFAULTS, type SchedulingErrors, type SecretMode, type SecretStore, type SessionUser, type SharedBusiness, type SharedPerson, type SharedRecord, type SharedRecordV1, type SharedRecordV2, type StripeEvent, type StripeResult, type SubmitResult, type TierGroup, type TierGroupRow, type WebhookEvent, applicantProfile, applicationBookingUpdate, applicationSummary, backfillCrm, bookingDecision, brandTokens, bucketSeries, buildGroupSeed, buildTierSeeds, canApprove, canBook, canChangeRole, canTransition, canceledPatch, chapterBrandFromTokens, chapterDb, clampArray, clerkGetUser, clerkGetUserByEmail, clerkIntegration, clerkInviteRequest, clerkListUsers, clerkSetRole, clerkUserRequest, createChapterIntegration, createClerkInvitation, createClerkUser, dashboardMetricData, defaultCrm, defineChapter, emailGroupFrom, endForSlot, findApplicationRef, findTier, firstPaymentPatch, formatChapterCopy, formationFields, getVaultSecret, hasDisclaimerAck, introIdempotencyKey, isAdminRole, isAlreadySent, isReconcilable, isSlotAvailable, isValidEmail, joinConfig, joinConfigTiers, leaderCrmConfig, loadOfferableTiers, loadTiers, meetingCreateRow, meetingRescheduleUpdate, memberApplication, memberSession, membershipPageDocument, networkSourceTag, normalizeSharedRecord, normalizeWebhookEvent, offerableTiers, paymentsReady, personInputFromApp, planDelivery, projectApplicant, projectSharedRecord, reconcileMeetings, refundedPatch, render, renderSummary, renderTemplateBody, renewalPatch, resolveApplication, resolveAuth, resolveChapterCopy, resolveLeaderFormation, resolvePipeline, resolveScheduling, resolveTiers, roleFromClaim, sendTemplated, sharedPersonInput, sharedRecordFromCrm, slotWindow, stageIndex, stripeCall, subAnnualCents, submitApplication, subscriptionIdempotencyKey, syncApplicationToCrm, tierIsFree, tierPayable, updateClerkUserMetadata, updateClerkUserMetadataByEmail, validateMembershipPageDocument, validateScheduling, webhookMutationId };