import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient"; import * as core from "../../../../core"; import type * as Square from "../../../index"; export declare namespace TransferOrdersClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class TransferOrdersClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: TransferOrdersClient.Options); /** * Creates a new transfer order in [DRAFT](entity:TransferOrderStatus) status. A transfer order represents the intent * to move [CatalogItemVariation](entity:CatalogItemVariation)s from one [Location](entity:Location) to another. * The source and destination locations must be different and must belong to your Square account. * * In [DRAFT](entity:TransferOrderStatus) status, you can: * - Add or remove items * - Modify quantities * - Update shipping information * - Delete the entire order via [DeleteTransferOrder](api-endpoint:TransferOrders-DeleteTransferOrder) * * The request requires source_location_id and destination_location_id. * Inventory levels are not affected until the order is started via * [StartTransferOrder](api-endpoint:TransferOrders-StartTransferOrder). * * Common integration points: * - Sync with warehouse management systems * - Automate regular stock transfers * - Initialize transfers from inventory optimization systems * * Creates a [transfer_order.created](webhook:transfer_order.created) webhook event. * * @param {Square.CreateTransferOrderRequest} request * @param {TransferOrdersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.transferOrders.create({ * idempotencyKey: "65cc0586-3e82-384s-b524-3885cffd52", * transferOrder: { * sourceLocationId: "EXAMPLE_SOURCE_LOCATION_ID_123", * destinationLocationId: "EXAMPLE_DEST_LOCATION_ID_456", * expectedAt: "2025-11-09T05:00:00Z", * notes: "Example transfer order for inventory redistribution between locations", * trackingNumber: "TRACK123456789", * createdByTeamMemberId: "EXAMPLE_TEAM_MEMBER_ID_789", * lineItems: [{ * itemVariationId: "EXAMPLE_ITEM_VARIATION_ID_001", * quantityOrdered: "5" * }, { * itemVariationId: "EXAMPLE_ITEM_VARIATION_ID_002", * quantityOrdered: "3" * }] * } * }) */ create(request: Square.CreateTransferOrderRequest, requestOptions?: TransferOrdersClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Searches for transfer orders using filters. Returns a paginated list of matching * [TransferOrder](entity:TransferOrder)s sorted by creation date. * * Common search scenarios: * - Find orders for a source [Location](entity:Location) * - Find orders for a destination [Location](entity:Location) * - Find orders in a particular [TransferOrderStatus](entity:TransferOrderStatus) * * @param {Square.SearchTransferOrdersRequest} request * @param {TransferOrdersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.transferOrders.search({ * query: { * filter: { * sourceLocationIds: ["EXAMPLE_SOURCE_LOCATION_ID_123"], * destinationLocationIds: ["EXAMPLE_DEST_LOCATION_ID_456"], * statuses: ["STARTED", "PARTIALLY_RECEIVED"] * }, * sort: { * field: "UPDATED_AT", * order: "DESC" * } * }, * cursor: "eyJsYXN0X3VwZGF0ZWRfYXQiOjE3NTMxMTg2NjQ4NzN9", * limit: 10 * }) */ search(request?: Square.SearchTransferOrdersRequest, requestOptions?: TransferOrdersClient.RequestOptions): Promise>; /** * Retrieves a specific [TransferOrder](entity:TransferOrder) by ID. Returns the complete * order details including: * * - Basic information (status, dates, notes) * - Line items with ordered and received quantities * - Source and destination [Location](entity:Location)s * - Tracking information (if available) * * @param {Square.GetTransferOrdersRequest} request * @param {TransferOrdersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.transferOrders.get({ * transferOrderId: "transfer_order_id" * }) */ get(request: Square.GetTransferOrdersRequest, requestOptions?: TransferOrdersClient.RequestOptions): core.HttpResponsePromise; private __get; /** * Updates an existing transfer order. This endpoint supports sparse updates, * allowing you to modify specific fields without affecting others. * * Creates a [transfer_order.updated](webhook:transfer_order.updated) webhook event. * * @param {Square.UpdateTransferOrderRequest} request * @param {TransferOrdersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.transferOrders.update({ * transferOrderId: "transfer_order_id", * idempotencyKey: "f47ac10b-58cc-4372-a567-0e02b2c3d479", * transferOrder: { * sourceLocationId: "EXAMPLE_SOURCE_LOCATION_ID_789", * destinationLocationId: "EXAMPLE_DEST_LOCATION_ID_101", * expectedAt: "2025-11-10T08:00:00Z", * notes: "Updated: Priority transfer due to low stock at destination", * trackingNumber: "TRACK987654321", * lineItems: [{ * uid: "1", * quantityOrdered: "7" * }, { * itemVariationId: "EXAMPLE_NEW_ITEM_VARIATION_ID_003", * quantityOrdered: "2" * }, { * uid: "2", * remove: true * }] * }, * version: BigInt("1753109537351") * }) */ update(request: Square.UpdateTransferOrderRequest, requestOptions?: TransferOrdersClient.RequestOptions): core.HttpResponsePromise; private __update; /** * Deletes a transfer order in [DRAFT](entity:TransferOrderStatus) status. * Only draft orders can be deleted. Once an order is started via * [StartTransferOrder](api-endpoint:TransferOrders-StartTransferOrder), it can no longer be deleted. * * Creates a [transfer_order.deleted](webhook:transfer_order.deleted) webhook event. * * @param {Square.DeleteTransferOrdersRequest} request * @param {TransferOrdersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.transferOrders.delete({ * transferOrderId: "transfer_order_id", * version: BigInt("1000000") * }) */ delete(request: Square.DeleteTransferOrdersRequest, requestOptions?: TransferOrdersClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Cancels a transfer order in [STARTED](entity:TransferOrderStatus) or * [PARTIALLY_RECEIVED](entity:TransferOrderStatus) status. Any unreceived quantities will no * longer be receivable and will be immediately returned to the source [Location](entity:Location)'s inventory. * * Common reasons for cancellation: * - Items no longer needed at destination * - Source location needs the inventory * - Order created in error * * Creates a [transfer_order.updated](webhook:transfer_order.updated) webhook event. * * @param {Square.CancelTransferOrderRequest} request * @param {TransferOrdersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.transferOrders.cancel({ * transferOrderId: "transfer_order_id", * idempotencyKey: "65cc0586-3e82-4d08-b524-3885cffd52", * version: BigInt("1753117449752") * }) */ cancel(request: Square.CancelTransferOrderRequest, requestOptions?: TransferOrdersClient.RequestOptions): core.HttpResponsePromise; private __cancel; /** * Records receipt of [CatalogItemVariation](entity:CatalogItemVariation)s for a transfer order. * This endpoint supports partial receiving - you can receive items in multiple batches. * * For each line item, you can specify: * - Quantity received in good condition (added to destination inventory with [InventoryState](entity:InventoryState) of IN_STOCK) * - Quantity damaged during transit/handling (added to destination inventory with [InventoryState](entity:InventoryState) of WASTE) * - Quantity canceled (returned to source location's inventory) * * The order must be in [STARTED](entity:TransferOrderStatus) or [PARTIALLY_RECEIVED](entity:TransferOrderStatus) status. * Received quantities are added to the destination [Location](entity:Location)'s inventory according to their condition. * Canceled quantities are immediately returned to the source [Location](entity:Location)'s inventory. * * When all items are either received, damaged, or canceled, the order moves to * [COMPLETED](entity:TransferOrderStatus) status. * * Creates a [transfer_order.updated](webhook:transfer_order.updated) webhook event. * * @param {Square.ReceiveTransferOrderRequest} request * @param {TransferOrdersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.transferOrders.receive({ * transferOrderId: "transfer_order_id", * idempotencyKey: "EXAMPLE_IDEMPOTENCY_KEY_101", * receipt: { * lineItems: [{ * transferOrderLineUid: "1", * quantityReceived: "3", * quantityDamaged: "1", * quantityCanceled: "1" * }, { * transferOrderLineUid: "2", * quantityReceived: "2", * quantityCanceled: "1" * }] * }, * version: BigInt("1753118664873") * }) */ receive(request: Square.ReceiveTransferOrderRequest, requestOptions?: TransferOrdersClient.RequestOptions): core.HttpResponsePromise; private __receive; /** * Changes a [DRAFT](entity:TransferOrderStatus) transfer order to [STARTED](entity:TransferOrderStatus) status. * This decrements inventory at the source [Location](entity:Location) and marks it as in-transit. * * The order must be in [DRAFT](entity:TransferOrderStatus) status and have all required fields populated. * Once started, the order can no longer be deleted, but it can be canceled via * [CancelTransferOrder](api-endpoint:TransferOrders-CancelTransferOrder). * * Creates a [transfer_order.updated](webhook:transfer_order.updated) webhook event. * * @param {Square.StartTransferOrderRequest} request * @param {TransferOrdersClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.transferOrders.start({ * transferOrderId: "transfer_order_id", * idempotencyKey: "EXAMPLE_IDEMPOTENCY_KEY_789", * version: BigInt("1753109537351") * }) */ start(request: Square.StartTransferOrderRequest, requestOptions?: TransferOrdersClient.RequestOptions): core.HttpResponsePromise; private __start; }