@odla-ai/chapter 0.35.0 → 0.36.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.
@@ -43,18 +43,21 @@ interface ChapterCopy {
43
43
  */
44
44
  payment: TextFields<"setupFailed" | "preparing" | "pending" | "processing" | "payAndContinue" | "incomplete" | "consent">;
45
45
  done: TextFields<"label" | "calendarInvite" | "memberArea">;
46
+ accepted: TextFields<"label" | "body">;
47
+ gift: TextFields<"chooseSelf" | "optionsLabel" | "label" | "body" | "save" | "rotate" | "rotateFailed">;
46
48
  };
47
49
  members: {
48
50
  loadFailed: string;
49
51
  account: TextFields<"signOut" | "adminConsole">;
50
52
  provisional: TextFields<"cardLabel" | "applicationNeeded" | "applicationNeededBody" | "apply" | "refunded" | "refundedBody" | "active" | "renews" | "introductionCall" | "calendarInvite" | "joinCall" | "bookCall" | "bookCallBody" | "chooseTime">;
51
53
  full: TextFields<"welcome">;
54
+ gifts: TextFields<"title" | "body" | "noneAvailable" | "paid" | "saveCode" | "purchases" | "noPurchases" | "pending" | "redeemed" | "expired" | "revoked" | "rotate" | "rotated" | "rotateFailed" | "redeemTitle" | "code" | "redeem" | "redeemFailed">;
52
55
  reschedule: TextFields<"changeTime" | "unavailable" | "loadFailed" | "slotGone" | "loading" | "noTimes" | "rescheduling" | "keepTime">;
53
56
  };
54
57
  admin: {
55
58
  auth: TextFields<"checking" | "notAuthorized" | "accountNotAuthorized" | "thisAccount" | "signOut" | "loading" | "signInNotConfigured" | "missingPublishableKey" | "noWorkspaces" | "signInTagline">;
56
59
  shell: TextFields<"adminRole" | "adminConsole" | "adminName" | "navigationLabel">;
57
- workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "network" | "portfolio" | "settings" | "calendar" | "email" | "chapters" | "formations" | "dealFlow" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel" | "portfolioViewsLabel">;
60
+ workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "admission" | "network" | "portfolio" | "settings" | "calendar" | "email" | "chapters" | "formations" | "dealFlow" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel" | "portfolioViewsLabel">;
58
61
  dashboard: TextFields<"loading" | "loadFailed" | "upcomingCalls" | "callsNeedAttention" | "noUpcomingCalls" | "drift" | "open" | "meet" | "applications" | "newMembers" | "newMembersUnavailable" | "revenueAdded" | "revenue" | "revenueUnavailable" | "pipeline" | "pipelineLabel" | "thisWeek" | "noChange" | "activeMemberships" | "annualRunRate" | "testMode">;
59
62
  billing: TextFields<"loading" | "loadFailed" | "notConfigured" | "active" | "annualized" | "renewingSoon" | "pastDue" | "subscriptions" | "testMode" | "truncated" | "name" | "email" | "application" | "subscription" | "cancelling" | "amount" | "renews">;
60
63
  availability: TextFields<"loading" | "loadFailed" | "saved" | "title" | "days" | "startHour" | "endHour" | "slotMinutes" | "minNoticeHours" | "windowDays" | "timezone" | "summaryTemplate" | "save"> & {
@@ -62,6 +65,7 @@ interface ChapterCopy {
62
65
  };
63
66
  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">;
64
67
  meetings: TextFields<"loading" | "loadFailed" | "cancelConfirm" | "newStartPrompt" | "parseFailed" | "agenda" | "empty" | "unknown" | "drift" | "meet" | "reschedule" | "cancel">;
68
+ admission: TextFields<"title" | "description" | "email" | "decision" | "expires" | "note" | "waive" | "require" | "add" | "ledger" | "loading" | "consumed" | "revoked" | "expired" | "active" | "local" | "parent" | "revoke">;
65
69
  network: AdminNetworkCopy;
66
70
  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">;
67
71
  };
@@ -251,6 +255,13 @@ interface ChapterDb {
251
255
  value: string | number | boolean;
252
256
  }>[], opts?: {
253
257
  mutationId?: string;
258
+ guards?: Array<{
259
+ ns: string;
260
+ id: string;
261
+ exists: boolean;
262
+ equals?: Record<string, unknown>;
263
+ absent?: string[];
264
+ }>;
254
265
  }): Promise<{
255
266
  txId: number;
256
267
  duplicate: boolean;
@@ -259,7 +270,7 @@ interface ChapterDb {
259
270
  get(name: string): Promise<string>;
260
271
  };
261
272
  }
