{"version":3,"sources":["../../src/client/types.gen.ts"],"sourcesContent":["// This file is auto-generated by @hey-api/openapi-ts\n\nexport type StockType = \"stock\"\n\nexport type StockTransactionType = \"stock-transaction\"\n\nexport type Type = \"stock\"\n\nexport type MultipleProducts = {\n  type?: \"stock\"\n  /**\n   * The unique identifier of the product.\n   */\n  id: string\n}\n\nexport type TransactionResponse = {\n  id: Uuid\n  type: StockTransactionType\n  attributes: TransactionResponseAttributes\n  meta?: Meta\n}\n\n/**\n * The type of action performed by this transaction.\n *\n * - **increment** - use this when you want to make products available for purchase, for example, when you have received stock from a supplier.\n *\n * - **decrement** - Use this when you want to remove stock from product inventory.\n *\n * - **allocate** - Use this when you want to allocate stock, normally to a reseller who sells on the stock.\n *\n * - **deallocate** - Use this when you want to deallocate any previously allocated stock.\n *\n */\nexport type Action = \"increment\" | \"decrement\" | \"allocate\" | \"deallocate\"\n\nexport type TransactionResponseAttributes = {\n  /**\n   * The type of action performed by this transaction.\n   *\n   * - **increment** - use this when you want to make products available for purchase, for example, when you have received stock from a supplier.\n   *\n   * - **decrement** - Use this when you want to remove stock from product inventory.\n   *\n   * - **allocate** - Use this when you want to allocate stock, normally to a reseller who sells on the stock.\n   *\n   * - **deallocate** - Use this when you want to deallocate any previously allocated stock.\n   *\n   */\n  action: \"increment\" | \"decrement\" | \"allocate\" | \"deallocate\"\n  product_id: Uuid\n  /**\n   * The amount of stock affected by the stock transaction.\n   */\n  quantity: BigInt\n  /**\n   * The slug of the location that the transaction should act on.\n   */\n  location?: string\n}\n\nexport type StockCreate = {\n  id?: Uuid\n  type: StockType\n  attributes: StockCreateAttributes\n}\n\nexport type StockUpdateRequest = {\n  id: Uuid\n  type: StockType\n  attributes: StockUpdateAttributes\n}\n\nexport type StockUpdateAttributes = {\n  locations?: NullableLocations\n}\n\nexport type NullableLocation = {\n  available: BigInt\n} | null\n\nexport type NullableLocations = {\n  [key: string]: NullableLocation\n}\n\nexport type StockCreateAttributes = {\n  available?: BigInt\n  locations?: {\n    [key: string]: {\n      available: BigInt\n    }\n  }\n}\n\nexport type StockResponse = {\n  id: Uuid\n  type: StockType\n  attributes: StockResponseAttributes\n  meta: StockMeta\n}\n\nexport type StockResponseAttributes = {\n  available: BigInt\n  allocated: BigInt\n  total: BigInt\n  locations?: StockLocations\n}\n\nexport type StockLocations = {\n  [key: string]: {\n    available: BigInt\n    allocated: BigInt\n    total: BigInt\n  }\n}\n\nexport type TransactionCreate = {\n  type: StockTransactionType\n  attributes: TransactionCreateAttributes\n}\n\nexport type TransactionCreateAttributes = {\n  product_id?: Uuid\n  /**\n   * The type of action being performed by this transaction.\n   *\n   * - **increment** - use this when you want to make products available for purchase, for example, when you have received stock from a supplier.\n   *\n   * - **decrement** - Use this when you want to remove stock from product inventory.\n   *\n   * - **allocate** - Use this when you want to allocate stock, normally to a reseller who sells on the stock.\n   *\n   * - **deallocate** - Use this when you want to deallocate any previously allocated stock.\n   *\n   * - **set** - Use this when you want to set total stock to a specific value.\n   *\n   */\n  action: \"increment\" | \"decrement\" | \"allocate\" | \"deallocate\" | \"set\"\n  /**\n   * The amount of stock affected by the stock transaction.\n   */\n  quantity: BigInt\n  /**\n   * The slug of the location that the transaction should act on.\n   */\n  location?: string\n}\n\nexport type Location = {\n  id: Uuid\n  type: InventoryLocationType\n  attributes: LocationAttributes\n  meta?: Meta\n}\n\nexport type LocationAttributes = {\n  name: string\n  external_ref?: string\n  slug: string\n  description?: string\n  address?: Array<string>\n  geolocation?: GeolocationDetails\n}\n\nexport type LocationUpdateAttributes = {\n  name?: string\n  external_ref?: string | null\n  slug?: string\n  description?: string | null\n  address?: Array<string | null> | null\n  geolocation?: GeolocationDetails\n}\n\n/**\n * The longitude and latitude of a location.\n */\nexport type GeolocationDetails = {\n  lat: number\n  lon: number\n} | null\n\nexport type LocationRequest = {\n  type?: InventoryLocationType\n  attributes: LocationAttributes\n}\n\nexport type LocationUpdateRequest = {\n  id: Uuid\n  type: InventoryLocationType\n  attributes: LocationUpdateAttributes\n}\n\nexport type InventoryLocationType = \"inventory_location\"\n\n/**\n * The unique identifier.\n */\nexport type Uuid = string\n\nexport type Timestamps = {\n  /**\n   * The date and time a resource was updated.\n   */\n  updated_at?: string\n  /**\n   * The date and time a resource was created.\n   */\n  created_at: string\n}\n\nexport type StockMeta = {\n  stock_id: Uuid\n  timestamps: Timestamps\n}\n\nexport type Meta = {\n  timestamps: Timestamps\n}\n\nexport type ErrorResponse = {\n  errors: Array<_Error>\n}\n\nexport type _Error = {\n  /**\n   * The HTTP response code of the error.\n   */\n  status: string\n  /**\n   * A brief summary of the error.\n   */\n  title: string\n  /**\n   * Optional additional detail about the error.\n   */\n  detail?: string\n  /**\n   * Additional supporting meta data for the error.\n   */\n  meta?: {\n    [key: string]: unknown\n  }\n}\n\nexport type Links = {\n  [key: string]: Link\n}\n\nexport type Link = LinkUri | LinkObject\n\nexport type LinkUri = string | null\n\nexport type LinkObject = {\n  href?: string\n  title?: string\n  describedby?: string\n}\n\n/**\n * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport type PageOffset = number\n\n/**\n * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n */\nexport type PageLimit = number\n\n/**\n * Some Inventories API endpoints support filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering), but you must go to a specific endpoint to understand the attributes and operators an endpoint supports.\n *\n */\nexport type Filter = string\n\nexport type ListStockData = {\n  body?: never\n  path?: never\n  query?: {\n    /**\n     * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n     */\n    \"page[offset]\"?: number\n    /**\n     * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n     */\n    \"page[limit]\"?: number\n    /**\n     * Some Inventories API endpoints support filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering), but you must go to a specific endpoint to understand the attributes and operators an endpoint supports.\n     *\n     */\n    filter?: string\n  }\n  url: \"/inventories\"\n}\n\nexport type ListStockErrors = {\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n  /**\n   * Internal server error. There was a system failure in the platform.\n   */\n  500: ErrorResponse\n}\n\nexport type ListStockError = ListStockErrors[keyof ListStockErrors]\n\nexport type ListStockResponses = {\n  /**\n   * Success. All products and their stock values are returned\n   */\n  200: {\n    data: Array<StockResponse>\n    links: Links\n  }\n}\n\nexport type ListStockResponse = ListStockResponses[keyof ListStockResponses]\n\nexport type CreateStockData = {\n  body?: {\n    data: StockCreate\n  }\n  path?: never\n  query?: never\n  url: \"/inventories\"\n}\n\nexport type CreateStockErrors = {\n  /**\n   * Bad request. The request failed validation.\n   */\n  400: ErrorResponse\n  /**\n   * Internal server error. There was a system failure in the platform.\n   */\n  500: ErrorResponse\n}\n\nexport type CreateStockError = CreateStockErrors[keyof CreateStockErrors]\n\nexport type CreateStockResponses = {\n  /**\n   * Success. Stock was successfully created for product\n   */\n  201: {\n    data: StockResponse\n  }\n}\n\nexport type CreateStockResponse =\n  CreateStockResponses[keyof CreateStockResponses]\n\nexport type GetStockForProductsData = {\n  body?: {\n    data: Array<MultipleProducts>\n  }\n  path?: never\n  query?: never\n  url: \"/inventories/multiple\"\n}\n\nexport type GetStockForProductsErrors = {\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n  /**\n   * Internal server error. There was a system failure in the platform.\n   */\n  500: ErrorResponse\n}\n\nexport type GetStockForProductsError =\n  GetStockForProductsErrors[keyof GetStockForProductsErrors]\n\nexport type GetStockForProductsResponses = {\n  /**\n   * Success. Multiple products and their stock values are returned.\n   */\n  200: {\n    data?: Array<StockResponse>\n  }\n}\n\nexport type GetStockForProductsResponse =\n  GetStockForProductsResponses[keyof GetStockForProductsResponses]\n\nexport type DeleteStockData = {\n  body?: never\n  path: {\n    /**\n     * The unique identifier of the product.\n     */\n    product_uuid: Uuid\n  }\n  query?: never\n  url: \"/inventories/{product_uuid}\"\n}\n\nexport type DeleteStockErrors = {\n  /**\n   * Bad request. The request failed validation.\n   */\n  400: ErrorResponse\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n  /**\n   * Internal server error. There was a system failure in the platform.\n   */\n  500: ErrorResponse\n}\n\nexport type DeleteStockError = DeleteStockErrors[keyof DeleteStockErrors]\n\nexport type DeleteStockResponses = {\n  /**\n   * Success. Removes the stock information about the product\n   */\n  204: void\n}\n\nexport type DeleteStockResponse =\n  DeleteStockResponses[keyof DeleteStockResponses]\n\nexport type GetStockData = {\n  body?: never\n  path: {\n    /**\n     * The unique identifier of the product.\n     */\n    product_uuid: Uuid\n  }\n  query?: never\n  url: \"/inventories/{product_uuid}\"\n}\n\nexport type GetStockErrors = {\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n  /**\n   * Internal server error. There was a system failure in the platform.\n   */\n  500: ErrorResponse\n}\n\nexport type GetStockError = GetStockErrors[keyof GetStockErrors]\n\nexport type GetStockResponses = {\n  /**\n   * Success. Returns the stock for the given product UUID\n   */\n  200: {\n    data: StockResponse\n  }\n}\n\nexport type GetStockResponse = GetStockResponses[keyof GetStockResponses]\n\nexport type UpdateStockData = {\n  body?: {\n    data: StockUpdateRequest\n  }\n  path: {\n    /**\n     * The unique identifier of the product.\n     */\n    product_uuid: Uuid\n  }\n  query?: never\n  url: \"/inventories/{product_uuid}\"\n}\n\nexport type UpdateStockErrors = {\n  /**\n   * Bad request. The request failed validation.\n   */\n  400: ErrorResponse\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n  /**\n   * Internal server error. There was a system failure in the platform.\n   */\n  500: ErrorResponse\n}\n\nexport type UpdateStockError = UpdateStockErrors[keyof UpdateStockErrors]\n\nexport type UpdateStockResponses = {\n  /**\n   * Success. The stock item was updated successfully.\n   */\n  200: {\n    data: StockResponse\n  }\n}\n\nexport type UpdateStockResponse =\n  UpdateStockResponses[keyof UpdateStockResponses]\n\nexport type ListTransactionsData = {\n  body?: never\n  path: {\n    /**\n     * The unique identifier of the product.\n     */\n    product_uuid: Uuid\n  }\n  query?: {\n    /**\n     * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n     */\n    \"page[offset]\"?: number\n    /**\n     * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n     */\n    \"page[limit]\"?: number\n    /**\n     * Some Inventories API endpoints support filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering), but you must go to a specific endpoint to understand the attributes and operators an endpoint supports.\n     *\n     */\n    filter?: string\n  }\n  url: \"/inventories/{product_uuid}/transactions\"\n}\n\nexport type ListTransactionsErrors = {\n  /**\n   * Bad request. The request failed validation.\n   */\n  400: ErrorResponse\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n  /**\n   * Internal server error. There was a system failure in the platform.\n   */\n  500: ErrorResponse\n}\n\nexport type ListTransactionsError =\n  ListTransactionsErrors[keyof ListTransactionsErrors]\n\nexport type ListTransactionsResponses = {\n  /**\n   * Success. Returns the stock for the given product\n   */\n  200: {\n    data?: Array<TransactionResponse>\n    links?: Links\n  }\n}\n\nexport type ListTransactionsResponse =\n  ListTransactionsResponses[keyof ListTransactionsResponses]\n\nexport type CreateTransactionData = {\n  body?: {\n    data: TransactionCreate\n  }\n  path: {\n    /**\n     * The unique identifier of the product.\n     */\n    product_uuid: Uuid\n  }\n  query?: never\n  url: \"/inventories/{product_uuid}/transactions\"\n}\n\nexport type CreateTransactionErrors = {\n  /**\n   * Bad request. The request failed validation.\n   */\n  400: ErrorResponse\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n  /**\n   * The request was understood, but could not be processed by the server\n   */\n  422: ErrorResponse\n  /**\n   * Internal server error. There was a system failure in the platform.\n   */\n  500: ErrorResponse\n}\n\nexport type CreateTransactionError =\n  CreateTransactionErrors[keyof CreateTransactionErrors]\n\nexport type CreateTransactionResponses = {\n  /**\n   * Success. Stock was successfully created for product\n   */\n  201: {\n    data?: TransactionResponse\n  }\n}\n\nexport type CreateTransactionResponse =\n  CreateTransactionResponses[keyof CreateTransactionResponses]\n\nexport type GetTransactionData = {\n  body?: never\n  path: {\n    /**\n     * The unique identifier of the product.\n     */\n    product_uuid: Uuid\n    /**\n     * The unique identifier of the transaction.\n     */\n    transaction_uuid: Uuid\n  }\n  query?: never\n  url: \"/inventories/{product_uuid}/transactions/{transaction_uuid}\"\n}\n\nexport type GetTransactionErrors = {\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n  /**\n   * Internal server error. There was a system failure in the platform.\n   */\n  500: ErrorResponse\n}\n\nexport type GetTransactionError =\n  GetTransactionErrors[keyof GetTransactionErrors]\n\nexport type GetTransactionResponses = {\n  /**\n   * Success. Returns the stock transaction for the given product\n   */\n  200: {\n    data?: TransactionResponse\n  }\n}\n\nexport type GetTransactionResponse =\n  GetTransactionResponses[keyof GetTransactionResponses]\n\nexport type ListLocationsData = {\n  body?: never\n  path?: never\n  query?: {\n    /**\n     * The current offset by number of records, not pages. Offset is zero-based. The maximum records you can offset is 10,000. If no page size is set, the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n     */\n    \"page[offset]\"?: number\n    /**\n     * The maximum number of records per page for this response. You can set this value up to 100. If no page size is set, the the [**page length**](https://elasticpath.dev/docs/commerce-cloud/global-project-settings/settings-overview#page-length) store setting is used.\n     */\n    \"page[limit]\"?: number\n    /**\n     * Some Inventories API endpoints support filtering. For the general syntax, see [**Filtering**](/guides/Getting-Started/filtering), but you must go to a specific endpoint to understand the attributes and operators an endpoint supports.\n     *\n     */\n    filter?: string\n  }\n  url: \"/inventories/locations\"\n}\n\nexport type ListLocationsErrors = {\n  /**\n   * Bad request. The request failed validation.\n   */\n  400: ErrorResponse\n}\n\nexport type ListLocationsError = ListLocationsErrors[keyof ListLocationsErrors]\n\nexport type ListLocationsResponses = {\n  /**\n   * Success. A list of locations is returned\n   */\n  200: {\n    data?: Array<Location>\n    links?: Links\n  }\n}\n\nexport type ListLocationsResponse =\n  ListLocationsResponses[keyof ListLocationsResponses]\n\nexport type CreateLocationData = {\n  body?: {\n    data: LocationRequest\n  }\n  path?: never\n  query?: never\n  url: \"/inventories/locations\"\n}\n\nexport type CreateLocationErrors = {\n  /**\n   * Bad request. The request failed validation.\n   */\n  400: ErrorResponse\n}\n\nexport type CreateLocationError =\n  CreateLocationErrors[keyof CreateLocationErrors]\n\nexport type CreateLocationResponses = {\n  /**\n   * Success. The location was created successfully\n   */\n  201: {\n    data?: Location\n  }\n}\n\nexport type CreateLocationResponse =\n  CreateLocationResponses[keyof CreateLocationResponses]\n\nexport type DeleteLocationData = {\n  body?: never\n  path: {\n    /**\n     * The unique identifier of the location.\n     */\n    location_uuid: Uuid\n  }\n  query?: never\n  url: \"/inventories/locations/{location_uuid}\"\n}\n\nexport type DeleteLocationResponses = {\n  /**\n   * Success. The location is deleted\n   */\n  204: void\n}\n\nexport type DeleteLocationResponse =\n  DeleteLocationResponses[keyof DeleteLocationResponses]\n\nexport type GetLocationData = {\n  body?: never\n  path: {\n    /**\n     * The unique identifier of the location.\n     */\n    location_uuid: Uuid\n  }\n  query?: never\n  url: \"/inventories/locations/{location_uuid}\"\n}\n\nexport type GetLocationErrors = {\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n}\n\nexport type GetLocationError = GetLocationErrors[keyof GetLocationErrors]\n\nexport type GetLocationResponses = {\n  /**\n   * Success. The location is returned\n   */\n  200: {\n    data?: Location\n  }\n}\n\nexport type GetLocationResponse =\n  GetLocationResponses[keyof GetLocationResponses]\n\nexport type UpdateLocationData = {\n  body?: {\n    data: LocationUpdateRequest\n  }\n  path: {\n    /**\n     * The unique identifier of the location.\n     */\n    location_uuid: Uuid\n  }\n  query?: never\n  url: \"/inventories/locations/{location_uuid}\"\n}\n\nexport type UpdateLocationErrors = {\n  /**\n   * Bad request. The request failed validation.\n   */\n  400: ErrorResponse\n  /**\n   * Not found. The requested entity does not exist.\n   */\n  404: ErrorResponse\n}\n\nexport type UpdateLocationError =\n  UpdateLocationErrors[keyof UpdateLocationErrors]\n\nexport type UpdateLocationResponses = {\n  /**\n   * Success. The location was updated successfully\n   */\n  200: {\n    data?: Location\n  }\n}\n\nexport type UpdateLocationResponse =\n  UpdateLocationResponses[keyof UpdateLocationResponses]\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}