@odla-ai/chapter 0.54.2 → 0.55.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
@@ -1551,6 +1551,21 @@ declare const MEMBERSHIP_AUTHORITY_PATH = "/api/membership-authority";
1551
1551
  */
1552
1552
  declare function createMembershipAuthorityHandler(options: MembershipAuthorityHandlerOptions): (req: Request) => Promise<Response>;
1553
1553
 
1554
+ /** The optional recipient selected before the applicant consents to payment. */
1555
+ interface CheckoutNamedSeatSelection {
1556
+ recipientName: string;
1557
+ recipientEmail: string;
1558
+ }
1559
+ /** Authority-owned provider allocation for the seat on the initial subscription. */
1560
+ interface CheckoutNamedSeat extends CheckoutNamedSeatSelection {
1561
+ purchaserEmail: string;
1562
+ seatId: string;
1563
+ membershipId: string;
1564
+ recipientClaimId: string;
1565
+ priceId: string;
1566
+ amountCents: number;
1567
+ }
1568
+
1554
1569
  /** Per-tier policy overrides prevent a chapter-wide price claim leaking into another SKU. */
1555
1570
  interface TierPaymentPolicy {
1556
1571
  refundPolicyText: string;
@@ -1590,11 +1605,15 @@ interface MembershipCheckoutBindingInput extends MembershipQuoteTarget {
1590
1605
  offerDigest: string;
1591
1606
  quoteDigest: string;
1592
1607
  priceId: string;
1608
+ namedSeat?: CheckoutNamedSeatSelection & {
1609
+ purchaserEmail: string;
1610
+ };
1593
1611
  }
1594
- /** Content-free authority receipt. It does not mean paid, approved, or entitled. */
1612
+ /** Frozen authority receipt, including any named recipient. It does not mean paid, approved, or entitled. */
1595
1613
  interface MembershipCheckoutBinding extends MembershipCheckoutBindingInput {
1596
1614
  id: string;
1597
1615
  boundAt: number;
1616
+ namedSeat?: CheckoutNamedSeat;
1598
1617
  }
1599
1618
  /** Stable per-application binding identity, separate from an individual offer generation. */
1600
1619
  declare function membershipCheckoutBindingId(input: MembershipQuoteTarget): Promise<string>;
@@ -1604,7 +1623,7 @@ declare function verifyMembershipCheckoutBinding(value: unknown, input: Membersh
1604
1623
  * Replays preserve an already-bound offer after its issuance window ends.
1605
1624
  * A different offer/Price/consent for the same application is never a second purchase.
1606
1625
  */
1607
- declare function bindMembershipCheckout(db: ChapterDb, input: MembershipCheckoutBindingInput, now: number): Promise<MembershipCheckoutBinding>;
1626
+ declare function bindMembershipCheckout(db: ChapterDb, input: MembershipCheckoutBindingInput, now: number, seatPriceId?: string): Promise<MembershipCheckoutBinding>;
1608
1627
 
1609
1628
  /** References only. Money facts must already exist in the verified network Stripe event log. */
1610
1629
  interface ConfirmMembershipPaymentInput extends MembershipQuoteTarget {
package/dist/index.d.ts CHANGED
@@ -1551,6 +1551,21 @@ declare const MEMBERSHIP_AUTHORITY_PATH = "/api/membership-authority";
1551
1551
  */
1552
1552
  declare function createMembershipAuthorityHandler(options: MembershipAuthorityHandlerOptions): (req: Request) => Promise<Response>;
1553
1553
 
1554
+ /** The optional recipient selected before the applicant consents to payment. */
1555
+ interface CheckoutNamedSeatSelection {
1556
+ recipientName: string;
1557
+ recipientEmail: string;
1558
+ }
1559
+ /** Authority-owned provider allocation for the seat on the initial subscription. */
1560
+ interface CheckoutNamedSeat extends CheckoutNamedSeatSelection {
1561
+ purchaserEmail: string;
1562
+ seatId: string;
1563
+ membershipId: string;
1564
+ recipientClaimId: string;
1565
+ priceId: string;
1566
+ amountCents: number;
1567
+ }
1568
+
1554
1569
  /** Per-tier policy overrides prevent a chapter-wide price claim leaking into another SKU. */
1555
1570
  interface TierPaymentPolicy {
1556
1571
  refundPolicyText: string;
@@ -1590,11 +1605,15 @@ interface MembershipCheckoutBindingInput extends MembershipQuoteTarget {
1590
1605
  offerDigest: string;
1591
1606
  quoteDigest: string;
1592
1607
  priceId: string;
1608
+ namedSeat?: CheckoutNamedSeatSelection & {
1609
+ purchaserEmail: string;
1610
+ };
1593
1611
  }
1594
- /** Content-free authority receipt. It does not mean paid, approved, or entitled. */
1612
+ /** Frozen authority receipt, including any named recipient. It does not mean paid, approved, or entitled. */
1595
1613
  interface MembershipCheckoutBinding extends MembershipCheckoutBindingInput {
1596
1614
  id: string;
1597
1615
  boundAt: number;
1616
+ namedSeat?: CheckoutNamedSeat;
1598
1617
  }
1599
1618
  /** Stable per-application binding identity, separate from an individual offer generation. */
1600
1619
  declare function membershipCheckoutBindingId(input: MembershipQuoteTarget): Promise<string>;
@@ -1604,7 +1623,7 @@ declare function verifyMembershipCheckoutBinding(value: unknown, input: Membersh
1604
1623
  * Replays preserve an already-bound offer after its issuance window ends.
1605
1624
  * A different offer/Price/consent for the same application is never a second purchase.
1606
1625
  */
1607
- declare function bindMembershipCheckout(db: ChapterDb, input: MembershipCheckoutBindingInput, now: number): Promise<MembershipCheckoutBinding>;
1626
+ declare function bindMembershipCheckout(db: ChapterDb, input: MembershipCheckoutBindingInput, now: number, seatPriceId?: string): Promise<MembershipCheckoutBinding>;
1608
1627
 
1609
1628
  /** References only. Money facts must already exist in the verified network Stripe event log. */
1610
1629
  interface ConfirmMembershipPaymentInput extends MembershipQuoteTarget {