262
- /** The scalar kinds an odla-db attribute can hold. */
273
+ /** Scalar kinds accepted by the Chapter schema adapter. */
263
274
  type AttrType = "string" | "number" | "boolean" | "json";
264
275
  /** One odla-db attribute: its type and index/uniqueness/optionality flags. */
265
276
  interface Attr {
@@ -759,6 +770,37 @@ interface MembershipPageDocument {
759
770
  footnoteMarkdown?: string;
760
771
  }
761
772
 
773
+ /** Current nested gift-catalog version inside signup-control. */
774
+ declare const GIFT_OFFER_CATALOG_VERSION: 1;
775
+ /** Membership tier or standalone entitlement fulfilled by redemption. */
776
+ type GiftOfferTarget = {
777
+ type: "tier";
778
+ tierId: string;
779
+ } | {
780
+ type: "entitlement";
781
+ entitlementKey: string;
782
+ };
783
+ /** Server-authored gift SKU; provider identifiers never reach public config. */
784
+ interface GiftOffer {
785
+ id: string;
786
+ target: GiftOfferTarget;
787
+ billingMode: "one_time" | "subscription";
788
+ stripePriceId: string;
789
+ priceCents: number;
790
+ currency: string;
791
+ redemptionLifetimeHours: number;
792
+ activeFrom?: number;
793
+ activeUntil?: number;
794
+ title: string;
795
+ description: string;
796
+ ctaLabel: string;
797
+ }
798
+ /** Versioned bounded collection delegated through signed signup control. */
799
+ interface GiftOfferCatalog {
800
+ schemaVersion: typeof GIFT_OFFER_CATALOG_VERSION;
801
+ offers: readonly GiftOffer[];
802
+ }
803
+
762
804
  /** Current wire-format version for complete signup-control documents. */
763
805
  declare const SIGNUP_CONTROL_SCHEMA_VERSION: 1;
764
806
  /** One authoritative membership tier in a signup-control revision. */
@@ -810,6 +852,7 @@ interface SignupControlDocument {
810
852
  policy?: SignupControlPolicy;
811
853
  scheduling?: ChapterScheduling;
812
854
  theme?: SignupControlTheme;
855
+ giftOffers?: GiftOfferCatalog;
813
856
  }
814
857
  /** Digest travels beside the document so the exact desired state is attestable. */
815
858
  interface SignupControlEnvelope {
@@ -840,6 +883,62 @@ interface SignupControlDeliveryOptions {
840
883
  /** Build and send one signed desired-state delivery. Durable retry belongs to the hub outbox. */
841
884
  declare function deliverSignupControl(options: SignupControlDeliveryOptions): Promise<SignupControlReceipt>;
842
885
 
886
+ /** Current wire version for parent-authored admission decisions. */
887
+ declare const ADMISSION_GRANTS_SCHEMA_VERSION: 1;
888
+ /** Whether an exact email can skip or must retain the Chapter interview. */
889
+ type AdmissionDecision = "waive_interview" | "require_interview";
890
+ /** One bounded admission decision. Email is PII and never enters public config. */
891
+ interface AdmissionGrantInput {
892
+ id: string;
893
+ email: string;
894
+ decision: AdmissionDecision;
895
+ note?: string;
896
+ expiresAt?: number;
897
+ }
898
+ /** Complete desired Parent state for one Chapter and environment. */
899
+ interface AdmissionGrantDocument {
900
+ schemaVersion: typeof ADMISSION_GRANTS_SCHEMA_VERSION;
901
+ revision: number;
902
+ generatedAt: number;
903
+ source: {
904
+ appId: string;
905
+ actor: string;
906
+ };
907
+ target: {
908
+ chapterId: string;
909
+ environment: string;
910
+ };
911
+ grants: readonly AdmissionGrantInput[];
912
+ }
913
+ /** Canonical desired-state document paired with its integrity digest. */
914
+ interface AdmissionGrantEnvelope {
915
+ digest: string;
916
+ document: AdmissionGrantDocument;
917
+ }
918
+ /** Chapter acknowledgement for an accepted or idempotently replayed revision. */
919
+ interface AdmissionGrantReceipt {
920
+ ok: true;
921
+ target: {
922
+ chapterId: string;
923
+ environment: string;
924
+ };
925
+ revision: number;
926
+ digest: string;
927
+ status: "accepted" | "replayed";
928
+ acknowledgedAt: number;
929
+ }
930
+
931
+ /** Inputs required to sign and deliver one Parent admission revision. */
932
+ interface AdmissionGrantDeliveryOptions {
933
+ secret: string;
934
+ sender: string;
935
+ targetUrl: string | URL;
936
+ envelope: AdmissionGrantEnvelope;
937
+ fetch?: typeof globalThis.fetch;
938
+ }
939
+ /** Deliver one signed Parent admission revision. Durable retry belongs upstream. */
940
+ declare function deliverAdmissionGrants(options: AdmissionGrantDeliveryOptions): Promise<AdmissionGrantReceipt>;
941
+
843
942
  /** Identity shared by initial HTML, response caching, and client hydration. */
844
943
  interface SignupControlThemeMetadata {
845
944
  source: "active" | "bootstrap";
@@ -910,4 +1009,4 @@ declare function chapterWorker(options: ChapterWorkerOptions): {
910
1009
  fetch(req: Request, env: ChapterEnv): Promise<Response>;
911
1010
  };
912
1011
 
913
- export { type ActiveSignupControlHtml, type ActiveSignupControlThemeOptions, type ChapterEnv, type ChapterWorkerOptions, type Route, type SignupControlDeliveryOptions, type WorkerContext, chapterWorker, createWorkerContext, deliverSignupControl, renderActiveSignupControlHtml, withActiveSignupControlTheme };
1012
+ export { type ActiveSignupControlHtml, type ActiveSignupControlThemeOptions, type AdmissionGrantDeliveryOptions, type ChapterEnv, type ChapterWorkerOptions, type Route, type SignupControlDeliveryOptions, type WorkerContext, chapterWorker, createWorkerContext, deliverAdmissionGrants, deliverSignupControl, renderActiveSignupControlHtml, withActiveSignupControlTheme };
@@ -43,18 +43,21 @@ interface ChapterCopy {
43
43
  */
44
44
  payment: TextFields<"setupFailed" | "preparing" | "pending" | "processing" | "payAndContinue" | "incomplete" | "consent">;
45
45
  done: TextFields<"label" | "calendarInvite" | "memberArea">;
46
+ accepted: TextFields<"label" | "body">;
47
+ gift: TextFields<"chooseSelf" | "optionsLabel" | "label" | "body" | "save" | "rotate" | "rotateFailed">;
46
48
  };
47
49
  members: {
48
50
  loadFailed: string;
49
51
  account: TextFields<"signOut" | "adminConsole">;
50
52
  provisional: TextFields<"cardLabel" | "applicationNeeded" | "applicationNeededBody" | "apply" | "refunded" | "refundedBody" | "active" | "renews" | "introductionCall" | "calendarInvite" | "joinCall" | "bookCall" | "bookCallBody" | "chooseTime">;
51
53
  full: TextFields<"welcome">;
54
+ gifts: TextFields<"title" | "body" | "noneAvailable" | "paid" | "saveCode" | "purchases" | "noPurchases" | "pending" | "redeemed" | "expired" | "revoked" | "rotate" | "rotated" | "rotateFailed" | "redeemTitle" | "code" | "redeem" | "redeemFailed">;
52
55
  reschedule: TextFields<"changeTime" | "unavailable" | "loadFailed" | "slotGone" | "loading" | "noTimes" | "rescheduling" | "keepTime">;
53
56
  };
54
57
  admin: {
55
58
  auth: TextFields<"checking" | "notAuthorized" | "accountNotAuthorized" | "thisAccount" | "signOut" | "loading" | "signInNotConfigured" | "missingPublishableKey" | "noWorkspaces" | "signInTagline">;
56
59
  shell: TextFields<"adminRole" | "adminConsole" | "adminName" | "navigationLabel">;
57
- workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "network" | "portfolio" | "settings" | "calendar" | "email" | "chapters" | "formations" | "dealFlow" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel" | "portfolioViewsLabel">;
60
+ workspaces: TextFields<"dashboard" | "overview" | "billing" | "people" | "admission" | "network" | "portfolio" | "settings" | "calendar" | "email" | "chapters" | "formations" | "dealFlow" | "dashboardViewsLabel" | "settingsViewsLabel" | "collectionsLabel" | "portfolioViewsLabel">;
58
61
  dashboard: TextFields<"loading" | "loadFailed" | "upcomingCalls" | "callsNeedAttention" | "noUpcomingCalls" | "drift" | "open" | "meet" | "applications" | "newMembers" | "newMembersUnavailable" | "revenueAdded" | "revenue" | "revenueUnavailable" | "pipeline" | "pipelineLabel" | "thisWeek" | "noChange" | "activeMemberships" | "annualRunRate" | "testMode">;
59
62
  billing: TextFields<"loading" | "loadFailed" | "notConfigured" | "active" | "annualized" | "renewingSoon" | "pastDue" | "subscriptions" | "testMode" | "truncated" | "name" | "email" | "application" | "subscription" | "cancelling" | "amount" | "renews">;
60
63
  availability: TextFields<"loading" | "loadFailed" | "saved" | "title" | "days" | "startHour" | "endHour" | "slotMinutes" | "minNoticeHours" | "windowDays" | "timezone" | "summaryTemplate" | "save"> & {
@@ -62,6 +65,7 @@ interface ChapterCopy {
62
65
  };
63
66
  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">;
64
67
  meetings: TextFields<"loading" | "loadFailed" | "cancelConfirm" | "newStartPrompt" | "parseFailed" | "agenda" | "empty" | "unknown" | "drift" | "meet" | "reschedule" | "cancel">;
68
+ admission: TextFields<"title" | "description" | "email" | "decision" | "expires" | "note" | "waive" | "require" | "add" | "ledger" | "loading" | "consumed" | "revoked" | "expired" | "active" | "local" | "parent" | "revoke">;
65
69
  network: AdminNetworkCopy;
66
70
  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">;
67
71
  };
@@ -251,6 +255,13 @@ interface ChapterDb {
251
255
  value: string | number | boolean;
252
256
  }>[], opts?: {
253
257
  mutationId?: string;
258
+ guards?: Array<{
259
+ ns: string;
260
+ id: string;
261
+ exists: boolean;
262
+ equals?: Record<string, unknown>;
263
+ absent?: string[];
264
+ }>;
254
265
  }): Promise<{
255
266
  txId: number;
256
267
  duplicate: boolean;
@@ -259,7 +270,7 @@ interface ChapterDb {
259
270
  get(name: string): Promise<string>;
260
271
  };
261
272
  }
262
- /** The scalar kinds an odla-db attribute can hold. */
273
+ /** Scalar kinds accepted by the Chapter schema adapter. */
263
274
  type AttrType = "string" | "number" | "boolean" | "json";
264
275
  /** One odla-db attribute: its type and index/uniqueness/optionality flags. */
265
276
  interface Attr {
@@ -759,6 +770,37 @@ interface MembershipPageDocument {
759
770
  footnoteMarkdown?: string;
760
771
  }
761
772
 
773
+ /** Current nested gift-catalog version inside signup-control. */
774
+ declare const GIFT_OFFER_CATALOG_VERSION: 1;
775
+ /** Membership tier or standalone entitlement fulfilled by redemption. */
776
+ type GiftOfferTarget = {
777
+ type: "tier";
778
+ tierId: string;
779
+ } | {
780
+ type: "entitlement";
781
+ entitlementKey: string;
782
+ };
783
+ /** Server-authored gift SKU; provider identifiers never reach public config. */
784
+ interface GiftOffer {
785
+ id: string;
786
+ target: GiftOfferTarget;
787
+ billingMode: "one_time" | "subscription";
788
+ stripePriceId: string;
789
+ priceCents: number;
790
+ currency: string;
791
+ redemptionLifetimeHours: number;
792
+ activeFrom?: number;
793
+ activeUntil?: number;
794
+ title: string;
795
+ description: string;
796
+ ctaLabel: string;
797
+ }
798
+ /** Versioned bounded collection delegated through signed signup control. */
799
+ interface GiftOfferCatalog {
800
+ schemaVersion: typeof GIFT_OFFER_CATALOG_VERSION;
801
+ offers: readonly GiftOffer[];
802
+ }
803
+
762
804
  /** Current wire-format version for complete signup-control documents. */
763
805
  declare const SIGNUP_CONTROL_SCHEMA_VERSION: 1;
764
806
  /** One authoritative membership tier in a signup-control revision. */
@@ -810,6 +852,7 @@ interface SignupControlDocument {
810
852
  policy?: SignupControlPolicy;
811
853
  scheduling?: ChapterScheduling;
812
854
  theme?: SignupControlTheme;
855
+ giftOffers?: GiftOfferCatalog;
813
856
  }
814
857
  /** Digest travels beside the document so the exact desired state is attestable. */
815
858
  interface SignupControlEnvelope {
@@ -840,6 +883,62 @@ interface SignupControlDeliveryOptions {
840
883
  /** Build and send one signed desired-state delivery. Durable retry belongs to the hub outbox. */
841
884
  declare function deliverSignupControl(options: SignupControlDeliveryOptions): Promise<SignupControlReceipt>;
842
885
 
886
+ /** Current wire version for parent-authored admission decisions. */
887
+ declare const ADMISSION_GRANTS_SCHEMA_VERSION: 1;
888
+ /** Whether an exact email can skip or must retain the Chapter interview. */
889
+ type AdmissionDecision = "waive_interview" | "require_interview";
890
+ /** One bounded admission decision. Email is PII and never enters public config. */
891
+ interface AdmissionGrantInput {
892
+ id: string;
893
+ email: string;
894
+ decision: AdmissionDecision;
895
+ note?: string;
896
+ expiresAt?: number;
897
+ }
898
+ /** Complete desired Parent state for one Chapter and environment. */
899
+ interface AdmissionGrantDocument {
900
+ schemaVersion: typeof ADMISSION_GRANTS_SCHEMA_VERSION;
901
+ revision: number;
902
+ generatedAt: number;
903
+ source: {
904
+ appId: string;
905
+ actor: string;
906
+ };
907
+ target: {
908
+ chapterId: string;
909
+ environment: string;
910
+ };
911
+ grants: readonly AdmissionGrantInput[];
912
+ }
913
+ /** Canonical desired-state document paired with its integrity digest. */
914
+ interface AdmissionGrantEnvelope {
915
+ digest: string;
916
+ document: AdmissionGrantDocument;
917
+ }
918
+ /** Chapter acknowledgement for an accepted or idempotently replayed revision. */
919
+ interface AdmissionGrantReceipt {
920
+ ok: true;
921
+ target: {
922
+ chapterId: string;
923
+ environment: string;
924
+ };
925
+ revision: number;
926
+ digest: string;
927
+ status: "accepted" | "replayed";
928
+ acknowledgedAt: number;
929
+ }
930
+
931
+ /** Inputs required to sign and deliver one Parent admission revision. */
932
+ interface AdmissionGrantDeliveryOptions {
933
+ secret: string;
934
+ sender: string;
935
+ targetUrl: string | URL;
936
+ envelope: AdmissionGrantEnvelope;
937
+ fetch?: typeof globalThis.fetch;
938
+ }
939
+ /** Deliver one signed Parent admission revision. Durable retry belongs upstream. */
940
+ declare function deliverAdmissionGrants(options: AdmissionGrantDeliveryOptions): Promise<AdmissionGrantReceipt>;
941
+
843
942
  /** Identity shared by initial HTML, response caching, and client hydration. */
844
943
  interface SignupControlThemeMetadata {
845
944
  source: "active" | "bootstrap";
@@ -910,4 +1009,4 @@ declare function chapterWorker(options: ChapterWorkerOptions): {
910
1009
  fetch(req: Request, env: ChapterEnv): Promise<Response>;
911
1010
  };
912
1011
 
913
- export { type ActiveSignupControlHtml, type ActiveSignupControlThemeOptions, type ChapterEnv, type ChapterWorkerOptions, type Route, type SignupControlDeliveryOptions, type WorkerContext, chapterWorker, createWorkerContext, deliverSignupControl, renderActiveSignupControlHtml, withActiveSignupControlTheme };
1012
+ export { type ActiveSignupControlHtml, type ActiveSignupControlThemeOptions, type AdmissionGrantDeliveryOptions, type ChapterEnv, type ChapterWorkerOptions, type Route, type SignupControlDeliveryOptions, type WorkerContext, chapterWorker, createWorkerContext, deliverAdmissionGrants, deliverSignupControl, renderActiveSignupControlHtml, withActiveSignupControlTheme };