{"version":3,"sources":["../../src/client/sdk.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nimport { createClient, createConfig, type Options } from \"@hey-api/client-fetch\"\nimport type {\n  ListStockData,\n  ListStockResponse,\n  ListStockError,\n  CreateStockData,\n  CreateStockResponse,\n  CreateStockError,\n  GetStockForProductsData,\n  GetStockForProductsResponse,\n  GetStockForProductsError,\n  DeleteStockData,\n  DeleteStockResponse,\n  DeleteStockError,\n  GetStockData,\n  GetStockResponse,\n  GetStockError,\n  UpdateStockData,\n  UpdateStockResponse,\n  UpdateStockError,\n  ListTransactionsData,\n  ListTransactionsResponse,\n  ListTransactionsError,\n  CreateTransactionData,\n  CreateTransactionResponse,\n  CreateTransactionError,\n  GetTransactionData,\n  GetTransactionResponse,\n  GetTransactionError,\n  ListLocationsData,\n  ListLocationsResponse,\n  ListLocationsError,\n  CreateLocationData,\n  CreateLocationResponse,\n  CreateLocationError,\n  DeleteLocationData,\n  DeleteLocationResponse,\n  GetLocationData,\n  GetLocationResponse,\n  GetLocationError,\n  UpdateLocationData,\n  UpdateLocationResponse,\n  UpdateLocationError,\n} from \"./types.gen\"\n\nexport const client = createClient(createConfig())\n\n/**\n * Get Stock for all Products\n * Returns all products and their associated stock.\n */\nexport const listStock = <ThrowOnError extends boolean = false>(\n  options?: Options<ListStockData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).get<\n    ListStockResponse,\n    ListStockError,\n    ThrowOnError\n  >({\n    ...options,\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories\",\n  })\n}\n\n/**\n * Create Stock for Product\n * Sets the inventory quantity for the specified product.\n */\nexport const createStock = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateStockData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).post<\n    CreateStockResponse,\n    CreateStockError,\n    ThrowOnError\n  >({\n    ...options,\n    headers: {\n      \"Content-Type\": \"application/json\",\n      ...options?.headers,\n    },\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories\",\n  })\n}\n\n/**\n * List Stock\n * Returns stock for all products matching the supplied unique identifiers.\n */\nexport const getStockForProducts = <ThrowOnError extends boolean = false>(\n  options?: Options<GetStockForProductsData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).post<\n    GetStockForProductsResponse,\n    GetStockForProductsError,\n    ThrowOnError\n  >({\n    ...options,\n    headers: {\n      \"Content-Type\": \"application/json\",\n      ...options?.headers,\n    },\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/multiple\",\n  })\n}\n\n/**\n * Delete Stock for Product\n * Deletes the inventory for the specified product. The product inventory is null and is no longer managed by Commerce. If you want to keep managing inventory but have none of the product in stock, set the inventory to `0` instead of deleting the inventory.\n */\nexport const deleteStock = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteStockData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).delete<\n    DeleteStockResponse,\n    DeleteStockError,\n    ThrowOnError\n  >({\n    ...options,\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/{product_uuid}\",\n  })\n}\n\n/**\n * Get Stock for Product\n * Gets the stock for the product matching the specified unique identifier.\n */\nexport const getStock = <ThrowOnError extends boolean = false>(\n  options: Options<GetStockData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).get<\n    GetStockResponse,\n    GetStockError,\n    ThrowOnError\n  >({\n    ...options,\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/{product_uuid}\",\n  })\n}\n\n/**\n * Update Stock for Product\n * Updates the inventory for the specified product.\n */\nexport const updateStock = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateStockData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).put<\n    UpdateStockResponse,\n    UpdateStockError,\n    ThrowOnError\n  >({\n    ...options,\n    headers: {\n      \"Content-Type\": \"application/json\",\n      ...options?.headers,\n    },\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/{product_uuid}\",\n  })\n}\n\n/**\n * Get Stock Transactions for Product\n * Returns the transactions recorded for the specified product.\n */\nexport const listTransactions = <ThrowOnError extends boolean = false>(\n  options: Options<ListTransactionsData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).get<\n    ListTransactionsResponse,\n    ListTransactionsError,\n    ThrowOnError\n  >({\n    ...options,\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/{product_uuid}/transactions\",\n  })\n}\n\n/**\n * Create Stock Transaction on Product\n */\nexport const createTransaction = <ThrowOnError extends boolean = false>(\n  options: Options<CreateTransactionData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).post<\n    CreateTransactionResponse,\n    CreateTransactionError,\n    ThrowOnError\n  >({\n    ...options,\n    headers: {\n      \"Content-Type\": \"application/json\",\n      ...options?.headers,\n    },\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/{product_uuid}/transactions\",\n  })\n}\n\n/**\n * Get Single Stock Transaction for Product\n * Returns the specific transaction with transaction_uuid for product_uuid\n */\nexport const getTransaction = <ThrowOnError extends boolean = false>(\n  options: Options<GetTransactionData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).get<\n    GetTransactionResponse,\n    GetTransactionError,\n    ThrowOnError\n  >({\n    ...options,\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/{product_uuid}/transactions/{transaction_uuid}\",\n  })\n}\n\n/**\n * List Locations\n * Lists all Inventory Locations\n */\nexport const listLocations = <ThrowOnError extends boolean = false>(\n  options?: Options<ListLocationsData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).get<\n    ListLocationsResponse,\n    ListLocationsError,\n    ThrowOnError\n  >({\n    ...options,\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/locations\",\n  })\n}\n\n/**\n * Create a Location\n * Creates an Inventory Location\n */\nexport const createLocation = <ThrowOnError extends boolean = false>(\n  options?: Options<CreateLocationData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).post<\n    CreateLocationResponse,\n    CreateLocationError,\n    ThrowOnError\n  >({\n    ...options,\n    headers: {\n      \"Content-Type\": \"application/json\",\n      ...options?.headers,\n    },\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/locations\",\n  })\n}\n\n/**\n * Delete a Location\n * Delete an Inventory Location\n */\nexport const deleteLocation = <ThrowOnError extends boolean = false>(\n  options: Options<DeleteLocationData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).delete<\n    DeleteLocationResponse,\n    unknown,\n    ThrowOnError\n  >({\n    ...options,\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/locations/{location_uuid}\",\n  })\n}\n\n/**\n * Get a Location\n * Get an Inventory Location\n */\nexport const getLocation = <ThrowOnError extends boolean = false>(\n  options: Options<GetLocationData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).get<\n    GetLocationResponse,\n    GetLocationError,\n    ThrowOnError\n  >({\n    ...options,\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/locations/{location_uuid}\",\n  })\n}\n\n/**\n * Update a Location\n * Updates an Inventory Location\n */\nexport const updateLocation = <ThrowOnError extends boolean = false>(\n  options: Options<UpdateLocationData, ThrowOnError>,\n) => {\n  return (options?.client ?? client).put<\n    UpdateLocationResponse,\n    UpdateLocationError,\n    ThrowOnError\n  >({\n    ...options,\n    headers: {\n      \"Content-Type\": \"application/json\",\n      ...options?.headers,\n    },\n    security: [\n      {\n        scheme: \"bearer\",\n        type: \"http\",\n      },\n    ],\n    url: \"/inventories/locations/{location_uuid}\",\n  })\n}\n"],"mappings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