/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */

import type { CancelablePromise } from "../core/CancelablePromise";
import { OpenAPI } from "../core/OpenAPI";
import { request as __request } from "../core/request";
export class OrderImportService {
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerInitiateImport(requestBody: {
    fileName?: string;
    updatedFields?: string;
    isUpdate?: boolean;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/orders",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerImportLegacyOrders(requestBody: {
    ordersFileUrl?: string;
    orderItemsFileName?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/legacy-orders",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerImportLegacyOrderItems(requestBody: {
    orderItemsFileUrl?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/legacy-order_items",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerInitiateImportSyncService(requestBody: {
    fileName?: string;
    syncAll?: boolean;
    importedData?: boolean;
    syncOrders?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/sync-orders",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerImportUserAddresses(requestBody: {
    fileName?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/userAddresses",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param orderId
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerGetOrders(
    orderId: string,
  ): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/order-imports/{orderId}",
      path: {
        orderId: orderId,
      },
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerGenerateOrderTransactions(requestBody: {
    fileName?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/order-transactions",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerGenerateOrderItems(requestBody: {
    fileName?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/order-items",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerUpdateOrderItemsImg(requestBody: {
    fileName?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "PUT",
      url: "/v1/order-imports/order-items-img-and-category",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param orderId
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerGetOrderTransaction(
    orderId: string,
  ): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "GET",
      url: "/v1/order-imports/order-transactions/{orderId}",
      path: {
        orderId: orderId,
      },
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerInitiateOrderInvoiceImport(requestBody: {
    fileName?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/order-invoices",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerInitiateAssignOrderInvoice(requestBody: {
    fileName?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/assign-invoiceId",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param requestBody
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerCreateMissingShipmentItems(requestBody: {
    fileName?: string;
  }): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/create-missing-shipment-items",
      body: requestBody,
      mediaType: "application/json",
    });
  }
  /**
   * @param orderId The ID of the order for which missing shipment items should be created
   * @returns any
   * @throws ApiError
   */
  public static importOrdersControllerCreateMissingShipmentItemsByOrderItem(
    orderId: string,
  ): CancelablePromise<any> {
    return __request(OpenAPI, {
      method: "POST",
      url: "/v1/order-imports/create-missing-shipment-items-by-orderID",
      query: {
        orderId: orderId,
      },
    });
  }
}
