diff --git a/.fern/metadata.json b/.fern/metadata.json index 06b4edcbd..3162d6dba 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -54,10 +54,10 @@ } } }, - "originGitCommit": "75ef7aa80f34af5146e06af9a90301f741138fc9", + "originGitCommit": "b2dac8b2c1b9fe87c0e1fe3eb6257b259caa0715", "originGitCommitIsDirty": false, "invokedBy": "ci", - "requestedVersion": "AUTO", - "ciProvider": "github", - "sdkVersion": "44.2.1" + "requestedVersion": "45.0.1", + "ciProvider": "buildkite", + "sdkVersion": "45.0.1" } diff --git a/.fern/replay.lock b/.fern/replay.lock index fcbffe99a..22aca7316 100644 --- a/.fern/replay.lock +++ b/.fern/replay.lock @@ -6,5 +6,11 @@ generations: timestamp: 2026-05-19T21:17:19.070Z cli_version: unknown generator_versions: {} -current_generation: 5566d34adedb1ff2d8d9add4889da2996ecdb244 + - commit_sha: 97af10cb2ecabb59842b013e392e5cb4ca46ffef + tree_hash: 9ce6a416fb1967d7859303f43d82c0639a9f04f8 + timestamp: 2026-07-14T16:57:57.559Z + cli_version: unknown + generator_versions: + fernapi/fern-typescript-sdk: 3.73.4 +current_generation: 97af10cb2ecabb59842b013e392e5cb4ca46ffef patches: [] diff --git a/package.json b/package.json index da647325c..dcd4b032e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square", - "version": "44.2.1", + "version": "45.0.1", "private": false, "repository": { "type": "git", diff --git a/reference.md b/reference.md index d093ab9fd..b87a16824 100644 --- a/reference.md +++ b/reference.md @@ -2085,9 +2085,15 @@ batches will be processed in order as long as the total object count for the request (items, variations, modifier lists, discounts, and taxes) is no more than 10,000. +This endpoint uses full-replacement semantics. The client must send the complete object, and any +field absent from the request is interpreted as an intentional clear. This logic applies to +nested objects as well. For example, omitting inlined children like variations will delete them. + To ensure consistency, only one update request is processed at a time per seller account. While one (batch or non-batch) update request is being processed, other (batched and non-batched) -update requests are rejected with the `429` error code. +update requests are rejected with the `429` error code. Prefer batching related changes into a +single call rather than issuing many small writes, since each write acquires the lock separately +and parallel writes to the same seller will contend with each other, producing `429` errors. @@ -2227,6 +2233,8 @@ Returns a list of all [CatalogObject](entity:CatalogObject)s of the specified ty The `types` parameter is specified as a comma-separated list of the [CatalogObjectType](entity:CatalogObjectType) values, for example, "`ITEM`, `ITEM_VARIATION`, `MODIFIER`, `MODIFIER_LIST`, `CATEGORY`, `DISCOUNT`, `TAX`, `IMAGE`". +Always specify `types` explicitly. When upgrading to a newer API version, omitting `types` may +cause new object types to appear in results that were not returned under the previous version. __Important:__ ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use [SearchCatalogObjects](api-endpoint:Catalog-SearchCatalogObjects) @@ -2323,6 +2331,11 @@ endpoint in the following aspects: - `SearchCatalogItems` supports the custom attribute query filters to return items or item variations that contain custom attribute values, where `SearchCatalogObjects` does not. - `SearchCatalogItems` does not support the `include_deleted_objects` filter to search for deleted items or item variations, whereas `SearchCatalogObjects` does. - The both endpoints have different call conventions, including the query filter formats. + +The `object_types` parameter is specified as a list of [CatalogObjectType](entity:CatalogObjectType) values. +Always specify `object_types` explicitly. When upgrading to a newer API version, omitting +`object_types` may cause new object types to appear in results that were not returned under +the previous version. @@ -4466,7 +4479,485 @@ await client.events.disableEvents();
-**requestOptions:** `EventsClient.RequestOptions` +**requestOptions:** `EventsClient.RequestOptions` + +
+
+ + + + + + + + +
client.events.enableEvents() -> Square.EnableEventsResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Enables events to make them searchable. Only events that occur while in the enabled state are searchable. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.events.enableEvents(); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**requestOptions:** `EventsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.events.listEventTypes({ ...params }) -> Square.ListEventTypesResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists all event types that you can subscribe to as webhooks or query using the Events API. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.events.listEventTypes({ + apiVersion: "api_version" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Square.ListEventTypesRequest` + +
+
+ +
+
+ +**requestOptions:** `EventsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +## GiftCards +
client.giftCards.list({ ...params }) -> core.Page<Square.GiftCard, Square.ListGiftCardsResponse> +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Lists all gift cards. You can specify optional filters to retrieve +a subset of the gift cards. Results are sorted by `created_at` in ascending order. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +const pageableResponse = await client.giftCards.list({ + type: "type", + state: "state", + limit: 1, + cursor: "cursor", + customerId: "customer_id" +}); +for await (const item of pageableResponse) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.giftCards.list({ + type: "type", + state: "state", + limit: 1, + cursor: "cursor", + customerId: "customer_id" +}); +while (page.hasNextPage()) { + page = page.getNextPage(); +} + +// You can also access the underlying response +const response = page.response; + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Square.ListGiftCardsRequest` + +
+
+ +
+
+ +**requestOptions:** `GiftCardsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.giftCards.create({ ...params }) -> Square.CreateGiftCardResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Creates a digital gift card or registers a physical (plastic) gift card. The resulting gift card +has a `PENDING` state. To activate a gift card so that it can be redeemed for purchases, call +[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) and create an `ACTIVATE` +activity with the initial balance. Alternatively, you can use [RefundPayment](api-endpoint:Refunds-RefundPayment) +to refund a payment to the new gift card. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.giftCards.create({ + idempotencyKey: "NC9Tm69EjbjtConu", + locationId: "81FN9BNFZTKS4", + giftCard: { + type: "DIGITAL" + } +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Square.CreateGiftCardRequest` + +
+
+ +
+
+ +**requestOptions:** `GiftCardsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.giftCards.getFromGan({ ...params }) -> Square.GetGiftCardFromGanResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves a gift card using the gift card account number (GAN). +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.giftCards.getFromGan({ + gan: "7783320001001635" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Square.GetGiftCardFromGanRequest` + +
+
+ +
+
+ +**requestOptions:** `GiftCardsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.giftCards.getFromNonce({ ...params }) -> Square.GetGiftCardFromNonceResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Retrieves a gift card using a secure payment token that represents the gift card. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.giftCards.getFromNonce({ + nonce: "cnon:7783322135245171" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Square.GetGiftCardFromNonceRequest` + +
+
+ +
+
+ +**requestOptions:** `GiftCardsClient.RequestOptions` + +
+
+
+
+ + +
+
+
+ +
client.giftCards.linkCustomer({ ...params }) -> Square.LinkCustomerToGiftCardResponse +
+
+ +#### 📝 Description + +
+
+ +
+
+ +Links a customer to a gift card, which is also referred to as adding a card on file. +
+
+
+
+ +#### 🔌 Usage + +
+
+ +
+
+ +```typescript +await client.giftCards.linkCustomer({ + giftCardId: "gift_card_id", + customerId: "GKY0FZ3V717AH8Q2D821PNT2ZW" +}); + +``` +
+
+
+
+ +#### ⚙️ Parameters + +
+
+ +
+
+ +**request:** `Square.LinkCustomerToGiftCardRequest` + +
+
+ +
+
+ +**requestOptions:** `GiftCardsClient.RequestOptions`
@@ -4478,7 +4969,7 @@ await client.events.disableEvents();
-
client.events.enableEvents() -> Square.EnableEventsResponse +
client.giftCards.unlinkCustomer({ ...params }) -> Square.UnlinkCustomerFromGiftCardResponse
@@ -4490,7 +4981,7 @@ await client.events.disableEvents();
-Enables events to make them searchable. Only events that occur while in the enabled state are searchable. +Unlinks a customer from a gift card, which is also referred to as removing a card on file.
@@ -4505,7 +4996,10 @@ Enables events to make them searchable. Only events that occur while in the enab
```typescript -await client.events.enableEvents(); +await client.giftCards.unlinkCustomer({ + giftCardId: "gift_card_id", + customerId: "GKY0FZ3V717AH8Q2D821PNT2ZW" +}); ```
@@ -4521,7 +5015,15 @@ await client.events.enableEvents();
-**requestOptions:** `EventsClient.RequestOptions` +**request:** `Square.UnlinkCustomerFromGiftCardRequest` + +
+
+ +
+
+ +**requestOptions:** `GiftCardsClient.RequestOptions`
@@ -4533,7 +5035,7 @@ await client.events.enableEvents();
-
client.events.listEventTypes({ ...params }) -> Square.ListEventTypesResponse +
client.giftCards.get({ ...params }) -> Square.GetGiftCardResponse
@@ -4545,7 +5047,7 @@ await client.events.enableEvents();
-Lists all event types that you can subscribe to as webhooks or query using the Events API. +Retrieves a gift card using the gift card ID.
@@ -4560,8 +5062,8 @@ Lists all event types that you can subscribe to as webhooks or query using the E
```typescript -await client.events.listEventTypes({ - apiVersion: "api_version" +await client.giftCards.get({ + id: "id" }); ``` @@ -4578,7 +5080,7 @@ await client.events.listEventTypes({
-**request:** `Square.ListEventTypesRequest` +**request:** `Square.GetGiftCardsRequest`
@@ -4586,7 +5088,7 @@ await client.events.listEventTypes({
-**requestOptions:** `EventsClient.RequestOptions` +**requestOptions:** `GiftCardsClient.RequestOptions`
@@ -4598,8 +5100,8 @@ await client.events.listEventTypes({
-## GiftCards -
client.giftCards.list({ ...params }) -> core.Page<Square.GiftCard, Square.ListGiftCardsResponse> +## Inventory +
client.inventory.listInventoryAdjustmentReasons({ ...params }) -> Square.ListInventoryAdjustmentReasonsResponse
@@ -4611,8 +5113,8 @@ await client.events.listEventTypes({
-Lists all gift cards. You can specify optional filters to retrieve -a subset of the gift cards. Results are sorted by `created_at` in ascending order. +Returns the standard and custom inventory adjustment reasons available +to the seller.
@@ -4627,31 +5129,10 @@ a subset of the gift cards. Results are sorted by `created_at` in ascending orde
```typescript -const pageableResponse = await client.giftCards.list({ - type: "type", - state: "state", - limit: 1, - cursor: "cursor", - customerId: "customer_id" -}); -for await (const item of pageableResponse) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.giftCards.list({ - type: "type", - state: "state", - limit: 1, - cursor: "cursor", - customerId: "customer_id" +await client.inventory.listInventoryAdjustmentReasons({ + includeDeleted: true, + includeSystemCodes: true }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} - -// You can also access the underlying response -const response = page.response; ```
@@ -4667,7 +5148,7 @@ const response = page.response;
-**request:** `Square.ListGiftCardsRequest` +**request:** `Square.ListInventoryAdjustmentReasonsRequest`
@@ -4675,7 +5156,7 @@ const response = page.response;
-**requestOptions:** `GiftCardsClient.RequestOptions` +**requestOptions:** `InventoryClient.RequestOptions`
@@ -4687,7 +5168,7 @@ const response = page.response;
-
client.giftCards.create({ ...params }) -> Square.CreateGiftCardResponse +
client.inventory.createInventoryAdjustmentReason({ ...params }) -> Square.CreateInventoryAdjustmentReasonResponse
@@ -4699,11 +5180,7 @@ const response = page.response;
-Creates a digital gift card or registers a physical (plastic) gift card. The resulting gift card -has a `PENDING` state. To activate a gift card so that it can be redeemed for purchases, call -[CreateGiftCardActivity](api-endpoint:GiftCardActivities-CreateGiftCardActivity) and create an `ACTIVATE` -activity with the initial balance. Alternatively, you can use [RefundPayment](api-endpoint:Refunds-RefundPayment) -to refund a payment to the new gift card. +Creates a custom inventory adjustment reason.
@@ -4718,11 +5195,14 @@ to refund a payment to the new gift card.
```typescript -await client.giftCards.create({ - idempotencyKey: "NC9Tm69EjbjtConu", - locationId: "81FN9BNFZTKS4", - giftCard: { - type: "DIGITAL" +await client.inventory.createInventoryAdjustmentReason({ + idempotencyKey: "27b2f2b1-1c2a-4b9e-8f3a-0d9c3a1e5b47", + adjustmentReason: { + id: { + type: "CUSTOM" + }, + name: "Donated to charity", + direction: "DECREASE" } }); @@ -4740,7 +5220,7 @@ await client.giftCards.create({
-**request:** `Square.CreateGiftCardRequest` +**request:** `Square.CreateInventoryAdjustmentReasonRequest`
@@ -4748,7 +5228,7 @@ await client.giftCards.create({
-**requestOptions:** `GiftCardsClient.RequestOptions` +**requestOptions:** `InventoryClient.RequestOptions`
@@ -4760,7 +5240,7 @@ await client.giftCards.create({
-
client.giftCards.getFromGan({ ...params }) -> Square.GetGiftCardFromGanResponse +
client.inventory.deleteInventoryAdjustmentReason({ ...params }) -> Square.DeleteInventoryAdjustmentReasonResponse
@@ -4772,7 +5252,7 @@ await client.giftCards.create({
-Retrieves a gift card using the gift card account number (GAN). +Soft deletes a custom inventory adjustment reason.
@@ -4787,8 +5267,11 @@ Retrieves a gift card using the gift card account number (GAN).
```typescript -await client.giftCards.getFromGan({ - gan: "7783320001001635" +await client.inventory.deleteInventoryAdjustmentReason({ + reasonId: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE" + } }); ``` @@ -4805,7 +5288,7 @@ await client.giftCards.getFromGan({
-**request:** `Square.GetGiftCardFromGanRequest` +**request:** `Square.DeleteInventoryAdjustmentReasonRequest`
@@ -4813,7 +5296,7 @@ await client.giftCards.getFromGan({
-**requestOptions:** `GiftCardsClient.RequestOptions` +**requestOptions:** `InventoryClient.RequestOptions`
@@ -4825,7 +5308,7 @@ await client.giftCards.getFromGan({
-
client.giftCards.getFromNonce({ ...params }) -> Square.GetGiftCardFromNonceResponse +
client.inventory.restoreInventoryAdjustmentReason({ ...params }) -> Square.RestoreInventoryAdjustmentReasonResponse
@@ -4837,7 +5320,7 @@ await client.giftCards.getFromGan({
-Retrieves a gift card using a secure payment token that represents the gift card. +Restores a soft-deleted custom inventory adjustment reason.
@@ -4852,8 +5335,11 @@ Retrieves a gift card using a secure payment token that represents the gift card
```typescript -await client.giftCards.getFromNonce({ - nonce: "cnon:7783322135245171" +await client.inventory.restoreInventoryAdjustmentReason({ + reasonId: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE" + } }); ``` @@ -4870,7 +5356,7 @@ await client.giftCards.getFromNonce({
-**request:** `Square.GetGiftCardFromNonceRequest` +**request:** `Square.RestoreInventoryAdjustmentReasonRequest`
@@ -4878,7 +5364,7 @@ await client.giftCards.getFromNonce({
-**requestOptions:** `GiftCardsClient.RequestOptions` +**requestOptions:** `InventoryClient.RequestOptions`
@@ -4890,7 +5376,7 @@ await client.giftCards.getFromNonce({
-
client.giftCards.linkCustomer({ ...params }) -> Square.LinkCustomerToGiftCardResponse +
client.inventory.retrieveInventoryAdjustmentReason({ ...params }) -> Square.RetrieveInventoryAdjustmentReasonResponse
@@ -4902,7 +5388,8 @@ await client.giftCards.getFromNonce({
-Links a customer to a gift card, which is also referred to as adding a card on file. +Returns the inventory adjustment reason identified by the provided +`reason_id`. Deleted custom reasons can be retrieved by ID.
@@ -4917,9 +5404,11 @@ Links a customer to a gift card, which is also referred to as adding a card on f
```typescript -await client.giftCards.linkCustomer({ - giftCardId: "gift_card_id", - customerId: "GKY0FZ3V717AH8Q2D821PNT2ZW" +await client.inventory.retrieveInventoryAdjustmentReason({ + reasonId: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE" + } }); ``` @@ -4936,7 +5425,7 @@ await client.giftCards.linkCustomer({
-**request:** `Square.LinkCustomerToGiftCardRequest` +**request:** `Square.RetrieveInventoryAdjustmentReasonRequest`
@@ -4944,7 +5433,7 @@ await client.giftCards.linkCustomer({
-**requestOptions:** `GiftCardsClient.RequestOptions` +**requestOptions:** `InventoryClient.RequestOptions`
@@ -4956,7 +5445,7 @@ await client.giftCards.linkCustomer({
-
client.giftCards.unlinkCustomer({ ...params }) -> Square.UnlinkCustomerFromGiftCardResponse +
client.inventory.updateInventoryAdjustmentReason({ ...params }) -> Square.UpdateInventoryAdjustmentReasonResponse
@@ -4968,7 +5457,7 @@ await client.giftCards.linkCustomer({
-Unlinks a customer from a gift card, which is also referred to as removing a card on file. +Updates a custom inventory adjustment reason.
@@ -4983,9 +5472,18 @@ Unlinks a customer from a gift card, which is also referred to as removing a car
```typescript -await client.giftCards.unlinkCustomer({ - giftCardId: "gift_card_id", - customerId: "GKY0FZ3V717AH8Q2D821PNT2ZW" +await client.inventory.updateInventoryAdjustmentReason({ + reasonId: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE" + }, + adjustmentReason: { + id: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE" + }, + name: "Charitable donation" + } }); ``` @@ -5002,7 +5500,7 @@ await client.giftCards.unlinkCustomer({
-**request:** `Square.UnlinkCustomerFromGiftCardRequest` +**request:** `Square.UpdateInventoryAdjustmentReasonRequest`
@@ -5010,7 +5508,7 @@ await client.giftCards.unlinkCustomer({
-**requestOptions:** `GiftCardsClient.RequestOptions` +**requestOptions:** `InventoryClient.RequestOptions`
@@ -5022,7 +5520,7 @@ await client.giftCards.unlinkCustomer({
-
client.giftCards.get({ ...params }) -> Square.GetGiftCardResponse +
client.inventory.deprecatedGetAdjustment({ ...params }) -> Square.GetInventoryAdjustmentResponse
@@ -5034,7 +5532,8 @@ await client.giftCards.unlinkCustomer({
-Retrieves a gift card using the gift card ID. +Deprecated version of [RetrieveInventoryAdjustment](api-endpoint:Inventory-RetrieveInventoryAdjustment) after the endpoint URL +is updated to conform to the standard convention.
@@ -5049,8 +5548,8 @@ Retrieves a gift card using the gift card ID.
```typescript -await client.giftCards.get({ - id: "id" +await client.inventory.deprecatedGetAdjustment({ + adjustmentId: "adjustment_id" }); ``` @@ -5067,7 +5566,7 @@ await client.giftCards.get({
-**request:** `Square.GetGiftCardsRequest` +**request:** `Square.DeprecatedGetAdjustmentInventoryRequest`
@@ -5075,7 +5574,7 @@ await client.giftCards.get({
-**requestOptions:** `GiftCardsClient.RequestOptions` +**requestOptions:** `InventoryClient.RequestOptions`
@@ -5087,8 +5586,7 @@ await client.giftCards.get({
-## Inventory -
client.inventory.deprecatedGetAdjustment({ ...params }) -> Square.GetInventoryAdjustmentResponse +
client.inventory.updateInventoryAdjustment({ ...params }) -> Square.UpdateInventoryAdjustmentResponse
@@ -5100,8 +5598,10 @@ await client.giftCards.get({
-Deprecated version of [RetrieveInventoryAdjustment](api-endpoint:Inventory-RetrieveInventoryAdjustment) after the endpoint URL -is updated to conform to the standard convention. +Applies an update to the provided adjustment. + +On success: returns the newly updated adjustment. +On failure: returns a list of related errors.
@@ -5116,8 +5616,9 @@ is updated to conform to the standard convention.
```typescript -await client.inventory.deprecatedGetAdjustment({ - adjustmentId: "adjustment_id" +await client.inventory.updateInventoryAdjustment({ + idempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", + adjustment: {} }); ``` @@ -5134,7 +5635,7 @@ await client.inventory.deprecatedGetAdjustment({
-**request:** `Square.DeprecatedGetAdjustmentInventoryRequest` +**request:** `Square.UpdateInventoryAdjustmentRequest`
@@ -5841,7 +6342,7 @@ await client.inventory.getPhysicalCount({
-
client.inventory.getTransfer({ ...params }) -> Square.GetInventoryTransferResponse +
client.inventory.get({ ...params }) -> core.Page<Square.InventoryCount, Square.GetInventoryCountResponse>
@@ -5853,8 +6354,10 @@ await client.inventory.getPhysicalCount({
-Returns the [InventoryTransfer](entity:InventoryTransfer) object -with the provided `transfer_id`. +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.
@@ -5869,9 +6372,27 @@ with the provided `transfer_id`.
```typescript -await client.inventory.getTransfer({ - transferId: "transfer_id" +const pageableResponse = await client.inventory.get({ + catalogObjectId: "catalog_object_id", + locationIds: "location_ids", + cursor: "cursor" +}); +for await (const item of pageableResponse) { + console.log(item); +} + +// Or you can manually iterate page-by-page +let page = await client.inventory.get({ + catalogObjectId: "catalog_object_id", + locationIds: "location_ids", + cursor: "cursor" }); +while (page.hasNextPage()) { + page = page.getNextPage(); +} + +// You can also access the underlying response +const response = page.response; ```
@@ -5887,7 +6408,7 @@ await client.inventory.getTransfer({
-**request:** `Square.GetTransferInventoryRequest` +**request:** `Square.GetInventoryRequest`
@@ -5907,7 +6428,7 @@ await client.inventory.getTransfer({
-
client.inventory.get({ ...params }) -> core.Page<Square.InventoryCount, Square.GetInventoryCountResponse> +
client.inventory.changes({ ...params }) -> core.Page<Square.InventoryChange, Square.GetInventoryChangesResponse>
@@ -5919,10 +6440,19 @@ await client.inventory.getTransfer({
-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. +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.
@@ -5937,7 +6467,7 @@ For more sophisticated queries, use a batch endpoint.
```typescript -const pageableResponse = await client.inventory.get({ +const pageableResponse = await client.inventory.changes({ catalogObjectId: "catalog_object_id", locationIds: "location_ids", cursor: "cursor" @@ -5947,7 +6477,7 @@ for await (const item of pageableResponse) { } // Or you can manually iterate page-by-page -let page = await client.inventory.get({ +let page = await client.inventory.changes({ catalogObjectId: "catalog_object_id", locationIds: "location_ids", cursor: "cursor" @@ -5973,7 +6503,7 @@ const response = page.response;
-**request:** `Square.GetInventoryRequest` +**request:** `Square.ChangesInventoryRequest`
@@ -5993,36 +6523,10 @@ const response = page.response;
-
client.inventory.changes({ ...params }) -> core.Page<Square.InventoryChange, Square.GetInventoryChangesResponse> -
-
- -#### 📝 Description - -
-
- +
client.inventory.getTransfer({ ...params }) -> void
-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. -
-
-
-
- #### 🔌 Usage
@@ -6032,27 +6536,9 @@ sophisticated queries, use a batch endpoint.
```typescript -const pageableResponse = await client.inventory.changes({ - catalogObjectId: "catalog_object_id", - locationIds: "location_ids", - cursor: "cursor" -}); -for await (const item of pageableResponse) { - console.log(item); -} - -// Or you can manually iterate page-by-page -let page = await client.inventory.changes({ - catalogObjectId: "catalog_object_id", - locationIds: "location_ids", - cursor: "cursor" +await client.inventory.getTransfer({ + transferId: "transfer_id" }); -while (page.hasNextPage()) { - page = page.getNextPage(); -} - -// You can also access the underlying response -const response = page.response; ```
@@ -6068,7 +6554,7 @@ const response = page.response;
-**request:** `Square.ChangesInventoryRequest` +**request:** `Square.GetTransferInventoryRequest`
@@ -15281,6 +15767,10 @@ await client.catalog.images.update({ Creates a new or updates the specified [CatalogObject](entity:CatalogObject). +This endpoint uses full-replacement semantics. The client must send the complete object, and any +field absent from the request is interpreted as an intentional clear. This logic applies to +nested objects as well. For example, omitting inlined children like variations will delete them. + To ensure consistency, only one update request is processed at a time per seller account. While one (batch or non-batch) update request is being processed, other (batched and non-batched) update requests are rejected with the `429` error code. diff --git a/src/BaseClient.ts b/src/BaseClient.ts index f845bfcab..b5db2cc53 100644 --- a/src/BaseClient.ts +++ b/src/BaseClient.ts @@ -16,7 +16,7 @@ export type BaseClientOptions = { /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; /** Override the Square-Version header */ - version?: "2026-05-20"; + version?: "2026-07-15"; /** Additional headers to include in requests. */ headers?: Record | null | undefined>; /** The default maximum time to wait for a response in seconds. */ @@ -40,7 +40,7 @@ export interface BaseRequestOptions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2026-05-20"; + version?: "2026-07-15"; /** Additional query string parameters to include in the request. */ queryParams?: Record; /** Additional headers to include in the request. */ @@ -64,11 +64,11 @@ export function normalizeClientOptions { + return core.HttpResponsePromise.fromPromise(this.__listInventoryAdjustmentReasons(request, requestOptions)); + } + + private async __listInventoryAdjustmentReasons( + request: Square.ListInventoryAdjustmentReasonsRequest = {}, + requestOptions?: InventoryClient.RequestOptions, + ): Promise> { + const { includeDeleted, includeSystemCodes } = request; + const _queryParams: Record = { + include_deleted: includeDeleted, + include_system_codes: includeSystemCodes, + }; + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SquareEnvironment.Production, + "v2/inventory/adjustment-reasons", + ), + method: "GET", + headers: _headers, + queryString: core.url + .queryBuilder() + .addMany(_queryParams) + .mergeAdditional(requestOptions?.queryParams) + .build(), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.ListInventoryAdjustmentReasonsResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SquareError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/v2/inventory/adjustment-reasons", + ); + } + + /** + * 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" + * } + * }) + */ + public createInventoryAdjustmentReason( + request: Square.CreateInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__createInventoryAdjustmentReason(request, requestOptions)); + } + + private async __createInventoryAdjustmentReason( + request: Square.CreateInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SquareEnvironment.Production, + "v2/inventory/adjustment-reasons/create", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(), + requestType: "json", + body: serializers.CreateInventoryAdjustmentReasonRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.CreateInventoryAdjustmentReasonResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SquareError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/v2/inventory/adjustment-reasons/create", + ); + } + + /** + * 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" + * } + * }) + */ + public deleteInventoryAdjustmentReason( + request: Square.DeleteInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__deleteInventoryAdjustmentReason(request, requestOptions)); + } + + private async __deleteInventoryAdjustmentReason( + request: Square.DeleteInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SquareEnvironment.Production, + "v2/inventory/adjustment-reasons/delete", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(), + requestType: "json", + body: serializers.DeleteInventoryAdjustmentReasonRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.DeleteInventoryAdjustmentReasonResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SquareError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/v2/inventory/adjustment-reasons/delete", + ); + } + + /** + * 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" + * } + * }) + */ + public restoreInventoryAdjustmentReason( + request: Square.RestoreInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__restoreInventoryAdjustmentReason(request, requestOptions)); + } + + private async __restoreInventoryAdjustmentReason( + request: Square.RestoreInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SquareEnvironment.Production, + "v2/inventory/adjustment-reasons/restore", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(), + requestType: "json", + body: serializers.RestoreInventoryAdjustmentReasonRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.RestoreInventoryAdjustmentReasonResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SquareError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/v2/inventory/adjustment-reasons/restore", + ); + } + + /** + * 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" + * } + * }) + */ + public retrieveInventoryAdjustmentReason( + request: Square.RetrieveInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__retrieveInventoryAdjustmentReason(request, requestOptions)); + } + + private async __retrieveInventoryAdjustmentReason( + request: Square.RetrieveInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SquareEnvironment.Production, + "v2/inventory/adjustment-reasons/retrieve", + ), + method: "POST", + headers: _headers, + contentType: "application/json", + queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(), + requestType: "json", + body: serializers.RetrieveInventoryAdjustmentReasonRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.RetrieveInventoryAdjustmentReasonResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SquareError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "POST", + "/v2/inventory/adjustment-reasons/retrieve", + ); + } + + /** + * 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" + * } + * }) + */ + public updateInventoryAdjustmentReason( + request: Square.UpdateInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__updateInventoryAdjustmentReason(request, requestOptions)); + } + + private async __updateInventoryAdjustmentReason( + request: Square.UpdateInventoryAdjustmentReasonRequest, + requestOptions?: InventoryClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SquareEnvironment.Production, + "v2/inventory/adjustment-reasons/update", + ), + method: "PUT", + headers: _headers, + contentType: "application/json", + queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(), + requestType: "json", + body: serializers.UpdateInventoryAdjustmentReasonRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.UpdateInventoryAdjustmentReasonResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SquareError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "PUT", + "/v2/inventory/adjustment-reasons/update", + ); + } + /** * @deprecated * @@ -53,7 +565,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -101,6 +613,90 @@ export class InventoryClient { ); } + /** + * 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: {} + * }) + */ + public updateInventoryAdjustment( + request: Square.UpdateInventoryAdjustmentRequest, + requestOptions?: InventoryClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__updateInventoryAdjustment(request, requestOptions)); + } + + private async __updateInventoryAdjustment( + request: Square.UpdateInventoryAdjustmentRequest, + requestOptions?: InventoryClient.RequestOptions, + ): Promise> { + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SquareEnvironment.Production, + "v2/inventory/adjustments/update", + ), + method: "PUT", + headers: _headers, + contentType: "application/json", + queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(), + requestType: "json", + body: serializers.UpdateInventoryAdjustmentRequest.jsonOrThrow(request, { + unrecognizedObjectKeys: "strip", + omitUndefined: true, + }), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { + data: serializers.UpdateInventoryAdjustmentResponse.parseOrThrow(_response.body, { + unrecognizedObjectKeys: "passthrough", + allowUnrecognizedUnionMembers: true, + allowUnrecognizedEnumValues: true, + skipValidation: true, + breadcrumbsPrefix: ["response"], + }), + rawResponse: _response.rawResponse, + }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SquareError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "PUT", + "/v2/inventory/adjustments/update", + ); + } + /** * Returns the [InventoryAdjustment](entity:InventoryAdjustment) object * with the provided `adjustment_id`. @@ -129,7 +725,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -219,7 +815,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -302,7 +898,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -387,7 +983,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -484,7 +1080,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -573,7 +1169,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -673,7 +1269,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -768,7 +1364,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -844,7 +1440,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -892,82 +1488,6 @@ export class InventoryClient { ); } - /** - * Returns the [InventoryTransfer](entity:InventoryTransfer) object - * with the provided `transfer_id`. - * - * @param {Square.GetTransferInventoryRequest} request - * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. - * - * @example - * await client.inventory.getTransfer({ - * transferId: "transfer_id" - * }) - */ - public getTransfer( - request: Square.GetTransferInventoryRequest, - requestOptions?: InventoryClient.RequestOptions, - ): core.HttpResponsePromise { - return core.HttpResponsePromise.fromPromise(this.__getTransfer(request, requestOptions)); - } - - private async __getTransfer( - request: Square.GetTransferInventoryRequest, - requestOptions?: InventoryClient.RequestOptions, - ): Promise> { - const { transferId } = request; - const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); - const _headers: core.Fetcher.Args["headers"] = mergeHeaders( - _authRequest.headers, - this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), - requestOptions?.headers, - ); - const _response = await (this._options.fetcher ?? core.fetcher)({ - url: core.url.join( - (await core.Supplier.get(this._options.baseUrl)) ?? - (await core.Supplier.get(this._options.environment)) ?? - environments.SquareEnvironment.Production, - `v2/inventory/transfers/${core.url.encodePathParam(transferId)}`, - ), - method: "GET", - headers: _headers, - queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(), - timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, - maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, - abortSignal: requestOptions?.abortSignal, - fetchFn: this._options?.fetch, - logging: this._options.logging, - }); - if (_response.ok) { - return { - data: serializers.GetInventoryTransferResponse.parseOrThrow(_response.body, { - unrecognizedObjectKeys: "passthrough", - allowUnrecognizedUnionMembers: true, - allowUnrecognizedEnumValues: true, - skipValidation: true, - breadcrumbsPrefix: ["response"], - }), - rawResponse: _response.rawResponse, - }; - } - - if (_response.error.reason === "status-code") { - throw new errors.SquareError({ - statusCode: _response.error.statusCode, - body: _response.error.body, - rawResponse: _response.rawResponse, - }); - } - - return handleNonStatusCodeError( - _response.error, - _response.rawResponse, - "GET", - "/v2/inventory/transfers/{transfer_id}", - ); - } - /** * Retrieves the current calculated stock count for a given * [CatalogObject](entity:CatalogObject) at a given set of @@ -1001,7 +1521,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -1108,7 +1628,7 @@ export class InventoryClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -1170,4 +1690,68 @@ export class InventoryClient { }, }); } + + /** + * @param {Square.GetTransferInventoryRequest} request + * @param {InventoryClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.inventory.getTransfer({ + * transferId: "transfer_id" + * }) + */ + public getTransfer( + request: Square.GetTransferInventoryRequest, + requestOptions?: InventoryClient.RequestOptions, + ): core.HttpResponsePromise { + return core.HttpResponsePromise.fromPromise(this.__getTransfer(request, requestOptions)); + } + + private async __getTransfer( + request: Square.GetTransferInventoryRequest, + requestOptions?: InventoryClient.RequestOptions, + ): Promise> { + const { transferId } = request; + const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); + const _headers: core.Fetcher.Args["headers"] = mergeHeaders( + _authRequest.headers, + this._options?.headers, + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), + requestOptions?.headers, + ); + const _response = await (this._options.fetcher ?? core.fetcher)({ + url: core.url.join( + (await core.Supplier.get(this._options.baseUrl)) ?? + (await core.Supplier.get(this._options.environment)) ?? + environments.SquareEnvironment.Production, + `v2/inventory/transfers/${core.url.encodePathParam(transferId)}`, + ), + method: "GET", + headers: _headers, + queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(), + timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000, + maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries, + abortSignal: requestOptions?.abortSignal, + fetchFn: this._options?.fetch, + logging: this._options.logging, + }); + if (_response.ok) { + return { data: undefined, rawResponse: _response.rawResponse }; + } + + if (_response.error.reason === "status-code") { + throw new errors.SquareError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + rawResponse: _response.rawResponse, + }); + } + + return handleNonStatusCodeError( + _response.error, + _response.rawResponse, + "GET", + "/v2/inventory/transfers/{transfer_id}", + ); + } } diff --git a/src/api/resources/inventory/client/requests/CreateInventoryAdjustmentReasonRequest.ts b/src/api/resources/inventory/client/requests/CreateInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..443c38db8 --- /dev/null +++ b/src/api/resources/inventory/client/requests/CreateInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,30 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../index"; + +/** + * @example + * { + * idempotencyKey: "27b2f2b1-1c2a-4b9e-8f3a-0d9c3a1e5b47", + * adjustmentReason: { + * id: { + * type: "CUSTOM" + * }, + * name: "Donated to charity", + * direction: "DECREASE" + * } + * } + */ +export interface CreateInventoryAdjustmentReasonRequest { + /** + * A client-supplied, universally unique identifier to make this + * [CreateInventoryAdjustmentReason](api-endpoint:Inventory-CreateInventoryAdjustmentReason) + * request idempotent. + */ + idempotencyKey: string; + /** + * The custom inventory adjustment reason to create. Only custom + * adjustment reasons can be created. + */ + adjustmentReason: Square.InventoryAdjustmentReason; +} diff --git a/src/api/resources/inventory/client/requests/DeleteInventoryAdjustmentReasonRequest.ts b/src/api/resources/inventory/client/requests/DeleteInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..4a91adda2 --- /dev/null +++ b/src/api/resources/inventory/client/requests/DeleteInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../index"; + +/** + * @example + * { + * reasonId: { + * type: "CUSTOM", + * customReasonId: "R5BX3PDCZ6EXAMPLE" + * } + * } + */ +export interface DeleteInventoryAdjustmentReasonRequest { + /** The identifier of the custom inventory adjustment reason to soft delete. */ + reasonId: Square.InventoryAdjustmentReasonId; +} diff --git a/src/api/resources/inventory/client/requests/GetTransferInventoryRequest.ts b/src/api/resources/inventory/client/requests/GetTransferInventoryRequest.ts index 50fc548e1..da22a02a2 100644 --- a/src/api/resources/inventory/client/requests/GetTransferInventoryRequest.ts +++ b/src/api/resources/inventory/client/requests/GetTransferInventoryRequest.ts @@ -7,6 +7,5 @@ * } */ export interface GetTransferInventoryRequest { - /** ID of the [InventoryTransfer](entity:InventoryTransfer) to retrieve. */ transferId: string; } diff --git a/src/api/resources/inventory/client/requests/ListInventoryAdjustmentReasonsRequest.ts b/src/api/resources/inventory/client/requests/ListInventoryAdjustmentReasonsRequest.ts new file mode 100644 index 000000000..038cae2a1 --- /dev/null +++ b/src/api/resources/inventory/client/requests/ListInventoryAdjustmentReasonsRequest.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * @example + * { + * includeDeleted: true, + * includeSystemCodes: true + * } + */ +export interface ListInventoryAdjustmentReasonsRequest { + /** + * Indicates whether the response should include deleted custom inventory + * adjustment reasons. The default value is `false`. + */ + includeDeleted?: boolean | null; + /** + * Indicates whether the response should include Square-generated system + * inventory adjustment reason codes that cannot be used to write adjustments + * from the Connect API, such as `SALE`, `RECOUNT`, `TRANSFER`, `IN_TRANSIT`, + * and `CANCELED_SALE`. The default value is `false`. + */ + includeSystemCodes?: boolean | null; +} diff --git a/src/api/resources/inventory/client/requests/RestoreInventoryAdjustmentReasonRequest.ts b/src/api/resources/inventory/client/requests/RestoreInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..82459a60f --- /dev/null +++ b/src/api/resources/inventory/client/requests/RestoreInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,20 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../index"; + +/** + * @example + * { + * reasonId: { + * type: "CUSTOM", + * customReasonId: "R5BX3PDCZ6EXAMPLE" + * } + * } + */ +export interface RestoreInventoryAdjustmentReasonRequest { + /** + * The identifier of the soft-deleted custom inventory adjustment reason + * to restore. + */ + reasonId: Square.InventoryAdjustmentReasonId; +} diff --git a/src/api/resources/inventory/client/requests/RetrieveInventoryAdjustmentReasonRequest.ts b/src/api/resources/inventory/client/requests/RetrieveInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..ce87570c7 --- /dev/null +++ b/src/api/resources/inventory/client/requests/RetrieveInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,17 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../index"; + +/** + * @example + * { + * reasonId: { + * type: "CUSTOM", + * customReasonId: "R5BX3PDCZ6EXAMPLE" + * } + * } + */ +export interface RetrieveInventoryAdjustmentReasonRequest { + /** The identifier of the inventory adjustment reason to retrieve. */ + reasonId: Square.InventoryAdjustmentReasonId; +} diff --git a/src/api/resources/inventory/client/requests/UpdateInventoryAdjustmentReasonRequest.ts b/src/api/resources/inventory/client/requests/UpdateInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..a576740eb --- /dev/null +++ b/src/api/resources/inventory/client/requests/UpdateInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,31 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../index"; + +/** + * @example + * { + * reasonId: { + * type: "CUSTOM", + * customReasonId: "R5BX3PDCZ6EXAMPLE" + * }, + * adjustmentReason: { + * id: { + * type: "CUSTOM", + * customReasonId: "R5BX3PDCZ6EXAMPLE" + * }, + * name: "Charitable donation" + * } + * } + */ +export interface UpdateInventoryAdjustmentReasonRequest { + /** The identifier of the custom inventory adjustment reason to update. */ + reasonId: Square.InventoryAdjustmentReasonId; + /** + * The requested custom inventory adjustment reason update. Only the + * `name` field can be updated. Deleted custom reasons cannot be updated. To + * restore a deleted custom reason, call + * [RestoreInventoryAdjustmentReason](api-endpoint:Inventory-RestoreInventoryAdjustmentReason). + */ + adjustmentReason: Square.InventoryAdjustmentReason; +} diff --git a/src/api/resources/inventory/client/requests/UpdateInventoryAdjustmentRequest.ts b/src/api/resources/inventory/client/requests/UpdateInventoryAdjustmentRequest.ts new file mode 100644 index 000000000..a80583428 --- /dev/null +++ b/src/api/resources/inventory/client/requests/UpdateInventoryAdjustmentRequest.ts @@ -0,0 +1,37 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../index"; + +/** + * @example + * { + * idempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", + * adjustment: {} + * } + */ +export interface UpdateInventoryAdjustmentRequest { + /** + * A client-supplied, universally unique identifier (UUID) for the + * request. + * + * See [Idempotency](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) in the + * [Build Basics](https://developer.squareup.com/docs/buildbasics) section for more + * information. + */ + idempotencyKey: string; + /** + * Represents the updates being written to a past/existing inventory adjustment. + * This works using sparse updates, meaning that any fields omitted from the inputted InventoryAdjustment + * will retain their values. + * + * Only updates to the quantity, cost_money, vendor_id, and reason_id fields of an InventoryAdjustment can be made here. + * Note that the quantity field must be provided, but it can be identical to the current quantity if there are no desired quantity changes. + * cost_money and vendor_id can only be written to adjustments that add stock to the system (from_state of NONE or UNLINKED_RETURN) and to untracked sale adjustments. + * reason_id can be changed to any reason that is valid for the adjustment's state transition. The reason of a system-generated adjustment (for example, SALE or RECOUNT) cannot be changed. + * Adjustments generated by Square from other records cannot be updated. This includes inferred adjustments created by physical counts, transfer-like cross-location adjustments, and component adjustments. + * Adjustments linked to purchase orders cannot be updated. Adjustments linked to sales can only have cost_money and vendor_id updated, and only for untracked sales. + * Restock adjustments linked to an itemized return can have their quantity updated, up to the quantity remaining on the return. + * Adjustments older than one year cannot be updated. + */ + adjustment: Square.InventoryAdjustment; +} diff --git a/src/api/resources/inventory/client/requests/index.ts b/src/api/resources/inventory/client/requests/index.ts index 30b02fc9c..3a77e333b 100644 --- a/src/api/resources/inventory/client/requests/index.ts +++ b/src/api/resources/inventory/client/requests/index.ts @@ -1,7 +1,14 @@ export type { ChangesInventoryRequest } from "./ChangesInventoryRequest"; +export type { CreateInventoryAdjustmentReasonRequest } from "./CreateInventoryAdjustmentReasonRequest"; +export type { DeleteInventoryAdjustmentReasonRequest } from "./DeleteInventoryAdjustmentReasonRequest"; export type { DeprecatedGetAdjustmentInventoryRequest } from "./DeprecatedGetAdjustmentInventoryRequest"; export type { DeprecatedGetPhysicalCountInventoryRequest } from "./DeprecatedGetPhysicalCountInventoryRequest"; export type { GetAdjustmentInventoryRequest } from "./GetAdjustmentInventoryRequest"; export type { GetInventoryRequest } from "./GetInventoryRequest"; export type { GetPhysicalCountInventoryRequest } from "./GetPhysicalCountInventoryRequest"; export type { GetTransferInventoryRequest } from "./GetTransferInventoryRequest"; +export type { ListInventoryAdjustmentReasonsRequest } from "./ListInventoryAdjustmentReasonsRequest"; +export type { RestoreInventoryAdjustmentReasonRequest } from "./RestoreInventoryAdjustmentReasonRequest"; +export type { RetrieveInventoryAdjustmentReasonRequest } from "./RetrieveInventoryAdjustmentReasonRequest"; +export type { UpdateInventoryAdjustmentReasonRequest } from "./UpdateInventoryAdjustmentReasonRequest"; +export type { UpdateInventoryAdjustmentRequest } from "./UpdateInventoryAdjustmentRequest"; diff --git a/src/api/resources/invoices/client/Client.ts b/src/api/resources/invoices/client/Client.ts index 4766d1a8f..c792d7461 100644 --- a/src/api/resources/invoices/client/Client.ts +++ b/src/api/resources/invoices/client/Client.ts @@ -55,7 +55,7 @@ export class InvoicesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -183,7 +183,7 @@ export class InvoicesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -274,7 +274,7 @@ export class InvoicesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -350,7 +350,7 @@ export class InvoicesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -431,7 +431,7 @@ export class InvoicesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -513,7 +513,7 @@ export class InvoicesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -613,7 +613,7 @@ export class InvoicesClient { _authRequest.headers, this._options?.headers, mergeOnlyDefinedHeaders({ - "Square-Version": requestOptions?.version ?? "2026-05-20", + "Square-Version": requestOptions?.version ?? "2026-07-15", ..._maybeEncodedRequest.headers, }), requestOptions?.headers, @@ -695,7 +695,7 @@ export class InvoicesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -774,7 +774,7 @@ export class InvoicesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -870,7 +870,7 @@ export class InvoicesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/labor/client/Client.ts b/src/api/resources/labor/client/Client.ts index ba8f3f909..35a545d7d 100644 --- a/src/api/resources/labor/client/Client.ts +++ b/src/api/resources/labor/client/Client.ts @@ -97,7 +97,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -180,7 +180,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -271,7 +271,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -352,7 +352,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -448,7 +448,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -533,7 +533,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -656,7 +656,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -756,7 +756,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -832,7 +832,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -937,7 +937,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -1013,7 +1013,7 @@ export class LaborClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/labor/resources/breakTypes/client/Client.ts b/src/api/resources/labor/resources/breakTypes/client/Client.ts index 9dce1d1ee..d5b189d78 100644 --- a/src/api/resources/labor/resources/breakTypes/client/Client.ts +++ b/src/api/resources/labor/resources/breakTypes/client/Client.ts @@ -54,7 +54,7 @@ export class BreakTypesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -157,7 +157,7 @@ export class BreakTypesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -233,7 +233,7 @@ export class BreakTypesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -310,7 +310,7 @@ export class BreakTypesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -388,7 +388,7 @@ export class BreakTypesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/labor/resources/employeeWages/client/Client.ts b/src/api/resources/labor/resources/employeeWages/client/Client.ts index 74b8b5c33..b3ee39816 100644 --- a/src/api/resources/labor/resources/employeeWages/client/Client.ts +++ b/src/api/resources/labor/resources/employeeWages/client/Client.ts @@ -56,7 +56,7 @@ export class EmployeeWagesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -148,7 +148,7 @@ export class EmployeeWagesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/labor/resources/shifts/client/Client.ts b/src/api/resources/labor/resources/shifts/client/Client.ts index 3d38eab8d..fc2c66211 100644 --- a/src/api/resources/labor/resources/shifts/client/Client.ts +++ b/src/api/resources/labor/resources/shifts/client/Client.ts @@ -94,7 +94,7 @@ export class ShiftsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -196,7 +196,7 @@ export class ShiftsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -274,7 +274,7 @@ export class ShiftsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -380,7 +380,7 @@ export class ShiftsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -458,7 +458,7 @@ export class ShiftsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/labor/resources/teamMemberWages/client/Client.ts b/src/api/resources/labor/resources/teamMemberWages/client/Client.ts index fa2301359..acc9ad1d3 100644 --- a/src/api/resources/labor/resources/teamMemberWages/client/Client.ts +++ b/src/api/resources/labor/resources/teamMemberWages/client/Client.ts @@ -54,7 +54,7 @@ export class TeamMemberWagesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -144,7 +144,7 @@ export class TeamMemberWagesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/labor/resources/workweekConfigs/client/Client.ts b/src/api/resources/labor/resources/workweekConfigs/client/Client.ts index d943f5c1d..87f393365 100644 --- a/src/api/resources/labor/resources/workweekConfigs/client/Client.ts +++ b/src/api/resources/labor/resources/workweekConfigs/client/Client.ts @@ -52,7 +52,7 @@ export class WorkweekConfigsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -147,7 +147,7 @@ export class WorkweekConfigsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/locations/client/Client.ts b/src/api/resources/locations/client/Client.ts index 00ff86cf6..dc7a56a39 100644 --- a/src/api/resources/locations/client/Client.ts +++ b/src/api/resources/locations/client/Client.ts @@ -63,7 +63,7 @@ export class LocationsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -147,7 +147,7 @@ export class LocationsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -224,7 +224,7 @@ export class LocationsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -312,7 +312,7 @@ export class LocationsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -470,7 +470,7 @@ export class LocationsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts index f8a009804..2499dd893 100644 --- a/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts +++ b/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts @@ -63,7 +63,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -166,7 +166,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -253,7 +253,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -339,7 +339,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -423,7 +423,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/locations/resources/customAttributes/client/Client.ts b/src/api/resources/locations/resources/customAttributes/client/Client.ts index 440e9260c..5b0f374eb 100644 --- a/src/api/resources/locations/resources/customAttributes/client/Client.ts +++ b/src/api/resources/locations/resources/customAttributes/client/Client.ts @@ -61,7 +61,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -172,7 +172,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -271,7 +271,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -372,7 +372,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -460,7 +460,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -544,7 +544,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/locations/resources/transactions/client/Client.ts b/src/api/resources/locations/resources/transactions/client/Client.ts index b405a6e56..ce838cd43 100644 --- a/src/api/resources/locations/resources/transactions/client/Client.ts +++ b/src/api/resources/locations/resources/transactions/client/Client.ts @@ -73,7 +73,7 @@ export class TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -155,7 +155,7 @@ export class TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -238,7 +238,7 @@ export class TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -321,7 +321,7 @@ export class TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/loyalty/client/Client.ts b/src/api/resources/loyalty/client/Client.ts index be5585ea8..0a987cda4 100644 --- a/src/api/resources/loyalty/client/Client.ts +++ b/src/api/resources/loyalty/client/Client.ts @@ -81,7 +81,7 @@ export class LoyaltyClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/loyalty/resources/accounts/client/Client.ts b/src/api/resources/loyalty/resources/accounts/client/Client.ts index 8b2ec4b39..486b31b67 100644 --- a/src/api/resources/loyalty/resources/accounts/client/Client.ts +++ b/src/api/resources/loyalty/resources/accounts/client/Client.ts @@ -55,7 +55,7 @@ export class AccountsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -139,7 +139,7 @@ export class AccountsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -215,7 +215,7 @@ export class AccountsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -308,7 +308,7 @@ export class AccountsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -398,7 +398,7 @@ export class AccountsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/loyalty/resources/programs/client/Client.ts b/src/api/resources/loyalty/resources/programs/client/Client.ts index b8347a406..dc82b43d9 100644 --- a/src/api/resources/loyalty/resources/programs/client/Client.ts +++ b/src/api/resources/loyalty/resources/programs/client/Client.ts @@ -56,7 +56,7 @@ export class ProgramsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -128,7 +128,7 @@ export class ProgramsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -219,7 +219,7 @@ export class ProgramsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/loyalty/resources/programs/resources/promotions/client/Client.ts b/src/api/resources/loyalty/resources/programs/resources/promotions/client/Client.ts index 938fea448..ab35e41f7 100644 --- a/src/api/resources/loyalty/resources/programs/resources/promotions/client/Client.ts +++ b/src/api/resources/loyalty/resources/programs/resources/promotions/client/Client.ts @@ -65,7 +65,7 @@ export class PromotionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -182,7 +182,7 @@ export class PromotionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -264,7 +264,7 @@ export class PromotionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -345,7 +345,7 @@ export class PromotionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/loyalty/resources/rewards/client/Client.ts b/src/api/resources/loyalty/resources/rewards/client/Client.ts index dd29812b7..2df212c87 100644 --- a/src/api/resources/loyalty/resources/rewards/client/Client.ts +++ b/src/api/resources/loyalty/resources/rewards/client/Client.ts @@ -61,7 +61,7 @@ export class RewardsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -145,7 +145,7 @@ export class RewardsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -221,7 +221,7 @@ export class RewardsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -304,7 +304,7 @@ export class RewardsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -391,7 +391,7 @@ export class RewardsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/merchants/client/Client.ts b/src/api/resources/merchants/client/Client.ts index b1414c928..146a9dd9f 100644 --- a/src/api/resources/merchants/client/Client.ts +++ b/src/api/resources/merchants/client/Client.ts @@ -71,7 +71,7 @@ export class MerchantsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -156,7 +156,7 @@ export class MerchantsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/merchants/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/merchants/resources/customAttributeDefinitions/client/Client.ts index 648bf2434..07559e6dc 100644 --- a/src/api/resources/merchants/resources/customAttributeDefinitions/client/Client.ts +++ b/src/api/resources/merchants/resources/customAttributeDefinitions/client/Client.ts @@ -63,7 +63,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -166,7 +166,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -253,7 +253,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -339,7 +339,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -423,7 +423,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/merchants/resources/customAttributes/client/Client.ts b/src/api/resources/merchants/resources/customAttributes/client/Client.ts index 0993e0fbd..79e087e42 100644 --- a/src/api/resources/merchants/resources/customAttributes/client/Client.ts +++ b/src/api/resources/merchants/resources/customAttributes/client/Client.ts @@ -58,7 +58,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -162,7 +162,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -261,7 +261,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -362,7 +362,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -450,7 +450,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -534,7 +534,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/oAuth/client/Client.ts b/src/api/resources/oAuth/client/Client.ts index bad07811a..d1a51f286 100644 --- a/src/api/resources/oAuth/client/Client.ts +++ b/src/api/resources/oAuth/client/Client.ts @@ -63,7 +63,7 @@ export class OAuthClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -159,7 +159,7 @@ export class OAuthClient { ): Promise> { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -242,7 +242,7 @@ export class OAuthClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -300,7 +300,7 @@ export class OAuthClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/orders/client/Client.ts b/src/api/resources/orders/client/Client.ts index 1a5803e45..edb23d1da 100644 --- a/src/api/resources/orders/client/Client.ts +++ b/src/api/resources/orders/client/Client.ts @@ -112,7 +112,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -190,7 +190,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -287,7 +287,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -365,7 +365,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -475,7 +475,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -551,7 +551,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -650,7 +650,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -741,7 +741,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts index c36446414..f0f874994 100644 --- a/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts +++ b/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts @@ -65,7 +65,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -167,7 +167,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -256,7 +256,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -343,7 +343,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -426,7 +426,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/orders/resources/customAttributes/client/Client.ts b/src/api/resources/orders/resources/customAttributes/client/Client.ts index a8de600a7..512d12148 100644 --- a/src/api/resources/orders/resources/customAttributes/client/Client.ts +++ b/src/api/resources/orders/resources/customAttributes/client/Client.ts @@ -71,7 +71,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -181,7 +181,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -282,7 +282,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -386,7 +386,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -479,7 +479,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -565,7 +565,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/payments/client/Client.ts b/src/api/resources/payments/client/Client.ts index fdb570f0c..ffd184b06 100644 --- a/src/api/resources/payments/client/Client.ts +++ b/src/api/resources/payments/client/Client.ts @@ -103,7 +103,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -208,7 +208,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -293,7 +293,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -369,7 +369,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -452,7 +452,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -529,7 +529,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -607,7 +607,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/payouts/client/Client.ts b/src/api/resources/payouts/client/Client.ts index 2c65647ab..8084d24bb 100644 --- a/src/api/resources/payouts/client/Client.ts +++ b/src/api/resources/payouts/client/Client.ts @@ -74,7 +74,7 @@ export class PayoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -160,7 +160,7 @@ export class PayoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -242,7 +242,7 @@ export class PayoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/refunds/client/Client.ts b/src/api/resources/refunds/client/Client.ts index 7ad6262d4..597567828 100644 --- a/src/api/resources/refunds/client/Client.ts +++ b/src/api/resources/refunds/client/Client.ts @@ -93,7 +93,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -190,7 +190,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -266,7 +266,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/reporting/client/Client.ts b/src/api/resources/reporting/client/Client.ts index ac765f587..33a9d8c6f 100644 --- a/src/api/resources/reporting/client/Client.ts +++ b/src/api/resources/reporting/client/Client.ts @@ -44,7 +44,7 @@ export class ReportingClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -111,7 +111,7 @@ export class ReportingClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index ed071b9f3..9c8029309 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -45,7 +45,7 @@ export class SitesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/snippets/client/Client.ts b/src/api/resources/snippets/client/Client.ts index bcc7bb45b..6fb2de477 100644 --- a/src/api/resources/snippets/client/Client.ts +++ b/src/api/resources/snippets/client/Client.ts @@ -55,7 +55,7 @@ export class SnippetsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -134,7 +134,7 @@ export class SnippetsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -215,7 +215,7 @@ export class SnippetsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/subscriptions/client/Client.ts b/src/api/resources/subscriptions/client/Client.ts index 0f9a7b58c..7e20be629 100644 --- a/src/api/resources/subscriptions/client/Client.ts +++ b/src/api/resources/subscriptions/client/Client.ts @@ -69,7 +69,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -147,7 +147,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -246,7 +246,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -326,7 +326,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -409,7 +409,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -491,7 +491,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -568,7 +568,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -651,7 +651,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -729,7 +729,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -819,7 +819,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -900,7 +900,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -987,7 +987,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/team/client/Client.ts b/src/api/resources/team/client/Client.ts index 91e0de25e..6fe498e07 100644 --- a/src/api/resources/team/client/Client.ts +++ b/src/api/resources/team/client/Client.ts @@ -53,7 +53,7 @@ export class TeamClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -131,7 +131,7 @@ export class TeamClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -207,7 +207,7 @@ export class TeamClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -288,7 +288,7 @@ export class TeamClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/teamMembers/client/Client.ts b/src/api/resources/teamMembers/client/Client.ts index 9473a13c2..9d00798b9 100644 --- a/src/api/resources/teamMembers/client/Client.ts +++ b/src/api/resources/teamMembers/client/Client.ts @@ -91,7 +91,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -197,7 +197,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -306,7 +306,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -389,7 +389,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -466,7 +466,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -575,7 +575,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts b/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts index 07d045117..ed189ec1a 100644 --- a/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts +++ b/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts @@ -55,7 +55,7 @@ export class WageSettingClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -156,7 +156,7 @@ export class WageSettingClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/terminal/client/Client.ts b/src/api/resources/terminal/client/Client.ts index 694234f16..8f1b891a2 100644 --- a/src/api/resources/terminal/client/Client.ts +++ b/src/api/resources/terminal/client/Client.ts @@ -70,7 +70,7 @@ export class TerminalClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -145,7 +145,7 @@ export class TerminalClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -220,7 +220,7 @@ export class TerminalClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/terminal/resources/actions/client/Client.ts b/src/api/resources/terminal/resources/actions/client/Client.ts index 7ee08804e..075b68505 100644 --- a/src/api/resources/terminal/resources/actions/client/Client.ts +++ b/src/api/resources/terminal/resources/actions/client/Client.ts @@ -58,7 +58,7 @@ export class ActionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -143,7 +143,7 @@ export class ActionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -219,7 +219,7 @@ export class ActionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -294,7 +294,7 @@ export class ActionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/terminal/resources/checkouts/client/Client.ts b/src/api/resources/terminal/resources/checkouts/client/Client.ts index 6f8840c78..9ce912939 100644 --- a/src/api/resources/terminal/resources/checkouts/client/Client.ts +++ b/src/api/resources/terminal/resources/checkouts/client/Client.ts @@ -61,7 +61,7 @@ export class CheckoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -141,7 +141,7 @@ export class CheckoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -222,7 +222,7 @@ export class CheckoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -297,7 +297,7 @@ export class CheckoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/terminal/resources/refunds/client/Client.ts b/src/api/resources/terminal/resources/refunds/client/Client.ts index 2ffb3ca3b..1e08a7295 100644 --- a/src/api/resources/terminal/resources/refunds/client/Client.ts +++ b/src/api/resources/terminal/resources/refunds/client/Client.ts @@ -58,7 +58,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -138,7 +138,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -214,7 +214,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -289,7 +289,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/transferOrders/client/Client.ts b/src/api/resources/transferOrders/client/Client.ts index a39b36f58..1bba53961 100644 --- a/src/api/resources/transferOrders/client/Client.ts +++ b/src/api/resources/transferOrders/client/Client.ts @@ -83,7 +83,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -173,7 +173,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -271,7 +271,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -368,7 +368,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -457,7 +457,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -547,7 +547,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -657,7 +657,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -747,7 +747,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/v1Transactions/client/Client.ts b/src/api/resources/v1Transactions/client/Client.ts index 9e9b45a28..67ea16529 100644 --- a/src/api/resources/v1Transactions/client/Client.ts +++ b/src/api/resources/v1Transactions/client/Client.ts @@ -63,7 +63,7 @@ export class V1TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -140,7 +140,7 @@ export class V1TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -219,7 +219,7 @@ export class V1TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/vendors/client/Client.ts b/src/api/resources/vendors/client/Client.ts index 979dd170b..a426112ed 100644 --- a/src/api/resources/vendors/client/Client.ts +++ b/src/api/resources/vendors/client/Client.ts @@ -69,7 +69,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -144,7 +144,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -226,7 +226,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -320,7 +320,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -393,7 +393,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -469,7 +469,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -548,7 +548,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/webhooks/resources/eventTypes/client/Client.ts b/src/api/resources/webhooks/resources/eventTypes/client/Client.ts index 9e4caca81..7cf034444 100644 --- a/src/api/resources/webhooks/resources/eventTypes/client/Client.ts +++ b/src/api/resources/webhooks/resources/eventTypes/client/Client.ts @@ -53,7 +53,7 @@ export class EventTypesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/webhooks/resources/subscriptions/client/Client.ts b/src/api/resources/webhooks/resources/subscriptions/client/Client.ts index e5b246bfc..73b96226d 100644 --- a/src/api/resources/webhooks/resources/subscriptions/client/Client.ts +++ b/src/api/resources/webhooks/resources/subscriptions/client/Client.ts @@ -62,7 +62,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -157,7 +157,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -233,7 +233,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -312,7 +312,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -393,7 +393,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -469,7 +469,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -551,7 +551,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-07-15" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/types/BatchRetrieveInventoryChangesRequest.ts b/src/api/types/BatchRetrieveInventoryChangesRequest.ts index 96652103a..edede15a6 100644 --- a/src/api/types/BatchRetrieveInventoryChangesRequest.ts +++ b/src/api/types/BatchRetrieveInventoryChangesRequest.ts @@ -45,4 +45,17 @@ export interface BatchRetrieveInventoryChangesRequest { cursor?: string | null; /** The number of [records](entity:InventoryChange) to return. */ limit?: number | null; + /** + * Specification of how returned inventory changes should be ordered. + * + * Currently, inventory changes can only be ordered by the occurred_at field. + * The default sort order for occurred_at is ASC (changes are returned oldest-first by default). + */ + sort?: Square.BatchRetrieveInventoryChangesSort; + /** + * The filter to return `ADJUSTMENT` query results by inventory + * adjustment reason. This filter is only applied when set. The request cannot + * include both `reason_ids` and `states`. + */ + reasonIds?: Square.InventoryAdjustmentReasonId[] | null; } diff --git a/src/api/types/BatchRetrieveInventoryChangesSort.ts b/src/api/types/BatchRetrieveInventoryChangesSort.ts new file mode 100644 index 000000000..9a5f6fd30 --- /dev/null +++ b/src/api/types/BatchRetrieveInventoryChangesSort.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +export interface BatchRetrieveInventoryChangesSort { + /** + * The field to sort inventory changes by. + * See [Field](#type-field) for possible values + */ + field?: Square.BatchRetrieveInventoryChangesSortField; + /** + * The order to sort inventory changes by. + * See [SortOrder](#type-sortorder) for possible values + */ + order?: Square.SortOrder; +} diff --git a/src/api/types/BatchRetrieveInventoryChangesSortField.ts b/src/api/types/BatchRetrieveInventoryChangesSortField.ts new file mode 100644 index 000000000..43a5451fc --- /dev/null +++ b/src/api/types/BatchRetrieveInventoryChangesSortField.ts @@ -0,0 +1,3 @@ +// This file was auto-generated by Fern from our API Definition. + +export type BatchRetrieveInventoryChangesSortField = "OCCURRED_AT"; diff --git a/src/api/types/CatalogCategory.ts b/src/api/types/CatalogCategory.ts index f4b8eeb00..2f2f7cfd4 100644 --- a/src/api/types/CatalogCategory.ts +++ b/src/api/types/CatalogCategory.ts @@ -18,7 +18,10 @@ export interface CatalogCategory { * See [CatalogCategoryType](#type-catalogcategorytype) for possible values */ categoryType?: Square.CatalogCategoryType; - /** The ID of the parent category of this category instance. */ + /** + * The parent category of this category instance. This includes the parent category ID and an ordinal + * value that determines the category's relative position among sibling categories with the same parent. + */ parentCategory?: Square.CatalogObjectCategory; /** Indicates whether a category is a top level category, which does not have any parent_category. */ isTopLevel?: boolean | null; diff --git a/src/api/types/CatalogItem.ts b/src/api/types/CatalogItem.ts index 487aad0e8..9b3a139ce 100644 --- a/src/api/types/CatalogItem.ts +++ b/src/api/types/CatalogItem.ts @@ -92,7 +92,10 @@ export interface CatalogItem { * It is currently supported for sellers of the Japanese locale only. */ sortName?: string | null; - /** The list of categories. */ + /** + * The list of categories to which this item belongs. Each entry includes the category ID and an ordinal + * value that determines the item's relative position within that category. + */ categories?: Square.CatalogObjectCategory[] | null; /** * The item's description as expressed in valid HTML elements. The length of this field value, including those of HTML tags, diff --git a/src/api/types/CatalogItemVariation.ts b/src/api/types/CatalogItemVariation.ts index 5911352d1..7e82ef96c 100644 --- a/src/api/types/CatalogItemVariation.ts +++ b/src/api/types/CatalogItemVariation.ts @@ -52,19 +52,25 @@ export interface CatalogItemVariation { priceMoney?: Square.Money; /** Per-location price and inventory overrides. */ locationOverrides?: Square.ItemVariationLocationOverrides[] | null; - /** If `true`, inventory tracking is active for the variation. */ + /** + * If `true`, inventory tracking is active for the variation at all locations by default. + * This value can be overridden for specific locations using `ItemVariationLocationOverrides.track_inventory`. + * If unset at both levels, inventory tracking is disabled. + */ trackInventory?: boolean | null; /** * Indicates whether the item variation displays an alert when its inventory quantity is less than or equal * to its `inventory_alert_threshold`. + * + * Deprecated because this field has never been global. * See [InventoryAlertType](#type-inventoryalerttype) for possible values */ inventoryAlertType?: Square.InventoryAlertType; /** * If the inventory quantity for the variation is less than or equal to this value and `inventory_alert_type` - * is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard. + * is `LOW_QUANTITY`, the variation displays an alert in the merchant dashboard. This value is always an integer. * - * This value is always an integer. + * Deprecated because this field has never been global. */ inventoryAlertThreshold?: bigint | null; /** Arbitrary user metadata to associate with the item variation. This attribute value length is of Unicode code points. */ @@ -129,4 +135,10 @@ export interface CatalogItemVariation { * kitchen name is "Large container" */ kitchenName?: string | null; + /** + * Details of the vendor this product is purchased from. + * This field can be set only if the seller has an active subscription + * to either Square for Retail Premium or Square for Restaurants Premium. + */ + vendorInformation?: Square.CatalogItemVariationVendorInformation[] | null; } diff --git a/src/api/types/CatalogItemVariationVendorInformation.ts b/src/api/types/CatalogItemVariationVendorInformation.ts new file mode 100644 index 000000000..a27b8c27f --- /dev/null +++ b/src/api/types/CatalogItemVariationVendorInformation.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Information about the vendor of an item variation. + */ +export interface CatalogItemVariationVendorInformation { + /** + * ID of the [Vendor](entity:Vendor) linked to a default cost of this product. + * When the product is added to a purchase order, the default cost is pre-filled. + * This field is not validated. Clients should gracefully handle cases where the vendor_id + * does not match any existing vendor. + */ + vendorId?: string | null; + /** + * Unique identifier of this product in the specified vendor's' inventory system. + * When the product is added to a purchase order, the vendor code is pre-filled based + * on the selected vendor. + */ + vendorCode?: string | null; + /** The unit cost of the linked product, when purchased from the linked vendor. */ + unitCostMoney?: Square.Money; +} diff --git a/src/api/types/CatalogObjectCategory.ts b/src/api/types/CatalogObjectCategory.ts index 63eb6dc02..fe17168c3 100644 --- a/src/api/types/CatalogObjectCategory.ts +++ b/src/api/types/CatalogObjectCategory.ts @@ -10,7 +10,11 @@ import type * as Square from "../index"; export interface CatalogObjectCategory { /** The ID of the object's category. */ id?: string; - /** The order of the object within the context of the category. */ + /** + * The position of this object within the specified category. When an item is assigned to a category, + * the ordinal determines the item's position relative to other items in the same category. When used for a + * parent category reference, the ordinal determines the category's position among its sibling categories. + */ ordinal?: bigint | null; type?: "CATEGORY"; /** Structured data for a `CatalogCategory`, set for CatalogObjects of type `CATEGORY`. */ diff --git a/src/api/types/CreateInventoryAdjustmentReasonResponse.ts b/src/api/types/CreateInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..e31b496af --- /dev/null +++ b/src/api/types/CreateInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Represents an output from a call to [CreateInventoryAdjustmentReason](api-endpoint:Inventory-CreateInventoryAdjustmentReason). + */ +export interface CreateInventoryAdjustmentReasonResponse { + /** Errors encountered when the request fails. */ + errors?: Square.Error_[]; + /** The successfully created inventory adjustment reason. */ + adjustmentReason?: Square.InventoryAdjustmentReason; +} diff --git a/src/api/types/DeleteInventoryAdjustmentReasonResponse.ts b/src/api/types/DeleteInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..974f51e62 --- /dev/null +++ b/src/api/types/DeleteInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Represents an output from a call to [DeleteInventoryAdjustmentReason](api-endpoint:Inventory-DeleteInventoryAdjustmentReason). + */ +export interface DeleteInventoryAdjustmentReasonResponse { + /** Errors encountered when the request fails. */ + errors?: Square.Error_[]; + /** The successfully soft-deleted inventory adjustment reason. */ + adjustmentReason?: Square.InventoryAdjustmentReason; +} diff --git a/src/api/types/DeviceCheckoutOptions.ts b/src/api/types/DeviceCheckoutOptions.ts index cd8a63a68..af2fd2156 100644 --- a/src/api/types/DeviceCheckoutOptions.ts +++ b/src/api/types/DeviceCheckoutOptions.ts @@ -24,7 +24,7 @@ export interface DeviceCheckoutOptions { * Controls whether the mobile client applies Auto Card Surcharge (ACS) during checkout. * If true, ACS is applied based on Dashboard configuration. * If false, ACS is not applied regardless of that configuration. - * For more information, see [Add a Card Surcharge](https://developer.squareupstaging.com/docs/terminal-api/additional-payment-checkout-features#add-a-card-surcharge). + * For more information, see [Add a Card Surcharge](https://developer.squareup.com/docs/terminal-api/additional-payment-checkout-features#add-a-card-surcharge). */ allowAutoCardSurcharge?: boolean | null; } diff --git a/src/api/types/ExcludeStrategy.ts b/src/api/types/ExcludeStrategy.ts index a8bfa7bb1..d22f82391 100644 --- a/src/api/types/ExcludeStrategy.ts +++ b/src/api/types/ExcludeStrategy.ts @@ -7,5 +7,6 @@ export const ExcludeStrategy = { LeastExpensive: "LEAST_EXPENSIVE", MostExpensive: "MOST_EXPENSIVE", + MostExpensiveLowestValue: "MOST_EXPENSIVE_LOWEST_VALUE", } as const; export type ExcludeStrategy = (typeof ExcludeStrategy)[keyof typeof ExcludeStrategy]; diff --git a/src/api/types/Fulfillment.ts b/src/api/types/Fulfillment.ts index e46180ce5..145cb80b4 100644 --- a/src/api/types/Fulfillment.ts +++ b/src/api/types/Fulfillment.ts @@ -81,4 +81,9 @@ export interface Fulfillment { shipmentDetails?: Square.FulfillmentShipmentDetails; /** Describes delivery details of an order fulfillment. */ deliveryDetails?: Square.FulfillmentDeliveryDetails; + /** + * Contains details for an in-store fulfillment. These details are required when the fulfillment + * type is `IN_STORE`. + */ + inStoreDetails?: Square.FulfillmentInStoreDetails; } diff --git a/src/api/types/FulfillmentInStoreDetails.ts b/src/api/types/FulfillmentInStoreDetails.ts new file mode 100644 index 000000000..db0a0e3be --- /dev/null +++ b/src/api/types/FulfillmentInStoreDetails.ts @@ -0,0 +1,49 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Contains the details necessary to fulfill an in-store order. + */ +export interface FulfillmentInStoreDetails { + /** + * A note to provide additional instructions about the in-store fulfillment + * displayed in the Square Point of Sale application and set by the API. + */ + note?: string | null; + /** Information about the person to receive this in-store fulfillment. */ + recipient?: Square.FulfillmentRecipient; + /** + * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + * indicating when the fulfillment was placed. The timestamp must be in RFC 3339 format + * (for example, "2016-09-04T23:59:33.123Z"). + */ + placedAt?: string | null; + /** + * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + * indicating when the fulfillment was completed. This field is automatically set when the + * fulfillment `state` changes to `COMPLETED`. The timestamp must be in RFC 3339 format + * (for example, "2016-09-04T23:59:33.123Z"). + */ + completedAt?: string; + /** + * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + * indicates when the seller started processing the fulfillment. + * This field is automatically set when the fulfillment `state` changes to `RESERVED`. + * The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). + */ + inProgressAt?: string; + /** + * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + * indicating when the fulfillment was moved to the `PREPARED` state, which indicates that the + * fulfillment is ready. The timestamp must be in RFC 3339 format (for example, "2016-09-04T23:59:33.123Z"). + */ + preparedAt?: string; + /** + * The [timestamp](https://developer.squareup.com/docs/build-basics/working-with-dates) + * indicating when the fulfillment was canceled. This field is automatically set when the + * fulfillment `state` changes to `CANCELED`. The timestamp must be in RFC 3339 format + * (for example, "2016-09-04T23:59:33.123Z"). + */ + canceledAt?: string; +} diff --git a/src/api/types/FulfillmentType.ts b/src/api/types/FulfillmentType.ts index f9105158f..c81d5c0c4 100644 --- a/src/api/types/FulfillmentType.ts +++ b/src/api/types/FulfillmentType.ts @@ -5,5 +5,6 @@ export const FulfillmentType = { Pickup: "PICKUP", Shipment: "SHIPMENT", Delivery: "DELIVERY", + InStore: "IN_STORE", } as const; export type FulfillmentType = (typeof FulfillmentType)[keyof typeof FulfillmentType]; diff --git a/src/api/types/GetInventoryTransferResponse.ts b/src/api/types/GetInventoryTransferResponse.ts index 72d3c3bab..d2555c1cc 100644 --- a/src/api/types/GetInventoryTransferResponse.ts +++ b/src/api/types/GetInventoryTransferResponse.ts @@ -1,10 +1,3 @@ // This file was auto-generated by Fern from our API Definition. -import type * as Square from "../index"; - -export interface GetInventoryTransferResponse { - /** Any errors that occurred during the request. */ - errors?: Square.Error_[]; - /** The requested [InventoryTransfer](entity:InventoryTransfer). */ - transfer?: Square.InventoryTransfer; -} +export type GetInventoryTransferResponse = unknown; diff --git a/src/api/types/InventoryAdjustment.ts b/src/api/types/InventoryAdjustment.ts index bc0ba3ab3..7f3f0ce6b 100644 --- a/src/api/types/InventoryAdjustment.ts +++ b/src/api/types/InventoryAdjustment.ts @@ -32,9 +32,14 @@ export interface InventoryAdjustment { toState?: Square.InventoryState; /** * The Square-generated ID of the [Location](entity:Location) where the related - * quantity of items is being tracked. + * quantity of items is being tracked before the adjustment. */ - locationId?: string | null; + fromLocationId?: string | null; + /** + * The Square-generated ID of the [Location](entity:Location) where the related + * quantity of items is being tracked after the adjustment. + */ + toLocationId?: string | null; /** * The Square-generated ID of the * [CatalogObject](entity:CatalogObject) being tracked. @@ -108,4 +113,24 @@ export interface InventoryAdjustment { goodsReceiptId?: string; /** An adjustment group bundling the related adjustments of item variations through stock conversions in a single inventory event. */ adjustmentGroup?: Square.InventoryAdjustmentGroup; + /** + * The total amount paid by the merchant to the supplying vendor for these units of the product. + * This field is only applicable for stock receive adjustments that introduce stock into the system (from_state is NONE or UNLINKED_RETURN). + * May be empty. + * This field will only accept writes if the merchant has an active subscription for either Retail Plus, Restaurants Plus, or Restaurants Premium. + */ + costMoney?: Square.Money; + /** + * The Square-generated ID of the Vendor from which the merchant purchased this product. + * This field is only applicable for stock receive adjustments that introduce stock into the system (from_state is NONE or UNLINKED_RETURN). + * This field will only accept writes if the merchant has an active subscription for either Retail Plus, Restaurants Plus, or Restaurants Premium. + */ + vendorId?: string | null; + /** + * The Square-generated ID of the InventoryPhysicalCount (recount) that generated this adjustment, if applicable. + * The quantity of an adjustment generated by a physical count cannot be edited. + */ + physicalCountId?: string; + /** Identifies the reason for this inventory adjustment. */ + reasonId?: Square.InventoryAdjustmentReasonId; } diff --git a/src/api/types/InventoryAdjustmentReason.ts b/src/api/types/InventoryAdjustmentReason.ts new file mode 100644 index 000000000..00bb569af --- /dev/null +++ b/src/api/types/InventoryAdjustmentReason.ts @@ -0,0 +1,46 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Represents an inventory adjustment reason. + */ +export interface InventoryAdjustmentReason { + /** The identifier for this inventory adjustment reason. */ + id: Square.InventoryAdjustmentReasonId; + /** + * The seller-facing name for a custom inventory adjustment reason. This + * field is empty for standard and system-generated adjustment reasons. + */ + name?: string | null; + /** + * Indicates whether this inventory adjustment reason increases or + * decreases inventory. This field is set for custom reasons and for standard + * seller-selectable reasons. It is empty for system-generated inventory + * events. + * See [Direction](#type-direction) for possible values + */ + direction?: Square.InventoryAdjustmentReasonDirection; + /** + * An RFC 3339-formatted timestamp that indicates when the custom + * adjustment reason was created. This field is empty for standard + * adjustment reasons. + */ + createdAt?: string; + /** + * An RFC 3339-formatted timestamp that indicates when the custom + * adjustment reason was last updated. This field is empty for standard + * adjustment reasons. + */ + updatedAt?: string; + /** + * Indicates whether this custom inventory adjustment reason has been + * deleted. Deleted custom reasons can still be retrieved by ID, but are + * omitted from list responses unless deleted reasons are explicitly included. + * To restore a deleted custom reason, call + * [RestoreInventoryAdjustmentReason](api-endpoint:Inventory-RestoreInventoryAdjustmentReason). + * This field is always `false` for standard and system-generated adjustment + * reasons. + */ + isDeleted?: boolean | null; +} diff --git a/src/api/types/InventoryAdjustmentReasonDirection.ts b/src/api/types/InventoryAdjustmentReasonDirection.ts new file mode 100644 index 000000000..da611f17c --- /dev/null +++ b/src/api/types/InventoryAdjustmentReasonDirection.ts @@ -0,0 +1,8 @@ +// This file was auto-generated by Fern from our API Definition. + +export const InventoryAdjustmentReasonDirection = { + Increase: "INCREASE", + Decrease: "DECREASE", +} as const; +export type InventoryAdjustmentReasonDirection = + (typeof InventoryAdjustmentReasonDirection)[keyof typeof InventoryAdjustmentReasonDirection]; diff --git a/src/api/types/InventoryAdjustmentReasonId.ts b/src/api/types/InventoryAdjustmentReasonId.ts new file mode 100644 index 000000000..98568f44e --- /dev/null +++ b/src/api/types/InventoryAdjustmentReasonId.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Identifies a standard or custom inventory adjustment reason. + */ +export interface InventoryAdjustmentReasonId { + /** + * The adjustment reason type. + * See [Type](#type-type) for possible values + */ + type: Square.InventoryAdjustmentReasonIdType; + /** + * The Square-generated ID of the custom adjustment reason. This field + * is only set when `type` is `CUSTOM`. + */ + customReasonId?: string | null; +} diff --git a/src/api/types/InventoryAdjustmentReasonIdType.ts b/src/api/types/InventoryAdjustmentReasonIdType.ts new file mode 100644 index 000000000..d64f4456a --- /dev/null +++ b/src/api/types/InventoryAdjustmentReasonIdType.ts @@ -0,0 +1,40 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * The type of inventory adjustment reason. + * + * Custom reasons use `CUSTOM` and include a `custom_reason_id`. Standard + * seller-selectable reasons use `RECEIVED`, `DAMAGED`, `THEFT`, `LOST`, + * `RETURNED`, `SPOILAGE_WASTE`, `SAMPLES_PROMOTIONAL`, `INTERNAL_USE`, + * `VENDOR_RETURN`, or `PRODUCTION_WASTE`. + * + * The writable standard reasons with direction `INCREASE` are `RECEIVED` + * and `RETURNED`. The writable standard reasons with direction `DECREASE` + * are `DAMAGED`, `THEFT`, `LOST`, `SPOILAGE_WASTE`, + * `SAMPLES_PROMOTIONAL`, `INTERNAL_USE`, `VENDOR_RETURN`, and + * `PRODUCTION_WASTE`. + * + * The `SALE`, `RECOUNT`, `TRANSFER`, `IN_TRANSIT`, and `CANCELED_SALE` + * values identify system-generated inventory events. These values can be + * returned by Square, but cannot be used when writing inventory adjustments. + */ +export const InventoryAdjustmentReasonIdType = { + Received: "RECEIVED", + Damaged: "DAMAGED", + Theft: "THEFT", + Lost: "LOST", + Returned: "RETURNED", + SpoilageWaste: "SPOILAGE_WASTE", + SamplesPromotional: "SAMPLES_PROMOTIONAL", + InternalUse: "INTERNAL_USE", + VendorReturn: "VENDOR_RETURN", + ProductionWaste: "PRODUCTION_WASTE", + Sale: "SALE", + Recount: "RECOUNT", + Transfer: "TRANSFER", + InTransit: "IN_TRANSIT", + CanceledSale: "CANCELED_SALE", + Custom: "CUSTOM", +} as const; +export type InventoryAdjustmentReasonIdType = + (typeof InventoryAdjustmentReasonIdType)[keyof typeof InventoryAdjustmentReasonIdType]; diff --git a/src/api/types/InventoryChange.ts b/src/api/types/InventoryChange.ts index 25da4cac7..77f57d9c5 100644 --- a/src/api/types/InventoryChange.ts +++ b/src/api/types/InventoryChange.ts @@ -24,14 +24,6 @@ export interface InventoryChange { * `ADJUSTMENT`, and is unset for all other change types. */ adjustment?: Square.InventoryAdjustment; - /** - * Contains details about the inventory transfer when `type` is - * `TRANSFER`, and is unset for all other change types. - * - * _Note:_ An [InventoryTransfer](entity:InventoryTransfer) object can only be set in the input to the - * [BatchChangeInventory](api-endpoint:Inventory-BatchChangeInventory) endpoint when the seller has an active Retail Plus subscription. - */ - transfer?: Square.InventoryTransfer; /** The [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change. */ measurementUnit?: Square.CatalogMeasurementUnit; /** The ID of the [CatalogMeasurementUnit](entity:CatalogMeasurementUnit) object representing the catalog measurement unit associated with the inventory change. */ diff --git a/src/api/types/InventoryChangeType.ts b/src/api/types/InventoryChangeType.ts index dbb8054b7..03a818446 100644 --- a/src/api/types/InventoryChangeType.ts +++ b/src/api/types/InventoryChangeType.ts @@ -4,6 +4,5 @@ export const InventoryChangeType = { PhysicalCount: "PHYSICAL_COUNT", Adjustment: "ADJUSTMENT", - Transfer: "TRANSFER", } as const; export type InventoryChangeType = (typeof InventoryChangeType)[keyof typeof InventoryChangeType]; diff --git a/src/api/types/InventoryCount.ts b/src/api/types/InventoryCount.ts index 9ac14ae96..e313a93b5 100644 --- a/src/api/types/InventoryCount.ts +++ b/src/api/types/InventoryCount.ts @@ -5,7 +5,8 @@ import type * as Square from "../index"; /** * Represents Square-estimated quantity of items in a particular state at a * particular seller location based on the known history of physical counts and - * inventory adjustments. + * inventory adjustments. The absence of an inventory count indicates that the + * catalog object hasn't interacted with the given inventory state at the given location. */ export interface InventoryCount { /** diff --git a/src/api/types/InventoryPhysicalCount.ts b/src/api/types/InventoryPhysicalCount.ts index 8272ff746..bcb7fb1f8 100644 --- a/src/api/types/InventoryPhysicalCount.ts +++ b/src/api/types/InventoryPhysicalCount.ts @@ -72,4 +72,10 @@ export interface InventoryPhysicalCount { occurredAt?: string | null; /** An RFC 3339-formatted timestamp that indicates when the physical count is received. */ createdAt?: string; + /** + * The Square-generated ID of the InventoryAdjustment that was generated by this physical count in order to + * adjust the current stock count to reflect the re-counted quantity. + * This field may be empty if the merchant does not have an active subscription for either Retail Plus, Restaurants Plus, or Restaurants Premium. + */ + adjustmentId?: string; } diff --git a/src/api/types/InventoryState.ts b/src/api/types/InventoryState.ts index 30c402767..980686488 100644 --- a/src/api/types/InventoryState.ts +++ b/src/api/types/InventoryState.ts @@ -18,5 +18,6 @@ export const InventoryState = { Decomposed: "DECOMPOSED", SupportedByNewerVersion: "SUPPORTED_BY_NEWER_VERSION", InTransit: "IN_TRANSIT", + Untracked: "UNTRACKED", } as const; export type InventoryState = (typeof InventoryState)[keyof typeof InventoryState]; diff --git a/src/api/types/InventoryTransfer.ts b/src/api/types/InventoryTransfer.ts deleted file mode 100644 index 395becc87..000000000 --- a/src/api/types/InventoryTransfer.ts +++ /dev/null @@ -1,80 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -import type * as Square from "../index"; - -/** - * Represents the transfer of a quantity of product inventory at a - * particular time from one location to another. - */ -export interface InventoryTransfer { - /** - * A unique ID generated by Square for the - * `InventoryTransfer`. - */ - id?: string; - /** - * An optional ID provided by the application to tie the - * `InventoryTransfer` to an external system. - */ - referenceId?: string | null; - /** - * The [inventory state](entity:InventoryState) for the quantity of - * items being transferred. - * See [InventoryState](#type-inventorystate) for possible values - */ - state?: Square.InventoryState; - /** - * The Square-generated ID of the [Location](entity:Location) where the related - * quantity of items was tracked before the transfer. - */ - fromLocationId?: string | null; - /** - * The Square-generated ID of the [Location](entity:Location) where the related - * quantity of items was tracked after the transfer. - */ - toLocationId?: string | null; - /** - * The Square-generated ID of the - * [CatalogObject](entity:CatalogObject) being tracked. - */ - catalogObjectId?: string | null; - /** - * The [type](entity:CatalogObjectType) of the [CatalogObject](entity:CatalogObject) being tracked. - * - * The Inventory API supports setting and reading the `"catalog_object_type": "ITEM_VARIATION"` field value. - * In addition, it can also read the `"catalog_object_type": "ITEM"` field value that is set by the Square Restaurants app. - */ - catalogObjectType?: string | null; - /** - * The number of items affected by the transfer as a decimal string. - * Can support up to 5 digits after the decimal point. - */ - quantity?: string | null; - /** - * A client-generated RFC 3339-formatted timestamp that indicates when - * the transfer took place. For write actions, the `occurred_at` timestamp - * cannot be older than 24 hours or in the future relative to the time of the - * request. - */ - occurredAt?: string | null; - /** - * An RFC 3339-formatted timestamp that indicates when Square - * received the transfer request. - */ - createdAt?: string; - /** - * Information about the application that initiated the - * inventory transfer. - */ - source?: Square.SourceApplication; - /** - * The Square-generated ID of the [Employee](entity:Employee) responsible for the - * inventory transfer. - */ - employeeId?: string | null; - /** - * The Square-generated ID of the [Team Member](entity:TeamMember) responsible for the - * inventory transfer. - */ - teamMemberId?: string | null; -} diff --git a/src/api/types/ItemVariationLocationOverrides.ts b/src/api/types/ItemVariationLocationOverrides.ts index 0475c43c7..a60ee3998 100644 --- a/src/api/types/ItemVariationLocationOverrides.ts +++ b/src/api/types/ItemVariationLocationOverrides.ts @@ -15,7 +15,11 @@ export interface ItemVariationLocationOverrides { * See [CatalogPricingType](#type-catalogpricingtype) for possible values */ pricingType?: Square.CatalogPricingType; - /** If `true`, inventory tracking is active for the `CatalogItemVariation` at this `Location`. */ + /** + * Indicates whether inventory tracking is active for the `CatalogItemVariation` at this `Location`. + * When set, this value explicitly overrides the global `track_inventory` setting. When unset, the location + * should use the global value. If both global and location-level values are unset, inventory tracking is disabled. + */ trackInventory?: boolean | null; /** * Indicates whether the `CatalogItemVariation` displays an alert when its inventory diff --git a/src/api/types/ListInventoryAdjustmentReasonsResponse.ts b/src/api/types/ListInventoryAdjustmentReasonsResponse.ts new file mode 100644 index 000000000..b272c9ee6 --- /dev/null +++ b/src/api/types/ListInventoryAdjustmentReasonsResponse.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Represents an output from a call to [ListInventoryAdjustmentReasons](api-endpoint:Inventory-ListInventoryAdjustmentReasons). + */ +export interface ListInventoryAdjustmentReasonsResponse { + /** Errors encountered when the request fails. */ + errors?: Square.Error_[]; + /** + * The standard, system-generated, and custom inventory adjustment + * reasons available to the seller. + */ + adjustmentReasons?: Square.InventoryAdjustmentReason[]; +} diff --git a/src/api/types/Order.ts b/src/api/types/Order.ts index dfcf110ea..284c7cbe3 100644 --- a/src/api/types/Order.ts +++ b/src/api/types/Order.ts @@ -20,7 +20,19 @@ export interface Order { * with this order. */ referenceId?: string | null; - /** The origination details of the order. */ + /** + * The latest source details of the order. + * + * This field reflects the most recent source that interacted with or modified the order, + * and may change during the order lifecycle. For example: + * - An order created via API (source.name = "MyPOS") paid with Square Terminal may have + * source updated to reflect the Terminal application (which uses REGISTER, like POS) + * - An order updated or completed by a different application may have source updated + * to reflect that application. + * + * To preserve the original source from order creation regardless of subsequent updates, + * use the `creation_source` field instead. + */ source?: Square.OrderSource; /** * The ID of the [customer](entity:Customer) associated with the order. diff --git a/src/api/types/OrderLineItemModifier.ts b/src/api/types/OrderLineItemModifier.ts index d22d85bee..e7c0d1f26 100644 --- a/src/api/types/OrderLineItemModifier.ts +++ b/src/api/types/OrderLineItemModifier.ts @@ -58,4 +58,6 @@ export interface OrderLineItemModifier { * For more information, see [Metadata](https://developer.squareup.com/docs/build-basics/metadata). */ metadata?: Record | null; + /** The `uid` of the parent modifier, if this modifier is nested under another modifier. */ + parentModifierUid?: string | null; } diff --git a/src/api/types/RestoreInventoryAdjustmentReasonResponse.ts b/src/api/types/RestoreInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..440de1075 --- /dev/null +++ b/src/api/types/RestoreInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Represents an output from a call to [RestoreInventoryAdjustmentReason](api-endpoint:Inventory-RestoreInventoryAdjustmentReason). + */ +export interface RestoreInventoryAdjustmentReasonResponse { + /** Errors encountered when the request fails. */ + errors?: Square.Error_[]; + /** The successfully restored inventory adjustment reason. */ + adjustmentReason?: Square.InventoryAdjustmentReason; +} diff --git a/src/api/types/RetrieveInventoryAdjustmentReasonResponse.ts b/src/api/types/RetrieveInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..e68786748 --- /dev/null +++ b/src/api/types/RetrieveInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,16 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Represents an output from a call to [RetrieveInventoryAdjustmentReason](api-endpoint:Inventory-RetrieveInventoryAdjustmentReason). + */ +export interface RetrieveInventoryAdjustmentReasonResponse { + /** Errors encountered when the request fails. */ + errors?: Square.Error_[]; + /** + * The successfully retrieved inventory adjustment reason. Deleted custom + * reasons can be retrieved by ID and have `is_deleted` set to `true`. + */ + adjustmentReason?: Square.InventoryAdjustmentReason; +} diff --git a/src/api/types/UpdateInventoryAdjustmentReasonResponse.ts b/src/api/types/UpdateInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..26d099c60 --- /dev/null +++ b/src/api/types/UpdateInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,13 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Represents an output from a call to [UpdateInventoryAdjustmentReason](api-endpoint:Inventory-UpdateInventoryAdjustmentReason). + */ +export interface UpdateInventoryAdjustmentReasonResponse { + /** Errors encountered when the request fails. */ + errors?: Square.Error_[]; + /** The successfully updated inventory adjustment reason. */ + adjustmentReason?: Square.InventoryAdjustmentReason; +} diff --git a/src/api/types/UpdateInventoryAdjustmentResponse.ts b/src/api/types/UpdateInventoryAdjustmentResponse.ts new file mode 100644 index 000000000..8bbb9fe89 --- /dev/null +++ b/src/api/types/UpdateInventoryAdjustmentResponse.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +export interface UpdateInventoryAdjustmentResponse { + /** Any errors that occurred during the request. */ + errors?: Square.Error_[]; + /** The newly updated adjustment. */ + adjustment?: Square.InventoryAdjustment; +} diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 0f157e6da..9a8b41bcf 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -40,6 +40,8 @@ export * from "./BatchGetInventoryCountsResponse"; export * from "./BatchGetOrdersResponse"; export * from "./BatchGetVendorsResponse"; export * from "./BatchRetrieveInventoryChangesRequest"; +export * from "./BatchRetrieveInventoryChangesSort"; +export * from "./BatchRetrieveInventoryChangesSortField"; export * from "./BatchUpdateTeamMembersResponse"; export * from "./BatchUpdateVendorsResponse"; export * from "./BatchUpsertCatalogObjectsResponse"; @@ -196,6 +198,7 @@ export * from "./CatalogItemOptionValue"; export * from "./CatalogItemOptionValueForItemVariation"; export * from "./CatalogItemProductType"; export * from "./CatalogItemVariation"; +export * from "./CatalogItemVariationVendorInformation"; export * from "./CatalogMeasurementUnit"; export * from "./CatalogModifier"; export * from "./CatalogModifierList"; @@ -304,6 +307,7 @@ export * from "./CreateDisputeEvidenceFileResponse"; export * from "./CreateDisputeEvidenceTextResponse"; export * from "./CreateGiftCardActivityResponse"; export * from "./CreateGiftCardResponse"; +export * from "./CreateInventoryAdjustmentReasonResponse"; export * from "./CreateInvoiceAttachmentRequestData"; export * from "./CreateInvoiceAttachmentResponse"; export * from "./CreateInvoiceResponse"; @@ -413,6 +417,7 @@ export * from "./DeleteCustomerCustomAttributeResponse"; export * from "./DeleteCustomerGroupResponse"; export * from "./DeleteCustomerResponse"; export * from "./DeleteDisputeEvidenceResponse"; +export * from "./DeleteInventoryAdjustmentReasonResponse"; export * from "./DeleteInvoiceAttachmentResponse"; export * from "./DeleteInvoiceResponse"; export * from "./DeleteLocationCustomAttributeDefinitionResponse"; @@ -523,6 +528,7 @@ export * from "./FulfillmentDeliveryDetails"; export * from "./FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType"; export * from "./FulfillmentFulfillmentEntry"; export * from "./FulfillmentFulfillmentLineItemApplication"; +export * from "./FulfillmentInStoreDetails"; export * from "./FulfillmentPickupDetails"; export * from "./FulfillmentPickupDetailsCurbsidePickupDetails"; export * from "./FulfillmentPickupDetailsScheduleType"; @@ -659,6 +665,10 @@ export * from "./GiftCardUpdatedEventObject"; export * from "./Hierarchy"; export * from "./InventoryAdjustment"; export * from "./InventoryAdjustmentGroup"; +export * from "./InventoryAdjustmentReason"; +export * from "./InventoryAdjustmentReasonDirection"; +export * from "./InventoryAdjustmentReasonId"; +export * from "./InventoryAdjustmentReasonIdType"; export * from "./InventoryAlertType"; export * from "./InventoryChange"; export * from "./InventoryChangeType"; @@ -668,7 +678,6 @@ export * from "./InventoryCountUpdatedEventData"; export * from "./InventoryCountUpdatedEventObject"; export * from "./InventoryPhysicalCount"; export * from "./InventoryState"; -export * from "./InventoryTransfer"; export * from "./Invoice"; export * from "./InvoiceAcceptedPaymentMethods"; export * from "./InvoiceAttachment"; @@ -778,6 +787,7 @@ export * from "./ListEmployeeWagesResponse"; export * from "./ListEventTypesResponse"; export * from "./ListGiftCardActivitiesResponse"; export * from "./ListGiftCardsResponse"; +export * from "./ListInventoryAdjustmentReasonsResponse"; export * from "./ListInvoicesResponse"; export * from "./ListJobsResponse"; export * from "./ListLocationBookingProfilesResponse"; @@ -1093,10 +1103,12 @@ export * from "./RegisterDomainResponse"; export * from "./RegisterDomainResponseStatus"; export * from "./RemoveGroupFromCustomerResponse"; export * from "./ReportingError"; +export * from "./RestoreInventoryAdjustmentReasonResponse"; export * from "./ResumeSubscriptionResponse"; export * from "./RetrieveBookingCustomAttributeDefinitionResponse"; export * from "./RetrieveBookingCustomAttributeResponse"; export * from "./RetrieveChannelResponse"; +export * from "./RetrieveInventoryAdjustmentReasonResponse"; export * from "./RetrieveJobResponse"; export * from "./RetrieveLocationBookingProfileResponse"; export * from "./RetrieveLocationCustomAttributeDefinitionResponse"; @@ -1326,6 +1338,8 @@ export * from "./UpdateCatalogImageResponse"; export * from "./UpdateCustomerCustomAttributeDefinitionResponse"; export * from "./UpdateCustomerGroupResponse"; export * from "./UpdateCustomerResponse"; +export * from "./UpdateInventoryAdjustmentReasonResponse"; +export * from "./UpdateInventoryAdjustmentResponse"; export * from "./UpdateInvoiceResponse"; export * from "./UpdateItemModifierListsResponse"; export * from "./UpdateItemTaxesResponse"; diff --git a/src/errors/SquareError.ts b/src/errors/SquareError.ts index af303dc23..8f3d8abac 100644 --- a/src/errors/SquareError.ts +++ b/src/errors/SquareError.ts @@ -1,9 +1,7 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ +// This file was auto-generated by Fern from our API Definition. import { type Error_, ErrorCategory as GeneratedErrorCategory, ErrorCode as GeneratedErrorCode } from "../api"; -import type * as core from "../core/index.js"; +import type * as core from "../core"; import { toJson } from "../core/json"; const fallbackError = { @@ -12,9 +10,9 @@ const fallbackError = { } as SquareError.BodyError; export class SquareError extends Error { - readonly statusCode?: number; - readonly body?: unknown; - readonly errors: SquareError.BodyError[]; + public readonly statusCode?: number; + public readonly body?: unknown; + public readonly errors: SquareError.BodyError[]; public readonly rawResponse?: core.RawResponse; public readonly cause?: unknown; @@ -24,18 +22,27 @@ export class SquareError extends Error { body, rawResponse, cause, - }: { message?: string; statusCode?: number; body?: unknown; rawResponse?: core.RawResponse; cause?: unknown }) { + }: { + message?: string; + statusCode?: number; + body?: unknown; + rawResponse?: core.RawResponse; + cause?: unknown; + }) { super(buildMessage({ message, statusCode, body })); - Object.setPrototypeOf(this, SquareError.prototype); - if (statusCode != null) { - this.statusCode = statusCode; + Object.setPrototypeOf(this, new.target.prototype); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); } + + this.name = "SquareError"; + this.statusCode = statusCode; + this.body = body; this.rawResponse = rawResponse; if (cause != null) { this.cause = cause; } - this.body = body; if (body != null && typeof body === "object") { if ("errors" in body) { this.errors = (body as unknown as SquareErrorBody).errors ?? [fallbackError]; diff --git a/src/serialization/resources/index.ts b/src/serialization/resources/index.ts index fd5b35663..0f6df833e 100644 --- a/src/serialization/resources/index.ts +++ b/src/serialization/resources/index.ts @@ -21,6 +21,8 @@ export * as events from "./events"; export * from "./events/client/requests"; export * as giftCards from "./giftCards"; export * from "./giftCards/client/requests"; +export * as inventory from "./inventory"; +export * from "./inventory/client/requests"; export * as invoices from "./invoices"; export * from "./invoices/client/requests"; export * as labor from "./labor"; diff --git a/src/serialization/resources/inventory/client/index.ts b/src/serialization/resources/inventory/client/index.ts new file mode 100644 index 000000000..415726b7f --- /dev/null +++ b/src/serialization/resources/inventory/client/index.ts @@ -0,0 +1 @@ +export * from "./requests"; diff --git a/src/serialization/resources/inventory/client/requests/CreateInventoryAdjustmentReasonRequest.ts b/src/serialization/resources/inventory/client/requests/CreateInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..d490ad8dc --- /dev/null +++ b/src/serialization/resources/inventory/client/requests/CreateInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { InventoryAdjustmentReason } from "../../../../types/InventoryAdjustmentReason"; + +export const CreateInventoryAdjustmentReasonRequest: core.serialization.Schema< + serializers.CreateInventoryAdjustmentReasonRequest.Raw, + Square.CreateInventoryAdjustmentReasonRequest +> = core.serialization.object({ + idempotencyKey: core.serialization.property("idempotency_key", core.serialization.string()), + adjustmentReason: core.serialization.property("adjustment_reason", InventoryAdjustmentReason), +}); + +export declare namespace CreateInventoryAdjustmentReasonRequest { + export interface Raw { + idempotency_key: string; + adjustment_reason: InventoryAdjustmentReason.Raw; + } +} diff --git a/src/serialization/resources/inventory/client/requests/DeleteInventoryAdjustmentReasonRequest.ts b/src/serialization/resources/inventory/client/requests/DeleteInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..972e297e8 --- /dev/null +++ b/src/serialization/resources/inventory/client/requests/DeleteInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { InventoryAdjustmentReasonId } from "../../../../types/InventoryAdjustmentReasonId"; + +export const DeleteInventoryAdjustmentReasonRequest: core.serialization.Schema< + serializers.DeleteInventoryAdjustmentReasonRequest.Raw, + Square.DeleteInventoryAdjustmentReasonRequest +> = core.serialization.object({ + reasonId: core.serialization.property("reason_id", InventoryAdjustmentReasonId), +}); + +export declare namespace DeleteInventoryAdjustmentReasonRequest { + export interface Raw { + reason_id: InventoryAdjustmentReasonId.Raw; + } +} diff --git a/src/serialization/resources/inventory/client/requests/RestoreInventoryAdjustmentReasonRequest.ts b/src/serialization/resources/inventory/client/requests/RestoreInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..7d18552e9 --- /dev/null +++ b/src/serialization/resources/inventory/client/requests/RestoreInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { InventoryAdjustmentReasonId } from "../../../../types/InventoryAdjustmentReasonId"; + +export const RestoreInventoryAdjustmentReasonRequest: core.serialization.Schema< + serializers.RestoreInventoryAdjustmentReasonRequest.Raw, + Square.RestoreInventoryAdjustmentReasonRequest +> = core.serialization.object({ + reasonId: core.serialization.property("reason_id", InventoryAdjustmentReasonId), +}); + +export declare namespace RestoreInventoryAdjustmentReasonRequest { + export interface Raw { + reason_id: InventoryAdjustmentReasonId.Raw; + } +} diff --git a/src/serialization/resources/inventory/client/requests/RetrieveInventoryAdjustmentReasonRequest.ts b/src/serialization/resources/inventory/client/requests/RetrieveInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..5392cbdb5 --- /dev/null +++ b/src/serialization/resources/inventory/client/requests/RetrieveInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { InventoryAdjustmentReasonId } from "../../../../types/InventoryAdjustmentReasonId"; + +export const RetrieveInventoryAdjustmentReasonRequest: core.serialization.Schema< + serializers.RetrieveInventoryAdjustmentReasonRequest.Raw, + Square.RetrieveInventoryAdjustmentReasonRequest +> = core.serialization.object({ + reasonId: core.serialization.property("reason_id", InventoryAdjustmentReasonId), +}); + +export declare namespace RetrieveInventoryAdjustmentReasonRequest { + export interface Raw { + reason_id: InventoryAdjustmentReasonId.Raw; + } +} diff --git a/src/serialization/resources/inventory/client/requests/UpdateInventoryAdjustmentReasonRequest.ts b/src/serialization/resources/inventory/client/requests/UpdateInventoryAdjustmentReasonRequest.ts new file mode 100644 index 000000000..11ee623fe --- /dev/null +++ b/src/serialization/resources/inventory/client/requests/UpdateInventoryAdjustmentReasonRequest.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { InventoryAdjustmentReason } from "../../../../types/InventoryAdjustmentReason"; +import { InventoryAdjustmentReasonId } from "../../../../types/InventoryAdjustmentReasonId"; + +export const UpdateInventoryAdjustmentReasonRequest: core.serialization.Schema< + serializers.UpdateInventoryAdjustmentReasonRequest.Raw, + Square.UpdateInventoryAdjustmentReasonRequest +> = core.serialization.object({ + reasonId: core.serialization.property("reason_id", InventoryAdjustmentReasonId), + adjustmentReason: core.serialization.property("adjustment_reason", InventoryAdjustmentReason), +}); + +export declare namespace UpdateInventoryAdjustmentReasonRequest { + export interface Raw { + reason_id: InventoryAdjustmentReasonId.Raw; + adjustment_reason: InventoryAdjustmentReason.Raw; + } +} diff --git a/src/serialization/resources/inventory/client/requests/UpdateInventoryAdjustmentRequest.ts b/src/serialization/resources/inventory/client/requests/UpdateInventoryAdjustmentRequest.ts new file mode 100644 index 000000000..73e422a75 --- /dev/null +++ b/src/serialization/resources/inventory/client/requests/UpdateInventoryAdjustmentRequest.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../../../../api/index"; +import * as core from "../../../../../core"; +import type * as serializers from "../../../../index"; +import { InventoryAdjustment } from "../../../../types/InventoryAdjustment"; + +export const UpdateInventoryAdjustmentRequest: core.serialization.Schema< + serializers.UpdateInventoryAdjustmentRequest.Raw, + Square.UpdateInventoryAdjustmentRequest +> = core.serialization.object({ + idempotencyKey: core.serialization.property("idempotency_key", core.serialization.string()), + adjustment: InventoryAdjustment, +}); + +export declare namespace UpdateInventoryAdjustmentRequest { + export interface Raw { + idempotency_key: string; + adjustment: InventoryAdjustment.Raw; + } +} diff --git a/src/serialization/resources/inventory/client/requests/index.ts b/src/serialization/resources/inventory/client/requests/index.ts new file mode 100644 index 000000000..27b3159e5 --- /dev/null +++ b/src/serialization/resources/inventory/client/requests/index.ts @@ -0,0 +1,6 @@ +export { CreateInventoryAdjustmentReasonRequest } from "./CreateInventoryAdjustmentReasonRequest"; +export { DeleteInventoryAdjustmentReasonRequest } from "./DeleteInventoryAdjustmentReasonRequest"; +export { RestoreInventoryAdjustmentReasonRequest } from "./RestoreInventoryAdjustmentReasonRequest"; +export { RetrieveInventoryAdjustmentReasonRequest } from "./RetrieveInventoryAdjustmentReasonRequest"; +export { UpdateInventoryAdjustmentReasonRequest } from "./UpdateInventoryAdjustmentReasonRequest"; +export { UpdateInventoryAdjustmentRequest } from "./UpdateInventoryAdjustmentRequest"; diff --git a/src/serialization/resources/inventory/index.ts b/src/serialization/resources/inventory/index.ts new file mode 100644 index 000000000..5ec76921e --- /dev/null +++ b/src/serialization/resources/inventory/index.ts @@ -0,0 +1 @@ +export * from "./client"; diff --git a/src/serialization/types/BatchRetrieveInventoryChangesRequest.ts b/src/serialization/types/BatchRetrieveInventoryChangesRequest.ts index 703244b39..50c6976be 100644 --- a/src/serialization/types/BatchRetrieveInventoryChangesRequest.ts +++ b/src/serialization/types/BatchRetrieveInventoryChangesRequest.ts @@ -3,6 +3,8 @@ import type * as Square from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; +import { BatchRetrieveInventoryChangesSort } from "./BatchRetrieveInventoryChangesSort"; +import { InventoryAdjustmentReasonId } from "./InventoryAdjustmentReasonId"; import { InventoryChangeType } from "./InventoryChangeType"; import { InventoryState } from "./InventoryState"; @@ -24,6 +26,11 @@ export const BatchRetrieveInventoryChangesRequest: core.serialization.ObjectSche updatedBefore: core.serialization.property("updated_before", core.serialization.string().optionalNullable()), cursor: core.serialization.string().optionalNullable(), limit: core.serialization.number().optionalNullable(), + sort: BatchRetrieveInventoryChangesSort.optional(), + reasonIds: core.serialization.property( + "reason_ids", + core.serialization.list(InventoryAdjustmentReasonId).optionalNullable(), + ), }); export declare namespace BatchRetrieveInventoryChangesRequest { @@ -36,5 +43,7 @@ export declare namespace BatchRetrieveInventoryChangesRequest { updated_before?: (string | null | undefined) | null; cursor?: (string | null | undefined) | null; limit?: (number | null | undefined) | null; + sort?: BatchRetrieveInventoryChangesSort.Raw | null; + reason_ids?: (InventoryAdjustmentReasonId.Raw[] | null | undefined) | null; } } diff --git a/src/serialization/types/BatchRetrieveInventoryChangesSort.ts b/src/serialization/types/BatchRetrieveInventoryChangesSort.ts new file mode 100644 index 000000000..9dd58a325 --- /dev/null +++ b/src/serialization/types/BatchRetrieveInventoryChangesSort.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { BatchRetrieveInventoryChangesSortField } from "./BatchRetrieveInventoryChangesSortField"; +import { SortOrder } from "./SortOrder"; + +export const BatchRetrieveInventoryChangesSort: core.serialization.ObjectSchema< + serializers.BatchRetrieveInventoryChangesSort.Raw, + Square.BatchRetrieveInventoryChangesSort +> = core.serialization.object({ + field: BatchRetrieveInventoryChangesSortField.optional(), + order: SortOrder.optional(), +}); + +export declare namespace BatchRetrieveInventoryChangesSort { + export interface Raw { + field?: BatchRetrieveInventoryChangesSortField.Raw | null; + order?: SortOrder.Raw | null; + } +} diff --git a/src/serialization/types/BatchRetrieveInventoryChangesSortField.ts b/src/serialization/types/BatchRetrieveInventoryChangesSortField.ts new file mode 100644 index 000000000..97625f734 --- /dev/null +++ b/src/serialization/types/BatchRetrieveInventoryChangesSortField.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const BatchRetrieveInventoryChangesSortField: core.serialization.Schema< + serializers.BatchRetrieveInventoryChangesSortField.Raw, + Square.BatchRetrieveInventoryChangesSortField +> = core.serialization.stringLiteral("OCCURRED_AT"); + +export declare namespace BatchRetrieveInventoryChangesSortField { + export type Raw = "OCCURRED_AT"; +} diff --git a/src/serialization/types/CatalogItemVariation.ts b/src/serialization/types/CatalogItemVariation.ts index f6fced660..76750784a 100644 --- a/src/serialization/types/CatalogItemVariation.ts +++ b/src/serialization/types/CatalogItemVariation.ts @@ -4,6 +4,7 @@ import type * as Square from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { CatalogItemOptionValueForItemVariation } from "./CatalogItemOptionValueForItemVariation"; +import { CatalogItemVariationVendorInformation } from "./CatalogItemVariationVendorInformation"; import { CatalogPricingType } from "./CatalogPricingType"; import { CatalogStockConversion } from "./CatalogStockConversion"; import { InventoryAlertType } from "./InventoryAlertType"; @@ -57,6 +58,10 @@ export const CatalogItemVariation: core.serialization.ObjectSchema< ), stockableConversion: core.serialization.property("stockable_conversion", CatalogStockConversion.optional()), kitchenName: core.serialization.property("kitchen_name", core.serialization.string().optionalNullable()), + vendorInformation: core.serialization.property( + "vendor_information", + core.serialization.list(CatalogItemVariationVendorInformation).optionalNullable(), + ), }); export declare namespace CatalogItemVariation { @@ -83,5 +88,6 @@ export declare namespace CatalogItemVariation { team_member_ids?: (string[] | null | undefined) | null; stockable_conversion?: CatalogStockConversion.Raw | null; kitchen_name?: (string | null | undefined) | null; + vendor_information?: (CatalogItemVariationVendorInformation.Raw[] | null | undefined) | null; } } diff --git a/src/serialization/types/CatalogItemVariationVendorInformation.ts b/src/serialization/types/CatalogItemVariationVendorInformation.ts new file mode 100644 index 000000000..090ce390d --- /dev/null +++ b/src/serialization/types/CatalogItemVariationVendorInformation.ts @@ -0,0 +1,23 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { Money } from "./Money"; + +export const CatalogItemVariationVendorInformation: core.serialization.ObjectSchema< + serializers.CatalogItemVariationVendorInformation.Raw, + Square.CatalogItemVariationVendorInformation +> = core.serialization.object({ + vendorId: core.serialization.property("vendor_id", core.serialization.string().optionalNullable()), + vendorCode: core.serialization.property("vendor_code", core.serialization.string().optionalNullable()), + unitCostMoney: core.serialization.property("unit_cost_money", Money.optional()), +}); + +export declare namespace CatalogItemVariationVendorInformation { + export interface Raw { + vendor_id?: (string | null | undefined) | null; + vendor_code?: (string | null | undefined) | null; + unit_cost_money?: Money.Raw | null; + } +} diff --git a/src/serialization/types/CreateInventoryAdjustmentReasonResponse.ts b/src/serialization/types/CreateInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..e308f7ba1 --- /dev/null +++ b/src/serialization/types/CreateInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { Error_ } from "./Error_"; +import { InventoryAdjustmentReason } from "./InventoryAdjustmentReason"; + +export const CreateInventoryAdjustmentReasonResponse: core.serialization.ObjectSchema< + serializers.CreateInventoryAdjustmentReasonResponse.Raw, + Square.CreateInventoryAdjustmentReasonResponse +> = core.serialization.object({ + errors: core.serialization.list(Error_).optional(), + adjustmentReason: core.serialization.property("adjustment_reason", InventoryAdjustmentReason.optional()), +}); + +export declare namespace CreateInventoryAdjustmentReasonResponse { + export interface Raw { + errors?: Error_.Raw[] | null; + adjustment_reason?: InventoryAdjustmentReason.Raw | null; + } +} diff --git a/src/serialization/types/DeleteInventoryAdjustmentReasonResponse.ts b/src/serialization/types/DeleteInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..f376694b5 --- /dev/null +++ b/src/serialization/types/DeleteInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { Error_ } from "./Error_"; +import { InventoryAdjustmentReason } from "./InventoryAdjustmentReason"; + +export const DeleteInventoryAdjustmentReasonResponse: core.serialization.ObjectSchema< + serializers.DeleteInventoryAdjustmentReasonResponse.Raw, + Square.DeleteInventoryAdjustmentReasonResponse +> = core.serialization.object({ + errors: core.serialization.list(Error_).optional(), + adjustmentReason: core.serialization.property("adjustment_reason", InventoryAdjustmentReason.optional()), +}); + +export declare namespace DeleteInventoryAdjustmentReasonResponse { + export interface Raw { + errors?: Error_.Raw[] | null; + adjustment_reason?: InventoryAdjustmentReason.Raw | null; + } +} diff --git a/src/serialization/types/ExcludeStrategy.ts b/src/serialization/types/ExcludeStrategy.ts index 0e9d65b9b..86dfe145d 100644 --- a/src/serialization/types/ExcludeStrategy.ts +++ b/src/serialization/types/ExcludeStrategy.ts @@ -5,8 +5,8 @@ import * as core from "../../core"; import type * as serializers from "../index"; export const ExcludeStrategy: core.serialization.Schema = - core.serialization.enum_(["LEAST_EXPENSIVE", "MOST_EXPENSIVE"]); + core.serialization.enum_(["LEAST_EXPENSIVE", "MOST_EXPENSIVE", "MOST_EXPENSIVE_LOWEST_VALUE"]); export declare namespace ExcludeStrategy { - export type Raw = "LEAST_EXPENSIVE" | "MOST_EXPENSIVE"; + export type Raw = "LEAST_EXPENSIVE" | "MOST_EXPENSIVE" | "MOST_EXPENSIVE_LOWEST_VALUE"; } diff --git a/src/serialization/types/Fulfillment.ts b/src/serialization/types/Fulfillment.ts index f47d10747..daf7a02e9 100644 --- a/src/serialization/types/Fulfillment.ts +++ b/src/serialization/types/Fulfillment.ts @@ -6,6 +6,7 @@ import type * as serializers from "../index"; import { FulfillmentDeliveryDetails } from "./FulfillmentDeliveryDetails"; import { FulfillmentFulfillmentEntry } from "./FulfillmentFulfillmentEntry"; import { FulfillmentFulfillmentLineItemApplication } from "./FulfillmentFulfillmentLineItemApplication"; +import { FulfillmentInStoreDetails } from "./FulfillmentInStoreDetails"; import { FulfillmentPickupDetails } from "./FulfillmentPickupDetails"; import { FulfillmentShipmentDetails } from "./FulfillmentShipmentDetails"; import { FulfillmentState } from "./FulfillmentState"; @@ -27,6 +28,7 @@ export const Fulfillment: core.serialization.ObjectSchema = core.serialization.object({ + note: core.serialization.string().optionalNullable(), + recipient: FulfillmentRecipient.optional(), + placedAt: core.serialization.property("placed_at", core.serialization.string().optionalNullable()), + completedAt: core.serialization.property("completed_at", core.serialization.string().optional()), + inProgressAt: core.serialization.property("in_progress_at", core.serialization.string().optional()), + preparedAt: core.serialization.property("prepared_at", core.serialization.string().optional()), + canceledAt: core.serialization.property("canceled_at", core.serialization.string().optional()), +}); + +export declare namespace FulfillmentInStoreDetails { + export interface Raw { + note?: (string | null | undefined) | null; + recipient?: FulfillmentRecipient.Raw | null; + placed_at?: (string | null | undefined) | null; + completed_at?: string | null; + in_progress_at?: string | null; + prepared_at?: string | null; + canceled_at?: string | null; + } +} diff --git a/src/serialization/types/FulfillmentType.ts b/src/serialization/types/FulfillmentType.ts index 049042b57..8340218f9 100644 --- a/src/serialization/types/FulfillmentType.ts +++ b/src/serialization/types/FulfillmentType.ts @@ -5,8 +5,8 @@ import * as core from "../../core"; import type * as serializers from "../index"; export const FulfillmentType: core.serialization.Schema = - core.serialization.enum_(["PICKUP", "SHIPMENT", "DELIVERY"]); + core.serialization.enum_(["PICKUP", "SHIPMENT", "DELIVERY", "IN_STORE"]); export declare namespace FulfillmentType { - export type Raw = "PICKUP" | "SHIPMENT" | "DELIVERY"; + export type Raw = "PICKUP" | "SHIPMENT" | "DELIVERY" | "IN_STORE"; } diff --git a/src/serialization/types/GetInventoryTransferResponse.ts b/src/serialization/types/GetInventoryTransferResponse.ts index e0dfe3168..4ce63f84e 100644 --- a/src/serialization/types/GetInventoryTransferResponse.ts +++ b/src/serialization/types/GetInventoryTransferResponse.ts @@ -3,20 +3,12 @@ import type * as Square from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; -import { Error_ } from "./Error_"; -import { InventoryTransfer } from "./InventoryTransfer"; -export const GetInventoryTransferResponse: core.serialization.ObjectSchema< +export const GetInventoryTransferResponse: core.serialization.Schema< serializers.GetInventoryTransferResponse.Raw, Square.GetInventoryTransferResponse -> = core.serialization.object({ - errors: core.serialization.list(Error_).optional(), - transfer: InventoryTransfer.optional(), -}); +> = core.serialization.unknown(); export declare namespace GetInventoryTransferResponse { - export interface Raw { - errors?: Error_.Raw[] | null; - transfer?: InventoryTransfer.Raw | null; - } + export type Raw = unknown; } diff --git a/src/serialization/types/InventoryAdjustment.ts b/src/serialization/types/InventoryAdjustment.ts index 0a0201f12..c1a268248 100644 --- a/src/serialization/types/InventoryAdjustment.ts +++ b/src/serialization/types/InventoryAdjustment.ts @@ -4,6 +4,7 @@ import type * as Square from "../../api/index"; import * as core from "../../core"; import type * as serializers from "../index"; import { InventoryAdjustmentGroup } from "./InventoryAdjustmentGroup"; +import { InventoryAdjustmentReasonId } from "./InventoryAdjustmentReasonId"; import { InventoryState } from "./InventoryState"; import { Money } from "./Money"; import { SourceApplication } from "./SourceApplication"; @@ -16,7 +17,8 @@ export const InventoryAdjustment: core.serialization.ObjectSchema< referenceId: core.serialization.property("reference_id", core.serialization.string().optionalNullable()), fromState: core.serialization.property("from_state", InventoryState.optional()), toState: core.serialization.property("to_state", InventoryState.optional()), - locationId: core.serialization.property("location_id", core.serialization.string().optionalNullable()), + fromLocationId: core.serialization.property("from_location_id", core.serialization.string().optionalNullable()), + toLocationId: core.serialization.property("to_location_id", core.serialization.string().optionalNullable()), catalogObjectId: core.serialization.property("catalog_object_id", core.serialization.string().optionalNullable()), catalogObjectType: core.serialization.property( "catalog_object_type", @@ -34,6 +36,10 @@ export const InventoryAdjustment: core.serialization.ObjectSchema< purchaseOrderId: core.serialization.property("purchase_order_id", core.serialization.string().optional()), goodsReceiptId: core.serialization.property("goods_receipt_id", core.serialization.string().optional()), adjustmentGroup: core.serialization.property("adjustment_group", InventoryAdjustmentGroup.optional()), + costMoney: core.serialization.property("cost_money", Money.optional()), + vendorId: core.serialization.property("vendor_id", core.serialization.string().optionalNullable()), + physicalCountId: core.serialization.property("physical_count_id", core.serialization.string().optional()), + reasonId: core.serialization.property("reason_id", InventoryAdjustmentReasonId.optional()), }); export declare namespace InventoryAdjustment { @@ -42,7 +48,8 @@ export declare namespace InventoryAdjustment { reference_id?: (string | null | undefined) | null; from_state?: InventoryState.Raw | null; to_state?: InventoryState.Raw | null; - location_id?: (string | null | undefined) | null; + from_location_id?: (string | null | undefined) | null; + to_location_id?: (string | null | undefined) | null; catalog_object_id?: (string | null | undefined) | null; catalog_object_type?: (string | null | undefined) | null; quantity?: (string | null | undefined) | null; @@ -57,5 +64,9 @@ export declare namespace InventoryAdjustment { purchase_order_id?: string | null; goods_receipt_id?: string | null; adjustment_group?: InventoryAdjustmentGroup.Raw | null; + cost_money?: Money.Raw | null; + vendor_id?: (string | null | undefined) | null; + physical_count_id?: string | null; + reason_id?: InventoryAdjustmentReasonId.Raw | null; } } diff --git a/src/serialization/types/InventoryAdjustmentReason.ts b/src/serialization/types/InventoryAdjustmentReason.ts new file mode 100644 index 000000000..f71cc6231 --- /dev/null +++ b/src/serialization/types/InventoryAdjustmentReason.ts @@ -0,0 +1,30 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { InventoryAdjustmentReasonDirection } from "./InventoryAdjustmentReasonDirection"; +import { InventoryAdjustmentReasonId } from "./InventoryAdjustmentReasonId"; + +export const InventoryAdjustmentReason: core.serialization.ObjectSchema< + serializers.InventoryAdjustmentReason.Raw, + Square.InventoryAdjustmentReason +> = core.serialization.object({ + id: InventoryAdjustmentReasonId, + name: core.serialization.string().optionalNullable(), + direction: InventoryAdjustmentReasonDirection.optional(), + createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + updatedAt: core.serialization.property("updated_at", core.serialization.string().optional()), + isDeleted: core.serialization.property("is_deleted", core.serialization.boolean().optionalNullable()), +}); + +export declare namespace InventoryAdjustmentReason { + export interface Raw { + id: InventoryAdjustmentReasonId.Raw; + name?: (string | null | undefined) | null; + direction?: InventoryAdjustmentReasonDirection.Raw | null; + created_at?: string | null; + updated_at?: string | null; + is_deleted?: (boolean | null | undefined) | null; + } +} diff --git a/src/serialization/types/InventoryAdjustmentReasonDirection.ts b/src/serialization/types/InventoryAdjustmentReasonDirection.ts new file mode 100644 index 000000000..9e2220027 --- /dev/null +++ b/src/serialization/types/InventoryAdjustmentReasonDirection.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const InventoryAdjustmentReasonDirection: core.serialization.Schema< + serializers.InventoryAdjustmentReasonDirection.Raw, + Square.InventoryAdjustmentReasonDirection +> = core.serialization.enum_(["INCREASE", "DECREASE"]); + +export declare namespace InventoryAdjustmentReasonDirection { + export type Raw = "INCREASE" | "DECREASE"; +} diff --git a/src/serialization/types/InventoryAdjustmentReasonId.ts b/src/serialization/types/InventoryAdjustmentReasonId.ts new file mode 100644 index 000000000..9d603b096 --- /dev/null +++ b/src/serialization/types/InventoryAdjustmentReasonId.ts @@ -0,0 +1,21 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { InventoryAdjustmentReasonIdType } from "./InventoryAdjustmentReasonIdType"; + +export const InventoryAdjustmentReasonId: core.serialization.ObjectSchema< + serializers.InventoryAdjustmentReasonId.Raw, + Square.InventoryAdjustmentReasonId +> = core.serialization.object({ + type: InventoryAdjustmentReasonIdType, + customReasonId: core.serialization.property("custom_reason_id", core.serialization.string().optionalNullable()), +}); + +export declare namespace InventoryAdjustmentReasonId { + export interface Raw { + type: InventoryAdjustmentReasonIdType.Raw; + custom_reason_id?: (string | null | undefined) | null; + } +} diff --git a/src/serialization/types/InventoryAdjustmentReasonIdType.ts b/src/serialization/types/InventoryAdjustmentReasonIdType.ts new file mode 100644 index 000000000..d074c9d4b --- /dev/null +++ b/src/serialization/types/InventoryAdjustmentReasonIdType.ts @@ -0,0 +1,47 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const InventoryAdjustmentReasonIdType: core.serialization.Schema< + serializers.InventoryAdjustmentReasonIdType.Raw, + Square.InventoryAdjustmentReasonIdType +> = core.serialization.enum_([ + "RECEIVED", + "DAMAGED", + "THEFT", + "LOST", + "RETURNED", + "SPOILAGE_WASTE", + "SAMPLES_PROMOTIONAL", + "INTERNAL_USE", + "VENDOR_RETURN", + "PRODUCTION_WASTE", + "SALE", + "RECOUNT", + "TRANSFER", + "IN_TRANSIT", + "CANCELED_SALE", + "CUSTOM", +]); + +export declare namespace InventoryAdjustmentReasonIdType { + export type Raw = + | "RECEIVED" + | "DAMAGED" + | "THEFT" + | "LOST" + | "RETURNED" + | "SPOILAGE_WASTE" + | "SAMPLES_PROMOTIONAL" + | "INTERNAL_USE" + | "VENDOR_RETURN" + | "PRODUCTION_WASTE" + | "SALE" + | "RECOUNT" + | "TRANSFER" + | "IN_TRANSIT" + | "CANCELED_SALE" + | "CUSTOM"; +} diff --git a/src/serialization/types/InventoryChange.ts b/src/serialization/types/InventoryChange.ts index da96b6a37..3c18063f3 100644 --- a/src/serialization/types/InventoryChange.ts +++ b/src/serialization/types/InventoryChange.ts @@ -7,14 +7,12 @@ import { CatalogMeasurementUnit } from "./CatalogMeasurementUnit"; import { InventoryAdjustment } from "./InventoryAdjustment"; import { InventoryChangeType } from "./InventoryChangeType"; import { InventoryPhysicalCount } from "./InventoryPhysicalCount"; -import { InventoryTransfer } from "./InventoryTransfer"; export const InventoryChange: core.serialization.ObjectSchema = core.serialization.object({ type: InventoryChangeType.optional(), physicalCount: core.serialization.property("physical_count", InventoryPhysicalCount.optional()), adjustment: InventoryAdjustment.optional(), - transfer: InventoryTransfer.optional(), measurementUnit: core.serialization.property("measurement_unit", CatalogMeasurementUnit.optional()), measurementUnitId: core.serialization.property("measurement_unit_id", core.serialization.string().optional()), }); @@ -24,7 +22,6 @@ export declare namespace InventoryChange { type?: InventoryChangeType.Raw | null; physical_count?: InventoryPhysicalCount.Raw | null; adjustment?: InventoryAdjustment.Raw | null; - transfer?: InventoryTransfer.Raw | null; measurement_unit?: CatalogMeasurementUnit.Raw | null; measurement_unit_id?: string | null; } diff --git a/src/serialization/types/InventoryChangeType.ts b/src/serialization/types/InventoryChangeType.ts index 384938781..54f301c74 100644 --- a/src/serialization/types/InventoryChangeType.ts +++ b/src/serialization/types/InventoryChangeType.ts @@ -7,8 +7,8 @@ import type * as serializers from "../index"; export const InventoryChangeType: core.serialization.Schema< serializers.InventoryChangeType.Raw, Square.InventoryChangeType -> = core.serialization.enum_(["PHYSICAL_COUNT", "ADJUSTMENT", "TRANSFER"]); +> = core.serialization.enum_(["PHYSICAL_COUNT", "ADJUSTMENT"]); export declare namespace InventoryChangeType { - export type Raw = "PHYSICAL_COUNT" | "ADJUSTMENT" | "TRANSFER"; + export type Raw = "PHYSICAL_COUNT" | "ADJUSTMENT"; } diff --git a/src/serialization/types/InventoryPhysicalCount.ts b/src/serialization/types/InventoryPhysicalCount.ts index 18eddfd35..1ddb1b8ed 100644 --- a/src/serialization/types/InventoryPhysicalCount.ts +++ b/src/serialization/types/InventoryPhysicalCount.ts @@ -25,6 +25,7 @@ export const InventoryPhysicalCount: core.serialization.ObjectSchema< teamMemberId: core.serialization.property("team_member_id", core.serialization.string().optionalNullable()), occurredAt: core.serialization.property("occurred_at", core.serialization.string().optionalNullable()), createdAt: core.serialization.property("created_at", core.serialization.string().optional()), + adjustmentId: core.serialization.property("adjustment_id", core.serialization.string().optional()), }); export declare namespace InventoryPhysicalCount { @@ -41,5 +42,6 @@ export declare namespace InventoryPhysicalCount { team_member_id?: (string | null | undefined) | null; occurred_at?: (string | null | undefined) | null; created_at?: string | null; + adjustment_id?: string | null; } } diff --git a/src/serialization/types/InventoryState.ts b/src/serialization/types/InventoryState.ts index 8a6011fda..3dab1a753 100644 --- a/src/serialization/types/InventoryState.ts +++ b/src/serialization/types/InventoryState.ts @@ -22,6 +22,7 @@ export const InventoryState: core.serialization.Schema = core.serialization.object({ - id: core.serialization.string().optional(), - referenceId: core.serialization.property("reference_id", core.serialization.string().optionalNullable()), - state: InventoryState.optional(), - fromLocationId: core.serialization.property("from_location_id", core.serialization.string().optionalNullable()), - toLocationId: core.serialization.property("to_location_id", core.serialization.string().optionalNullable()), - catalogObjectId: core.serialization.property("catalog_object_id", core.serialization.string().optionalNullable()), - catalogObjectType: core.serialization.property( - "catalog_object_type", - core.serialization.string().optionalNullable(), - ), - quantity: core.serialization.string().optionalNullable(), - occurredAt: core.serialization.property("occurred_at", core.serialization.string().optionalNullable()), - createdAt: core.serialization.property("created_at", core.serialization.string().optional()), - source: SourceApplication.optional(), - employeeId: core.serialization.property("employee_id", core.serialization.string().optionalNullable()), - teamMemberId: core.serialization.property("team_member_id", core.serialization.string().optionalNullable()), -}); - -export declare namespace InventoryTransfer { - export interface Raw { - id?: string | null; - reference_id?: (string | null | undefined) | null; - state?: InventoryState.Raw | null; - from_location_id?: (string | null | undefined) | null; - to_location_id?: (string | null | undefined) | null; - catalog_object_id?: (string | null | undefined) | null; - catalog_object_type?: (string | null | undefined) | null; - quantity?: (string | null | undefined) | null; - occurred_at?: (string | null | undefined) | null; - created_at?: string | null; - source?: SourceApplication.Raw | null; - employee_id?: (string | null | undefined) | null; - team_member_id?: (string | null | undefined) | null; - } -} diff --git a/src/serialization/types/ListInventoryAdjustmentReasonsResponse.ts b/src/serialization/types/ListInventoryAdjustmentReasonsResponse.ts new file mode 100644 index 000000000..fa2edaae4 --- /dev/null +++ b/src/serialization/types/ListInventoryAdjustmentReasonsResponse.ts @@ -0,0 +1,25 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { Error_ } from "./Error_"; +import { InventoryAdjustmentReason } from "./InventoryAdjustmentReason"; + +export const ListInventoryAdjustmentReasonsResponse: core.serialization.ObjectSchema< + serializers.ListInventoryAdjustmentReasonsResponse.Raw, + Square.ListInventoryAdjustmentReasonsResponse +> = core.serialization.object({ + errors: core.serialization.list(Error_).optional(), + adjustmentReasons: core.serialization.property( + "adjustment_reasons", + core.serialization.list(InventoryAdjustmentReason).optional(), + ), +}); + +export declare namespace ListInventoryAdjustmentReasonsResponse { + export interface Raw { + errors?: Error_.Raw[] | null; + adjustment_reasons?: InventoryAdjustmentReason.Raw[] | null; + } +} diff --git a/src/serialization/types/OrderLineItemModifier.ts b/src/serialization/types/OrderLineItemModifier.ts index 1662836b9..1786d12b2 100644 --- a/src/serialization/types/OrderLineItemModifier.ts +++ b/src/serialization/types/OrderLineItemModifier.ts @@ -19,6 +19,10 @@ export const OrderLineItemModifier: core.serialization.ObjectSchema< metadata: core.serialization .record(core.serialization.string(), core.serialization.string().nullable()) .optionalNullable(), + parentModifierUid: core.serialization.property( + "parent_modifier_uid", + core.serialization.string().optionalNullable(), + ), }); export declare namespace OrderLineItemModifier { @@ -31,5 +35,6 @@ export declare namespace OrderLineItemModifier { base_price_money?: Money.Raw | null; total_price_money?: Money.Raw | null; metadata?: (Record | null | undefined) | null; + parent_modifier_uid?: (string | null | undefined) | null; } } diff --git a/src/serialization/types/RestoreInventoryAdjustmentReasonResponse.ts b/src/serialization/types/RestoreInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..07f2fdda1 --- /dev/null +++ b/src/serialization/types/RestoreInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { Error_ } from "./Error_"; +import { InventoryAdjustmentReason } from "./InventoryAdjustmentReason"; + +export const RestoreInventoryAdjustmentReasonResponse: core.serialization.ObjectSchema< + serializers.RestoreInventoryAdjustmentReasonResponse.Raw, + Square.RestoreInventoryAdjustmentReasonResponse +> = core.serialization.object({ + errors: core.serialization.list(Error_).optional(), + adjustmentReason: core.serialization.property("adjustment_reason", InventoryAdjustmentReason.optional()), +}); + +export declare namespace RestoreInventoryAdjustmentReasonResponse { + export interface Raw { + errors?: Error_.Raw[] | null; + adjustment_reason?: InventoryAdjustmentReason.Raw | null; + } +} diff --git a/src/serialization/types/RetrieveInventoryAdjustmentReasonResponse.ts b/src/serialization/types/RetrieveInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..c9a32551a --- /dev/null +++ b/src/serialization/types/RetrieveInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { Error_ } from "./Error_"; +import { InventoryAdjustmentReason } from "./InventoryAdjustmentReason"; + +export const RetrieveInventoryAdjustmentReasonResponse: core.serialization.ObjectSchema< + serializers.RetrieveInventoryAdjustmentReasonResponse.Raw, + Square.RetrieveInventoryAdjustmentReasonResponse +> = core.serialization.object({ + errors: core.serialization.list(Error_).optional(), + adjustmentReason: core.serialization.property("adjustment_reason", InventoryAdjustmentReason.optional()), +}); + +export declare namespace RetrieveInventoryAdjustmentReasonResponse { + export interface Raw { + errors?: Error_.Raw[] | null; + adjustment_reason?: InventoryAdjustmentReason.Raw | null; + } +} diff --git a/src/serialization/types/UpdateInventoryAdjustmentReasonResponse.ts b/src/serialization/types/UpdateInventoryAdjustmentReasonResponse.ts new file mode 100644 index 000000000..8fe090359 --- /dev/null +++ b/src/serialization/types/UpdateInventoryAdjustmentReasonResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { Error_ } from "./Error_"; +import { InventoryAdjustmentReason } from "./InventoryAdjustmentReason"; + +export const UpdateInventoryAdjustmentReasonResponse: core.serialization.ObjectSchema< + serializers.UpdateInventoryAdjustmentReasonResponse.Raw, + Square.UpdateInventoryAdjustmentReasonResponse +> = core.serialization.object({ + errors: core.serialization.list(Error_).optional(), + adjustmentReason: core.serialization.property("adjustment_reason", InventoryAdjustmentReason.optional()), +}); + +export declare namespace UpdateInventoryAdjustmentReasonResponse { + export interface Raw { + errors?: Error_.Raw[] | null; + adjustment_reason?: InventoryAdjustmentReason.Raw | null; + } +} diff --git a/src/serialization/types/UpdateInventoryAdjustmentResponse.ts b/src/serialization/types/UpdateInventoryAdjustmentResponse.ts new file mode 100644 index 000000000..21150c735 --- /dev/null +++ b/src/serialization/types/UpdateInventoryAdjustmentResponse.ts @@ -0,0 +1,22 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { Error_ } from "./Error_"; +import { InventoryAdjustment } from "./InventoryAdjustment"; + +export const UpdateInventoryAdjustmentResponse: core.serialization.ObjectSchema< + serializers.UpdateInventoryAdjustmentResponse.Raw, + Square.UpdateInventoryAdjustmentResponse +> = core.serialization.object({ + errors: core.serialization.list(Error_).optional(), + adjustment: InventoryAdjustment.optional(), +}); + +export declare namespace UpdateInventoryAdjustmentResponse { + export interface Raw { + errors?: Error_.Raw[] | null; + adjustment?: InventoryAdjustment.Raw | null; + } +} diff --git a/src/serialization/types/index.ts b/src/serialization/types/index.ts index 0f157e6da..9a8b41bcf 100644 --- a/src/serialization/types/index.ts +++ b/src/serialization/types/index.ts @@ -40,6 +40,8 @@ export * from "./BatchGetInventoryCountsResponse"; export * from "./BatchGetOrdersResponse"; export * from "./BatchGetVendorsResponse"; export * from "./BatchRetrieveInventoryChangesRequest"; +export * from "./BatchRetrieveInventoryChangesSort"; +export * from "./BatchRetrieveInventoryChangesSortField"; export * from "./BatchUpdateTeamMembersResponse"; export * from "./BatchUpdateVendorsResponse"; export * from "./BatchUpsertCatalogObjectsResponse"; @@ -196,6 +198,7 @@ export * from "./CatalogItemOptionValue"; export * from "./CatalogItemOptionValueForItemVariation"; export * from "./CatalogItemProductType"; export * from "./CatalogItemVariation"; +export * from "./CatalogItemVariationVendorInformation"; export * from "./CatalogMeasurementUnit"; export * from "./CatalogModifier"; export * from "./CatalogModifierList"; @@ -304,6 +307,7 @@ export * from "./CreateDisputeEvidenceFileResponse"; export * from "./CreateDisputeEvidenceTextResponse"; export * from "./CreateGiftCardActivityResponse"; export * from "./CreateGiftCardResponse"; +export * from "./CreateInventoryAdjustmentReasonResponse"; export * from "./CreateInvoiceAttachmentRequestData"; export * from "./CreateInvoiceAttachmentResponse"; export * from "./CreateInvoiceResponse"; @@ -413,6 +417,7 @@ export * from "./DeleteCustomerCustomAttributeResponse"; export * from "./DeleteCustomerGroupResponse"; export * from "./DeleteCustomerResponse"; export * from "./DeleteDisputeEvidenceResponse"; +export * from "./DeleteInventoryAdjustmentReasonResponse"; export * from "./DeleteInvoiceAttachmentResponse"; export * from "./DeleteInvoiceResponse"; export * from "./DeleteLocationCustomAttributeDefinitionResponse"; @@ -523,6 +528,7 @@ export * from "./FulfillmentDeliveryDetails"; export * from "./FulfillmentDeliveryDetailsOrderFulfillmentDeliveryDetailsScheduleType"; export * from "./FulfillmentFulfillmentEntry"; export * from "./FulfillmentFulfillmentLineItemApplication"; +export * from "./FulfillmentInStoreDetails"; export * from "./FulfillmentPickupDetails"; export * from "./FulfillmentPickupDetailsCurbsidePickupDetails"; export * from "./FulfillmentPickupDetailsScheduleType"; @@ -659,6 +665,10 @@ export * from "./GiftCardUpdatedEventObject"; export * from "./Hierarchy"; export * from "./InventoryAdjustment"; export * from "./InventoryAdjustmentGroup"; +export * from "./InventoryAdjustmentReason"; +export * from "./InventoryAdjustmentReasonDirection"; +export * from "./InventoryAdjustmentReasonId"; +export * from "./InventoryAdjustmentReasonIdType"; export * from "./InventoryAlertType"; export * from "./InventoryChange"; export * from "./InventoryChangeType"; @@ -668,7 +678,6 @@ export * from "./InventoryCountUpdatedEventData"; export * from "./InventoryCountUpdatedEventObject"; export * from "./InventoryPhysicalCount"; export * from "./InventoryState"; -export * from "./InventoryTransfer"; export * from "./Invoice"; export * from "./InvoiceAcceptedPaymentMethods"; export * from "./InvoiceAttachment"; @@ -778,6 +787,7 @@ export * from "./ListEmployeeWagesResponse"; export * from "./ListEventTypesResponse"; export * from "./ListGiftCardActivitiesResponse"; export * from "./ListGiftCardsResponse"; +export * from "./ListInventoryAdjustmentReasonsResponse"; export * from "./ListInvoicesResponse"; export * from "./ListJobsResponse"; export * from "./ListLocationBookingProfilesResponse"; @@ -1093,10 +1103,12 @@ export * from "./RegisterDomainResponse"; export * from "./RegisterDomainResponseStatus"; export * from "./RemoveGroupFromCustomerResponse"; export * from "./ReportingError"; +export * from "./RestoreInventoryAdjustmentReasonResponse"; export * from "./ResumeSubscriptionResponse"; export * from "./RetrieveBookingCustomAttributeDefinitionResponse"; export * from "./RetrieveBookingCustomAttributeResponse"; export * from "./RetrieveChannelResponse"; +export * from "./RetrieveInventoryAdjustmentReasonResponse"; export * from "./RetrieveJobResponse"; export * from "./RetrieveLocationBookingProfileResponse"; export * from "./RetrieveLocationCustomAttributeDefinitionResponse"; @@ -1326,6 +1338,8 @@ export * from "./UpdateCatalogImageResponse"; export * from "./UpdateCustomerCustomAttributeDefinitionResponse"; export * from "./UpdateCustomerGroupResponse"; export * from "./UpdateCustomerResponse"; +export * from "./UpdateInventoryAdjustmentReasonResponse"; +export * from "./UpdateInventoryAdjustmentResponse"; export * from "./UpdateInvoiceResponse"; export * from "./UpdateItemModifierListsResponse"; export * from "./UpdateItemTaxesResponse"; diff --git a/src/version.ts b/src/version.ts index 21124abb7..3884a03e5 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "44.2.1"; +export const SDK_VERSION = "45.0.1"; diff --git a/tests/integration/inventory.serial.test.ts b/tests/integration/inventory.serial.test.ts index 6cffae124..f42379db3 100644 --- a/tests/integration/inventory.serial.test.ts +++ b/tests/integration/inventory.serial.test.ts @@ -54,7 +54,8 @@ describe("Inventory API", () => { type: "ADJUSTMENT", adjustment: { catalogObjectId: itemVariationId, - locationId: locationId, + fromLocationId: locationId, + toLocationId: locationId, quantity: "100", fromState: "NONE", toState: "IN_STOCK", @@ -152,7 +153,8 @@ describe("Inventory API", () => { type: "ADJUSTMENT", adjustment: { catalogObjectId: itemVariationId, - locationId: locationId, + fromLocationId: locationId, + toLocationId: locationId, quantity: "50", // Different quantity than setup fromState: "NONE", toState: "IN_STOCK", @@ -168,7 +170,7 @@ describe("Inventory API", () => { type: "ADJUSTMENT", adjustment: { catalogObjectId: itemVariationId, - locationId: locationId, + toLocationId: locationId, quantity: "50", }, }); diff --git a/tests/wire/inventory.test.ts b/tests/wire/inventory.test.ts index 36c996201..6a1c43271 100644 --- a/tests/wire/inventory.test.ts +++ b/tests/wire/inventory.test.ts @@ -4,6 +4,387 @@ import { SquareClient } from "../../src/Client"; import { mockServerPool } from "../mock-server/MockServerPool"; describe("InventoryClient", () => { + test("ListInventoryAdjustmentReasons", async () => { + const server = mockServerPool.createServer(); + const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + const rawResponseBody = { + errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], + adjustment_reasons: [ + { + id: { type: "RECEIVED" }, + name: "name", + direction: "INCREASE", + created_at: "created_at", + updated_at: "updated_at", + is_deleted: true, + }, + { + id: { type: "DAMAGED" }, + name: "name", + direction: "DECREASE", + created_at: "created_at", + updated_at: "updated_at", + is_deleted: true, + }, + { + id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" }, + name: "Donated to charity", + direction: "DECREASE", + created_at: "2026-07-15T18:24:31.000Z", + updated_at: "2026-07-15T18:24:31.000Z", + is_deleted: false, + }, + ], + }; + + server + .mockEndpoint() + .get("/v2/inventory/adjustment-reasons") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.inventory.listInventoryAdjustmentReasons({ + includeDeleted: true, + includeSystemCodes: true, + }); + expect(response).toEqual({ + errors: [ + { + category: "API_ERROR", + code: "INTERNAL_SERVER_ERROR", + detail: "detail", + field: "field", + }, + ], + adjustmentReasons: [ + { + id: { + type: "RECEIVED", + }, + name: "name", + direction: "INCREASE", + createdAt: "created_at", + updatedAt: "updated_at", + isDeleted: true, + }, + { + id: { + type: "DAMAGED", + }, + name: "name", + direction: "DECREASE", + createdAt: "created_at", + updatedAt: "updated_at", + isDeleted: true, + }, + { + id: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + name: "Donated to charity", + direction: "DECREASE", + createdAt: "2026-07-15T18:24:31.000Z", + updatedAt: "2026-07-15T18:24:31.000Z", + isDeleted: false, + }, + ], + }); + }); + + test("CreateInventoryAdjustmentReason", async () => { + const server = mockServerPool.createServer(); + const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { + idempotency_key: "27b2f2b1-1c2a-4b9e-8f3a-0d9c3a1e5b47", + adjustment_reason: { id: { type: "CUSTOM" }, name: "Donated to charity", direction: "DECREASE" }, + }; + const rawResponseBody = { + errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], + adjustment_reason: { + id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" }, + name: "Donated to charity", + direction: "DECREASE", + created_at: "2026-07-15T18:24:31.000Z", + updated_at: "2026-07-15T18:24:31.000Z", + is_deleted: false, + }, + }; + + server + .mockEndpoint() + .post("/v2/inventory/adjustment-reasons/create") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.inventory.createInventoryAdjustmentReason({ + idempotencyKey: "27b2f2b1-1c2a-4b9e-8f3a-0d9c3a1e5b47", + adjustmentReason: { + id: { + type: "CUSTOM", + }, + name: "Donated to charity", + direction: "DECREASE", + }, + }); + expect(response).toEqual({ + errors: [ + { + category: "API_ERROR", + code: "INTERNAL_SERVER_ERROR", + detail: "detail", + field: "field", + }, + ], + adjustmentReason: { + id: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + name: "Donated to charity", + direction: "DECREASE", + createdAt: "2026-07-15T18:24:31.000Z", + updatedAt: "2026-07-15T18:24:31.000Z", + isDeleted: false, + }, + }); + }); + + test("DeleteInventoryAdjustmentReason", async () => { + const server = mockServerPool.createServer(); + const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { reason_id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" } }; + const rawResponseBody = { + errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], + adjustment_reason: { + id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" }, + name: "Charitable donation", + direction: "DECREASE", + created_at: "2026-07-15T18:24:31.000Z", + updated_at: "2026-07-15T19:05:44.000Z", + is_deleted: true, + }, + }; + + server + .mockEndpoint() + .post("/v2/inventory/adjustment-reasons/delete") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.inventory.deleteInventoryAdjustmentReason({ + reasonId: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + }); + expect(response).toEqual({ + errors: [ + { + category: "API_ERROR", + code: "INTERNAL_SERVER_ERROR", + detail: "detail", + field: "field", + }, + ], + adjustmentReason: { + id: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + name: "Charitable donation", + direction: "DECREASE", + createdAt: "2026-07-15T18:24:31.000Z", + updatedAt: "2026-07-15T19:05:44.000Z", + isDeleted: true, + }, + }); + }); + + test("RestoreInventoryAdjustmentReason", async () => { + const server = mockServerPool.createServer(); + const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { reason_id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" } }; + const rawResponseBody = { + errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], + adjustment_reason: { + id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" }, + name: "Charitable donation", + direction: "DECREASE", + created_at: "2026-07-15T18:24:31.000Z", + updated_at: "2026-07-15T19:07:12.000Z", + is_deleted: false, + }, + }; + + server + .mockEndpoint() + .post("/v2/inventory/adjustment-reasons/restore") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.inventory.restoreInventoryAdjustmentReason({ + reasonId: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + }); + expect(response).toEqual({ + errors: [ + { + category: "API_ERROR", + code: "INTERNAL_SERVER_ERROR", + detail: "detail", + field: "field", + }, + ], + adjustmentReason: { + id: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + name: "Charitable donation", + direction: "DECREASE", + createdAt: "2026-07-15T18:24:31.000Z", + updatedAt: "2026-07-15T19:07:12.000Z", + isDeleted: false, + }, + }); + }); + + test("RetrieveInventoryAdjustmentReason", async () => { + const server = mockServerPool.createServer(); + const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { reason_id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" } }; + const rawResponseBody = { + errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], + adjustment_reason: { + id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" }, + name: "Donated to charity", + direction: "DECREASE", + created_at: "2026-07-15T18:24:31.000Z", + updated_at: "2026-07-15T18:24:31.000Z", + is_deleted: false, + }, + }; + + server + .mockEndpoint() + .post("/v2/inventory/adjustment-reasons/retrieve") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.inventory.retrieveInventoryAdjustmentReason({ + reasonId: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + }); + expect(response).toEqual({ + errors: [ + { + category: "API_ERROR", + code: "INTERNAL_SERVER_ERROR", + detail: "detail", + field: "field", + }, + ], + adjustmentReason: { + id: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + name: "Donated to charity", + direction: "DECREASE", + createdAt: "2026-07-15T18:24:31.000Z", + updatedAt: "2026-07-15T18:24:31.000Z", + isDeleted: false, + }, + }); + }); + + test("UpdateInventoryAdjustmentReason", async () => { + const server = mockServerPool.createServer(); + const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { + reason_id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" }, + adjustment_reason: { + id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" }, + name: "Charitable donation", + }, + }; + const rawResponseBody = { + errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], + adjustment_reason: { + id: { type: "CUSTOM", custom_reason_id: "R5BX3PDCZ6EXAMPLE" }, + name: "Charitable donation", + direction: "DECREASE", + created_at: "2026-07-15T18:24:31.000Z", + updated_at: "2026-07-15T19:02:07.000Z", + is_deleted: false, + }, + }; + + server + .mockEndpoint() + .put("/v2/inventory/adjustment-reasons/update") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.inventory.updateInventoryAdjustmentReason({ + reasonId: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + adjustmentReason: { + id: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + name: "Charitable donation", + }, + }); + expect(response).toEqual({ + errors: [ + { + category: "API_ERROR", + code: "INTERNAL_SERVER_ERROR", + detail: "detail", + field: "field", + }, + ], + adjustmentReason: { + id: { + type: "CUSTOM", + customReasonId: "R5BX3PDCZ6EXAMPLE", + }, + name: "Charitable donation", + direction: "DECREASE", + createdAt: "2026-07-15T18:24:31.000Z", + updatedAt: "2026-07-15T19:02:07.000Z", + isDeleted: false, + }, + }); + }); + test("DeprecatedGetAdjustment", async () => { const server = mockServerPool.createServer(); const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); @@ -15,7 +396,8 @@ describe("InventoryClient", () => { reference_id: "4a366069-4096-47a2-99a5-0084ac879509", from_state: "IN_STOCK", to_state: "SOLD", - location_id: "C6W5YS5QM06F5", + from_location_id: "from_location_id", + to_location_id: "to_location_id", catalog_object_id: "W62UWFY35CWMYGVWK6TWJDNI", catalog_object_type: "ITEM_VARIATION", quantity: "7", @@ -39,6 +421,10 @@ describe("InventoryClient", () => { from_state: "CUSTOM", to_state: "CUSTOM", }, + cost_money: { amount: BigInt(1000000), currency: "UNKNOWN_CURRENCY" }, + vendor_id: "vendor_id", + physical_count_id: "physical_count_id", + reason_id: { type: "RECEIVED", custom_reason_id: "custom_reason_id" }, }, }; @@ -67,7 +453,8 @@ describe("InventoryClient", () => { referenceId: "4a366069-4096-47a2-99a5-0084ac879509", fromState: "IN_STOCK", toState: "SOLD", - locationId: "C6W5YS5QM06F5", + fromLocationId: "from_location_id", + toLocationId: "to_location_id", catalogObjectId: "W62UWFY35CWMYGVWK6TWJDNI", catalogObjectType: "ITEM_VARIATION", quantity: "7", @@ -94,6 +481,128 @@ describe("InventoryClient", () => { fromState: "CUSTOM", toState: "CUSTOM", }, + costMoney: { + amount: BigInt("1000000"), + currency: "UNKNOWN_CURRENCY", + }, + vendorId: "vendor_id", + physicalCountId: "physical_count_id", + reasonId: { + type: "RECEIVED", + customReasonId: "custom_reason_id", + }, + }, + }); + }); + + test("UpdateInventoryAdjustment", async () => { + const server = mockServerPool.createServer(); + const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + const rawRequestBody = { idempotency_key: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", adjustment: {} }; + const rawResponseBody = { + errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], + adjustment: { + id: "UDMOEO78BG6GYWA2XDRYX3KB", + reference_id: "4a366069-4096-47a2-99a5-0084ac879509", + from_state: "IN_STOCK", + to_state: "SOLD", + from_location_id: "from_location_id", + to_location_id: "to_location_id", + catalog_object_id: "W62UWFY35CWMYGVWK6TWJDNI", + catalog_object_type: "ITEM_VARIATION", + quantity: "7.5", + total_price_money: { amount: BigInt(4550), currency: "USD" }, + occurred_at: "2016-11-16T25:44:22.837Z", + created_at: "2016-11-17T13:02:15.142Z", + source: { + product: "SQUARE_POS", + application_id: "416ff29c-86c4-4feb-b58c-9705f21f3ea0", + name: "Square Point of Sale 4.37", + }, + employee_id: "employee_id", + team_member_id: "LRK57NSQ5X7PUD05", + transaction_id: "transaction_id", + refund_id: "refund_id", + purchase_order_id: "purchase_order_id", + goods_receipt_id: "goods_receipt_id", + adjustment_group: { + id: "id", + root_adjustment_id: "root_adjustment_id", + from_state: "CUSTOM", + to_state: "CUSTOM", + }, + cost_money: { amount: BigInt(1000000), currency: "UNKNOWN_CURRENCY" }, + vendor_id: "vendor_id", + physical_count_id: "physical_count_id", + reason_id: { type: "RECEIVED", custom_reason_id: "custom_reason_id" }, + }, + }; + + server + .mockEndpoint() + .put("/v2/inventory/adjustments/update") + .jsonBody(rawRequestBody) + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.inventory.updateInventoryAdjustment({ + idempotencyKey: "8fc6a5b0-9fe8-4b46-b46b-2ef95793abbe", + adjustment: {}, + }); + expect(response).toEqual({ + errors: [ + { + category: "API_ERROR", + code: "INTERNAL_SERVER_ERROR", + detail: "detail", + field: "field", + }, + ], + adjustment: { + id: "UDMOEO78BG6GYWA2XDRYX3KB", + referenceId: "4a366069-4096-47a2-99a5-0084ac879509", + fromState: "IN_STOCK", + toState: "SOLD", + fromLocationId: "from_location_id", + toLocationId: "to_location_id", + catalogObjectId: "W62UWFY35CWMYGVWK6TWJDNI", + catalogObjectType: "ITEM_VARIATION", + quantity: "7.5", + totalPriceMoney: { + amount: BigInt("4550"), + currency: "USD", + }, + occurredAt: "2016-11-16T25:44:22.837Z", + createdAt: "2016-11-17T13:02:15.142Z", + source: { + product: "SQUARE_POS", + applicationId: "416ff29c-86c4-4feb-b58c-9705f21f3ea0", + name: "Square Point of Sale 4.37", + }, + employeeId: "employee_id", + teamMemberId: "LRK57NSQ5X7PUD05", + transactionId: "transaction_id", + refundId: "refund_id", + purchaseOrderId: "purchase_order_id", + goodsReceiptId: "goods_receipt_id", + adjustmentGroup: { + id: "id", + rootAdjustmentId: "root_adjustment_id", + fromState: "CUSTOM", + toState: "CUSTOM", + }, + costMoney: { + amount: BigInt("1000000"), + currency: "UNKNOWN_CURRENCY", + }, + vendorId: "vendor_id", + physicalCountId: "physical_count_id", + reasonId: { + type: "RECEIVED", + customReasonId: "custom_reason_id", + }, }, }); }); @@ -109,7 +618,8 @@ describe("InventoryClient", () => { reference_id: "4a366069-4096-47a2-99a5-0084ac879509", from_state: "IN_STOCK", to_state: "SOLD", - location_id: "C6W5YS5QM06F5", + from_location_id: "from_location_id", + to_location_id: "to_location_id", catalog_object_id: "W62UWFY35CWMYGVWK6TWJDNI", catalog_object_type: "ITEM_VARIATION", quantity: "7", @@ -133,6 +643,10 @@ describe("InventoryClient", () => { from_state: "CUSTOM", to_state: "CUSTOM", }, + cost_money: { amount: BigInt(1000000), currency: "UNKNOWN_CURRENCY" }, + vendor_id: "vendor_id", + physical_count_id: "physical_count_id", + reason_id: { type: "RECEIVED", custom_reason_id: "custom_reason_id" }, }, }; @@ -161,7 +675,8 @@ describe("InventoryClient", () => { referenceId: "4a366069-4096-47a2-99a5-0084ac879509", fromState: "IN_STOCK", toState: "SOLD", - locationId: "C6W5YS5QM06F5", + fromLocationId: "from_location_id", + toLocationId: "to_location_id", catalogObjectId: "W62UWFY35CWMYGVWK6TWJDNI", catalogObjectType: "ITEM_VARIATION", quantity: "7", @@ -188,6 +703,16 @@ describe("InventoryClient", () => { fromState: "CUSTOM", toState: "CUSTOM", }, + costMoney: { + amount: BigInt("1000000"), + currency: "UNKNOWN_CURRENCY", + }, + vendorId: "vendor_id", + physicalCountId: "physical_count_id", + reasonId: { + type: "RECEIVED", + customReasonId: "custom_reason_id", + }, }, }); }); @@ -719,6 +1244,7 @@ describe("InventoryClient", () => { team_member_id: "LRK57NSQ5X7PUD05", occurred_at: "2016-11-16T22:25:24.878Z", created_at: "2016-11-16T22:25:24.878Z", + adjustment_id: "adjustment_id", }, }; @@ -759,6 +1285,7 @@ describe("InventoryClient", () => { teamMemberId: "LRK57NSQ5X7PUD05", occurredAt: "2016-11-16T22:25:24.878Z", createdAt: "2016-11-16T22:25:24.878Z", + adjustmentId: "adjustment_id", }, }); }); @@ -786,6 +1313,7 @@ describe("InventoryClient", () => { team_member_id: "LRK57NSQ5X7PUD05", occurred_at: "2016-11-16T22:25:24.878Z", created_at: "2016-11-16T22:25:24.878Z", + adjustment_id: "adjustment_id", }, }; @@ -826,75 +1354,7 @@ describe("InventoryClient", () => { teamMemberId: "LRK57NSQ5X7PUD05", occurredAt: "2016-11-16T22:25:24.878Z", createdAt: "2016-11-16T22:25:24.878Z", - }, - }); - }); - - test("getTransfer", async () => { - const server = mockServerPool.createServer(); - const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); - - const rawResponseBody = { - errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], - transfer: { - id: "UDMOEO78BG6GYWA2XDRYX3KB", - reference_id: "4a366069-4096-47a2-99a5-0084ac879509", - state: "IN_STOCK", - from_location_id: "C6W5YS5QM06F5", - to_location_id: "59TNP9SA8VGDA", - catalog_object_id: "W62UWFY35CWMYGVWK6TWJDNI", - catalog_object_type: "ITEM_VARIATION", - quantity: "7", - occurred_at: "2016-11-16T25:44:22.837Z", - created_at: "2016-11-17T13:02:15.142Z", - source: { - product: "SQUARE_POS", - application_id: "416ff29c-86c4-4feb-b58c-9705f21f3ea0", - name: "Square Point of Sale 4.37", - }, - employee_id: "employee_id", - team_member_id: "LRK57NSQ5X7PUD05", - }, - }; - - server - .mockEndpoint() - .get("/v2/inventory/transfers/transfer_id") - .respondWith() - .statusCode(200) - .jsonBody(rawResponseBody) - .build(); - - const response = await client.inventory.getTransfer({ - transferId: "transfer_id", - }); - expect(response).toEqual({ - errors: [ - { - category: "API_ERROR", - code: "INTERNAL_SERVER_ERROR", - detail: "detail", - field: "field", - }, - ], - transfer: { - id: "UDMOEO78BG6GYWA2XDRYX3KB", - referenceId: "4a366069-4096-47a2-99a5-0084ac879509", - state: "IN_STOCK", - fromLocationId: "C6W5YS5QM06F5", - toLocationId: "59TNP9SA8VGDA", - catalogObjectId: "W62UWFY35CWMYGVWK6TWJDNI", - catalogObjectType: "ITEM_VARIATION", - quantity: "7", - occurredAt: "2016-11-16T25:44:22.837Z", - createdAt: "2016-11-17T13:02:15.142Z", - source: { - product: "SQUARE_POS", - applicationId: "416ff29c-86c4-4feb-b58c-9705f21f3ea0", - name: "Square Point of Sale 4.37", - }, - employeeId: "employee_id", - teamMemberId: "LRK57NSQ5X7PUD05", + adjustmentId: "adjustment_id", }, }); }); @@ -975,7 +1435,6 @@ describe("InventoryClient", () => { reference_id: "d8207693-168f-4b44-a2fd-a7ff533ddd26", from_state: "IN_STOCK", to_state: "SOLD", - location_id: "C6W5YS5QM06F5", catalog_object_id: "W62UWFY35CWMYGVWK6TWJDNI", catalog_object_type: "ITEM_VARIATION", quantity: "3", @@ -1021,7 +1480,6 @@ describe("InventoryClient", () => { referenceId: "d8207693-168f-4b44-a2fd-a7ff533ddd26", fromState: "IN_STOCK", toState: "SOLD", - locationId: "C6W5YS5QM06F5", catalogObjectId: "W62UWFY35CWMYGVWK6TWJDNI", catalogObjectType: "ITEM_VARIATION", quantity: "3", @@ -1055,4 +1513,16 @@ describe("InventoryClient", () => { const nextPage = await page.getNextPage(); expect(expected.changes).toEqual(nextPage.data); }); + + test("getTransfer", async () => { + const server = mockServerPool.createServer(); + const client = new SquareClient({ maxRetries: 0, token: "test", environment: server.baseUrl }); + + server.mockEndpoint().get("/v2/inventory/transfers/transfer_id").respondWith().statusCode(200).build(); + + const response = await client.inventory.getTransfer({ + transferId: "transfer_id", + }); + expect(response).toEqual(undefined); + }); }); diff --git a/yarn.lock b/yarn.lock index 693ee3280..da21ee92a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -49,9 +49,9 @@ tslib "^2.8.1" "@apimatic/core@^0.10.16": - version "0.10.29" - resolved "https://registry.yarnpkg.com/@apimatic/core/-/core-0.10.29.tgz#df4399643be47f38a3c8f81fe4bc2f99ac56ed0e" - integrity sha512-QhORiq0QbjlDMrw8ZZsAeG2DzE6QgGz5ukD5w2MOWE/3iIWnUDEROjmc2SfhyiGsE3GoEJ8cyhMMdjlOioP6ww== + version "0.10.30" + resolved "https://registry.yarnpkg.com/@apimatic/core/-/core-0.10.30.tgz#445f44a742183c2665f960a069106588dade3c1a" + integrity sha512-MqODm1YwuW5yK7gkVtqiRQBgoAfjsTSNYTYJP4cg/JDaF8RokpiupSEDuUW6Xdo3fl/4tGCzphtAlKSeLUWKVA== dependencies: "@apimatic/convert-to-stream" "^0.1.9" "@apimatic/core-interfaces" "^0.2.14" @@ -888,9 +888,9 @@ form-data "^4.0.4" "@types/node@*": - version "26.0.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-26.0.1.tgz#4a60e2c7a6d68bd261e265f8983bfe1601263ce3" - integrity sha512-fc3KiUoBt6kie0N9bIW3E47vZsuaMf0PM2AaUpLCLT0s/LvX1nxAim6Fc049cNxODPpGm6qRAuUOB86SkRuPQw== + version "26.1.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-26.1.1.tgz#bad758d601e97d6cf457d204ee76a35fce7bd119" + integrity sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw== dependencies: undici-types "~8.3.0" @@ -907,9 +907,9 @@ undici-types "~6.21.0" "@types/readable-stream@^4.0.23": - version "4.0.23" - resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.23.tgz#fcd0f7472f45ceb43154f08f0083ccd1c76e53ce" - integrity sha512-wwXrtQvbMHxCbBgjHaMGEmImFTQxxpfMOR/ZoQnXxB1woqkUbdLGFDgauo00Py9IudiaqSeiBiulSV9i6XIPig== + version "4.0.24" + resolved "https://registry.yarnpkg.com/@types/readable-stream/-/readable-stream-4.0.24.tgz#7b2431bfc1367d05c53598ad36094b044726d442" + integrity sha512-NRvUNC/JFGPJvqdAfEve8oginbM6V08u5NzLWpG8MwA2kTPOLnqk+wpwuPT+mp3aUsxyuT6m2gnrPuHYCruzEg== dependencies: "@types/node" "*" @@ -1271,15 +1271,15 @@ base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -baseline-browser-mapping@^2.10.38: - version "2.10.40" - resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.40.tgz#f372c8eb36ff4ad0b5e7ae467014abef124554ba" - integrity sha512-BSSLZ9/Cjjv7Gtj5B68ZzXcXUg8iOf3fme+FCuh8rC/Go+Kmh8cox7M3A8dolou16s64QjLPOSdngh7GxXvkSw== +baseline-browser-mapping@^2.10.42: + version "2.10.43" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.43.tgz#7b5d11590ce5acdbe4859443e3c940e81ce8c02d" + integrity sha512-AjYpR78kDWAY3Efj+cDTFH9t9SCoL7OoTp1BOb0mQV7S+6CiLwnWM3FyxhJtdPufDFKzmCSFoUncKjWgJEZTCQ== brace-expansion@^1.1.7: - version "1.1.15" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.15.tgz#a6d90d54067236e5f42570a3b7378d594d9b7738" - integrity sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg== + version "1.1.16" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.16.tgz#723d3a30c0558c225abc9fc479a73e14e26c3c2f" + integrity sha512-IDw48K2/2kRkg9LdJxurvq3lV3aBgq0REY89duEqFRthjlPdXHKMj7EnQOXVckxzgisinf3nHfrcE2FufFLXMw== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" @@ -1292,14 +1292,14 @@ braces@^3.0.3: fill-range "^7.1.1" browserslist@^4.24.0, browserslist@^4.28.1: - version "4.28.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.4.tgz#dd8b8167a32845ff5f8cd6ce13f5abba16cd04c9" - integrity sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw== - dependencies: - baseline-browser-mapping "^2.10.38" - caniuse-lite "^1.0.30001799" - electron-to-chromium "^1.5.376" - node-releases "^2.0.48" + version "4.28.6" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.28.6.tgz#7cf83afcd69c55fde6fb2dcc5039ff0f4ba42610" + integrity sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw== + dependencies: + baseline-browser-mapping "^2.10.42" + caniuse-lite "^1.0.30001803" + electron-to-chromium "^1.5.389" + node-releases "^2.0.51" update-browserslist-db "^1.2.3" bs-logger@^0.2.6: @@ -1352,10 +1352,10 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001799: - version "1.0.30001799" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001799.tgz#5c909138c27f1a61219d3e092071c1cc7d32dc55" - integrity sha512-hG1bReV+OUU+MOqK4t/ZWI0tZOyz3rqS9XuhOUz1cIcbwBKjOyJEJuw9ER5JuNyqxNk8u/JUVbGibBOL1yrjFw== +caniuse-lite@^1.0.30001803: + version "1.0.30001805" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001805.tgz#78d5d5968a69b7ff81af87a96d7ddc7ea6670b1e" + integrity sha512-52noaS3DubycKSXaU30TwPGIp+POyQSUVa5jBEq3vkRkY0kjyb3LQgvhU6WGyCcyXqVLWO0Cw0Q6BSdD0kUfVA== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1559,10 +1559,10 @@ dunder-proto@^1.0.1: es-errors "^1.3.0" gopd "^1.2.0" -electron-to-chromium@^1.5.376: - version "1.5.381" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.381.tgz#037549001adc80e04834ede96dc52a1fbf6c9fde" - integrity sha512-n9Wa6yB+vDsGuA8AKbl/0z7HbvWqt5jxIdvr1IUicd0ryPrk7/xzwqLv8D9AbbvZ6avVNtXYLTfmgFHkwkyelg== +electron-to-chromium@^1.5.389: + version "1.5.389" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.389.tgz#538be9ebec78026d4daba6be321ab854dfac2a8f" + integrity sha512-cEto7aeOqBfU1D+c5py5pE+ooscKE75JifxLBdFUZsqAxRS6y7kebtxAZvICszSl05gPjYHDTjY+lXpyGvpJbg== emittery@^0.13.1: version "0.13.1" @@ -1575,9 +1575,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== enhanced-resolve@^5.22.2: - version "5.24.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.24.1.tgz#b2439adf5d31d7e4764de1f9ecf942d6cd3fc874" - integrity sha512-7DdUaTjmNwMcH2gLr1qycesKII3BK4RLy/mdAb7x10Lq7bR4aNKHt1BR1ZALSv0rPM/hF5wYF0PhGop/rJm8vw== + version "5.24.2" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.24.2.tgz#f25d703a24431cb1e02f944adb74aefa4fcb8d7e" + integrity sha512-rpsZEGT1jFuve6QlpyRp9ckQ+kN61hvF9BzCPyMdaKTm8UJce96KBn3sorXOFXlzjPrs3Vc4T1NsSroZ3PxlFw== dependencies: graceful-fs "^4.2.4" tapable "^2.3.3" @@ -1605,9 +1605,9 @@ es-errors@^1.3.0: integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== es-module-lexer@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-2.2.0.tgz#fe824f12e3f28bde741bb572b5a182786eaf3764" - integrity sha512-3lGxdTXCLfe1MYfTz1y2ksAAUM4NAOP6rPEjxGJVKO7TZ5+tvHCaQWGpC4Y3IXvW3ece0Cz1cIP4FWBxOnGCTQ== + version "2.3.1" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-2.3.1.tgz#5bf2df06999dbbe5f006a5f46a11fb9f5b7b391b" + integrity sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA== es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: version "1.1.2" @@ -2734,10 +2734,10 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.48: - version "2.0.50" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.50.tgz#597197a852071ce42fc2550e58e223242bcba969" - integrity sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg== +node-releases@^2.0.51: + version "2.0.51" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.51.tgz#cdc08433577f5b32ad01694481726e22eeb54aef" + integrity sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ== normalize-path@^3.0.0: version "3.0.0" @@ -2854,9 +2854,9 @@ picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA== picomatch@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.4.tgz#fd6f5e00a143086e074dffe4c924b8fb293b0589" - integrity sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A== + version "4.0.5" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.5.tgz#51ea57a17d86f605f81039595fbc40ed06a55fab" + integrity sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A== pirates@^4.0.4: version "4.0.7" @@ -3187,9 +3187,9 @@ tapable@^2.3.0, tapable@^2.3.3: integrity sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A== terser@^5.31.1: - version "5.48.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.48.0.tgz#8b391171cfbb7ac4a88f9f04ba1cfabc54f643db" - integrity sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q== + version "5.49.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.49.0.tgz#30b341fdf70cfc98486965125ae660fda8403670" + integrity sha512-SNiDnXyHSrxVcIOtVbULzcTmniUiwcV7Nwdyj1twVubeTmbjoa8p69KKDpfkdoOavuM4/GRm1+ykI8qqnavHoA== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.15.0" @@ -3210,17 +3210,17 @@ tiny-warning@^1.0.3: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== -tldts-core@^7.4.5: - version "7.4.5" - resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.4.5.tgz#4d1a77adbf274206be79e9d5fd602089a4e99c72" - integrity sha512-pGrwzZDvPwKe+7NNUqAunb6rqTfynr0VOUhCMdqbu5xlvNiszsAJygRzwvpVycdzejlbpY+SWJOn+s75Og7FEA== +tldts-core@^7.4.8: + version "7.4.8" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.4.8.tgz#c729aee4ff9d3670741193682a98e25a3d780dd9" + integrity sha512-c1P7u0EhACHj7lPy4MJm8iTFEU8+nB0LCtddH0fhP7noaVoXAqafMtOOeX+ulpuPBqnrRgRhw494RICT3mbhnw== tldts@^7.0.5: - version "7.4.5" - resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.4.5.tgz#19648239527391393b49f0ae5eccc418f638deec" - integrity sha512-RfEzKWcq5fHUOFq7J3rl3Oz6ylKGtcHqUznzj4EcXsxLSIjJcvpbXAQtWGeJQ0xKnimR5e0Cn+cn9TssfMzm+g== + version "7.4.8" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.4.8.tgz#f2edc0d81483ea76c45827d642ccd535a3a7a4f7" + integrity sha512-htwgN/8KRB3z3vnC0BOETVh2m499g5GmyTK9Wq5JBLX3FNz6tSBveAd+fQhzy9hkjif8vy2jwDMR1sGhLtZl2A== dependencies: - tldts-core "^7.4.5" + tldts-core "^7.4.8" tmpl@1.0.5: version "1.0.5" @@ -3245,9 +3245,9 @@ tough-cookie@^4.1.2: url-parse "^1.5.3" tough-cookie@^6.0.0: - version "6.0.1" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.1.tgz#a495f833836609ed983c19bc65639cfbceb54c76" - integrity sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw== + version "6.0.2" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-6.0.2.tgz#7b1f22fcf2daf06c4ff9d53ec1845f44c6627062" + integrity sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA== dependencies: tldts "^7.0.5" @@ -3389,14 +3389,14 @@ webidl-conversions@^7.0.0: integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== webpack-sources@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.5.0.tgz#87bf7f5801a4e985b1f1c92b64b9620a02f76d08" - integrity sha512-HPuy+uuoTCaaoEoI1LQ3JN9+vrPBvEesnnX1jADHy728cHSMlq4wUc4afYqahq2B1mhQVZxCXOkNTnXltr+2vQ== + version "3.5.1" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.5.1.tgz#76c2418486dcc02b2aa0694c104176c2858fe84a" + integrity sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw== webpack@^5.105.4: - version "5.108.2" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.108.2.tgz#3b76d7fec173be8673ff45f6dcaf0442574ee286" - integrity sha512-sUWBWPJwWH+QHUObS4lfNaQ368Tj8NaHDBsRJcU/NmQpeOqxV5iQUT2c5nvDWi8WYR5ynF7az+PuMdc+oDLJOA== + version "5.108.4" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.108.4.tgz#141818a411662773a0bb32dc5536acc5409943b7" + integrity sha512-yur8LyJoeiWh47dErD+Ok7vlbmDsJ3UbbRPAoxbGJ54WpE2y5yVo5G/inUzujnYgw3tPmBRdn+G7PoxXaYC33w== dependencies: "@types/estree" "^1.0.8" "@types/json-schema" "^7.0.15"