import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient"; import * as core from "../../../../core"; import type * as Square from "../../../index"; export declare namespace InventoryClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } export declare class InventoryClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: InventoryClient.Options); /** * Returns the standard and custom inventory adjustment reasons available * to the seller. * * @param {Square.ListInventoryAdjustmentReasonsRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.listInventoryAdjustmentReasons({ * includeDeleted: true, * includeSystemCodes: true * }) */ listInventoryAdjustmentReasons(request?: Square.ListInventoryAdjustmentReasonsRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __listInventoryAdjustmentReasons; /** * Creates a custom inventory adjustment reason. * * @param {Square.CreateInventoryAdjustmentReasonRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.createInventoryAdjustmentReason({ * idempotencyKey: "27b2f2b1-1c2a-4b9e-8f3a-0d9c3a1e5b47", * adjustmentReason: { * id: { * type: "CUSTOM" * }, * name: "Donated to charity", * direction: "DECREASE" * } * }) */ createInventoryAdjustmentReason(request: Square.CreateInventoryAdjustmentReasonRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __createInventoryAdjustmentReason; /** * Soft deletes a custom inventory adjustment reason. * * @param {Square.DeleteInventoryAdjustmentReasonRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.deleteInventoryAdjustmentReason({ * reasonId: { * type: "CUSTOM", * customReasonId: "R5BX3PDCZ6EXAMPLE" * } * }) */ deleteInventoryAdjustmentReason(request: Square.DeleteInventoryAdjustmentReasonRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __deleteInventoryAdjustmentReason; /** * Restores a soft-deleted custom inventory adjustment reason. * * @param {Square.RestoreInventoryAdjustmentReasonRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.restoreInventoryAdjustmentReason({ * reasonId: { * type: "CUSTOM", * customReasonId: "R5BX3PDCZ6EXAMPLE" * } * }) */ restoreInventoryAdjustmentReason(request: Square.RestoreInventoryAdjustmentReasonRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __restoreInventoryAdjustmentReason; /** * Returns the inventory adjustment reason identified by the provided * `reason_id`. Deleted custom reasons can be retrieved by ID. * * @param {Square.RetrieveInventoryAdjustmentReasonRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.retrieveInventoryAdjustmentReason({ * reasonId: { * type: "CUSTOM", * customReasonId: "R5BX3PDCZ6EXAMPLE" * } * }) */ retrieveInventoryAdjustmentReason(request: Square.RetrieveInventoryAdjustmentReasonRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __retrieveInventoryAdjustmentReason; /** * Updates a custom inventory adjustment reason. * * @param {Square.UpdateInventoryAdjustmentReasonRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.updateInventoryAdjustmentReason({ * reasonId: { * type: "CUSTOM", * customReasonId: "R5BX3PDCZ6EXAMPLE" * }, * adjustmentReason: { * id: { * type: "CUSTOM", * customReasonId: "R5BX3PDCZ6EXAMPLE" * }, * name: "Charitable donation" * } * }) */ updateInventoryAdjustmentReason(request: Square.UpdateInventoryAdjustmentReasonRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __updateInventoryAdjustmentReason; /** * @deprecated * * Deprecated version of [RetrieveInventoryAdjustment](api-endpoint:Inventory-RetrieveInventoryAdjustment) after the endpoint URL * is updated to conform to the standard convention. * * @param {Square.DeprecatedGetAdjustmentInventoryRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.deprecatedGetAdjustment({ * adjustmentId: "adjustment_id" * }) */ deprecatedGetAdjustment(request: Square.DeprecatedGetAdjustmentInventoryRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __deprecatedGetAdjustment; /** * Applies an update to the provided adjustment. * * On success: returns the newly updated adjustment. * On failure: returns a list of related errors. * * @param {Square.UpdateInventoryAdjustmentRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.updateInventoryAdjustment({ * idempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", * adjustment: {} * }) */ updateInventoryAdjustment(request: Square.UpdateInventoryAdjustmentRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __updateInventoryAdjustment; /** * Returns the [InventoryAdjustment](entity:InventoryAdjustment) object * with the provided `adjustment_id`. * * @param {Square.GetAdjustmentInventoryRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.getAdjustment({ * adjustmentId: "adjustment_id" * }) */ getAdjustment(request: Square.GetAdjustmentInventoryRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __getAdjustment; /** * @deprecated * * Deprecated version of [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) after the endpoint URL * is updated to conform to the standard convention. * * @param {Square.BatchChangeInventoryRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.deprecatedBatchChange({ * idempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", * changes: [{ * type: "PHYSICAL_COUNT", * physicalCount: { * referenceId: "1536bfbf-efed-48bf-b17d-a197141b2a92", * catalogObjectId: "W62UWFY35CWMYGVWK6TWJDNI", * state: "IN_STOCK", * locationId: "C6W5YS5QM06F5", * quantity: "53", * teamMemberId: "LRK57NSQ5X7PUD05", * occurredAt: "2016-11-16T22:25:24.878Z" * } * }], * ignoreUnchangedCounts: true * }) */ deprecatedBatchChange(request: Square.BatchChangeInventoryRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __deprecatedBatchChange; /** * @deprecated * * Deprecated version of [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges) after the endpoint URL * is updated to conform to the standard convention. * * @param {Square.BatchRetrieveInventoryChangesRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.deprecatedBatchGetChanges({ * catalogObjectIds: ["W62UWFY35CWMYGVWK6TWJDNI"], * locationIds: ["C6W5YS5QM06F5"], * types: ["PHYSICAL_COUNT"], * states: ["IN_STOCK"], * updatedAfter: "2016-11-01T00:00:00.000Z", * updatedBefore: "2016-12-01T00:00:00.000Z" * }) */ deprecatedBatchGetChanges(request: Square.BatchRetrieveInventoryChangesRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __deprecatedBatchGetChanges; /** * @deprecated * * Deprecated version of [BatchRetrieveInventoryCounts](api-endpoint:Inventory-BatchRetrieveInventoryCounts) after the endpoint URL * is updated to conform to the standard convention. * * @param {Square.BatchGetInventoryCountsRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.deprecatedBatchGetCounts({ * catalogObjectIds: ["W62UWFY35CWMYGVWK6TWJDNI"], * locationIds: ["59TNP9SA8VGDA"], * updatedAfter: "2016-11-16T00:00:00.000Z" * }) */ deprecatedBatchGetCounts(request: Square.BatchGetInventoryCountsRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __deprecatedBatchGetCounts; /** * Applies adjustments and counts to the provided item quantities. * * On success: returns the current calculated counts for all objects * referenced in the request. * On failure: returns a list of related errors. * * @param {Square.BatchChangeInventoryRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.batchCreateChanges({ * idempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", * changes: [{ * type: "PHYSICAL_COUNT", * physicalCount: { * referenceId: "1536bfbf-efed-48bf-b17d-a197141b2a92", * catalogObjectId: "W62UWFY35CWMYGVWK6TWJDNI", * state: "IN_STOCK", * locationId: "C6W5YS5QM06F5", * quantity: "53", * teamMemberId: "LRK57NSQ5X7PUD05", * occurredAt: "2016-11-16T22:25:24.878Z" * } * }], * ignoreUnchangedCounts: true * }) */ batchCreateChanges(request: Square.BatchChangeInventoryRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __batchCreateChanges; /** * Returns historical physical counts and adjustments based on the * provided filter criteria. * * Results are paginated and sorted in ascending order according their * `occurred_at` timestamp (oldest first). * * BatchRetrieveInventoryChanges is a catch-all query endpoint for queries * that cannot be handled by other, simpler endpoints. * * @param {Square.BatchRetrieveInventoryChangesRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.batchGetChanges({ * catalogObjectIds: ["W62UWFY35CWMYGVWK6TWJDNI"], * locationIds: ["C6W5YS5QM06F5"], * types: ["PHYSICAL_COUNT"], * states: ["IN_STOCK"], * updatedAfter: "2016-11-01T00:00:00.000Z", * updatedBefore: "2016-12-01T00:00:00.000Z" * }) */ batchGetChanges(request: Square.BatchRetrieveInventoryChangesRequest, requestOptions?: InventoryClient.RequestOptions): Promise>; /** * Returns current counts for the provided * [CatalogObject](entity:CatalogObject)s at the requested * [Location](entity:Location)s. * * Results are paginated and sorted in descending order according to their * `calculated_at` timestamp (newest first). * * When `updated_after` is specified, only counts that have changed since that * time (based on the server timestamp for the most recent change) are * returned. This allows clients to perform a "sync" operation, for example * in response to receiving a Webhook notification. * * @param {Square.BatchGetInventoryCountsRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.batchGetCounts({ * catalogObjectIds: ["W62UWFY35CWMYGVWK6TWJDNI"], * locationIds: ["59TNP9SA8VGDA"], * updatedAfter: "2016-11-16T00:00:00.000Z" * }) */ batchGetCounts(request: Square.BatchGetInventoryCountsRequest, requestOptions?: InventoryClient.RequestOptions): Promise>; /** * @deprecated * * Deprecated version of [RetrieveInventoryPhysicalCount](api-endpoint:Inventory-RetrieveInventoryPhysicalCount) after the endpoint URL * is updated to conform to the standard convention. * * @param {Square.DeprecatedGetPhysicalCountInventoryRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.deprecatedGetPhysicalCount({ * physicalCountId: "physical_count_id" * }) */ deprecatedGetPhysicalCount(request: Square.DeprecatedGetPhysicalCountInventoryRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __deprecatedGetPhysicalCount; /** * Returns the [InventoryPhysicalCount](entity:InventoryPhysicalCount) * object with the provided `physical_count_id`. * * @param {Square.GetPhysicalCountInventoryRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.getPhysicalCount({ * physicalCountId: "physical_count_id" * }) */ getPhysicalCount(request: Square.GetPhysicalCountInventoryRequest, requestOptions?: InventoryClient.RequestOptions): core.HttpResponsePromise; private __getPhysicalCount; /** * Retrieves the current calculated stock count for a given * [CatalogObject](entity:CatalogObject) at a given set of * [Location](entity:Location)s. Responses are paginated and unsorted. * For more sophisticated queries, use a batch endpoint. * * @param {Square.GetInventoryRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.get({ * catalogObjectId: "catalog_object_id", * locationIds: "location_ids", * cursor: "cursor" * }) */ get(request: Square.GetInventoryRequest, requestOptions?: InventoryClient.RequestOptions): Promise>; /** * @deprecated * * Returns a set of physical counts and inventory adjustments for the * provided [CatalogObject](entity:CatalogObject) at the requested * [Location](entity:Location)s. * * You can achieve the same result by calling [BatchRetrieveInventoryChanges](api-endpoint:Inventory-BatchRetrieveInventoryChanges) * and having the `catalog_object_ids` list contain a single element of the `CatalogObject` ID. * * Results are paginated and sorted in descending order according to their * `occurred_at` timestamp (newest first). * * There are no limits on how far back the caller can page. This endpoint can be * used to display recent changes for a specific item. For more * sophisticated queries, use a batch endpoint. * * @param {Square.ChangesInventoryRequest} request * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. * * @example * await client.inventory.changes({ * catalogObjectId: "catalog_object_id", * locationIds: "location_ids", * cursor: "cursor" * }) */ changes(request: Square.ChangesInventoryRequest, requestOptions?: InventoryClient.RequestOptions): Promise>; }