import type { components, paths } from '../generated/openapi.js'; import type { RequestOptions } from '../types.js'; import { BaseResource } from './base.js'; export type Line = components['schemas']['Line']; export type LineList = components['schemas']['LineList']; export type MyLines = components['schemas']['MyLines']; export type AssignLineBody = components['schemas']['AssignLine']; export type ActivateLineBody = components['schemas']['ActivateLine']; export type TransferOwnershipBody = components['schemas']['TransferOwnership']; export type PatchLineBody = components['schemas']['PatchLine']; export type MintSharedLineBody = components['schemas']['MintSharedLine']; export type LineConfigPatch = components['schemas']['LineConfigPatch']; export type LineConfigResponseData = components['schemas']['LineConfigResponseData']; export type LineHealth = components['schemas']['LineHealth']; export type QuotaSnapshot = components['schemas']['QuotaSnapshot']; export type QueueResponseData = components['schemas']['QueueResponseData']; export type ListLinesQuery = NonNullable; export type ListQueueQuery = NonNullable; export declare class LinesResource extends BaseResource { /** * `GET /v1/lines` — page/limit-paginated list of lines visible to the * caller. Returns the wire-format envelope contents (`{lines, total, * page, limit}`); not cursor-paginated like messages because the * marketplace UI shows real "page X of Y" pagination. */ list(query?: ListLinesQuery, opts?: RequestOptions): Promise; /** `GET /v1/lines/my` — list of lines owned by the calling account. */ listMine(opts?: RequestOptions): Promise; /** `GET /v1/lines/{id}` — fetch a single line by ID or `line_` public ID. */ get(id: string, opts?: RequestOptions): Promise; /** * `POST /v1/lines/assign` — atomically find an available line matching * the requested billing tier (and optional area code), reserve it, and * activate it on the calling account in a single round-trip. */ assign(body: AssignLineBody, opts?: RequestOptions): Promise; /** * `POST /v1/lines/shared` — mint a fresh **billable** virtual wholesale * line on the calling account. Wholesale-partner only in v1: a direct * (non-wholesale) customer is rejected with `PaymentRequiredError` (402), * and a scoped API key is rejected with `PermissionDeniedError` (403). * * Every call mints a NEW billable line. The auto `Idempotency-Key` * (`config.idempotencyKey: 'auto'`) only dedupes THIS call's internal * retries — it is generated per call, so two separate `mintShared()` calls * produce two keys and two billable lines. A caller-level retry MUST reuse * the same `opts.idempotencyKey`; under `idempotencyKey: 'manual'` no key is * sent at all and the caller owns it entirely. * * `body` defaults to `{}` (not `undefined`) so the request always carries * `Content-Type: application/json`; the route's body is optional and the * handler treats a missing body as `{}`. */ mintShared(body?: MintSharedLineBody, opts?: RequestOptions): Promise; /** `POST /v1/lines/{id}/reserve` — soft-hold a marketplace line for 15 minutes. */ reserve(id: string, opts?: RequestOptions): Promise; /** * `POST /v1/lines/{id}/activate` — commit a reserved line to `active`. * Wholesale partners use this as the second phase of reserve→activate (no * Stripe checkout, EOM-metered) and may pick the inbound-only rental variant * via `body.inbound_only`. Direct callers get the mock-sub test/dev shortcut * and `inbound_only` is ignored. */ activate(id: string, body?: ActivateLineBody, opts?: RequestOptions): Promise; /** `POST /v1/lines/{id}/release` — release an active or reserved line back to the pool. */ release(id: string, opts?: RequestOptions): Promise; /** * `POST /v1/lines/{id}/transfer-ownership` — reassign a line to a * different end-user account without re-pairing the underlying device. */ transferOwnership(id: string, body: TransferOwnershipBody, opts?: RequestOptions): Promise; /** * `POST /v1/lines/{id}/convert-to-test` — convert a line into a test line. * Rejected with `ConflictError` (409) for byod lines, a line you do not own, * or a line with an active subscription; a line the caller cannot see is a * masked `NotFoundError` (404). */ convertToTest(id: string, opts?: RequestOptions): Promise; /** * `POST /v1/lines/{id}/convert-from-test` — convert a test line back to a * normal line. Rejected with `ConflictError` (409) while the test line still * hosts live trials; a line the caller cannot see is a masked * `NotFoundError` (404). */ convertFromTest(id: string, opts?: RequestOptions): Promise; /** * `PATCH /v1/lines/{id}` — merge-patch the line's free-form metadata * object. Null-valued keys delete those keys from the stored object. */ patch(id: string, body: PatchLineBody, opts?: RequestOptions): Promise; /** `GET /v1/lines/{id}/quota` — the line's current 5-bucket quota snapshot. */ quota(id: string, opts?: RequestOptions): Promise; /** `GET /v1/lines/{id}/queue` — pending scheduled / queued messages for the line. */ queue(id: string, query?: ListQueueQuery, opts?: RequestOptions): Promise; /** * `GET /v1/lines/{id}/health` — BYOD-only line health snapshot. Throws * `PermissionDeniedError` (`rental_health_not_exposed`) for rental * tiers per contract §2.13. * * This is the PER-LINE health probe. For the global backend/system health * use `client.health()` (`GET /v1/health`) — a different endpoint on the * client itself, not on a line. */ health(id: string, opts?: RequestOptions): Promise; /** `GET /v1/lines/{id}/config` — effective per-line config (system defaults + overrides). */ getConfig(id: string, opts?: RequestOptions): Promise; /** * `PATCH /v1/lines/{id}/config` — partial override of the line's * config. BYOD callers can only lower limits / raise delays per * contract §2.13. */ updateConfig(id: string, body: LineConfigPatch, opts?: RequestOptions): Promise; } //# sourceMappingURL=lines.d.ts.map