Skip to content

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 06 Oct 16:04
· 197 commits to main since this release
e60e48c

Added

  • actionRoles on the pricing item's lib/plan-card-config.tsx and the
    billing-settings item's lib/credit-bundle-config.tsx: the workspace
    roles shown a plan's or a bundle's other ways to pay (default
    ["owner"]). Bind it to paymentPollConfig.payerRoles so the pages
    offer the QR payment to the roles its server action accepts.
  • PaymentProvider.callbackResponse({ settled }): the answer a provider
    expects to its callback. The payment-poll item's callback route returns
    it when the provider has one, and its JSON summary otherwise.

Changed

  • PricingContent, PlanCard and CreditBundles take the caller's role
    instead of a canCheckout flag. Card checkout stays owner-only; an
    admin or member sees the bundles on billing settings when
    actionRoles includes their role.
  • A local invoice is recorded before its provider is asked. openLocalInvoice
    writes the payments row as opening, hands its id to
    createPayment as the new paymentId parameter, and fills in the
    provider's invoice_id and expires_at from the answer; a provider that
    refuses leaves the row failed. A provider can use paymentId as its
    merchant-side invoice number or in its callback URL, and
    invoiceIdFromCallback may return either id.
  • An invoice's expiry is kept and acted on. settleLocalInvoice cancels an
    invoice the provider still reports unpaid LOCAL_INVOICE_EXPIRY_GRACE_MS
    (15 minutes) after its expiresAt and marks it failed, and
    settlePendingLocalInvoices keeps settling an invoice with a recorded
    expiry until then rather than only for a day after it was opened.
  • A local invoice keeps what it was sold for. openLocalInvoice takes the
    offer's grant and stores it in the new payments.grant_terms, and
    settleLocalInvoice applies that grant rather than asking fulfil,
    which now decides only for an invoice opened without one. An offer
    changed or removed after the invoice was opened no longer changes or
    blocks what a paid invoice grants. The payment-poll item's
    startLocalPayment passes the grant.
  • Payment.invoiceId (the payments row type) is string | null: a row
    is opening, with no invoice id yet, while its provider is asked. Code
    that reads payments directly checks for it.
  • Migrations 0005_local_invoice_expiry (payments.invoice_id nullable,
    payments.expires_at added) and 0006_local_invoice_grant
    (payments.grant_terms added). Nothing is renamed or removed, so
    intelligo migrate can run ahead of the deploy.

Upgrading

Run intelligo migrate, then intelligo sync pricing billing-settings payment-poll to take the new pages and route; bind actionRoles in
lib/plan-card-config.tsx and lib/credit-bundle-config.tsx if a role
other than the owner pays locally.