/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */


/** OneOf type helpers */
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
type XOR<T, U> = (T | U) extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
type OneOf<T extends any[]> = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR<A, B>, ...Rest]> : never;

export interface paths {
  "/invoices/{invoiceId}/items.csv": {
    /**
     * Invoice (CSV)
     * @description Get an invoice as a CSV. Requires the [`invoices_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Invoice csv get"];
  };
  "/invoices/pending/items.csv": {
    /**
     * Pending Invoice (CSV)
     * @description Get an invoice as a CSV. Requires the [`invoices_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Invoice pending csv get"];
  };
  "/returns/{returnId}": {
    /**
     * Return
     * @description Get return. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Return get"];
    parameters: {
      path: {
        returnId: components["parameters"]["return-id.param"];
      };
    };
  };
  "/returns/{returnId}/comments": {
    /**
     * List Return Comments
     * @description List return comments. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Return comments get"];
    /**
     * Create Return Comment
     * @description Create return comment. Requires the [`returns_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Return comment create"];
    parameters: {
      path: {
        returnId: components["parameters"]["return-id.param"];
      };
    };
  };
  "/returns/{returnId}/process": {
    /**
     * Process Return
     * @description **BETA**: This endpoint is in beta and subject to change.
     *
     * Trigger processing of a return with specified products.
     *
     * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Return process"];
    parameters: {
      path: {
        returnId: components["parameters"]["return-id.param"];
      };
    };
  };
  "/returns/{returnId}/status": {
    /**
     * Return Status
     * @description Get return status. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Return status get"];
    /**
     * Update Return Status
     * @description Update return status.
     *
     * Certain status transitions trigger additional side effects to maintain data consistency:
     *
     * - Setting status to **complete** will also mark all return items as complete.
     * - Setting status to **open** from **complete** or **rejected** will reopen the return, resetting all processed/rejected items back to open, clearing pending processing info, resetting the expiration date, and marking the return as reopened. **Note:** Reopening a processed return does not reverse any refunds, exchanges, or other actions that were performed during processing.
     *
     * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
     */
    put: operations["Return status update"];
  };
  "/stores/{storeId}/admin": {
    /**
     * Navigate to Merchant Admin
     * @description Navigate to the merchant admin page.
     */
    get: operations["Merchant admin navigate"];
  };
  "/stores/{storeId}/checkout-buttons-ui": {
    /**
     * Checkout Buttons UI
     * @description Generate rendered HTML and CSS for checkout buttons.
     */
    get: operations["Checkout buttons UI"];
  };
  "/stores/{storeId}/coverage-info": {
    /**
     * Navigate to Coverage Info
     * @description Navigate to the coverage info page.
     */
    get: operations["Coverage info navigate"];
  };
  "/stores/{storeId}/coverage-products": {
    /**
     * Coverage Products
     * @description Get available coverage products.
     */
    post: operations["Coverage products"];
  };
  "/stores/{storeId}/customer-portal": {
    /**
     * Navigate to Customer Portal
     * @description Navigate to the customer portal.
     */
    get: operations["Customer portal navigate"];
  };
  "/stores/{storeId}/customer-subscriptions": {
    /**
     * Update Customer Subscriptions
     * @description Update customer subscription status for SMS and email marketing and transactional messages. If the customer with that phone number or email does not exist, it will be created. Requires the [`customers_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Customer subscriptions update"];
  };
  "/stores/{storeId}/customers": {
    /**
     * Get customer by email
     * @description Retrieve a customer profile by email address.
     *
     * The response includes the customer's name, contact information, location,
     * and any custom fields associated with the profile. Custom fields are returned
     * as `{ fieldName: value }` pairs.
     *
     * Requires the [`customers_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Customer get"];
    /**
     * Create or update customer
     * @description Create or update a customer profile. Uses the email address as the upsert
     * key — if a customer with that email exists, their profile is updated;
     * otherwise, a new customer is created.
     *
     * ## Profile fields
     * - `firstName` and `lastName` are set directly on the customer. A full
     *   display name is automatically generated from these fields.
     * - `phoneNumber` should be in E.164 format (e.g., `+12345678900`). If the
     *   number is new, it is added to the customer's contact information.
     *
     * ## Location
     * Providing `location` sets the customer's current location. Only the fields
     * you include are updated.
     *
     * ## Custom fields
     * Use `customFields` to store arbitrary key-value data on the customer (e.g.,
     * `pricing_plan`, `subscription_source`). Values can be strings, numbers, or
     * booleans. If a custom field doesn't exist yet, it is created automatically.
     *
     * Requires the [`customers_write`](/docs/api-reference/scopes) scope.
     */
    put: operations["Customer upsert"];
  };
  "/stores/{storeId}/events": {
    /**
     * Create custom event
     * @description Create a custom event to trigger flows with merchant-defined event names and properties.
     *
     * Custom events allow merchants to trigger flows based on events from their own systems.
     * Events can include custom properties that are accessible in email and SMS templates,
     * and are persisted for segmentation and historical queries.
     *
     * ## Identity Resolution
     * The API resolves customers using the following priority order:
     * 1. `customer.id` — Redo customer ObjectId (highest priority)
     * 2. `customer.email` — customer email address
     * 3. `customer.phoneNumber` — customer phone number
     *
     * At least one identifier must be provided. If no matching customer is found, one will
     * be created automatically. If `customer.id` is provided but not found, the API falls
     * back to email/phone rather than returning 404.
     *
     * ## Datetime Formatting
     * All datetime values must be formatted as ISO 8601 (RFC 3339) strings, e.g., `2026-04-02T12:00:00Z`.
     * This applies to `eventTimestamp`, any date-valued properties in `data`, and any date-valued `customFields`.
     * Strings matching this format are automatically detected and indexed as dates for segmentation.
     *
     * ## Rate Limiting
     * This endpoint is rate-limited to 100 requests per second per store.
     *
     * Requires the [`customer_events_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Custom event create"];
  };
  "/stores/{storeId}/events/bulk": {
    /**
     * Bulk create custom events
     * @description Create multiple custom events in a single request. Accepts up to 100 events per request.
     *
     * Each event is validated independently. The response includes per-event results, allowing
     * partial failures — some events may be accepted while others are rejected due to validation
     * errors.
     *
     * ## Identity Resolution
     * Each event resolves customers independently using the same priority order as the
     * single-event endpoint:
     * 1. `customer.id` — Redo customer ObjectId (highest priority)
     * 2. `customer.email` — customer email address
     * 3. `customer.phoneNumber` — customer phone number
     *
     * At least one identifier must be provided per event. If no matching customer is found,
     * one will be created automatically.
     *
     * ## Rate Limiting
     * This endpoint is rate-limited to 100 requests per second per store.
     *
     * Requires the [`customer_events_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Bulk create custom events"];
  };
  "/stores/{storeId}/inbound-shipments": {
    /**
     * List Inbound Shipments
     * @description List inbound shipments, representing inventory in transit or received at a location. Sorted by most recently updated first.
     * Requires the [`inbound_shipments_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Inbound shipments list"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
  };
  "/stores/{storeId}/inbound-shipments/{inboundShipmentId}": {
    /**
     * Get Inbound Shipment
     * @description Get a single inbound shipment by ID. Returns additional detail fields including purchase orders, transfer orders, files, volume, item discrepancies, and packing modes.
     * Requires the [`inbound_shipments_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Inbound shipment get"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        inboundShipmentId: components["parameters"]["inbound-shipment-id.param"];
      };
    };
  };
  "/stores/{storeId}/inventory-items": {
    /**
     * List Inventory Items
     * @description List in-stock inventory items. Only items with on-hand quantity greater than zero are returned. Sorted by most recently updated first.
     * Requires the [`inventory_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Inventory items list"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
  };
  "/stores/{storeId}/inventory-items/{inventoryItemId}": {
    /**
     * Get Inventory Item
     * @description Get a single in-stock inventory item by ID. Requires the [`inventory_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Inventory item get"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        inventoryItemId: components["parameters"]["inventory-item-id.param"];
      };
    };
  };
  "/stores/{storeId}/inventory-levels": {
    /**
     * List Inventory Levels
     * @description List inventory levels, representing the aggregate quantity of a product at a specific location. Sorted by most recently updated first.
     * Requires the [`inventory_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Inventory levels list"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
  };
  "/stores/{storeId}/inventory-levels/{inventoryLevelId}": {
    /**
     * Get Inventory Level
     * @description Get a single inventory level by ID. Returns additional detail fields including external IDs, creation timestamp, product UPC, and image URL.
     * Requires the [`inventory_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Inventory level get"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        inventoryLevelId: components["parameters"]["inventory-level-id.param"];
      };
    };
  };
  "/stores/{storeId}/invoices": {
    /**
     * List Invoices
     * @description Get a list of invoices. Requires the [`invoices_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Invoice list"];
  };
  "/stores/{storeId}/orders": {
    /**
     * Create Order
     * @description Create a new order in the system with line items, customer information, and shipping details. Requires the [`orders_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Order create"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
  };
  "/stores/{storeId}/orders/{orderId}": {
    /**
     * Get Order
     * @description Retrieve an existing order from the system, including all fulfillments. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response. Requires the [`orders_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Order get"];
    /**
     * Delete Order
     * @description Delete an order from the system. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response. Requires the [`orders_write`](/docs/api-reference/scopes) scope.
     */
    delete: operations["Order delete"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        orderId: components["parameters"]["order-id.param"];
      };
    };
  };
  "/stores/{storeId}/orders/{orderId}/fulfillments": {
    /**
     * Create Fulfillment
     * @description Create a fulfillment for specific line items within an order, including tracking information. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response. Requires the [`orders_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Fulfillment create"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        orderId: components["parameters"]["order-id.param"];
      };
    };
  };
  "/stores/{storeId}/orders/{orderId}/fulfillments/{fulfillmentId}/shipment-status": {
    /**
     * Update Fulfillment Status
     * @description Post a shipment status update or trigger an automation event for a fulfillment.
     *
     * The status field accepts two types of values:
     *
     * **Statuses** (e.g., `in_transit`, `delivered`): Real carrier tracking statuses that update the shipment's current status. When you send these, the fulfillment's current status is updated to reflect the new state. Triggers any configured automations for that status.
     *
     * **Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Special event types that trigger automations without changing the current shipment status. The status field remains unchanged, but you can still update estimated delivery date and add tracking history entries. Use these to trigger event-based automations.
     *
     * Both statuses and events can update other fields like estimated delivery date and tracking history.
     *
     * Requires the [`orders_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Fulfillment status update"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        orderId: components["parameters"]["order-id.param"];
        fulfillmentId: components["parameters"]["fulfillment-id.param"];
      };
    };
  };
  "/stores/{storeId}/products/bulk-upload": {
    /**
     * Bulk upload products
     * @description Bulk create or update product families and their variants.
     *
     * Submit up to 1,000 product families per request, each containing up to 100 variants.
     * Products are processed asynchronously in batches. Only one bulk upload can run per store at a time.
     *
     * ## Matching Strategy
     *
     * The API uses the following priority to match incoming product families to existing records:
     *
     * 1. **`product_family_id`** — Redo product family ID (direct lookup)
     * 2. **`external_id`** — ID from your external system
     * 3. **SKU** — Matched via variant SKUs
     *
     * If no match is found, a new product family is created.
     *
     * ## Concurrency
     *
     * Only one bulk upload operation can run per store at a time. If a bulk upload is already
     * in progress, the request will return a `409 Conflict` error.
     *
     * Requires the [`products_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Products bulk upload"];
  };
  "/stores/{storeId}/return-tags": {
    /**
     * List Return Tags
     * @description List every return tag defined for the store. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Return tags list"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
  };
  "/stores/{storeId}/return-tags/{name}": {
    /**
     * Upsert Return Tag
     * @description Create a new return tag, update an existing tag's color, or rename a tag. When `newName` is set and differs from the path `name`, the rename cascades to returns and saved view filters.
     *
     * Possible 400 problem types:
     * - `com.getredo.api:return-tag/rename-precondition-failed` — the source
     *   tag does not exist, or the target name is already in use.
     *
     * - `com.getredo.api:return-tag/invalid-request` — the path `name` is
     *   missing or the request body is invalid.
     *
     * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
     */
    put: operations["Return tag upsert"];
    /**
     * Delete Return Tag
     * @description Delete a return tag. The tag is also stripped from every return and saved view filter that referenced it.
     * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
     */
    delete: operations["Return tag delete"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        name: components["parameters"]["return-tag-name.param"];
      };
    };
  };
  "/stores/{storeId}/returns": {
    /**
     * List Returns
     * @description List returns, sorted by most recent to least recent. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Returns list"];
    /**
     * Create Return
     * @description Create a return for specific order line items. Requires the [`returns_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Return create"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
  };
  "/stores/{storeId}/returns/bulk": {
    /**
     * Import Returns
     * @description Import externally-created returns into Redo. Use this endpoint when the return originates outside of Redo — a warehouse scan, an ERP, a POS system, or a partner platform.
     *
     * Products are referenced by their Redo product ID, obtained from the bulk product upload response. No order is required. Returns are created ready for warehouse intake. Supports up to 100 returns per request with per-item error reporting.
     * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Import returns"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
  };
  "/stores/{storeId}/storefront/events": {
    /**
     * Receive Storefront Events
     * @description Processes events from storefronts using Shopify pixel event schema Requires the [`storefront_events_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Storefront Event"];
  };
  "/stores/{storeId}/webhooks": {
    /**
     * List Webhooks
     * @description List webhooks for store. Requires the [`webhooks_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Webhooks list"];
    /**
     * Create or Update Webhook
     * @description Create webhook for store. Or if webhook already exists with `externalId`, update it. Requires the [`webhooks_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Webhook create"];
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
  };
  "/webhooks/{webhookId}": {
    /**
     * Webhook
     * @description Get a webhook. Requires the [`webhooks_read`](/docs/api-reference/scopes) scope.
     */
    get: operations["Webhook get"];
    /**
     * Update Webhook
     * @description Update a webhook. Requires the [`webhooks_write`](/docs/api-reference/scopes) scope.
     */
    put: operations["Webhook update"];
    /**
     * Delete Webhook
     * @description Delete a webhook. Requires the [`webhooks_write`](/docs/api-reference/scopes) scope.
     */
    delete: operations["Webhook delete"];
  };
  "/webhooks/{webhookId}/replay": {
    /**
     * Replay Webhook
     * @description Replay a webhook. Requires the [`webhooks_write`](/docs/api-reference/scopes) scope.
     */
    post: operations["Webhook replay"];
    parameters: {
      path: {
        webhookId: components["parameters"]["webhook-id.param"];
      };
    };
  };
}

export interface webhooks {
  "return": {
    /** Return event */
    post: operations["Webhook return event"];
  };
}

