import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Whop from "../../../index.js"; export declare namespace ShipmentsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * A Shipment attaches a carrier tracking number to a payment and follows the package from label creation to delivery, exposing the current delivery status and a customer-facing tracking URL. * * Use the Shipments API to list an account's shipments, retrieve one by its ID or the payment it fulfills, attach a tracking number to a payment, and update the tracking number on an existing shipment. */ export declare class ShipmentsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: ShipmentsClient.Options); /** * Lists an account's shipments. * * @param {Whop.ListShipmentsRequest} request * @param {ShipmentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.shipments.list({ * payment_id: ["pay_xxxxxxxxxxxxxx"] * }) */ list(request?: Whop.ListShipmentsRequest, requestOptions?: ShipmentsClient.RequestOptions): Promise>; /** * Attaches a carrier tracking number to a payment and begins tracking it. * * @param {Whop.CreateShipmentsRequest} request * @param {ShipmentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.shipments.create({ * payment_id: "pay_xxxxxxxxxxxxxx", * tracking_number: "1Z999AA10123456784" * }) */ create(request: Whop.CreateShipmentsRequest, requestOptions?: ShipmentsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Finds the delivery for a purchase from an account with customer tracking turned on, using exactly one order or tracking number plus the buyer's current receipt email. No authentication is required and no sign-in or session is created. Email matching ignores case and surrounding whitespace, but dots and +tags must match. Every miss returns the same 404: an unknown account, tracking turned off, a wrong number or email, an unpaid order or a purchase with nothing to ship. `shipment` is `null` while a paid physical purchase has no tracking yet. Limited to 30 attempts per five minutes per client IP. Responses are never cached or replayed with Idempotency-Key. * * @param {Whop.LookupShipmentsRequest} request * @param {ShipmentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.shipments.lookup({ * account_id: "biz_xxxxxxxxxxxxxx", * email: "marcus@shinetime.example" * }) */ lookup(request: Whop.LookupShipmentsRequest, requestOptions?: ShipmentsClient.RequestOptions): core.HttpResponsePromise; private __lookup; /** * Retrieves a shipment by its ID, or by the ID of the payment it fulfills. * * @param {Whop.RetrieveShipmentsRequest} request * @param {ShipmentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.shipments.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrieveShipmentsRequest, requestOptions?: ShipmentsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Updates a shipment's tracking number and re-tracks it with the carrier. * * @param {Whop.UpdateShipmentsRequest} request * @param {ShipmentsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.shipments.update({ * id: "id", * tracking_number: "9400111899223456789012" * }) */ update(request: Whop.UpdateShipmentsRequest, requestOptions?: ShipmentsClient.RequestOptions): core.HttpResponsePromise; private __update; }