import type { components, paths } from '../generated/openapi.js'; import type { RequestOptions } from '../types.js'; import { BaseResource } from './base.js'; export type PreOrder = components['schemas']['PreOrder']; export type PreOrderStatus = components['schemas']['PreOrderStatus']; export type PreOrderListData = components['schemas']['PreOrderList']['data']; export type CreatePreOrderBody = NonNullable['content']['application/json']; export type ListPreOrdersQuery = NonNullable; export declare class PreOrdersResource extends BaseResource { /** * `POST /v1/pre-orders` — place a pre-order for a rental tier with no * in-stock inventory. Set `inbound_only: true` to request the inbound-only * rental variant. Returns a `provisioning` pre-order; ops procures the * hardware and the partner is notified via the `pre_order.fulfilled` webhook * when a matching line is ready. Direct customers get a Stripe * `stripe_client_secret` to confirm the first-month charge; wholesale * partners are billed EOM (no per-line Stripe sub). */ create(body: CreatePreOrderBody, opts?: RequestOptions): Promise; /** * `POST /v1/pre-orders/{id}/confirm` — confirm a `draft` pre-order. The * binding step: engages the one-month commitment (full month, no proration) * and triggers procurement (mints the provisioning line + fulfillment task, * notifies ops, and for direct customers returns the first-month * `stripe_client_secret`). Only a draft can be confirmed. */ confirm(id: string, opts?: RequestOptions): Promise; /** * `GET /v1/pre-orders` — returns ONE PAGE of the caller's pre-orders. * * The endpoint is cursor-paginated; this method is not. Unlike `messages.list` and `chats.list`, * which return an `AsyncIterable` via `paginate()`, this hands back a single page plus `has_more` * / `next_cursor` for the caller to drive. Saying only "cursor-paginated" was true of the ENDPOINT * and false of the METHOD, and a partner reading the docstring alone writes a `for await` and gets * a runtime `TypeError` — the same class of break §5.2 was corrected for (WHA-2278). * * Iterate it yourself by passing the returned `next_cursor` back in `query.cursor` until * `has_more` is false. */ list(query?: ListPreOrdersQuery, opts?: RequestOptions): Promise; /** `GET /v1/pre-orders/{id}` — fetch a single pre-order by id. */ get(id: string, opts?: RequestOptions): Promise; /** * `POST /v1/pre-orders/{id}/cancel` — cancel a pre-order before it is * fulfilled. Refunds the Stripe payment intent (if charged) and releases the * procurement task. No-op on an already-cancelled / fulfilled pre-order. */ cancel(id: string, opts?: RequestOptions): Promise; } //# sourceMappingURL=preorders.d.ts.map