export interface components {
  schemas: {
    /**
     * Address
     * @description Address.
     */
    "address.schema": {
      /**
       * City
       * @description City name
       */
      city: string;
      /**
       * Country
       * @description Country code
       */
      country: string;
      /**
       * Line 1
       * @description Line 1
       */
      line1: string;
      /**
       * Line 2
       * @description Line 2
       * @default
       */
      line2?: string;
      /**
       * Postal code
       * @description Postal or ZIP code
       */
      postalCode: string;
      /**
       * State
       * @description State or province
       */
      state: string;
    };
    /**
     * Bulk Custom Event Request
     * @description Request body for sending multiple custom events in a single request.
     */
    "bulk-custom-event-request.schema": {
      /** @description Array of custom events to create. */
      events: components["schemas"]["custom-event-request.schema"][];
    };
    /**
     * Product Family Image
     * @description An image associated with a product family or variant.
     */
    "bulk-product-family-image.schema": {
      /**
       * Alt Text
       * @description Alt text for the image.
       */
      alt_text: string;
      /**
       * URL
       * Format: uri
       * @description URL of the image.
       */
      url: string;
    };
    /**
     * Product Family Option
     * @description A product option (e.g. Size, Color) with its possible values.
     */
    "bulk-product-family-option.schema": {
      /**
       * Name
       * @description Option name (e.g. "Size", "Color").
       */
      name: string;
      /**
       * Values
       * @description Possible values for this option (e.g. ["Small", "Medium", "Large"]).
       */
      values: string[];
    };
    /**
     * Bulk Product Family
     * @description A product family containing one or more variants.
     *
     * Matching priority for existing product families:
     * 1. `product_family_id` — Redo product family ID (direct lookup)
     * 2. `external_id` — ID from your external system
     * 3. SKU — Matched via variant SKUs
     * If no match is found, a new product family is created.
     */
    "bulk-product-family.schema": {
      /**
       * Description
       * @description Product family description.
       */
      description?: string;
      /**
       * External ID
       * @description Product family ID in your external system. Second-priority match.
       */
      external_id?: string;
      /**
       * Images
       * @description Images for the product family.
       */
      images?: components["schemas"]["bulk-product-family-image.schema"][];
      /**
       * Kind
       * @description Whether the product is sellable or non-sellable.
       * @default SELLABLE
       * @enum {string}
       */
      kind?: "SELLABLE" | "NON_SELLABLE";
      /**
       * Options
       * @description Product options (e.g. Size, Color) with their possible values.
       */
      options?: components["schemas"]["bulk-product-family-option.schema"][];
      /**
       * Product Family ID
       * @description Redo product family ID. Highest-priority match for updating an existing product family.
       */
      product_family_id?: string;
      /**
       * Tags
       * @description Tags for categorization.
       * @default []
       */
      tags?: string[];
      /**
       * Title
       * @description Product family title.
       */
      title: string;
      /**
       * Variants
       * @description Product variants. At least 1 and up to 100 per product family.
       */
      variants: components["schemas"]["bulk-variant.schema"][];
      /**
       * Vendor
       * @description Vendor or manufacturer name.
       */
      vendor?: string;
    };
    /**
     * Bulk Product Upload Request
     * @description Request body for bulk uploading product families and their variants.
     */
    "bulk-product-upload-request.schema": {
      /**
       * Products
       * @description Product families to create or update. Between 1 and 1000 per request.
       */
      products: components["schemas"]["bulk-product-family.schema"][];
    };
    /**
     * Bulk Product Upload Response
     * @description Response from a bulk product upload operation.
     */
    "bulk-product-upload-response.schema": {
      /**
       * Error Count
       * @description Number of product families that failed to process.
       */
      error_count: number;
      /**
       * Processed Count
       * @description Number of product families processed successfully.
       */
      processed_count: number;
      /**
       * Results
       * @description Per-product-family results.
       */
      results: (OneOf<[{
          /**
           * Product Family ID
           * @description Redo product family ID.
           */
          product_family_id: string;
          /**
           * Products
           * @description Variant results within this product family.
           */
          products: {
              /**
               * ID
               * @description Redo product ID.
               */
              id: string;
              /**
               * SKU
               * @description Product SKU.
               */
              sku: string;
            }[];
          /**
           * Status
           * @description Whether the product family was created or updated.
           * @enum {string}
           */
          status: "created" | "updated";
        }, {
          /**
           * Error
           * @description Error message describing what went wrong.
           */
          error: string;
          /**
           * Status
           * @description Indicates an error occurred.
           * @constant
           */
          status: "error";
        }]>)[];
      /**
       * Total Count
       * @description Total number of product families in the request.
       */
      total_count: number;
    };
    /** @description Import returns request body. */
    "bulk-returns-request.schema": {
      /** @description Array of returns to import (max 100). */
      returns: {
          /** @description Carrier name for the tracking number (e.g. 'USPS', 'UPS'). */
          carrier?: string;
          /** @description ISO 4217 currency code (defaults to USD). */
          currency?: string;
          /** @description Optional customer information. */
          customer?: {
            /** Format: email */
            email?: string;
            firstName?: string;
            lastName?: string;
          };
          /** @description Merchant's own return/RMA ID. Stored on the return so it's scannable at warehouse intake. */
          externalReferenceId?: string;
          /** @description Idempotency key to prevent duplicate return creation on retry. */
          idempotencyKey?: string;
          /** @description Merchant return destination address. */
          merchantAddress?: {
            /** @description City. */
            city: string;
            /** @description ISO 3166-1 alpha-2 country code. */
            country: string;
            /** @description Street address line 1. */
            line1: string;
            /** @description Street address line 2. */
            line2?: string;
            /** @description Recipient or location name. */
            name?: string;
            /** @description Phone number. */
            phone?: string;
            /** @description Postal/ZIP code. */
            postalCode?: string;
            /** @description State or province code. */
            state?: string;
          };
          /** @description Internal notes. */
          notes?: string;
          /** @description Products being returned (at least 1). */
          products: {
              /** @description Override barcode (uses catalog value if omitted). */
              barcode?: string;
              /** @description Item condition. */
              condition?: string;
              /** @description Redo product ID returned from the bulk product upload response (e.g. `prd_ABC123`). */
              productId: string;
              /** @description Override product title (uses catalog value if omitted). */
              productTitle?: string;
              /** @description Number of units to return. */
              quantity: number;
              /** @description Return reason. */
              reason?: string;
              /** @description Override SKU (uses catalog value if omitted). */
              sku?: string;
              /** @description Override variant title (uses catalog value if omitted). */
              variantTitle?: string;
            }[];
          /** @description Customer's shipping address. */
          shippingAddress?: {
            /** @description City. */
            city: string;
            /** @description ISO 3166-1 alpha-2 country code. */
            country: string;
            /** @description Street address line 1. */
            line1: string;
            /** @description Street address line 2. */
            line2?: string;
            /** @description Recipient or location name. */
            name?: string;
            /** @description Phone number. */
            phone?: string;
            /** @description Postal/ZIP code. */
            postalCode?: string;
            /** @description State or province code. */
            state?: string;
          };
          /** @description Carrier tracking number for the inbound return shipment. */
          trackingNumber?: string;
        }[];
    };
    /** @description Bulk external return creation response. */
    "bulk-returns-response.schema": {
      /** @description Number of returns that failed. */
      errorCount: number;
      /** @description Number of returns successfully created. */
      processedCount: number;
      /** @description Per-item results in the same order as the request. */
      results: ({
          /** @description Zero-based index into the request array. */
          index: number;
          /** @description ID of the created return. */
          returnId: string;
          /** @enum {string} */
          status: "created";
        } | {
          /** @description Error message. */
          error: string;
          /** @description Zero-based index into the request array. */
          index: number;
          /** @enum {string} */
          status: "error";
        })[];
      /** @description Total number of returns in the request. */
      totalCount: number;
    };
    /**
     * Bulk Variant
     * @description A product variant within a product family.
     */
    "bulk-variant.schema": {
      /**
       * Barcodes
       * @description Additional barcodes for this variant.
       */
      barcodes?: string[];
      /**
       * Currency
       * @description Currency code (e.g. "USD").
       */
      currency: string;
      /**
       * Dimension Unit
       * @description Unit of dimension measurement.
       * @enum {string}
       */
      dimension_unit?: "in" | "cm";
      /**
       * External ID
       * @description Variant ID in your external system. Used for matching if `id` is not provided.
       */
      external_id?: string;
      /**
       * Height
       * @description Height of the variant.
       */
      height?: number;
      /**
       * HS Code
       * @description Harmonized System code for customs.
       */
      hs_code?: string;
      /**
       * ID
       * @description Redo variant ID. Used for matching to an existing variant.
       */
      id?: string;
      /**
       * Images
       * @description Images specific to this variant.
       */
      images?: components["schemas"]["bulk-product-family-image.schema"][];
      /**
       * Length
       * @description Length of the variant.
       */
      length?: number;
      /**
       * Option Values
       * @description Values for each option defined on the product family, in the same order.
       */
      option_values?: string[];
      /**
       * Origin Country
       * @description Country of origin as an ISO 3166-1 alpha-2 code (e.g. "US").
       */
      origin_country?: string;
      /**
       * Price
       * @description Price in the smallest currency unit (e.g. cents for USD).
       */
      price: number;
      /**
       * SKU
       * @description Stock keeping unit. Required. Used for matching if neither `id` nor `external_id` are provided.
       */
      sku: string;
      /**
       * Title
       * @description Variant title (e.g. "Small / Blue").
       */
      title?: string;
      /**
       * UPC
       * @description Universal product code.
       */
      upc?: string;
      /**
       * Weight
       * @description Weight of the variant.
       */
      weight?: number;
      /**
       * Weight Unit
       * @description Unit of weight measurement.
       * @enum {string}
       */
      weight_unit?: "g" | "kg" | "lb" | "oz" | "t";
      /**
       * Width
       * @description Width of the variant.
       */
      width?: number;
    };
    /**
     * Comment
     * @description Comment with either message or image.
     */
    "comment.schema": OneOf<[{
      /**
       * Image
       * @description Base64-encoded image
       */
      image: string;
    }, {
      /**
       * Message
       * @description Message.
       */
      message: string;
    }]>;
    /**
     * Coverage product
     * @description Coverage product.
     */
    "coverage-product.schema": {
      /** @description Coverage. */
      coverages?: ({
          lineItems: {
              /**
               * ID
               * @description Line item ID.
               */
              id?: string;
            }[];
          /**
           * Coverage
           * @enum {unknown}
           */
          type: "shipping_failure" | "return_shipping";
        })[];
      /**
       * ID
       * @description Coverage ID.
       */
      id: string;
      /**
       * Price
       * @description Price.
       */
      price: components["schemas"]["money.schema"];
    };
    /** @description Create return request body. */
    "create-return-request.schema": {
      /** @description Return information payload. */
      data: {
        /** @description External order ID from the ecommerce platform. */
        externalOrderId: string;
        /** @description Items being returned. */
        items: ({
            /**
             * @description How the customer should be compensated for this item.
             * @enum {string}
             */
            compensation: "refund" | "store_credit";
            /** @description External line item ID from the order. */
            lineItemId: string;
            /** @description Customer-facing notes for this item. */
            notes?: string;
            /** @description Number of units to return. */
            quantity: number;
            /** @description Customer-facing return reason. */
            reason: string;
            /** @description Machine-readable reason code. */
            reasonCode?: string;
          })[];
        /** @description Optional return label and tracking details. */
        label?: {
          /** @description Carrier name. */
          carrier?: string;
          /** @description Commercial or form label URL. */
          formLabelUrl?: string;
          /** @description Provider shipment identifier to reference. */
          originalShipmentId?: string;
          /** @description Postage label URL. */
          postageLabelUrl?: string;
          /** @description Carrier tracking number. */
          trackingNumber: string;
          /** @description Public tracking URL. */
          trackingUrl?: string;
        };
        /** @description Internal merchant-side notes. */
        notes?: string;
        /** @description Ecommerce platform provider. */
        provider: string;
        /** @description Address the customer is shipping from. */
        shippingAddress: {
          city: string;
          /** @description ISO 3166-1 alpha-2 country code. */
          country: string;
          line1: string;
          line2?: string;
          postalCode: string;
          state: string;
        };
      };
      /** @description Options controlling side effects of the return creation. */
      options?: {
        /**
         * @description Whether to create RMAs with external integrations (e.g. ShipBob). Defaults to false.
         * @default false
         */
        createExternalRMAs?: boolean;
      };
    };
    /** @description Create return response body. */
    "create-return-response.schema": {
      externalRMAResponses: {
          /** @description Provider error code when external RMA creation fails. */
          errorCode?: string;
          /** @description Provider error message when external RMA creation fails. */
          errorMessage?: string;
          /** @description Name of the external integration provider. */
          integrationProvider: string;
          /** @description Whether external RMA creation succeeded. */
          success: boolean;
        }[];
      return: components["schemas"]["return-read.schema"];
    };
    /**
     * Custom Event Request
     * @description Custom event to trigger flows with merchant-defined event names and properties.
     */
    "custom-event-request.schema": {
      /** @description Customer identity and profile fields. At least one of `id`, `email`, or `phoneNumber` is required for identity resolution. */
      customer: {
        /** @description Merchant-defined customer attributes as key-value pairs. Values can be strings, numbers, or booleans. Date values should be passed as ISO 8601 strings (e.g., "2026-04-02T12:00:00Z") and are automatically detected and indexed as dates. */
        customFields?: {
          [key: string]: string | number | boolean;
        };
        /**
         * Format: email
         * @description Customer email address. Used for identity resolution.
         */
        email?: string;
        /** @description Customer first name. Applied with patch semantics — does not erase existing value if omitted. */
        firstName?: string;
        /** @description Redo customer ObjectId. Used for identity resolution. Takes priority over email and phoneNumber when provided. */
        id?: string;
        /** @description Customer last name. Applied with patch semantics — does not erase existing value if omitted. */
        lastName?: string;
        /** @description Customer location for profile enrichment. All fields are optional. */
        location?: {
          /** @description City name. */
          city?: string;
          /** @description Country name. */
          country?: string;
          /** @description ISO 3166-1 alpha-2 country code (e.g., "US", "GB"). */
          countryCode?: string;
          /** @description IANA time zone identifier (e.g., "America/New_York"). */
          ianaTimeZoneName?: string;
          /** @description Geographic latitude coordinate. */
          latitude?: number;
          /** @description Geographic longitude coordinate. */
          longitude?: number;
          /** @description Postal or ZIP code. */
          postalCode?: string;
          /** @description State or province name. */
          state?: string;
          /** @description State or province abbreviation (e.g., "CA", "NY"). */
          stateCode?: string;
          /** @description Primary street address. */
          street1?: string;
          /** @description Secondary address line (apartment, suite, etc.). */
          street2?: string;
        };
        /** @description Customer phone number in E.164 format. Used for identity resolution. */
        phoneNumber?: string;
      };
      /**
       * @description Custom properties for this event (must not exceed 400 properties). The size of the event payload must not exceed 5 MB, and each string cannot be larger than 100 KB. For a full list of data limits on event payloads, see [Limitations](/docs/guides/integrations/custom-events#rate-limits).
       *
       * Note any top-level property that is not an object can be used to create segments. The `$extra` property records any non-segmentable values that can be referenced later, e.g., HTML templates are useful on a segment but are not used to create a segment.
       */
      data?: {
        /** @description Non-segmentable metadata bucket. Values inside `$extra` are stored on the event but excluded from segmentation indexes. Unlike top-level data properties, values of 0, null, and empty string are NOT stripped inside `$extra`. Use this for large text, debug info, nested objects, arrays, or any data you want to reference in templates but not segment on. */
        $extra?: {
          [key: string]: unknown;
        };
        [key: string]: (string | number | boolean) | undefined;
      };
      /** @description The name of the custom event (e.g., 'User Registered', 'Loyalty Reward Earned'). */
      eventName: string;
      /**
       * Format: date-time
       * @description ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
       */
      eventTimestamp?: string;
      /** @description Merchant-controlled deduplication key (1-255 characters). If provided, subsequent events with the same uniqueId for the same store are silently deduplicated. Use this for safe retries and at-least-once delivery patterns. */
      uniqueId?: string;
      /** @description Monetary or conversion value associated with the event (e.g., purchase amount). */
      value?: number;
      /** @description ISO 4217 currency code for the value field (e.g., "USD", "EUR"). */
      valueCurrency?: string;
      [key: string]: unknown;
    };
    /**
     * Customer Location
     * @description Customer location information.
     */
    "customer-location.schema": {
      /** @description City name */
      city?: string;
      /** @description Country name */
      country?: string;
      /** @description ISO 3166-1 alpha-2 country code */
      countryCode?: string;
      /** @description IANA time zone identifier */
      ianaTimeZoneName?: string;
      /** @description Latitude coordinate */
      latitude?: number;
      /** @description Longitude coordinate */
      longitude?: number;
      /** @description Postal or ZIP code */
      postalCode?: string;
      /** @description State or province name */
      state?: string;
      /** @description State or province abbreviation */
      stateCode?: string;
      /** @description Street address line 1 */
      street1?: string;
      /** @description Street address line 2 */
      street2?: string;
    };
    /**
     * Customer
     * @description Customer profile.
     */
    "customer-read.schema": {
      /**
       * Created at
       * Format: date-time
       * @description Timestamp when the customer was created. May be null for older customers created before this field was tracked.
       */
      createdAt?: string | null;
      /** @description Custom field values as key-value pairs, where keys are field names and values can be strings, numbers, or booleans. DATE custom field values are returned as ISO 8601 datetime strings (e.g., "2026-01-15T12:00:00.000Z"), not Date objects. */
      customFields?: {
        [key: string]: string | number | boolean;
      };
      /**
       * Format: email
       * @description Customer email address
       */
      email: string;
      /** @description Customer first name */
      firstName?: string;
      /** @description Redo customer ID */
      id: string;
      /** @description Customer last name */
      lastName?: string;
      location?: components["schemas"]["customer-location.schema"];
      /** @description Customer phone number in E.164 format */
      phoneNumber?: string;
      /**
       * Updated at
       * Format: date-time
       * @description Timestamp when the customer was last updated. May be null for older customers created before this field was tracked.
       */
      updatedAt?: string | null;
    };
    /** @description Email subscription updates */
    "customer-subscription-email.schema": {
      /**
       * Format: email
       * @description Email address
       */
      email: string;
      subscriptions: {
        /** @description Email marketing subscription. Email is always auto-confirmed on subscribe. */
        marketing?: {
          /**
           * @description Subscription status.
           * @enum {string}
           */
          subscriptionStatus: "subscribed" | "unsubscribed";
          /**
           * @description Whether to trigger automations for this subscription change. Defaults to false.
           * @default false
           */
          triggerAutomations?: boolean;
          /**
           * Format: date-time
           * @description ISO 8601 timestamp. If not provided, defaults to now.
           */
          updatedAt?: string;
        };
      };
    };
    /** @description SMS subscription updates */
    "customer-subscription-sms.schema": {
      /** @description Phone number in E.164 format (e.g., +12345678900) */
      phoneNumber: string;
      subscriptions: {
        marketing?: components["schemas"]["subscription-status-marketing.schema"];
        transactional?: components["schemas"]["subscription-status-transactional.schema"];
      };
    };
    /** @description Customer subscription update response */
    "customer-subscription-update-response.schema": {
      /** @description Human-readable success message */
      message: string;
      /** @description Whether the operation was successful */
      success: boolean;
      /** @description Details of which subscriptions were updated */
      updatedSubscriptions: {
        email?: {
          /** @description Whether email marketing was updated */
          marketing?: boolean;
        };
        sms?: {
          /** @description Whether SMS marketing was updated */
          marketing?: boolean;
          /** @description Whether SMS transactional was updated */
          transactional?: boolean;
        };
      };
    };
    /**
     * Customer Upsert Request
     * @description Request body for creating or updating a customer profile. The email address is used as the upsert key.
     */
    "customer-upsert-request.schema": {
      /**
       * @description Custom field values as key-value pairs. Keys are field names and values can be strings, numbers, or booleans. The field type is determined automatically based on the value:
       * - String values → STRING custom field
       * - Number values → NUMBER custom field
       * - Boolean values → BOOLEAN custom field
       * - ISO 8601 datetime strings (e.g., "2026-02-24T12:15:00.000Z") → DATE custom field (auto-detected)
       *
       * If a field name does not already have a declaration, one is created automatically. For STRING fields, unique values are tracked as options (used for segment filtering dropdowns). NUMBER, BOOLEAN, and DATE fields do not track options.
       * @example {
       *   "subscription_source": "web",
       *   "status": "Active",
       *   "loyalty_points": 1250,
       *   "vip_member": true,
       *   "signup_date": "2026-02-24T12:15:00.000Z"
       * }
       */
      customFields?: {
        [key: string]: string | number | boolean;
      };
      /**
       * Format: email
       * @description Customer email address. Used as the upsert key to find or create the customer.
       */
      email: string;
      /** @description Customer first name */
      firstName?: string;
      /** @description Customer last name */
      lastName?: string;
      location?: components["schemas"]["customer-location.schema"];
      /** @description Customer phone number in E.164 format (e.g., +12345678900). Appended to the existing phone list if not already present. */
      phoneNumber?: string;
    };
    /**
     * Customer Upsert Response
     * @description Response after creating or updating a customer profile.
     */
    "customer-upsert-response.schema": {
      /** @description Whether a new customer was created (true) or an existing customer was updated (false). */
      created: boolean;
      /** @description Customer email address */
      email: string;
      /** @description Redo customer ID */
      id: string;
    };
    /**
     * Problem details
     * @description Problem details. See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
     */
    "error.schema": {
      /**
       * Detail
       * @description Human-readable description of the problem.
       */
      detail?: string;
      /**
       * Format: uri-reference
       * @description A URI reference that identifies this problem.
       */
      instance?: string;
      /**
       * Title
       * @description Human-readable summary of the problem type.
       */
      title?: string;
      /**
       * Format: uri-reference
       * @description A URI reference that identifies the problem type.
       * @default about:blank
       */
      type?: string;
    };
    /**
     * Exchang provision
     * @example deferred
     * @enum {string}
     */
    "exchange-provision.schema": "instant" | "deferred";
    /**
     * HTTPS callback
     * @description HTTPS callback
     */
    "https-callback.schema": {
      /**
       * Authorization
       * @description Authorization.
       */
      auth: OneOf<[{
        /**
         * Bearer
         * @description Bearer
         */
        bearer?: {
          /**
           * Token
           * Format: password
           * @description Token for Bearer authorization.
           * @example abc123
           */
          token?: string;
        };
      }, null]>;
      /**
       * URL
       * Format: uri
       * @description HTTPS callback URL.
       * @example https://subscriber.example.org/events
       */
      url: string;
    };
    /**
     * Inbound Shipment Detail
     * @description Inbound shipment (detail view).
     */
    "inbound-shipment-detail.schema": components["schemas"]["inbound-shipment-list.schema"] & ({
      /**
       * @description Custom volume in cubic meters.
       * @example 2.4
       */
      custom_volume_cubic_meters: number | null;
      /**
       * @description Total damaged units.
       * @example 5
       */
      damaged_count: number;
      /** @description Attached files. */
      files: components["schemas"]["inbound-shipment-file.schema"][];
      items?: components["schemas"]["inbound-shipment-item-detail.schema"][];
      /**
       * @description Total missing units.
       * @example 0
       */
      missing_count: number;
      /** @description Linked purchase orders. */
      purchase_orders: components["schemas"]["inbound-shipment-order-ref.schema"][];
      /** @description Linked transfer orders. */
      transfer_orders: components["schemas"]["inbound-shipment-order-ref.schema"][];
    });
    /**
     * Inbound Shipment File
     * @description File attached to an inbound shipment.
     */
    "inbound-shipment-file.schema": {
      /**
       * @description MIME type.
       * @example application/pdf
       */
      content_type: string;
      /**
       * Format: date-time
       * @description Upload timestamp (ISO 8601).
       * @example 2026-03-28T14:35:00Z
       */
      created_at: string;
      /**
       * @description Prefixed file ID (`isf_...`).
       * @example isf_3d4e5f6g7h
       */
      id: string;
      /**
       * @description File display title.
       * @example Packing List.pdf
       */
      title: string;
      /**
       * @description File URL.
       * @example https://storage.example.com/files/packing-list.pdf
       */
      url: string;
    };
    /**
     * Inbound Shipment Item Detail
     * @description Inbound shipment line item (detail view).
     */
    "inbound-shipment-item-detail.schema": components["schemas"]["inbound-shipment-item-list.schema"] & {
      /**
       * @description Difference between expected and received quantity.
       * @example -150
       */
      discrepancy?: number;
      /**
       * @description Packing mode (e.g. `individual`).
       * @example individual
       */
      packing_mode?: string;
      product?: components["schemas"]["inbound-shipment-product-detail.schema"];
    };
    /**
     * Inbound Shipment Item
     * @description Inbound shipment line item (list view).
     */
    "inbound-shipment-item-list.schema": {
      /**
       * @description Damaged units.
       * @example 0
       */
      damaged_quantity: number;
      /**
       * @description Prefixed shipment item ID (`isp_...`).
       * @example isp_8b2c3d4e5f
       */
      id: string;
      /**
       * @description Missing units.
       * @example 0
       */
      missing_quantity: number;
      product: components["schemas"]["inbound-shipment-product-summary.schema"];
      /**
       * @description Expected quantity.
       * @example 500
       */
      quantity: number;
      /**
       * @description Quantity received so far.
       * @example 0
       */
      received_quantity: number;
    };
    /**
     * Inbound Shipment
     * @description Inbound shipment (list view).
     */
    "inbound-shipment-list.schema": {
      /**
       * Format: date
       * @description Actual arrival date (YYYY-MM-DD).
       * @example null
       */
      actual_arrival_date: string | null;
      /**
       * @description Carrier name.
       * @example FedEx Freight
       */
      carrier: string | null;
      /**
       * Format: date-time
       * @description Creation timestamp (ISO 8601).
       * @example 2026-03-28T14:30:00Z
       */
      created_at: string;
      duty_cost: components["schemas"]["inbound-shipment-money.schema"];
      /**
       * Format: date
       * @description Expected arrival date (YYYY-MM-DD).
       * @example 2026-04-15
       */
      estimated_arrival_date: string | null;
      freight_cost: components["schemas"]["inbound-shipment-money.schema"];
      /**
       * @description Type of freight (e.g. `LTL`, `FTL`, `Parcel`).
       * @example LTL
       */
      freight_type: string | null;
      /**
       * @description Prefixed shipment ID (`inb_...`).
       * @example inb_7a3f9c2e1b
       */
      id: string;
      /**
       * @description Total expected unit quantity.
       * @example 800
       */
      item_count: number;
      items: components["schemas"]["inbound-shipment-item-list.schema"][];
      location: components["schemas"]["inbound-shipment-location.schema"];
      /**
       * @description Payment terms (e.g. `NET30`, `COD`).
       * @example NET30
       */
      payment_terms: string | null;
      /**
       * @description Total received units.
       * @example 0
       */
      received_count: number;
      /**
       * @description Merchant-assigned shipment identifier.
       * @example SHIP-2026-0042
       */
      shipment_id: string | null;
      /**
       * @description Distinct SKU count.
       * @example 2
       */
      sku_count: number;
      /**
       * @description Shipment status.
       * @example IN_TRANSIT
       * @enum {string}
       */
      status: "PENDING" | "IN_TRANSIT" | "PARTIALLY_RECEIVED" | "RECEIVED";
      /**
       * @description Tracking number.
       * @example 794644790132
       */
      tracking_number: string | null;
      /**
       * @description Tracking URL.
       * @example https://www.fedex.com/fedextrack/?trknbr=794644790132
       */
      tracking_url: string | null;
      /**
       * Format: date-time
       * @description Last updated timestamp (ISO 8601).
       * @example 2026-03-29T09:15:00Z
       */
      updated_at: string;
    };
    /**
     * Inbound Shipment Location
     * @description Destination location.
     */
    "inbound-shipment-location.schema": {
      /**
       * @description Prefixed location ID (`loc_...`).
       * @example loc_4d8e1a2b3c
       */
      id: string;
      /**
       * @description Location name.
       * @example East Coast Warehouse
       */
      name: string;
    };
    /**
     * Money
     * @description Monetary amount with currency.
     */
    "inbound-shipment-money.schema": {
      /**
       * @description Decimal amount as a string.
       * @example 1250.00
       */
      amount: string;
      /**
       * @description ISO 4217 currency code.
       * @example USD
       */
      currency: string;
    };
    /**
     * Order Reference
     * @description Reference to a linked purchase order or transfer order.
     */
    "inbound-shipment-order-ref.schema": {
      /**
       * @description Prefixed order ID (`po_...` or `trn_...`).
       * @example po_5e6f7a8b9c
       */
      id: string;
      /**
       * @description Order number or name.
       * @example PO-2026-0018
       */
      name: string;
    };
    /**
     * Inbound Shipment Product Detail
     * @description Product detail in a shipment item (detail view).
     */
    "inbound-shipment-product-detail.schema": components["schemas"]["inbound-shipment-product-summary.schema"] & ({
      /**
       * @description Universal product code.
       * @example 012345678901
       */
      upc?: string | null;
    });
    /**
     * Inbound Shipment Product Summary
     * @description Product summary in a shipment item.
     */
    "inbound-shipment-product-summary.schema": {
      /**
       * @description Prefixed product ID (`prd_...`).
       * @example prd_1a2b3c4d5e
       */
      id: string;
      /**
       * @description URL of the product's primary image.
       * @example https://cdn.example.com/tshirt-blk-m.jpg
       */
      image_url?: string | null;
      /**
       * @description Stock keeping unit.
       * @example TSH-BLK-M
       */
      sku: string | null;
      /**
       * @description Product title including variant options.
       * @example Classic Cotton T-Shirt - Black / M
       */
      title: string;
    };
    /**
     * Inventory Item
     * @description Inventory item list entry.
     */
    "inventory-item-list.schema": {
      /**
       * Format: date-time
       * @description Creation timestamp (ISO 8601).
       * @example 2025-11-01T10:00:00.000Z
       */
      created_at: string;
      /**
       * @description Prefixed inventory item ID (`ii_...`).
       * @example ii_5f8e1a2b3c
       */
      id: string;
      /**
       * @description Inventory item kind.
       * @example PRODUCT
       * @enum {string}
       */
      kind: "PRODUCT" | "RETURN" | "UNDECLARED" | "UNKNOWN";
      /** @description Per-location quantities for this inventory item. */
      locations: components["schemas"]["inventory-item-location.schema"][];
      /**
       * @description Product title including variant options.
       * @example Classic Cotton T-Shirt - Black / M
       */
      name: string | null;
      /**
       * @description On-hand quantity. When `location_id` is supplied as a query filter, this is the quantity at that location; otherwise it is the total across all locations.
       * @example 250
       */
      quantity: number;
      /**
       * @description Stock keeping unit from the linked product.
       * @example TSH-BLK-M
       */
      sku: string | null;
      /**
       * Format: date-time
       * @description Last updated timestamp (ISO 8601).
       * @example 2026-03-31T18:45:00.000Z
       */
      updated_at: string;
    };
    /**
     * Inventory Item Location
     * @description Per-location quantity for an inventory item.
     */
    "inventory-item-location.schema": {
      /**
       * @description Prefixed location ID (`loc_...`).
       * @example loc_4d8e1a2b3c
       */
      location_id: string;
      /**
       * @description Location name.
       * @example East Coast Warehouse
       */
      location_name: string;
      /**
       * @description On-hand quantity at this location.
       * @example 120
       */
      quantity: number;
    };
    /**
     * Inventory Level Detail
     * @description Inventory level detail.
     */
    "inventory-level-detail.schema": components["schemas"]["inventory-level-list.schema"] & ({
      /**
       * Format: date-time
       * @description Creation timestamp (ISO 8601).
       * @example 2025-11-01T10:00:00.000Z
       */
      created_at: string;
      /**
       * @description External system IDs (e.g. Shopify inventory item GID).
       * @example {
       *   "shopify": "gid://shopify/InventoryItem/12345678"
       * }
       */
      external_ids: Record<string, unknown> | null;
      product?: components["schemas"]["inventory-level-product-detail.schema"];
    });
    /**
     * Inventory Level
     * @description Inventory level list item.
     */
    "inventory-level-list.schema": {
      /**
       * @description Available quantity (`quantity - committed - reserved`).
       * @example 1100
       */
      available: number;
      /**
       * @description Can be assembled from BOM components.
       * @example 0
       */
      buildable: number;
      /**
       * @description Allocated to unfulfilled orders.
       * @example 100
       */
      committed: number;
      /**
       * @description Prefixed inventory level ID (`li_...`).
       * @example li_9b2c4d6e8f
       */
      id: string;
      location: components["schemas"]["inventory-level-location.schema"];
      product: components["schemas"]["inventory-level-product-summary.schema"];
      /**
       * @description On-hand quantity.
       * @example 1250
       */
      quantity: number;
      /**
       * @description Held (damaged, QC, etc.).
       * @example 50
       */
      reserved: number;
      /**
       * @description Total available (`available + buildable`).
       * @example 1100
       */
      total_available: number;
      /**
       * Format: date-time
       * @description Last updated timestamp (ISO 8601).
       * @example 2026-03-31T18:45:00.000Z
       */
      updated_at: string;
    };
    /**
     * Inventory Level Location
     * @description Location summary in an inventory level response.
     */
    "inventory-level-location.schema": {
      /**
       * @description Prefixed location ID (`loc_...`).
       * @example loc_4d8e1a2b3c
       */
      id: string;
      /**
       * @description Location name.
       * @example East Coast Warehouse
       */
      name: string;
    };
    /**
     * Inventory Level Product Detail
     * @description Product detail in an inventory level detail response.
     */
    "inventory-level-product-detail.schema": components["schemas"]["inventory-level-product-summary.schema"] & ({
      /**
       * @description URL of the product's primary image.
       * @example https://cdn.example.com/tshirt-blk-m.jpg
       */
      image_url?: string | null;
      /**
       * @description Universal product code.
       * @example 012345678901
       */
      upc?: string | null;
    });
    /**
     * Inventory Level Product Summary
     * @description Product summary in an inventory level response.
     */
    "inventory-level-product-summary.schema": {
      /**
       * @description Prefixed product ID (`prd_...`).
       * @example prd_1a2b3c4d5e
       */
      id: string;
      /**
       * @description Stock keeping unit.
       * @example TSH-BLK-M
       */
      sku: string | null;
      /**
       * @description Product title including variant options.
       * @example Classic Cotton T-Shirt - Black / M
       */
      title: string;
    };
    /** @description Schema for an invoice. */
    "invoice.schema": {
      /** @description The charge that the invoice is for. */
      charge: components["schemas"]["money.schema"];
      /**
       * Format: date-time
       * @description The time the invoice was created.
       */
      createdAt: string;
      /** @description The ID of the charge. */
      id?: string;
      /** @description The status of the invoice. */
      status: string;
      store?: {
        /** @description The ID of the store. */
        id: string;
      };
      /**
       * Format: date-time
       * @description The time the invoice was last updated.
       */
      updatedAt: string;
    };
    /**
     * Item quantity
     * @description Item quantity.
     * @example 1
     */
    "item-quantity.schema": number;
    /**
     * Length
     * @description Length measurement with unit.
     */
    "length.schema": {
      /**
       * Unit
       * @description Length unit
       * @enum {string}
       */
      unit: "in" | "cm";
      /**
       * Value
       * @description Numeric length value
       */
      value: number;
    };
    /**
     * Money
     * @description Currency amount
     */
    "money.schema": {
      /** Amount */
      amount?: string;
      /** Currency */
      currency?: string;
    };
    /**
     * Order
     * @description Order.
     */
    "order-read.schema": {
      customer: {
        /**
         * Email address
         * Format: email
         * @description Email address of customer.
         */
        emailAddress?: string;
        /**
         * Name
         * @description Name of customer.
         */
        name: components["schemas"]["person-name.schema"];
        /**
         * Phone number
         * @description Phone number of customer.
         */
        phoneNumber?: components["schemas"]["phone-number.schema"];
      };
      /**
       * Discounts
       * @description The total amount discounted on the order before returns. This includes both order and line level discounts.
       */
      discounts: components["schemas"]["money.schema"];
      /**
       * External ID
       * @description Shopify ID
       */
      externalId?: string;
      /**
       * ID
       * @description Order ID
       * @example 64e4da943dd822979a70bd12
       */
      id: string;
      /** Line items */
      items: ({
          /** @example 123 */
          externalId?: string;
          /**
           * @description ID of the location where the item was be fulfilled.
           * @example 123
           */
          fulfillmentLocationId: string | null;
          /**
           * ID
           * @description Line item ID
           */
          id: string;
          /** Price */
          price: components["schemas"]["money.schema"];
          /** Product */
          product: components["schemas"]["product.schema"];
          /** Quantity */
          quantity: components["schemas"]["item-quantity.schema"];
          /** Variant */
          variant: components["schemas"]["product-variant.schema"];
        })[];
      /**
       * Line Items Total
       * @description Total price of all line items before discounts, shipping, and taxes.
       */
      lineItemsTotal: components["schemas"]["money.schema"];
      /**
       * Name
       * @description Shopify name.
       */
      name: string;
      /**
       * Shipping Cost
       * @description The total shipping cost for the order. This includes fees and any related discounts that were refunded.
       */
      shippingCost: components["schemas"]["money.schema"];
      /**
       * Taxes
       * @description Total taxes applied to the order.
       */
      taxes: components["schemas"]["money.schema"];
      /**
       * Total
       * @description The total price of the order, before returns. This includes taxes, discounts, and shipping costs.
       */
      total: components["schemas"]["money.schema"];
    };
    /** @description Billing address. */
    "orders-api-billing-address.schema": {
      /** @description Primary address line. */
      address1?: string | null;
      /** @description Secondary address line. */
      address2?: string | null;
      /** @description City. */
      city?: string | null;
      /** @description Country. */
      country?: string | null;
      /** @description Postal or zip code. */
      postalCode?: string | null;
      /** @description State or province. */
      province?: string | null;
    };
    /** @description Request body for creating a fulfillment. */
    "orders-api-create-fulfillment-request.schema": {
      /** @description Unique identifier for the fulfillment. If not provided, will be auto-generated. */
      fulfillmentId?: string;
      /** @description Initial tracking information for the dummy tracker. Only used when useDummyTracking is true. If not specified, defaults to status "pre_transit". */
      initialTracking?: {
        /**
         * Format: date-time
         * @description Timestamp of the tracking event in ISO 8601 format.
         */
        datetime?: string | null;
        /**
         * Format: date-time
         * @description Estimated delivery date in ISO 8601 format.
         */
        estimatedDeliveryDate?: string | null;
        location?: components["schemas"]["orders-api-tracking-location.schema"];
        /** @description Tracking event message. */
        message?: string | null;
        /**
         * @description Initial shipment status for the dummy tracker. Only actual statuses are allowed (not automation events).
         * @enum {string}
         */
        status: "pre_transit" | "unknown" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "delivered" | "return_to_sender" | "failure" | "cancelled" | "error";
      };
      /** @description List of line items to fulfill. */
      lineItems: {
          /** @description Line item ID to fulfill. */
          id: string;
          /** @description Quantity to fulfill for this line item. */
          quantity: number;
        }[];
      /** @description Optional tracking information for the shipment. */
      tracking?: {
        /** @description Name of the shipping carrier (e.g., FedEx, UPS, USPS). */
        carrier: string;
        /** @description Tracking number/code for the shipment. */
        code: string;
      } | null;
      /** @description If true, creates a dummy tracker for testing without calling external tracking APIs. Useful for development and testing the fulfillment status update endpoint. */
      useDummyTracking?: boolean;
    };
    /** @description Request body for creating an order. */
    "orders-api-create-order-request.schema": {
      billingAddress?: components["schemas"]["orders-api-billing-address.schema"];
      /**
       * Format: date-time
       * @description ISO 8601 date string for when the order was created.
       */
      createdAt: string;
      /** @description Currency code from the ISO 4217 standard (e.g., USD, EUR, GBP). */
      currencyCode?: string | null;
      customer?: components["schemas"]["orders-api-customer.schema"];
      /** @description List of line items in the order. */
      lineItems: components["schemas"]["orders-api-line-item.schema"][];
      /**
       * @description Optional. Pin this order to a specific fulfillment location. Must be a location id (`loc_...`) returned by `GET /inventory-levels` — either one of your own warehouses or a location at a linked 3PL fulfillment service. When provided, the fulfillment group's origin address is sourced from the location row. Omit to use your team's default origin address.
       * @example loc_4d8e1a2b3c
       */
      locationId?: string | null;
      /** @description Unique identifier for the order. */
      orderId: string;
      shipping?: components["schemas"]["orders-api-shipping.schema"];
      /** @description Subtotal price excluding tax and shipping, as a decimal amount in the order's currency (e.g. $79.99, not 7999 cents). */
      subtotalPrice?: number | null;
      /** @description Optional tags associated with the order. */
      tags?: string[] | null;
      /** @description Total discount amount applied to the order (e.g. coupon codes, promotions), as a decimal amount in the order's currency (e.g. $79.99, not 7999 cents). */
      totalDiscount?: number | null;
      /** @description Total order price including tax and shipping, as a decimal amount in the order's currency (e.g. $79.99, not 7999 cents). */
      totalPrice?: number | null;
      /** @description Total tax amount, as a decimal amount in the order's currency (e.g. $79.99, not 7999 cents). */
      totalTax?: number | null;
    };
    /** @description Successful order creation response. */
    "orders-api-create-order-response.schema": {
      /** @description Original external order ID provided in the request. */
      externalOrderId: string;
      /** @description Internal Redo order ID. */
      orderId: string;
    };
    /** @description Customer information. */
    "orders-api-customer.schema": {
      /** @description Customer email address. */
      email?: string | null;
      /** @description Customer first name. */
      firstName?: string | null;
      /** @description Customer ID from the external system. */
      id?: string | null;
      /** @description Customer last name. */
      lastName?: string | null;
      /** @description Customer full name. */
      name?: string | null;
      /** @description Customer phone number. */
      phoneNumber?: string | null;
    };
    /** @description Successful order deletion response. */
    "orders-api-delete-order-response.schema": {
      /** @description External order ID that was deleted. */
      externalOrderId: string;
      /** @description Internal Redo order ID. */
      orderId: string;
      /** @description Indicates successful deletion. */
      success: boolean;
    };
    /** @description Orders API error response. */
    "orders-api-error.schema": {
      /** @description Error message describing what went wrong. */
      error: string;
    };
    /** @description Fulfilled line item details. */
    "orders-api-fulfillment-line-item.schema": {
      /** @description Line item ID that was fulfilled. */
      id: string;
      /** @description Product ID. */
      productId: string;
      /** @description Quantity fulfilled for this line item. */
      quantity: number;
      /** @description SKU of the product. */
      sku?: string | null;
      /** @description Title/name of the product. */
      title: string;
      /** @description Product variant ID. */
      variantId?: string | null;
    };
    /** @description Successful fulfillment operation response. */
    "orders-api-fulfillment-response.schema": {
      fulfillment: components["schemas"]["orders-api-fulfillment.schema"];
      /** @constant */
      success: true;
    };
    /** @description Fulfillment information. */
    "orders-api-fulfillment.schema": {
      /**
       * Format: date-time
       * @description ISO 8601 date string for when the fulfillment was created.
       */
      createdAt: string;
      /**
       * Format: date-time
       * @description ISO 8601 timestamp of when the shipment was delivered.
       */
      deliveredAt?: string | null;
      /** @description Carrier's estimated delivery date (YYYY-MM-DD), typically in the destination's local time. Some carriers do not clearly distinguish local vs UTC, so the date may occasionally be off by one day. */
      estimatedDeliveryDate?: string | null;
      /** @description Unique fulfillment ID. */
      id: string;
      /** @description List of line items in this fulfillment. */
      lineItems: components["schemas"]["orders-api-fulfillment-line-item.schema"][];
      /**
       * @description Current shipment status.
       * @enum {string}
       */
      status: "pre_transit" | "unknown" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "delivered" | "return_to_sender" | "failure" | "cancelled" | "error";
      /** @description Shipping carrier name (e.g., FedEx, UPS). */
      trackingCompany?: string | null;
      /** @description List of tracking events in chronological order. */
      trackingHistory: components["schemas"]["orders-api-tracking-event.schema"][];
      /** @description Tracking number for the shipment. */
      trackingNumber?: string | null;
    };
    /** @description Response for getting an order, including fulfillments. */
    "orders-api-get-order-response.schema": components["schemas"]["orders-api-create-order-request.schema"] & {
      /** @description List of fulfillments for this order. */
      fulfillments: components["schemas"]["orders-api-fulfillment.schema"][];
    };
    /** @description Line item in the order. */
    "orders-api-line-item.schema": {
      /** @description Total discount amount applied to this line item, as a decimal amount in the order's currency (e.g. $79.99, not 7999 cents). */
      discount?: number | null;
      /** @description Unique identifier for the line item. */
      id: string;
      /** @description URL to the product image. */
      imageUrl?: string | null;
      /** @description Price per unit of the product before discounts, as a decimal amount in the order's currency (e.g. $79.99, not 7999 cents). */
      price?: number | null;
      /** @description Identifier for the product. */
      productId: string;
      /** @description Quantity of the product ordered. */
      quantity: number;
      /** @description SKU of the product. */
      sku?: string | null;
      /** @description Title/name of the product. */
      title: string;
      /** @description Identifier for the product variant. */
      variantId?: string | null;
    };
    /** @description Shipping address. */
    "orders-api-shipping-address.schema": {
      /** @description Primary address line. */
      address1?: string | null;
      /** @description Secondary address line. */
      address2?: string | null;
      /** @description City. */
      city?: string | null;
      /** @description Country. */
      country?: string | null;
      /** @description Postal or zip code. */
      postalCode?: string | null;
      /** @description State or province. */
      province?: string | null;
    };
    /** @description Shipping information. */
    "orders-api-shipping.schema": {
      address?: components["schemas"]["orders-api-shipping-address.schema"];
      /** @description Shipping cost, as a decimal amount in the order's currency (e.g. $79.99, not 7999 cents). */
      cost?: number | null;
      /** @description Shipping method name. */
      method?: string | null;
    };
    /** @description Tracking event details. */
    "orders-api-tracking-event.schema": {
      /**
       * Format: date-time
       * @description ISO 8601 timestamp of the tracking event.
       */
      datetime: string;
      location?: components["schemas"]["orders-api-tracking-location.schema"];
      /** @description Tracking event message. */
      message: string;
      /** @description Status at this tracking event. */
      status: string;
    };
    /** @description Location information for a tracking event. */
    "orders-api-tracking-location.schema": {
      city?: string | null;
      country?: string | null;
      postalCode?: string | null;
      state?: string | null;
    };
    /**
     * @description Request body for updating a fulfillment's tracking status.
     *
     * The status field accepts two types of values:
     * - **Statuses** (e.g., `in_transit`, `delivered`): Update the shipment's current status and trigger configured automations.
     * - **Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Trigger automations without changing the current shipment status.
     *
     * Both can update other fields like estimated delivery date and tracking history.
     */
    "orders-api-update-fulfillment-status-request.schema": {
      /**
       * Format: date-time
       * @description Timestamp of the tracking event in ISO 8601 format.
       */
      datetime?: string | null;
      /**
       * Format: date-time
       * @description Estimated delivery date in ISO 8601 format.
       */
      estimatedDeliveryDate?: string | null;
      location?: components["schemas"]["orders-api-tracking-location.schema"];
      /** @description Tracking event message (e.g., "Departed shipping partner facility"). */
      message?: string | null;
      /**
       * @description Shipment status or automation event.
       *
       * Statuses update the current shipment status and trigger automations:
       * `pre_transit`, `in_transit`, `out_for_delivery`, `available_for_pickup`, `delivered`, `return_to_sender`, `failure`, `cancelled`, `error`.
       *
       * Events trigger automations without changing the current status:
       * `stalled_in_transit`, `delayed`, `arriving_early`.
       *
       * @enum {string}
       */
      status: "pre_transit" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "delivered" | "return_to_sender" | "failure" | "cancelled" | "error" | "stalled_in_transit" | "delayed" | "arriving_early";
    };
    /**
     * Person name
     * @description Person name.
     */
    "person-name.schema": {
      /** @description Given name */
      given: string;
      /** @description Surname */
      surname: string;
    };
    /**
     * Phone number
     * @description Phone number, in E.164 format
     */
    "phone-number.schema": string;
    /**
     * Pill theme
     * @description Color theme used to render a tag pill in the UI.
     * @enum {string}
     */
    "pill-theme.schema": "NORMAL" | "PRIMARY_LIGHT" | "LIGHT_PINK" | "DANGER" | "NEUTRAL_YELLOW" | "SUCCESS" | "NEUTRAL_BLUE" | "PRIMARY" | "SOLID_WHITE" | "SOLID_PINK" | "SOLID_RED" | "SOLID_ORANGE" | "SOLID_YELLOW" | "SOLID_GREEN" | "SOLID_LIGHT_BLUE" | "SOLID_NAVY" | "SOLID_BLACK" | "BRAND" | "GRAY_BLUE" | "WHITE_SUCCESS" | "GRAY_ALTERNATE" | "BRAND_ALTERNATE" | "ERROR_ALTERNATE" | "WARNING_ALTERNATE" | "SUCCESS_ALTERNATE" | "GRAY_BLUE_ALTERNATE" | "BLUE_LIGHT_ALTERNATE" | "BLUE_ALTERNATE" | "INDIGO_ALTERNATE" | "PURPLE_ALTERNATE" | "PINK_ALTERNATE" | "ORANGE_ALTERNATE" | "BLACK_ALTERNATE" | "WHITE_ALTERNATE" | "WHITE_SUCCESS_ALTERNATE";
    /** Product variant */
    "product-variant.schema": {
      /** External ID */
      externalId?: string;
      /** Title */
      name: string;
      /** SKU */
      sku?: string;
      /** Weight */
      weight?: components["schemas"]["weight.schema"];
    };
    /**
     * Product
     * @description Product.
     */
    "product.schema": {
      /**
       * External ID
       * @description Product ID in external system (e.g. shopify).
       */
      externalId?: string;
      /**
       * Name
       * @description Product title
       */
      name: string;
    };
    /**
     * Return Dropoff
     * @description Dropoff entry for returns using QR-code-based drop-off methods (e.g. BlueYonder/FedEx Easy Returns)
     */
    "return-dropoff.schema": {
      /**
       * Provider
       * @description Dropoff provider name (e.g. "FedEx Easy Returns", "Virtual")
       */
      provider: string;
      /**
       * QR Code
       * @description Raw QR code data
       */
      qrCode?: string;
      /**
       * QR Code URL
       * @description URL to a rendered QR code image
       */
      qrCodeUrl?: string;
      /**
       * Shipment Group ID
       * @description ID of the shipment group this dropoff belongs to
       */
      shipmentGroupId: string;
    };
    /**
     * Return
     * @description Return read.
     */
    "return-read.schema": {
      /**
       * Compensation Methods
       * @description Array of compensation methods available for this return
       */
      compensationMethods?: ("refund" | "store_credit" | "exchange")[];
      /**
       * Complete With No Action
       * @description Whether this return can be completed with no action
       */
      completeWithNoAction?: boolean;
      /**
       * Created at
       * Format: date-time
       * @description Time of creation.
       */
      createdAt: string;
      destination: {
        /**
         * Mailing address
         * @description Mailing address to send the returned items.
         */
        mailingAddress?: components["schemas"]["address.schema"];
        /**
         * Phone number
         * @description Phone number of the destination.
         */
        phoneNumber?: components["schemas"]["phone-number.schema"];
      };
      /**
       * Dropoffs
       * @description Array of QR-code-based dropoff entries for returns using drop-off methods such as BlueYonder/FedEx Easy Returns. Empty for standard label-based returns.
       */
      dropoffs?: components["schemas"]["return-dropoff.schema"][];
      /**
       * Exchange
       * @description Exchange order
       */
      exchange?: {
        /** @description Total quantity of all exchange items */
        itemCount?: number;
        /** Line items */
        items: {
            /** ID */
            id: string;
            /** @description Original price for the exchange item without discounts and taxes */
            originalPrice?: {
              amount?: string;
              currency?: string;
            };
            /** @description Subtotal price for the exchange item including discounts */
            price?: {
              amount?: string;
              currency?: string;
              tax?: string;
            };
            /** Product */
            product?: components["schemas"]["product.schema"];
            /** Quantity */
            quantity: components["schemas"]["item-quantity.schema"];
            variant: components["schemas"]["product-variant.schema"];
          }[];
        order?: {
          /**
           * External ID
           * @description ID of external order
           */
          externalId?: string;
        };
        /** Provision */
        provision: components["schemas"]["exchange-provision.schema"];
        /** @description Total tax for exchange items */
        totalTax?: {
          amount?: string;
          currency?: string;
        };
      };
      /**
       * External Order IDs
       * @description Array of external order IDs associated with this return
       */
      externalOrderIds?: string[];
      /**
       * External Return IDs
       * @description Array of external return identifiers associated with this return. For Shopify returns, value is Shopify's numeric return ID as a string, not a Shopify admin URL or gid:// ID.
       */
      externalReturnIds?: {
          /**
           * @description External provider that owns this return identifier
           * @enum {string}
           */
          provider: "shopify";
          /** @description Return identifier value from the external provider */
          value: string;
        }[];
      /**
       * Gift cards
       * @description Gift card(s) created for return
       */
      giftCards: {
          /** Amount */
          amount: components["schemas"]["money.schema"];
          /**
           * Code
           * @description Gift card 16 digit code.
           */
          code: string;
          /**
           * ID
           * @description Gift card ID.
           */
          externalId: string;
        }[];
      /**
       * Identifier
       * @description Return identifier.
       */
      id: string;
      /**
       * Internal Created By Name
       * @description Name of the internal team member who created this return
       */
      internalCreatedByName?: string;
      /** @description Return items */
      items: ({
          /** @description Assessment records for this return item. Only applicable for warranties. */
          assessments?: ({
              /** @description User assigned to this assessment */
              assignedUser: {
                email: string;
                firstName: string;
                id: string;
                lastName: string;
                name: string;
              };
              /** @description Assessment responses */
              responses: ({
                  /** @constant */
                  type: "short_text";
                  /** @description Short text response value */
                  value: string;
                } | {
                  /** @constant */
                  type: "long_text";
                  /** @description Long text response value */
                  value: string;
                } | {
                  /** @constant */
                  type: "select";
                  /** @description Select response values (array of selected options) */
                  value: string[];
                } | {
                  /** @constant */
                  type: "number";
                  /** @description Number response value */
                  value: number;
                } | {
                  /** @constant */
                  type: "boolean";
                  /** @description Boolean response value */
                  value: boolean;
                } | {
                  /** @constant */
                  type: "file_upload";
                  /** @description File upload response values (array of file URLs or identifiers) */
                  value: string[];
                } | {
                  /** @constant */
                  type: "date";
                  /**
                   * Format: date-time
                   * @description Date response value
                   */
                  value: string;
                })[];
            })[];
          /** @description Customer's comment about the return */
          customerComment?: string;
          /**
           * Exchange item
           * @description Exchange item details if this return item is being exchanged
           */
          exchangeItem?: {
            product?: {
              externalId?: string;
              name?: string;
            };
            quantity?: number;
            variant?: {
              externalId?: string;
              name?: string;
            };
          };
          /**
           * External Return Line Item ID
           * @description External return line item ID
           */
          externalReturnLineItemId?: string;
          /**
           * Grade
           * @description Merchant-assigned grade for the returned item (e.g. condition or quality tier). Null if the merchant has not graded this item.
           */
          grade?: string | null;
          /** @description Whether this is a green return (no physical return required) */
          greenReturn?: boolean;
          /**
           * ID
           * @description Return item ID.
           */
          id: string;
          /** @description Multiple choice questions and answers for this return item */
          multipleChoiceQuestions?: {
              /** @description The selected answer */
              answer: string;
              /** @description The question text */
              question: string;
            }[];
          /**
           * Order item
           * @description Order line item
           */
          orderItem: {
            /**
             * ID
             * @description Line item reference ID in format: {orderId}/{lineItemIndex}
             */
            id: string;
            /**
             * Line Item ID
             * @description Original Shopify line item ID
             */
            line_item_id?: string;
          };
          /**
           * Outcome
           * @description Merchant-assigned processing outcome for the returned item (e.g. restock, dispose). Null if the merchant has not set an outcome for this item.
           */
          outcome?: string | null;
          /** @description Product adjustment details */
          productAdjustment?: string;
          /** @description Product ID */
          productId?: string;
          /**
           * Product value (no tax / no adjustment)
           * @description Per-product value before taxes and merchant adjustments. Equivalent to the "Product Value (No Tax/Adjustment)" column in the Returns Report.
           */
          productValueNoTaxNoAdjustment?: {
            /** Amount */
            amount: components["schemas"]["money.schema"];
          };
          /** @description Quantity of items being returned */
          quantity: number;
          /** @description Primary return reason */
          reason: string;
          /** @description Return reason code */
          reasonCode?: string;
          /** @description Array of return reason codes */
          reasonCodes?: string[];
          /** @description Array of return reasons */
          reasons?: string[];
          /** @description Refund details */
          refund?: {
            /** Amount */
            amount: components["schemas"]["money.schema"];
            /** @description Refund strategy */
            type?: string;
          };
          /**
           * Shipment Group IDs
           * @description IDs of the shipment groups this return item belongs to
           */
          shipmentGroupIds?: string[];
          /** @description Product SKU */
          sku?: string;
          /** @description Return item status */
          status?: string;
          /**
           * UPC
           * @description Universal Product Code (barcode) snapshotted from the product at return-creation time. Null if no barcode was recorded.
           */
          upc?: string | null;
          /** @description Product variant ID */
          variantId?: string;
        })[];
      /**
       * Notes
       * @description Teammembers generated notes and comments on the return
       */
      notes?: {
          /**
           * Image URL
           * @description Optional image URL attached to the note
           */
          image?: string;
          /**
           * Message
           * @description The note text
           */
          message: string;
        }[];
      /**
       * Order
       * @description Original order.
       */
      order: {
        /**
         * ID
         * @description Redo's internal identifier for the original order created in Redo.
         * @example 64e4da943dd822979a70bd12
         */
        id: string;
        /**
         * Name
         * @description Order name from the external provider, such as the Shopify order name.
         */
        name?: string;
      };
      /**
       * Shipment
       * @description Shipment, if has been made
       */
      shipment?: components["schemas"]["return-shipment.schema"];
      /**
       * Shipments
       * @description Array of all shipments associated with this return
       */
      shipments?: components["schemas"]["return-shipment.schema"][];
      /**
       * Shopify Order IDs
       * @description Array of Shopify order IDs (deprecated, use externalOrderIds)
       */
      shopifyOrderIds?: string[];
      source: {
        /**
         * Email address
         * Format: email
         * @description Email address.
         */
        emailAddress: string;
        /**
         * Mailing address
         * @description Mailing address returned items are sent from.
         */
        mailingAddress: components["schemas"]["address.schema"];
        /**
         * Name
         * @description Name of returner.
         */
        name: components["schemas"]["person-name.schema"];
        /**
         * Phone number
         * @description Phone number of returner.
         */
        phoneNumber: components["schemas"]["phone-number.schema"];
      };
      /**
       * Status
       * @description Return status.
       */
      status: components["schemas"]["return-status.schema"];
      /**
       * Tags
       * @description Tags associated with this return
       */
      tags?: {
          /** @description The tag's display name */
          name: string;
          /** @description The source of the tag */
          source: string;
        }[];
      /**
       * Totals
       * @description Calculated totals for the return
       */
      totals?: {
        /** @description The upsell amount for the exchange order */
        charge: {
          amount: components["schemas"]["money.schema"];
        };
        /** @description Total value of new items in exchange */
        exchange: {
          amount: components["schemas"]["money.schema"];
        };
        /** @description Total refund amount excluding shipping */
        refund: {
          amount: components["schemas"]["money.schema"];
        };
        /** @description Total store credit amount */
        storeCredit: {
          amount: components["schemas"]["money.schema"];
        };
      };
      /**
       * Type
       * @description Return type.
       */
      type?: components["schemas"]["return-type.schema"];
      /**
       * Updated at
       * Format: date-time
       * @description Time of last update.
       */
      updatedAt: string;
    };
    /**
     * Return Shipment
     * @description Return shipment tracking information
     */
    "return-shipment.schema": {
      /**
       * Carrier
       * @description Carrier code
       */
      carrier?: string;
      /**
       * Delivered At
       * @description Date and time this shipment was delivered
       */
      deliveredAt?: string;
      /**
       * Estimated Delivery Date
       * @description Estimated delivery date for this shipment
       */
      estimatedDeliveryDate?: string;
      /**
       * External Location ID
       * @description External location ID for the destination of this shipment
       */
      externalLocationId?: string;
      /**
       * Form Label
       * @description Form label URL
       */
      formLabel?: string;
      /**
       * Item IDs
       * @description IDs of the return items included in this shipment
       */
      itemIds?: string[];
      /**
       * Postage Label
       * @description Postage label URL
       */
      postageLabel?: string;
      /**
       * Shipment Group ID
       * @description ID of the shipment group this shipment belongs to
       */
      shipmentGroupId?: string;
      /**
       * Status
       * @description Status of shipment
       * @enum {string}
       */
      status?: "unknown" | "pre_transit" | "in_transit" | "out_for_delivery" | "available_for_pickup" | "cancelled" | "delivered" | "error" | "failure" | "return_to_sender" | "expired";
      /**
       * Tracker
       * @description Tracking number
       */
      tracker?: string;
      /**
       * Tracking URL
       * @description Tracking URL
       */
      trackingUrl?: string;
    };
    /**
     * Return status
     * @description Return status.
     *
     * * complete: The return has been completed successfully.
     * * open: Return has been approved and is awaiting shipment.
     * * flagged: A problem with return processing requires merchant action.
     * * rejected: The return has been rejected.
     * * deleted: The return has been reset.
     *
     * @example open
     * @enum {string}
     */
    "return-status-update.schema": "complete" | "open" | "flagged" | "rejected" | "deleted";
    /**
     * Return status
     * @description Return status.
     *
     * * open: Return has been approved and is awaiting shipment.
     * * in_transit: Return shipment is in transit.
     * * delivered: Return shipment has been delivered and awaiting processing.
     * * needs_review: Return requires review before further action.
     * * in_review: Return is currently being reviewed.
     * * complete: The return has been completed successfully.
     * * rejected: The return has been rejected.
     * * flagged: A problem with return processing requires merchant action.
     * * pre_shipment: Return requires pre-shipment merchant authorization.
     * * deleted: The return has been deleted (Reset).
     *
     * @example open
     * @enum {string}
     */
    "return-status.schema": "open" | "in_transit" | "delivered" | "needs_review" | "in_review" | "complete" | "rejected" | "flagged" | "pre_shipment" | "deleted";
    /**
     * Return tag upsert request
     * @description Request body for creating, recoloring, or renaming a return tag.
     */
    "return-tag-upsert-request.schema": {
      /** @description New name for the tag. When set and different from the path `name`, the tag is renamed and the change cascades to returns and saved view filters. */
      newName?: string;
      pillTheme: components["schemas"]["pill-theme.schema"];
    };
    /**
     * Return tag
     * @description A return tag defined for a store.
     */
    "return-tag.schema": {
      /** @constant */
      kind: "return";
      /** @description The tag's display name. Case-sensitive. */
      name: string;
      /** @description Stable numeric identifier, if one has been assigned. */
      numericId: number | null;
      pillTheme: components["schemas"]["pill-theme.schema"];
      /**
       * @description Where the tag originated.
       * @enum {string}
       */
      source: "merchant" | "redo" | "flow";
    };
    /**
     * Return type
     * @description Return type.
     *
     * @example return
     * @enum {string}
     */
    "return-type.schema": "claim" | "return" | "warranty";
    /**
     * Storefront Cart
     * @description Storefront cart.
     */
    "storefront-cart.schema": {
      /**
       * Line items
       * @description Line items.
       */
      lineItems: {
          coupons?: {
              code: string;
              /** @description The amount this coupon discounts in dollars for this line item. */
              discountAmount: components["schemas"]["money.schema"];
              id: string;
            }[];
          /**
           * ID
           * @description Line item ID.
           */
          id: string;
          /**
           * Original Price
           * @description Original price.
           */
          originalPrice?: components["schemas"]["money.schema"];
          /**
           * Price
           * @description Total price.
           */
          priceTotal: components["schemas"]["money.schema"];
          /** @description Product. */
          product: {
            /**
             * ID
             * @description Identifier of the product.
             */
            id: string;
          };
          /**
           * Quantity
           * @description Quantity.
           */
          quantity: number;
          /** @description Variant. */
          variant: {
            /**
             * ID
             * @description Identifier of the variant.
             */
            id: string;
          };
        }[];
      /**
       * Price
       * @description Total price.
       */
      priceTotal: components["schemas"]["money.schema"];
    };
    /**
     * Storefront Customer
     * @description Storefront customer.
     */
    "storefront-customer.schema": {
      /**
       * ID
       * @description Customer ID.
       */
      id: string;
    };
    /**
     * Storefront Event
     * @description Shopify pixel event for storefront tracking.
     */
    "storefront-event.schema": {
      /** @description Anonymous identifier for users without account. */
      anonymousId?: string;
      /** @description Cart information. */
      cart?: Record<string, never> | null;
      /** @description Information about specific cart line item. */
      cartLine?: Record<string, never>;
      /** @description Checkout information. */
      checkout?: Record<string, never>;
      /** @description Collection information. */
      collection?: Record<string, never>;
      /** @description Customer information if available. */
      customer?: Record<string, never> | null;
      /**
       * Format: email
       * @description Customer email if available.
       */
      customerEmail?: string;
      /** @description Customer phone if available. */
      customerPhone?: string;
      /** @description Unique identifier for the event. */
      eventId: string;
      /**
       * @description Name of the Shopify pixel event.
       * @enum {string}
       */
      eventName: "product_added_to_cart" | "product_removed_from_cart" | "product_viewed" | "checkout_started" | "checkout_completed" | "checkout_contact_info_submitted" | "page_viewed" | "collection_viewed";
      /** @description Product variant information. */
      productVariant?: Record<string, never>;
      /**
       * @description Source of the event.
       * @enum {string}
       */
      source: "AIMERCE";
      /**
       * Format: date-time
       * @description ISO 8601 timestamp when the event occurred.
       */
      timestamp: string;
      /** @description Page URL without query parameters. */
      urlWithoutParams?: string;
      /** @description Complete page URL with query parameters. */
      urlWithParams?: string;
      [key: string]: unknown;
    };
    /**
     * Subscription Status Marketing
     * @description Marketing subscription status
     */
    "subscription-status-marketing.schema": {
      /**
       * @description Subscription status. Use `confirmed` if the customer has already completed double opt-in elsewhere and you are recording that fact.
       * @enum {string}
       */
      subscriptionStatus: "subscribed" | "confirmed" | "unsubscribed";
      /**
       * @description Whether to trigger automations for this subscription change. Defaults to false.
       * @default false
       */
      triggerAutomations?: boolean;
      /**
       * Format: date-time
       * @description ISO 8601 timestamp. If not provided, defaults to now.
       */
      updatedAt?: string;
    };
    /**
     * Subscription Status Transactional
     * @description Transactional subscription status (order tracking)
     */
    "subscription-status-transactional.schema": {
      /**
       * @description Subscription status. Only subscribed and unsubscribed are supported for transactional.
       * @enum {string}
       */
      subscriptionStatus: "subscribed" | "unsubscribed";
      /**
       * Format: date-time
       * @description ISO 8601 timestamp. If not provided, defaults to now.
       */
      updatedAt?: string;
    };
    /**
     * Webhook create
     * @description Webhook create.
     */
    "webhook-create.schema": {
      /**
       * Backfill
       * @description Create events for already-existing items
       * @default false
       */
      backfill?: boolean;
      /**
       * HTTPS callback
       * @description HTTPS callback to POST events.
       */
      callback: components["schemas"]["https-callback.schema"];
      /**
       * External ID
       * @description Optional external identifier.
       * @default null
       */
      externalId?: string | null;
      /**
       * Kind
       * @description Kind.
       */
      kind?: components["schemas"]["webhook-kind.schema"];
      /**
       * Topic
       * @description Topic.
       */
      topic: components["schemas"]["webhook-topic.schema"];
    };
    /**
     * Webhook kind
     * @description Webhook kind.
     * @enum {string}
     */
    "webhook-kind.schema": "redo" | "loop";
    /**
     * Webhook read
     * @description Webhook read.
     */
    "webhook-read.schema": {
      /**
       * Callback
       * @description HTTPS callback URL to POST events.
       */
      callback: components["schemas"]["https-callback.schema"];
      /**
       * Created at.
       * Format: date-time
       * @description Time created.
       */
      createdAt: string;
      /**
       * External ID
       * @description Optional external identifier.
       * @default null
       */
      externalId?: string | null;
      /**
       * ID
       * @description Webhook ID.
       */
      id?: string;
      /**
       * Kind
       * @description Kind.
       */
      kind?: components["schemas"]["webhook-kind.schema"];
      /**
       * Topic
       * @description Topic.
       */
      topic: components["schemas"]["webhook-topic.schema"];
      /**
       * Updated at.
       * Format: date-time
       * @description Last time updated.
       */
      updatedAt: string;
    };
    /**
     * Webhook topic
     * @description Webhook topic.
     * @enum {string}
     */
    "webhook-topic.schema": "return";
    /**
     * Webhook update
     * @description Webhook update.
     */
    "webhook-update.schema": {
      /**
       * HTTPS callback
       * @description HTTPS callback to POST events.
       */
      callback: components["schemas"]["https-callback.schema"];
      /**
       * External ID
       * @description Optional external identifier.
       * @default null
       */
      externalId?: string | null;
    };
    /**
     * Weight
     * @description Weight.
     */
    "weight.schema": {
      /**
       * Kilograms
       * @description Weight in kilograms
       */
      kg?: number;
    };
  };
  responses: never;
  parameters: {
    /**
     * @description Maximum created time, exclusive
     * @example 2026-01-01T00:00:00Z
     */
    "created-at-max.param"?: string;
    /**
     * @description Minimum created time, inclusive
     * @example 2000-01-01T00:00:00Z
     */
    "created-at-min.param"?: string;
    /** @description Unique fulfillment identifier. */
    "fulfillment-id.param": string;
    /** @description Optional idempotency key for safely retrying create requests. */
    "idempotency-key.param"?: string;
    /** @description Inbound shipment ID */
    "inbound-shipment-id.param": string;
    /**
     * @description Filter by shipment status
     * @example IN_TRANSIT
     */
    "inbound-shipment-status.param"?: "PENDING" | "IN_TRANSIT" | "PARTIALLY_RECEIVED" | "RECEIVED";
    /** @description Inventory item ID */
    "inventory-item-id.param": string;
    /**
     * @description Filter by inventory item kind
     * @example PRODUCT
     */
    "inventory-item-kind.param"?: "PRODUCT" | "RETURN" | "UNDECLARED" | "UNKNOWN";
    /** @description Inventory level ID */
    "inventory-level-id.param": string;
    /** @description Invoice ID */
    "invoice-id.param": string;
    /**
     * @description Filter by location ID (e.g. `loc_...`)
     * @example loc_4d8e1a2b3c
     */
    "location-id.param"?: string;
    /** @description Order ID. Can be either the external order ID provided when creating the order, or the internal Redo order ID. */
    "order-id.param": string;
    /**
     * @description Page marker, from X-Page-Next header
     * @example 64df700931a04885276c3364
     */
    "page-continue.param"?: string;
    /**
     * @description Page size, defaults to 20
     * @example 20
     */
    "page-size.param"?: number;
    /**
     * @description Filter by product ID (e.g. `prd_...`)
     * @example prd_1a2b3c4d5e
     */
    "product-id.param"?: string;
    /** @description Provider specific order name */
    "provider-order-name"?: string;
    /** @description Return ID */
    "return-id.param": string;
    /** @description Filter returns by status */
    "return-status.param"?: components["schemas"]["return-status.schema"];
    /** @description Return tag name. Case-sensitive and URL-encoded. */
    "return-tag-name.param": string;
    /** @description Shopify specific order name */
    "shopify-order-name"?: string;
    /**
     * @description Filter by product SKU
     * @example TSH-BLK-M
     */
    "sku.param"?: string;
    /** @description Store ID */
    "store-id.param": string;
    /**
     * @description Maximum updated time, exclusive
     * @example 2000-02-01T00:00:00Z
     */
    "updated-at-max.param"?: string;
    /**
     * @description Minimum updated time, inclusive
     * @example 2000-01-01T00:00:00Z
     */
    "updated-at-min.param"?: string;
    /** @description Webhook ID */
    "webhook-id.param": string;
  };
  requestBodies: never;
  headers: {
    /** @description Next value for X-Page-Continue, for more results */
    "page-next.header": string;
  };
  pathItems: never;
}

