Add default_plan_ladder_id with a forward data migration and update the runtime to resolve the ladder's rank-0 tier at use-time. Regenerate sqlc, update auto-provisioning, ReapplyDefaultsForPool, operator UI and tests; add GetTierByLadderRank and pool/provision query helpers. Add a CSP-safe confirm-action modal and wire operator actions to it. Close plan-sole-writer safety gaps and serialize IssueGrant with a FOR UPDATE pool lock to prevent ladder races.
78 lines
5.2 KiB
Go
78 lines
5.2 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
// versions:
|
|
// sqlc v1.29.0
|
|
|
|
package billing
|
|
|
|
import (
|
|
"context"
|
|
"database/sql"
|
|
)
|
|
|
|
type Querier interface {
|
|
CreateBillingAccount(ctx context.Context, arg CreateBillingAccountParams) (Account, error)
|
|
CreateInvoice(ctx context.Context, arg CreateInvoiceParams) (Invoice, error)
|
|
CreateInvoiceLineItem(ctx context.Context, arg CreateInvoiceLineItemParams) (InvoiceLineItem, error)
|
|
CreatePayment(ctx context.Context, arg CreatePaymentParams) (Payment, error)
|
|
CreatePaymentMethod(ctx context.Context, arg CreatePaymentMethodParams) (PaymentMethod, error)
|
|
CreatePlanLadder(ctx context.Context, arg CreatePlanLadderParams) (PlanLadder, error)
|
|
CreatePlanLadderTier(ctx context.Context, arg CreatePlanLadderTierParams) (PlanLadderTier, error)
|
|
CreatePrice(ctx context.Context, arg CreatePriceParams) (Price, error)
|
|
CreateProduct(ctx context.Context, arg CreateProductParams) (Product, error)
|
|
CreateSubscription(ctx context.Context, arg CreateSubscriptionParams) (Subscription, error)
|
|
CreateSubscriptionChange(ctx context.Context, arg CreateSubscriptionChangeParams) (SubscriptionChange, error)
|
|
CreateSubscriptionItem(ctx context.Context, arg CreateSubscriptionItemParams) (SubscriptionItem, error)
|
|
DeletePlanLadder(ctx context.Context, planLadderID string) error
|
|
DeleteTier(ctx context.Context, arg DeleteTierParams) error
|
|
GetBillingAccountByID(ctx context.Context, billingAccountID string) (Account, error)
|
|
GetInvoiceByID(ctx context.Context, invoiceID string) (Invoice, error)
|
|
GetInvoiceLineItemsByInvoiceID(ctx context.Context, invoiceID string) ([]InvoiceLineItem, error)
|
|
GetInvoicesByBillingAccountID(ctx context.Context, billingAccountID string) ([]Invoice, error)
|
|
GetPaymentByID(ctx context.Context, paymentID string) (Payment, error)
|
|
GetPaymentMethodByID(ctx context.Context, paymentMethodID string) (PaymentMethod, error)
|
|
GetPaymentMethodsByBillingAccountID(ctx context.Context, billingAccountID string) ([]PaymentMethod, error)
|
|
GetPaymentsByInvoiceID(ctx context.Context, invoiceID string) ([]Payment, error)
|
|
GetPlanLadderByID(ctx context.Context, planLadderID string) (PlanLadder, error)
|
|
GetPlanLadderByKey(ctx context.Context, ladderKey string) (PlanLadder, error)
|
|
GetPrice(ctx context.Context, priceID string) (Price, error)
|
|
GetProductByID(ctx context.Context, productID string) (Product, error)
|
|
GetProductByName(ctx context.Context, name string) (Product, error)
|
|
GetProductKind(ctx context.Context, productID string) (sql.NullString, error)
|
|
GetSubscriptionByID(ctx context.Context, subscriptionID string) (Subscription, error)
|
|
GetSubscriptionChangesBySubscriptionID(ctx context.Context, subscriptionID string) ([]SubscriptionChange, error)
|
|
GetSubscriptionItemsBySubscriptionID(ctx context.Context, subscriptionID string) ([]SubscriptionItem, error)
|
|
GetSubscriptionsByBillingAccountID(ctx context.Context, billingAccountID string) ([]Subscription, error)
|
|
GetTier(ctx context.Context, arg GetTierParams) (PlanLadderTier, error)
|
|
GetTierByLadderRank(ctx context.Context, arg GetTierByLadderRankParams) (PlanLadderTier, error)
|
|
ListActiveProducts(ctx context.Context) ([]Product, error)
|
|
ListAllProducts(ctx context.Context) ([]Product, error)
|
|
ListBillingAccounts(ctx context.Context) ([]Account, error)
|
|
ListBillingAccountsByOrgID(ctx context.Context, orgID string) ([]Account, error)
|
|
ListInvoices(ctx context.Context) ([]ListInvoicesRow, error)
|
|
ListLaddersByProduct(ctx context.Context, productID string) ([]ListLaddersByProductRow, error)
|
|
ListPayments(ctx context.Context) ([]ListPaymentsRow, error)
|
|
ListPlanLadders(ctx context.Context) ([]PlanLadder, error)
|
|
ListPlanLaddersWithRankZeroProduct(ctx context.Context) ([]ListPlanLaddersWithRankZeroProductRow, error)
|
|
ListPricesByProduct(ctx context.Context, productID string) ([]Price, error)
|
|
// Plan products are those attached to a ladder via plan_ladder_tiers
|
|
// (Doc 31 Amendment #3). product_type is NULL for plans; kind is
|
|
// derived structurally.
|
|
ListPublicPlanProducts(ctx context.Context) ([]Product, error)
|
|
ListPublicProducts(ctx context.Context) ([]Product, error)
|
|
ListSubscriptions(ctx context.Context) ([]ListSubscriptionsRow, error)
|
|
ListTiersByLadder(ctx context.Context, planLadderID string) ([]PlanLadderTier, error)
|
|
ListTiersByLadderWithProducts(ctx context.Context, planLadderID string) ([]ListTiersByLadderWithProductsRow, error)
|
|
MarkPaymentMethodDetached(ctx context.Context, paymentMethodID string) error
|
|
UpdateBillingAccountStatus(ctx context.Context, arg UpdateBillingAccountStatusParams) (Account, error)
|
|
UpdateInvoicePaid(ctx context.Context, arg UpdateInvoicePaidParams) (Invoice, error)
|
|
UpdateInvoiceStatus(ctx context.Context, arg UpdateInvoiceStatusParams) (Invoice, error)
|
|
UpdateInvoiceVoided(ctx context.Context, arg UpdateInvoiceVoidedParams) (Invoice, error)
|
|
UpdatePaymentMethodSafeFields(ctx context.Context, arg UpdatePaymentMethodSafeFieldsParams) (PaymentMethod, error)
|
|
UpdatePlanLadder(ctx context.Context, arg UpdatePlanLadderParams) (PlanLadder, error)
|
|
UpdateProduct(ctx context.Context, arg UpdateProductParams) (Product, error)
|
|
UpdateSubscriptionStatus(ctx context.Context, arg UpdateSubscriptionStatusParams) (Subscription, error)
|
|
UpdateTierRank(ctx context.Context, arg UpdateTierRankParams) (PlanLadderTier, error)
|
|
}
|
|
|
|
var _ Querier = (*Queries)(nil)
|