import * as z from "zod/v4-mini"; import { ClosedEnum } from "../../types/enums.js"; import { BillingCadence } from "./billing-cadence.js"; import { BillingPeriod } from "./billing-period.js"; import { FilterCondition, FilterCondition$Outbound } from "./filter-condition.js"; import { SortCondition, SortCondition$Outbound } from "./sort-condition.js"; import { Status } from "./status.js"; import { SubscriptionStatus } from "./subscription-status.js"; import { SubscriptionType } from "./subscription-type.js"; export declare const SubscriptionFilterOrder: { readonly Asc: "asc"; readonly Desc: "desc"; }; export type SubscriptionFilterOrder = ClosedEnum; export type SubscriptionFilter = { /** * ActiveAt filters subscriptions that are active at the given time */ activeAt?: Date | undefined; /** * BillingCadence filters by billing cadence */ billingCadence?: Array | undefined; /** * BillingPeriod filters by billing period */ billingPeriod?: Array | undefined; /** * CustomerID filters by customer ID */ customerId?: string | undefined; /** * CustomerIDs filters by customer IDs */ customerIds?: Array | undefined; /** * EffectiveDateForUpdate selects subscriptions that need a billing-period pass on or before this time: * * @remarks * current_period_end <= date OR (cancel_at IS NOT NULL AND cancel_at <= date). * When nil, period/cancel cutoff logic is not applied by this field (see TimeRangeFilter for legacy period-end filtering). */ effectiveDateForUpdate?: string | undefined; endTime?: Date | undefined; expand?: string | undefined; /** * ExternalCustomerID filters by external customer ID */ externalCustomerId?: string | undefined; filters?: Array | undefined; /** * InvoicingCustomerIDs filters by invoicing customer ID */ invoicingCustomerIds?: Array | undefined; limit?: number | undefined; offset?: number | undefined; order?: SubscriptionFilterOrder | undefined; /** * ParentSubscriptionIDs filters by parent subscription IDs */ parentSubscriptionIds?: Array | undefined; /** * PlanID filters by plan ID */ planId?: string | undefined; sort?: Array | undefined; startTime?: Date | undefined; status?: Status | undefined; subscriptionIds?: Array | undefined; /** * SubscriptionStatus filters by subscription status */ subscriptionStatus?: Array | undefined; /** * SubscriptionType filters by subscription type */ subscriptionType?: Array | undefined; /** * TrialEndDueLTE, when set, restricts to subscriptions with trial_end not nil and trial_end <= trial_end_due_lte. * * @remarks * Use with subscription_status trialing for trial-end cron processing. */ trialEndDueLte?: Date | undefined; /** * WithCouponAssociations eager-loads coupon associations and their coupons. * * @remarks * * Kept separate from WithLineItems because the coupon_associations table has no * index leading with subscription_id, so Ent's edge load degrades to a full table * scan. Only set it when the response actually surfaces the associations; the * service layer back-fills it from expand="coupon_associations". */ withCouponAssociations?: boolean | undefined; /** * WithLineItems includes line items in the response. * * @remarks * * Deprecated: use expand="subscription_line_items" instead. Retained for * backwards compatibility and for internal callers that need to force-disable * line item loading (set to false). The service layer ORs this with the * expand check before invoking the repository. */ withLineItems?: boolean | undefined; }; /** @internal */ export declare const SubscriptionFilterOrder$outboundSchema: z.ZodMiniEnum; /** @internal */ export type SubscriptionFilter$Outbound = { active_at?: string | undefined; billing_cadence?: Array | undefined; billing_period?: Array | undefined; customer_id?: string | undefined; customer_ids?: Array | undefined; effective_date_for_update?: string | undefined; end_time?: string | undefined; expand?: string | undefined; external_customer_id?: string | undefined; filters?: Array | undefined; invoicing_customer_ids?: Array | undefined; limit?: number | undefined; offset?: number | undefined; order?: string | undefined; parent_subscription_ids?: Array | undefined; plan_id?: string | undefined; sort?: Array | undefined; start_time?: string | undefined; status?: string | undefined; subscription_ids?: Array | undefined; subscription_status?: Array | undefined; subscription_type?: Array | undefined; trial_end_due_lte?: string | undefined; with_coupon_associations?: boolean | undefined; with_line_items?: boolean | undefined; }; /** @internal */ export declare const SubscriptionFilter$outboundSchema: z.ZodMiniType; export declare function subscriptionFilterToJSON(subscriptionFilter: SubscriptionFilter): string; //# sourceMappingURL=subscription-filter.d.ts.map