export type $defs = Record<string, never>;

export type external = Record<string, never>;

export interface operations {

  /**
   * Invoice (CSV)
   * @description Get an invoice as a CSV. Requires the [`invoices_read`](/docs/api-reference/scopes) scope.
   */
  "Invoice csv get": {
    parameters: {
      path: {
        invoiceId: components["parameters"]["invoice-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "text/csv": string;
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Pending Invoice (CSV)
   * @description Get an invoice as a CSV. Requires the [`invoices_read`](/docs/api-reference/scopes) scope.
   */
  "Invoice pending csv get": {
    responses: {
      /** @description Success */
      200: {
        content: {
          "text/csv": string;
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Return
   * @description Get return. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
   */
  "Return get": {
    parameters: {
      path: {
        returnId: components["parameters"]["return-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            order: components["schemas"]["order-read.schema"];
            return: components["schemas"]["return-read.schema"];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * List Return Comments
   * @description List return comments. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
   */
  "Return comments get": {
    parameters: {
      path: {
        returnId: components["parameters"]["return-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            /**
             * Comments
             * @description Return comments.
             */
            comments: components["schemas"]["comment.schema"][];
          };
        };
      };
    };
  };
  /**
   * Create Return Comment
   * @description Create return comment. Requires the [`returns_write`](/docs/api-reference/scopes) scope.
   */
  "Return comment create": {
    parameters: {
      path: {
        returnId: components["parameters"]["return-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": {
          comment: components["schemas"]["comment.schema"];
        };
      };
    };
    responses: {
      /** @description Created */
      201: {
        content: {
          "application/json": {
            comment: components["schemas"]["comment.schema"];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Process Return
   * @description **BETA**: This endpoint is in beta and subject to change.
   *
   * Trigger processing of a return with specified products.
   *
   * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
   */
  "Return process": {
    parameters: {
      path: {
        returnId: components["parameters"]["return-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": {
          /** @description Notes to send to customer. These can be rejection notes or processing notes. */
          customerNotes?: string;
          /** @description Array of products to process or reject */
          products: ({
              /**
               * @description Product ID found on the return
               * @example 64e4d5e837572a4813b73e41
               */
              _id: string;
              /** @description Processing details. You may only have one of reject or processInput. */
              processInput?: ({
                /** @description Adjustment amount. This will be the amount that is credited to the customer, overriding the original product value. */
                newMerchantAdjustment?: number | null;
                /** @description Whether to restock the item */
                restock?: boolean;
              }) | null;
              /**
               * @description Reject this product. You may only have one of reject or processInput.
               * @default false
               */
              reject?: boolean;
            })[];
        };
      };
    };
    responses: {
      /** @description Processing request completed */
      200: {
        content: {
          "application/json": {
            /** @description Status message */
            message?: string;
          };
        };
      };
      /** @description Bad request (e.g., missing products array) */
      400: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Return Status
   * @description Get return status. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
   */
  "Return status get": {
    parameters: {
      path: {
        returnId: components["parameters"]["return-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            status: components["schemas"]["return-status.schema"];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Update Return Status
   * @description Update return status.
   *
   * Certain status transitions trigger additional side effects to maintain data consistency:
   *
   * - Setting status to **complete** will also mark all return items as complete.
   * - Setting status to **open** from **complete** or **rejected** will reopen the return, resetting all processed/rejected items back to open, clearing pending processing info, resetting the expiration date, and marking the return as reopened. **Note:** Reopening a processed return does not reverse any refunds, exchanges, or other actions that were performed during processing.
   *
   * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
   */
  "Return status update": {
    parameters: {
      path: {
        returnId: components["parameters"]["return-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": {
          status: components["schemas"]["return-status-update.schema"];
        };
      };
    };
    responses: {
      /** @description Updated */
      204: {
        content: never;
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Navigate to Merchant Admin
   * @description Navigate to the merchant admin page.
   */
  "Merchant admin navigate": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Redirect */
      302: {
        content: never;
      };
    };
  };
  /**
   * Checkout Buttons UI
   * @description Generate rendered HTML and CSS for checkout buttons.
   */
  "Checkout buttons UI": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            /**
             * Checkout buttons CSS
             * @description Boilerplate checkout button CSS, plus any merchant configured styles or A/B tests.
             */
            css?: string;
            /**
             * Checkout buttons HTML
             * @description Boilerplate checkout button HTML
             */
            html?: string;
          };
        };
      };
    };
  };
  /**
   * Navigate to Coverage Info
   * @description Navigate to the coverage info page.
   */
  "Coverage info navigate": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Redirect */
      302: {
        content: never;
      };
    };
  };
  /**
   * Coverage Products
   * @description Get available coverage products.
   */
  "Coverage products": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": {
          cart: components["schemas"]["storefront-cart.schema"];
          customer?: components["schemas"]["storefront-customer.schema"];
          /**
           * Products
           * @deprecated
           * @description Product information.
           */
          products?: {
              /**
               * ID
               * @description Identifier of the product.
               */
              id: string;
            }[];
          /**
           * Variants
           * @deprecated
           * @description Variant information.
           */
          variants?: {
              /**
               * Height
               * @description Height of an item.
               */
              height?: components["schemas"]["length.schema"];
              /**
               * ID
               * @description Identifier of the variant.
               */
              id: string;
              /**
               * Length
               * @description Length of an item.
               */
              length?: components["schemas"]["length.schema"];
              /** Title */
              title?: string;
              /**
               * Weight
               * @description Weight of an item.
               */
              weight?: components["schemas"]["weight.schema"];
              /**
               * Width
               * @description Width of an item.
               */
              width?: components["schemas"]["length.schema"];
            }[];
        };
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            /**
             * Coverage Products
             * @description Coverage products.
             */
            coverageProducts: components["schemas"]["coverage-product.schema"][];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Navigate to Customer Portal
   * @description Navigate to the customer portal.
   */
  "Customer portal navigate": {
    parameters: {
      query?: {
        /** @description HMAC-SHA256 JWT of {"iss":"<partnerId>","sub":"<storeId>/<customerId>"} */
        token?: string;
        /** @description Order ID */
        order_id?: string;
      };
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Redirect */
      302: {
        content: never;
      };
    };
  };
  /**
   * Update Customer Subscriptions
   * @description Update customer subscription status for SMS and email marketing and transactional messages. If the customer with that phone number or email does not exist, it will be created. Requires the [`customers_write`](/docs/api-reference/scopes) scope.
   */
  "Customer subscriptions update": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": {
          email?: components["schemas"]["customer-subscription-email.schema"];
          sms?: components["schemas"]["customer-subscription-sms.schema"];
        };
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": components["schemas"]["customer-subscription-update-response.schema"];
        };
      };
      /** @description Bad Request */
      400: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Internal Server Error */
      500: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Get customer by email
   * @description Retrieve a customer profile by email address.
   *
   * The response includes the customer's name, contact information, location,
   * and any custom fields associated with the profile. Custom fields are returned
   * as `{ fieldName: value }` pairs.
   *
   * Requires the [`customers_read`](/docs/api-reference/scopes) scope.
   */
  "Customer get": {
    parameters: {
      query: {
        /** @description Customer email address */
        email: string;
      };
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Customer found */
      200: {
        content: {
          "application/json": components["schemas"]["customer-read.schema"];
        };
      };
      /** @description Missing or invalid email parameter */
      400: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description No customer found for that email */
      404: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Internal server error */
      500: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Create or update customer
   * @description Create or update a customer profile. Uses the email address as the upsert
   * key — if a customer with that email exists, their profile is updated;
   * otherwise, a new customer is created.
   *
   * ## Profile fields
   * - `firstName` and `lastName` are set directly on the customer. A full
   *   display name is automatically generated from these fields.
   * - `phoneNumber` should be in E.164 format (e.g., `+12345678900`). If the
   *   number is new, it is added to the customer's contact information.
   *
   * ## Location
   * Providing `location` sets the customer's current location. Only the fields
   * you include are updated.
   *
   * ## Custom fields
   * Use `customFields` to store arbitrary key-value data on the customer (e.g.,
   * `pricing_plan`, `subscription_source`). Values can be strings, numbers, or
   * booleans. If a custom field doesn't exist yet, it is created automatically.
   *
   * Requires the [`customers_write`](/docs/api-reference/scopes) scope.
   */
  "Customer upsert": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["customer-upsert-request.schema"];
      };
    };
    responses: {
      /** @description Existing customer updated */
      200: {
        content: {
          "application/json": components["schemas"]["customer-upsert-response.schema"];
        };
      };
      /** @description New customer created */
      201: {
        content: {
          "application/json": components["schemas"]["customer-upsert-response.schema"];
        };
      };
      /** @description Invalid request body or invalid email address */
      400: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Internal server error */
      500: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Create custom event
   * @description Create a custom event to trigger flows with merchant-defined event names and properties.
   *
   * Custom events allow merchants to trigger flows based on events from their own systems.
   * Events can include custom properties that are accessible in email and SMS templates,
   * and are persisted for segmentation and historical queries.
   *
   * ## Identity Resolution
   * The API resolves customers using the following priority order:
   * 1. `customer.id` — Redo customer ObjectId (highest priority)
   * 2. `customer.email` — customer email address
   * 3. `customer.phoneNumber` — customer phone number
   *
   * At least one identifier must be provided. If no matching customer is found, one will
   * be created automatically. If `customer.id` is provided but not found, the API falls
   * back to email/phone rather than returning 404.
   *
   * ## Datetime Formatting
   * All datetime values must be formatted as ISO 8601 (RFC 3339) strings, e.g., `2026-04-02T12:00:00Z`.
   * This applies to `eventTimestamp`, any date-valued properties in `data`, and any date-valued `customFields`.
   * Strings matching this format are automatically detected and indexed as dates for segmentation.
   *
   * ## Rate Limiting
   * This endpoint is rate-limited to 100 requests per second per store.
   *
   * Requires the [`customer_events_write`](/docs/api-reference/scopes) scope.
   */
  "Custom event create": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["custom-event-request.schema"];
      };
    };
    responses: {
      /** @description Event accepted and queued for processing. No response body is returned. */
      202: {
        content: never;
      };
      /** @description Invalid request body or missing required customer identifier */
      400: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Store not found */
      404: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Rate limit exceeded */
      429: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Bulk create custom events
   * @description Create multiple custom events in a single request. Accepts up to 100 events per request.
   *
   * Each event is validated independently. The response includes per-event results, allowing
   * partial failures — some events may be accepted while others are rejected due to validation
   * errors.
   *
   * ## Identity Resolution
   * Each event resolves customers independently using the same priority order as the
   * single-event endpoint:
   * 1. `customer.id` — Redo customer ObjectId (highest priority)
   * 2. `customer.email` — customer email address
   * 3. `customer.phoneNumber` — customer phone number
   *
   * At least one identifier must be provided per event. If no matching customer is found,
   * one will be created automatically.
   *
   * ## Rate Limiting
   * This endpoint is rate-limited to 100 requests per second per store.
   *
   * Requires the [`customer_events_write`](/docs/api-reference/scopes) scope.
   */
  "Bulk create custom events": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["bulk-custom-event-request.schema"];
      };
    };
    responses: {
      /** @description Bulk request accepted and queued for processing. No response body is returned. */
      202: {
        content: never;
      };
      /** @description Invalid request body (e.g., events array missing or exceeds 100 items) */
      400: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Store not found */
      404: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Rate limit exceeded */
      429: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * List Inbound Shipments
   * @description List inbound shipments, representing inventory in transit or received at a location. Sorted by most recently updated first.
   * Requires the [`inbound_shipments_read`](/docs/api-reference/scopes) scope.
   */
  "Inbound shipments list": {
    parameters: {
      query?: {
        status?: components["parameters"]["inbound-shipment-status.param"];
        location_id?: components["parameters"]["location-id.param"];
        created_at_min?: components["parameters"]["created-at-min.param"];
        created_at_max?: components["parameters"]["created-at-max.param"];
      };
      header?: {
        "X-Page-Continue"?: components["parameters"]["page-continue.param"];
        "X-Page-Size"?: components["parameters"]["page-size.param"];
      };
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        headers: {
          "X-Page-Next": components["headers"]["page-next.header"];
        };
        content: {
          "application/json": {
            inbound_shipments: components["schemas"]["inbound-shipment-list.schema"][];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Get Inbound Shipment
   * @description Get a single inbound shipment by ID. Returns additional detail fields including purchase orders, transfer orders, files, volume, item discrepancies, and packing modes.
   * Requires the [`inbound_shipments_read`](/docs/api-reference/scopes) scope.
   */
  "Inbound shipment get": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        inboundShipmentId: components["parameters"]["inbound-shipment-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            inbound_shipment: components["schemas"]["inbound-shipment-detail.schema"];
          };
        };
      };
      /** @description Inbound shipment not found */
      404: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * List Inventory Items
   * @description List in-stock inventory items. Only items with on-hand quantity greater than zero are returned. Sorted by most recently updated first.
   * Requires the [`inventory_read`](/docs/api-reference/scopes) scope.
   */
  "Inventory items list": {
    parameters: {
      query?: {
        location_id?: components["parameters"]["location-id.param"];
        kind?: components["parameters"]["inventory-item-kind.param"];
      };
      header?: {
        "X-Page-Continue"?: components["parameters"]["page-continue.param"];
        "X-Page-Size"?: components["parameters"]["page-size.param"];
      };
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        headers: {
          "X-Page-Next": components["headers"]["page-next.header"];
        };
        content: {
          "application/json": {
            inventory_items: components["schemas"]["inventory-item-list.schema"][];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Get Inventory Item
   * @description Get a single in-stock inventory item by ID. Requires the [`inventory_read`](/docs/api-reference/scopes) scope.
   */
  "Inventory item get": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        inventoryItemId: components["parameters"]["inventory-item-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            inventory_item: components["schemas"]["inventory-item-list.schema"];
          };
        };
      };
      /** @description Inventory item not found */
      404: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * List Inventory Levels
   * @description List inventory levels, representing the aggregate quantity of a product at a specific location. Sorted by most recently updated first.
   * Requires the [`inventory_read`](/docs/api-reference/scopes) scope.
   */
  "Inventory levels list": {
    parameters: {
      query?: {
        location_id?: components["parameters"]["location-id.param"];
        product_id?: components["parameters"]["product-id.param"];
        sku?: components["parameters"]["sku.param"];
        updated_at_min?: components["parameters"]["updated-at-min.param"];
        updated_at_max?: components["parameters"]["updated-at-max.param"];
      };
      header?: {
        "X-Page-Continue"?: components["parameters"]["page-continue.param"];
        "X-Page-Size"?: components["parameters"]["page-size.param"];
      };
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        headers: {
          "X-Page-Next": components["headers"]["page-next.header"];
        };
        content: {
          "application/json": {
            inventory_levels: components["schemas"]["inventory-level-list.schema"][];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Get Inventory Level
   * @description Get a single inventory level by ID. Returns additional detail fields including external IDs, creation timestamp, product UPC, and image URL.
   * Requires the [`inventory_read`](/docs/api-reference/scopes) scope.
   */
  "Inventory level get": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        inventoryLevelId: components["parameters"]["inventory-level-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            inventory_level: components["schemas"]["inventory-level-detail.schema"];
          };
        };
      };
      /** @description Inventory level not found */
      404: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * List Invoices
   * @description Get a list of invoices. Requires the [`invoices_read`](/docs/api-reference/scopes) scope.
   */
  "Invoice list": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            invoices: components["schemas"]["invoice.schema"][];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Create Order
   * @description Create a new order in the system with line items, customer information, and shipping details. Requires the [`orders_write`](/docs/api-reference/scopes) scope.
   */
  "Order create": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["orders-api-create-order-request.schema"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": components["schemas"]["orders-api-create-order-response.schema"];
        };
      };
      /** @description Bad Request (validation error) */
      400: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Unauthorized (invalid or missing API token) */
      401: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Conflict (duplicate order ID) */
      409: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Get Order
   * @description Retrieve an existing order from the system, including all fulfillments. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response. Requires the [`orders_read`](/docs/api-reference/scopes) scope.
   */
  "Order get": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        orderId: components["parameters"]["order-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": components["schemas"]["orders-api-get-order-response.schema"];
        };
      };
      /** @description Unauthorized (invalid or missing API token) */
      401: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Order not found */
      404: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Delete Order
   * @description Delete an order from the system. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response. Requires the [`orders_write`](/docs/api-reference/scopes) scope.
   */
  "Order delete": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        orderId: components["parameters"]["order-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": components["schemas"]["orders-api-delete-order-response.schema"];
        };
      };
      /** @description Unauthorized (invalid or missing API token) */
      401: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Order not found */
      404: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Create Fulfillment
   * @description Create a fulfillment for specific line items within an order, including tracking information. The orderId parameter can be either the external order ID you provided when creating the order, or the internal Redo order ID returned from the create order response. Requires the [`orders_write`](/docs/api-reference/scopes) scope.
   */
  "Fulfillment create": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        orderId: components["parameters"]["order-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["orders-api-create-fulfillment-request.schema"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": components["schemas"]["orders-api-fulfillment-response.schema"];
        };
      };
      /** @description Bad Request (validation error) */
      400: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Unauthorized (invalid or missing API token) */
      401: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Order not found */
      404: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Update Fulfillment Status
   * @description Post a shipment status update or trigger an automation event for a fulfillment.
   *
   * The status field accepts two types of values:
   *
   * **Statuses** (e.g., `in_transit`, `delivered`): Real carrier tracking statuses that update the shipment's current status. When you send these, the fulfillment's current status is updated to reflect the new state. Triggers any configured automations for that status.
   *
   * **Events** (e.g., `stalled_in_transit`, `delayed`, `arriving_early`): Special event types that trigger automations without changing the current shipment status. The status field remains unchanged, but you can still update estimated delivery date and add tracking history entries. Use these to trigger event-based automations.
   *
   * Both statuses and events can update other fields like estimated delivery date and tracking history.
   *
   * Requires the [`orders_write`](/docs/api-reference/scopes) scope.
   */
  "Fulfillment status update": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        orderId: components["parameters"]["order-id.param"];
        fulfillmentId: components["parameters"]["fulfillment-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["orders-api-update-fulfillment-status-request.schema"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": components["schemas"]["orders-api-fulfillment-response.schema"];
        };
      };
      /** @description Bad Request (validation error) */
      400: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Unauthorized (invalid or missing API token) */
      401: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Fulfillment not found */
      404: {
        content: {
          "application/json": components["schemas"]["orders-api-error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Bulk upload products
   * @description Bulk create or update product families and their variants.
   *
   * Submit up to 1,000 product families per request, each containing up to 100 variants.
   * Products are processed asynchronously in batches. Only one bulk upload can run per store at a time.
   *
   * ## Matching Strategy
   *
   * The API uses the following priority to match incoming product families to existing records:
   *
   * 1. **`product_family_id`** — Redo product family ID (direct lookup)
   * 2. **`external_id`** — ID from your external system
   * 3. **SKU** — Matched via variant SKUs
   *
   * If no match is found, a new product family is created.
   *
   * ## Concurrency
   *
   * Only one bulk upload operation can run per store at a time. If a bulk upload is already
   * in progress, the request will return a `409 Conflict` error.
   *
   * Requires the [`products_write`](/docs/api-reference/scopes) scope.
   */
  "Products bulk upload": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["bulk-product-upload-request.schema"];
      };
    };
    responses: {
      /** @description Upload completed */
      200: {
        content: {
          "application/json": components["schemas"]["bulk-product-upload-response.schema"];
        };
      };
      /** @description Invalid request body or missing required fields */
      400: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description A bulk upload is already in progress for this store */
      409: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * List Return Tags
   * @description List every return tag defined for the store. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
   */
  "Return tags list": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            tags: components["schemas"]["return-tag.schema"][];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Upsert Return Tag
   * @description Create a new return tag, update an existing tag's color, or rename a tag. When `newName` is set and differs from the path `name`, the rename cascades to returns and saved view filters.
   *
   * Possible 400 problem types:
   * - `com.getredo.api:return-tag/rename-precondition-failed` — the source
   *   tag does not exist, or the target name is already in use.
   *
   * - `com.getredo.api:return-tag/invalid-request` — the path `name` is
   *   missing or the request body is invalid.
   *
   * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
   */
  "Return tag upsert": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        name: components["parameters"]["return-tag-name.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["return-tag-upsert-request.schema"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            tag: components["schemas"]["return-tag.schema"];
          };
        };
      };
      /** @description Rename precondition failed or invalid request */
      400: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Delete Return Tag
   * @description Delete a return tag. The tag is also stripped from every return and saved view filter that referenced it.
   * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
   */
  "Return tag delete": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
        name: components["parameters"]["return-tag-name.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            /** @constant */
            success: true;
          };
        };
      };
      /** @description Invalid request. Returned with type `com.getredo.api:return-tag/invalid-request` when the path `name` is missing. */
      400: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * List Returns
   * @description List returns, sorted by most recent to least recent. Requires the [`returns_read`](/docs/api-reference/scopes) scope.
   */
  "Returns list": {
    parameters: {
      query?: {
        updated_at_max?: components["parameters"]["updated-at-max.param"];
        updated_at_min?: components["parameters"]["updated-at-min.param"];
        shopify_order_name?: components["parameters"]["shopify-order-name"];
        provider_order_name?: components["parameters"]["provider-order-name"];
        status?: components["parameters"]["return-status.param"];
      };
      header?: {
        "X-Page-Continue"?: components["parameters"]["page-continue.param"];
        "X-Page-Size"?: components["parameters"]["page-size.param"];
      };
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        headers: {
          "X-Page-Next": components["headers"]["page-next.header"];
        };
        content: {
          "application/json": {
            orders: components["schemas"]["order-read.schema"][];
            returns: components["schemas"]["return-read.schema"][];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Create Return
   * @description Create a return for specific order line items. Requires the [`returns_write`](/docs/api-reference/scopes) scope.
   */
  "Return create": {
    parameters: {
      header?: {
        "Idempotency-Key"?: components["parameters"]["idempotency-key.param"];
      };
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["create-return-request.schema"];
      };
    };
    responses: {
      /** @description Success (idempotent replay; existing return returned) */
      200: {
        content: {
          "application/json": components["schemas"]["create-return-response.schema"];
        };
      };
      /** @description Created */
      201: {
        content: {
          "application/json": components["schemas"]["create-return-response.schema"];
        };
      };
      /** @description Invalid request body */
      400: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Order not found */
      404: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Conflict */
      409: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Import Returns
   * @description Import externally-created returns into Redo. Use this endpoint when the return originates outside of Redo — a warehouse scan, an ERP, a POS system, or a partner platform.
   *
   * Products are referenced by their Redo product ID, obtained from the bulk product upload response. No order is required. Returns are created ready for warehouse intake. Supports up to 100 returns per request with per-item error reporting.
   * Requires the [`returns_write`](/docs/api-reference/scopes) scope.
   */
  "Import returns": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["bulk-returns-request.schema"];
      };
    };
    responses: {
      /** @description Batch processed. Check individual results for per-item status. Some items may have succeeded while others failed. */
      200: {
        content: {
          "application/json": components["schemas"]["bulk-returns-response.schema"];
        };
      };
      /** @description Invalid request body or team not configured for product catalog operations. */
      400: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Receive Storefront Events
   * @description Processes events from storefronts using Shopify pixel event schema Requires the [`storefront_events_write`](/docs/api-reference/scopes) scope.
   */
  "Storefront Event": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": components["schemas"]["storefront-event.schema"];
      };
    };
    responses: {
      /** @description Event processed successfully */
      204: {
        content: never;
      };
      /** @description Invalid event payload */
      400: {
        content: {
          "application/json": components["schemas"]["error.schema"];
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * List Webhooks
   * @description List webhooks for store. Requires the [`webhooks_read`](/docs/api-reference/scopes) scope.
   */
  "Webhooks list": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            webhooks: components["schemas"]["webhook-read.schema"][];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Create or Update Webhook
   * @description Create webhook for store. Or if webhook already exists with `externalId`, update it. Requires the [`webhooks_write`](/docs/api-reference/scopes) scope.
   */
  "Webhook create": {
    parameters: {
      path: {
        storeId: components["parameters"]["store-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": {
          webhook?: components["schemas"]["webhook-create.schema"];
        };
      };
    };
    responses: {
      /** @description Updated */
      200: {
        content: {
          "application/json": {
            webhook?: components["schemas"]["webhook-read.schema"];
          };
        };
      };
      /** @description Created */
      201: {
        content: {
          "application/json": {
            webhook?: components["schemas"]["webhook-read.schema"];
          };
        };
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Webhook
   * @description Get a webhook. Requires the [`webhooks_read`](/docs/api-reference/scopes) scope.
   */
  "Webhook get": {
    parameters: {
      path: {
        webhookId: components["parameters"]["webhook-id.param"];
      };
    };
    responses: {
      /** @description Success */
      200: {
        content: {
          "application/json": {
            webhook: components["schemas"]["webhook-read.schema"];
          };
        };
      };
    };
  };
  /**
   * Update Webhook
   * @description Update a webhook. Requires the [`webhooks_write`](/docs/api-reference/scopes) scope.
   */
  "Webhook update": {
    parameters: {
      path: {
        webhookId: components["parameters"]["webhook-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": {
          webhook: components["schemas"]["webhook-update.schema"];
        };
      };
    };
    responses: {
      /** @description Success */
      204: {
        content: never;
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /**
   * Delete Webhook
   * @description Delete a webhook. Requires the [`webhooks_write`](/docs/api-reference/scopes) scope.
   */
  "Webhook delete": {
    parameters: {
      path: {
        webhookId: components["parameters"]["webhook-id.param"];
      };
    };
    responses: {
      /** @description Deleted */
      204: {
        content: never;
      };
    };
  };
  /**
   * Replay Webhook
   * @description Replay a webhook. Requires the [`webhooks_write`](/docs/api-reference/scopes) scope.
   */
  "Webhook replay": {
    parameters: {
      path: {
        webhookId: components["parameters"]["webhook-id.param"];
      };
    };
    requestBody: {
      content: {
        "application/json": {
          /** Format: date-time */
          start: string;
        };
      };
    };
    responses: {
      /** @description Success */
      202: {
        content: never;
      };
      /** @description Error */
      default: {
        content: {
          "application/problem+json": components["schemas"]["error.schema"];
        };
      };
    };
  };
  /** Return event */
  "Webhook return event": {
    /** @description Return event webhook. */
    requestBody: {
      content: {
        /**
         * @example {
         *   "type": "created",
         *   "at": "2023-08-18T12:00:00Z",
         *   "merchantName": "Example Merchant",
         *   "return": {
         *     "id": "64df65d4c5a4ca3eff4b4e43",
         *     "type": "return",
         *     "status": "open",
         *     "createdAt": "2023-08-18T12:00:00Z",
         *     "updatedAt": "2023-08-18T12:00:00Z",
         *     "order": {
         *       "id": "64e4da943dd822979a70bd12",
         *       "name": "#1234"
         *     },
         *     "externalOrderIds": [
         *       "1073459971"
         *     ],
         *     "externalReturnIds": [
         *       {
         *         "provider": "shopify",
         *         "value": "12345"
         *       }
         *     ],
         *     "shopifyOrderIds": [
         *       "1073459971"
         *     ],
         *     "compensationMethods": [
         *       "refund",
         *       "store_credit",
         *       "exchange"
         *     ],
         *     "completeWithNoAction": false,
         *     "internalCreatedByName": "Jordan Manager",
         *     "items": [
         *       {
         *         "id": "64df65d4c5a4ca3eff4b4e44",
         *         "orderItem": {
         *           "id": "1073459971/0",
         *           "line_item_id": "12345678901234"
         *         },
         *         "productId": "8453214567890",
         *         "variantId": "44567823456789",
         *         "sku": "TSHIRT-BLU-M",
         *         "upc": "012345678905",
         *         "quantity": 1,
         *         "status": "open",
         *         "grade": "A",
         *         "outcome": "restock",
         *         "greenReturn": false,
         *         "reason": "Too big",
         *         "reasonCode": "size_too_large",
         *         "reasons": [
         *           "Too big"
         *         ],
         *         "reasonCodes": [
         *           "size_too_large"
         *         ],
         *         "customerComment": "Runs larger than expected",
         *         "multipleChoiceQuestions": [
         *           {
         *             "question": "What was wrong with the fit?",
         *             "answer": "Too large in the chest"
         *           }
         *         ],
         *         "shipmentGroupIds": [
         *           "sg_abc123"
         *         ],
         *         "externalReturnLineItemId": "ret_li_12345",
         *         "exchangeItem": {
         *           "product": {
         *             "externalId": "8453214567890",
         *             "name": "Classic T-Shirt"
         *           },
         *           "variant": {
         *             "externalId": "44567823456790",
         *             "name": "Large / Blue"
         *           },
         *           "quantity": 1
         *         },
         *         "refund": {
         *           "amount": {
         *             "amount": "29.99",
         *             "currency": "USD"
         *           },
         *           "type": "original_payment"
         *         },
         *         "productValueNoTaxNoAdjustment": {
         *           "amount": {
         *             "amount": "29.99",
         *             "currency": "USD"
         *           }
         *         }
         *       }
         *     ],
         *     "source": {
         *       "emailAddress": "customer@example.com",
         *       "name": {
         *         "given": "Jane",
         *         "surname": "Doe"
         *       },
         *       "mailingAddress": {
         *         "line1": "123 Main St",
         *         "line2": "Apt 4B",
         *         "city": "San Francisco",
         *         "state": "CA",
         *         "postalCode": "94102",
         *         "country": "US"
         *       },
         *       "phoneNumber": "+14155551234"
         *     },
         *     "destination": {
         *       "mailingAddress": {
         *         "line1": "500 Warehouse Way",
         *         "line2": "",
         *         "city": "Salt Lake City",
         *         "state": "UT",
         *         "postalCode": "84104",
         *         "country": "US"
         *       },
         *       "phoneNumber": "+18015550100"
         *     },
         *     "shipment": {
         *       "carrier": "USPS",
         *       "status": "pre_transit",
         *       "tracker": "9400111202555842761523",
         *       "trackingUrl": "https://tools.usps.com/go/TrackConfirmAction?tLabels=9400111202555842761523",
         *       "postageLabel": "https://files.getredo.com/labels/abc123.pdf",
         *       "formLabel": "https://files.getredo.com/forms/abc123.pdf",
         *       "shipmentGroupId": "sg_abc123",
         *       "itemIds": [
         *         "64df65d4c5a4ca3eff4b4e44"
         *       ],
         *       "externalLocationId": "loc_warehouse_1",
         *       "estimatedDeliveryDate": "2023-08-22T00:00:00Z"
         *     },
         *     "shipments": [
         *       {
         *         "carrier": "USPS",
         *         "status": "pre_transit",
         *         "tracker": "9400111202555842761523",
         *         "trackingUrl": "https://tools.usps.com/go/TrackConfirmAction?tLabels=9400111202555842761523",
         *         "postageLabel": "https://files.getredo.com/labels/abc123.pdf",
         *         "shipmentGroupId": "sg_abc123",
         *         "itemIds": [
         *           "64df65d4c5a4ca3eff4b4e44"
         *         ]
         *       }
         *     ],
         *     "dropoffs": [],
         *     "giftCards": [],
         *     "exchange": {
         *       "itemCount": 1,
         *       "items": [
         *         {
         *           "id": "64df65d4c5a4ca3eff4b4e45",
         *           "originalPrice": {
         *             "amount": "34.99",
         *             "currency": "USD"
         *           },
         *           "price": {
         *             "amount": "29.99",
         *             "currency": "USD",
         *             "tax": "2.40"
         *           },
         *           "product": {
         *             "externalId": "8453214567890",
         *             "name": "Classic T-Shirt"
         *           },
         *           "variant": {
         *             "externalId": "44567823456790",
         *             "name": "Large / Blue",
         *             "sku": "TSHIRT-BLU-L"
         *           },
         *           "quantity": 1
         *         }
         *       ],
         *       "order": {
         *         "externalId": "shopify-exchange-456"
         *       },
         *       "provision": "deferred",
         *       "totalTax": {
         *         "amount": "2.40",
         *         "currency": "USD"
         *       }
         *     },
         *     "totals": {
         *       "refund": {
         *         "amount": {
         *           "amount": "0.00",
         *           "currency": "USD"
         *         }
         *       },
         *       "exchange": {
         *         "amount": {
         *           "amount": "29.99",
         *           "currency": "USD"
         *         }
         *       },
         *       "storeCredit": {
         *         "amount": {
         *           "amount": "0.00",
         *           "currency": "USD"
         *         }
         *       },
         *       "charge": {
         *         "amount": {
         *           "amount": "0.00",
         *           "currency": "USD"
         *         }
         *       }
         *     },
         *     "tags": [
         *       {
         *         "name": "VIP customer",
         *         "source": "merchant"
         *       }
         *     ],
         *     "notes": [
         *       {
         *         "message": "Reviewed by support — approved for exchange"
         *       }
         *     ]
         *   },
         *   "order": {
         *     "id": "64e4da943dd822979a70bd12",
         *     "externalId": "1073459971",
         *     "name": "#1234",
         *     "customer": {
         *       "emailAddress": "customer@example.com",
         *       "name": {
         *         "given": "Jane",
         *         "surname": "Doe"
         *       },
         *       "phoneNumber": "+14155551234"
         *     },
         *     "items": [
         *       {
         *         "id": "1073459971/0",
         *         "externalId": "12345678901234",
         *         "fulfillmentLocationId": "loc_warehouse_1",
         *         "product": {
         *           "externalId": "8453214567890",
         *           "name": "Classic T-Shirt"
         *         },
         *         "variant": {
         *           "externalId": "44567823456789",
         *           "name": "Medium / Blue",
         *           "sku": "TSHIRT-BLU-M"
         *         },
         *         "quantity": 1,
         *         "price": {
         *           "amount": "29.99",
         *           "currency": "USD"
         *         }
         *       }
         *     ],
         *     "discounts": {
         *       "amount": "0.00",
         *       "currency": "USD"
         *     },
         *     "lineItemsTotal": {
         *       "amount": "29.99",
         *       "currency": "USD"
         *     },
         *     "shippingCost": {
         *       "amount": "5.99",
         *       "currency": "USD"
         *     },
         *     "taxes": {
         *       "amount": "2.40",
         *       "currency": "USD"
         *     },
         *     "total": {
         *       "amount": "38.38",
         *       "currency": "USD"
         *     }
         *   }
         * }
         */
        "application/json": {
          /**
           * At
           * Format: date-time
           * @description Event time
           */
          at?: string;
          /**
           * Merchant Name
           * @description Name of the merchant team that owns this return.
           */
          merchantName?: string;
          /**
           * Order
           * @description Order for return.
           */
          order?: components["schemas"]["order-read.schema"];
          /**
           * Return
           * @description Return.
           */
          return?: components["schemas"]["return-read.schema"];
          /**
           * @description Event type
           * @enum {string}
           */
          type?: "backfill" | "created" | "updated";
        };
      };
    };
    responses: {
      /** @description Success. Return a 2xx status code to indicate success. */
      "2XX": {
        content: never;
      };
      /** @description Error. The event will be retried multiple times and then discarded. */
      default: {
        content: never;
      };
    };
  };
}
