diff --git a/package.json b/package.json
index 6acef5d92..1fb834b6c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "square",
- "version": "43.1.1",
+ "version": "43.1.0",
"private": false,
"repository": "github:square/square-nodejs-sdk",
"license": "MIT",
diff --git a/reference.md b/reference.md
index 42f62d172..cfebf6dc5 100644
--- a/reference.md
+++ b/reference.md
@@ -392,6 +392,9 @@ Provides summary information for a merchant's online store orders.
```typescript
await client.v1Transactions.v1ListOrders({
locationId: "location_id",
+ order: "DESC",
+ limit: 1,
+ batchToken: "batch_token",
});
```
@@ -670,13 +673,21 @@ Returns a list of [BankAccount](entity:BankAccount) objects linked to a Square a
```typescript
-const response = await client.bankAccounts.list();
+const response = await client.bankAccounts.list({
+ cursor: "cursor",
+ limit: 1,
+ locationId: "location_id",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.bankAccounts.list();
+let page = await client.bankAccounts.list({
+ cursor: "cursor",
+ limit: 1,
+ locationId: "location_id",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -878,13 +889,29 @@ To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ`
```typescript
-const response = await client.bookings.list();
+const response = await client.bookings.list({
+ limit: 1,
+ cursor: "cursor",
+ customerId: "customer_id",
+ teamMemberId: "team_member_id",
+ locationId: "location_id",
+ startAtMin: "start_at_min",
+ startAtMax: "start_at_max",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.bookings.list();
+let page = await client.bookings.list({
+ limit: 1,
+ cursor: "cursor",
+ customerId: "customer_id",
+ teamMemberId: "team_member_id",
+ locationId: "location_id",
+ startAtMin: "start_at_min",
+ startAtMax: "start_at_max",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -1568,13 +1595,25 @@ A max of 25 cards will be returned.
```typescript
-const response = await client.cards.list();
+const response = await client.cards.list({
+ cursor: "cursor",
+ customerId: "customer_id",
+ includeDisabled: true,
+ referenceId: "reference_id",
+ sortOrder: "DESC",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.cards.list();
+let page = await client.cards.list({
+ cursor: "cursor",
+ customerId: "customer_id",
+ includeDisabled: true,
+ referenceId: "reference_id",
+ sortOrder: "DESC",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -2163,13 +2202,21 @@ and set the `include_deleted_objects` attribute value to `true`.
```typescript
-const response = await client.catalog.list();
+const response = await client.catalog.list({
+ cursor: "cursor",
+ types: "types",
+ catalogVersion: BigInt("1000000"),
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.catalog.list();
+let page = await client.catalog.list({
+ cursor: "cursor",
+ types: "types",
+ catalogVersion: BigInt("1000000"),
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -2207,7 +2254,7 @@ while (page.hasNextPage()) {
-client.catalog.search({ ...params }) -> Square.SearchCatalogObjectsResponse
+client.catalog.search({ ...params }) -> core.Page
-
@@ -2243,7 +2290,22 @@ endpoint in the following aspects:
-
```typescript
-await client.catalog.search({
+const response = await client.catalog.search({
+ objectTypes: ["ITEM"],
+ query: {
+ prefixQuery: {
+ attributeName: "name",
+ attributePrefix: "tea",
+ },
+ },
+ limit: 100,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.catalog.search({
objectTypes: ["ITEM"],
query: {
prefixQuery: {
@@ -2253,6 +2315,9 @@ await client.catalog.search({
},
limit: 100,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -2287,7 +2352,7 @@ await client.catalog.search({
-client.catalog.searchItems({ ...params }) -> Square.SearchCatalogItemsResponse
+client.catalog.searchItems({ ...params }) -> core.Page
-
@@ -2323,7 +2388,41 @@ endpoint in the following aspects:
-
```typescript
-await client.catalog.searchItems({
+const response = await client.catalog.searchItems({
+ textFilter: "red",
+ categoryIds: ["WINE_CATEGORY_ID"],
+ stockLevels: ["OUT", "LOW"],
+ enabledLocationIds: ["ATL_LOCATION_ID"],
+ limit: 100,
+ sortOrder: "ASC",
+ productTypes: ["REGULAR"],
+ customAttributeFilters: [
+ {
+ customAttributeDefinitionId: "VEGAN_DEFINITION_ID",
+ boolFilter: true,
+ },
+ {
+ customAttributeDefinitionId: "BRAND_DEFINITION_ID",
+ stringFilter: "Dark Horse",
+ },
+ {
+ key: "VINTAGE",
+ numberFilter: {
+ min: "min",
+ max: "max",
+ },
+ },
+ {
+ customAttributeDefinitionId: "VARIETAL_DEFINITION_ID",
+ },
+ ],
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.catalog.searchItems({
textFilter: "red",
categoryIds: ["WINE_CATEGORY_ID"],
stockLevels: ["OUT", "LOW"],
@@ -2352,6 +2451,9 @@ await client.catalog.searchItems({
},
],
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -2524,9 +2626,9 @@ await client.catalog.updateItemTaxes({
-## Customers
+## Channels
-client.customers.list({ ...params }) -> core.Page
+client.channels.list({ ...params }) -> core.Page
-
@@ -2538,12 +2640,6 @@ await client.catalog.updateItemTaxes({
-
-Lists customer profiles associated with a Square account.
-
-Under normal operating conditions, newly created or updated customer profiles become available
-for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated
-profiles can take closer to one minute or longer, especially during network incidents and outages.
-
@@ -2558,13 +2654,25 @@ profiles can take closer to one minute or longer, especially during network inci
-
```typescript
-const response = await client.customers.list();
+const response = await client.channels.list({
+ referenceType: "UNKNOWN_TYPE",
+ referenceId: "reference_id",
+ status: "ACTIVE",
+ cursor: "cursor",
+ limit: 1,
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.customers.list();
+let page = await client.channels.list({
+ referenceType: "UNKNOWN_TYPE",
+ referenceId: "reference_id",
+ status: "ACTIVE",
+ cursor: "cursor",
+ limit: 1,
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -2583,7 +2691,7 @@ while (page.hasNextPage()) {
-
-**request:** `Square.ListCustomersRequest`
+**request:** `Square.ListChannelsRequest`
@@ -2591,7 +2699,7 @@ while (page.hasNextPage()) {
-
-**requestOptions:** `Customers.RequestOptions`
+**requestOptions:** `Channels.RequestOptions`
@@ -2602,7 +2710,7 @@ while (page.hasNextPage()) {
-client.customers.create({ ...params }) -> Square.CreateCustomerResponse
+client.channels.bulkRetrieve({ ...params }) -> Square.BulkRetrieveChannelsResponse
-
@@ -2614,20 +2722,10 @@ while (page.hasNextPage()) {
-
-Creates a new customer for a business.
-
-You must provide at least one of the following values in your request to this
-endpoint:
-
-- `given_name`
-- `family_name`
-- `company_name`
-- `email_address`
-- `phone_number`
-
-
-
-
+
+
+
+
#### 🔌 Usage
@@ -2638,21 +2736,8 @@ endpoint:
```typescript
-await client.customers.create({
- givenName: "Amelia",
- familyName: "Earhart",
- emailAddress: "Amelia.Earhart@example.com",
- address: {
- addressLine1: "500 Electric Ave",
- addressLine2: "Suite 600",
- locality: "New York",
- administrativeDistrictLevel1: "NY",
- postalCode: "10003",
- country: "US",
- },
- phoneNumber: "+1-212-555-4240",
- referenceId: "YOUR_REFERENCE_ID",
- note: "a customer",
+await client.channels.bulkRetrieve({
+ channelIds: ["CH_9C03D0B59", "CH_6X139B5MN", "NOT_EXISTING"],
});
```
@@ -2669,7 +2754,7 @@ await client.customers.create({
-
-**request:** `Square.CreateCustomerRequest`
+**request:** `Square.BulkRetrieveChannelsRequest`
@@ -2677,7 +2762,7 @@ await client.customers.create({
-
-**requestOptions:** `Customers.RequestOptions`
+**requestOptions:** `Channels.RequestOptions`
@@ -2688,7 +2773,7 @@ await client.customers.create({
-client.customers.batchCreate({ ...params }) -> Square.BulkCreateCustomersResponse
+client.channels.get({ ...params }) -> Square.RetrieveChannelResponse
-
@@ -2700,21 +2785,10 @@ await client.customers.create({
-
-Creates multiple [customer profiles](entity:Customer) for a business.
-
-This endpoint takes a map of individual create requests and returns a map of responses.
-
-You must provide at least one of the following values in each create request:
-
-- `given_name`
-- `family_name`
-- `company_name`
-- `email_address`
-- `phone_number`
-
-
-
-
+
+
+
+
#### 🔌 Usage
@@ -2725,41 +2799,8 @@ You must provide at least one of the following values in each create request:
```typescript
-await client.customers.batchCreate({
- customers: {
- "8bb76c4f-e35d-4c5b-90de-1194cd9179f0": {
- givenName: "Amelia",
- familyName: "Earhart",
- emailAddress: "Amelia.Earhart@example.com",
- address: {
- addressLine1: "500 Electric Ave",
- addressLine2: "Suite 600",
- locality: "New York",
- administrativeDistrictLevel1: "NY",
- postalCode: "10003",
- country: "US",
- },
- phoneNumber: "+1-212-555-4240",
- referenceId: "YOUR_REFERENCE_ID",
- note: "a customer",
- },
- "d1689f23-b25d-4932-b2f0-aed00f5e2029": {
- givenName: "Marie",
- familyName: "Curie",
- emailAddress: "Marie.Curie@example.com",
- address: {
- addressLine1: "500 Electric Ave",
- addressLine2: "Suite 601",
- locality: "New York",
- administrativeDistrictLevel1: "NY",
- postalCode: "10003",
- country: "US",
- },
- phoneNumber: "+1-212-444-4240",
- referenceId: "YOUR_REFERENCE_ID",
- note: "another customer",
- },
- },
+await client.channels.get({
+ channelId: "channel_id",
});
```
@@ -2776,7 +2817,7 @@ await client.customers.batchCreate({
-
-**request:** `Square.BulkCreateCustomersRequest`
+**request:** `Square.GetChannelsRequest`
@@ -2784,7 +2825,7 @@ await client.customers.batchCreate({
-
-**requestOptions:** `Customers.RequestOptions`
+**requestOptions:** `Channels.RequestOptions`
@@ -2795,7 +2836,9 @@ await client.customers.batchCreate({
-client.customers.bulkDeleteCustomers({ ...params }) -> Square.BulkDeleteCustomersResponse
+## Customers
+
+client.customers.list({ ...params }) -> core.Page
-
@@ -2807,9 +2850,11 @@ await client.customers.batchCreate({
-
-Deletes multiple customer profiles.
+Lists customer profiles associated with a Square account.
-The endpoint takes a list of customer IDs and returns a map of responses.
+Under normal operating conditions, newly created or updated customer profiles become available
+for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated
+profiles can take closer to one minute or longer, especially during network incidents and outages.
@@ -2825,9 +2870,28 @@ The endpoint takes a list of customer IDs and returns a map of responses.
-
```typescript
-await client.customers.bulkDeleteCustomers({
- customerIds: ["8DDA5NZVBZFGAX0V3HPF81HHE0", "N18CPRVXR5214XPBBA6BZQWF3C", "2GYD7WNXF7BJZW1PMGNXZ3Y8M8"],
+const response = await client.customers.list({
+ cursor: "cursor",
+ limit: 1,
+ sortField: "DEFAULT",
+ sortOrder: "DESC",
+ count: true,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.customers.list({
+ cursor: "cursor",
+ limit: 1,
+ sortField: "DEFAULT",
+ sortOrder: "DESC",
+ count: true,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -2843,7 +2907,7 @@ await client.customers.bulkDeleteCustomers({
-
-**request:** `Square.BulkDeleteCustomersRequest`
+**request:** `Square.ListCustomersRequest`
@@ -2862,7 +2926,7 @@ await client.customers.bulkDeleteCustomers({
-client.customers.bulkRetrieveCustomers({ ...params }) -> Square.BulkRetrieveCustomersResponse
+client.customers.create({ ...params }) -> Square.CreateCustomerResponse
-
@@ -2874,14 +2938,20 @@ await client.customers.bulkDeleteCustomers({
-
-Retrieves multiple customer profiles.
+Creates a new customer for a business.
-This endpoint takes a list of customer IDs and returns a map of responses.
+You must provide at least one of the following values in your request to this
+endpoint:
-
-
-
-
+- `given_name`
+- `family_name`
+- `company_name`
+- `email_address`
+- `phone_number`
+
+
+
+
#### 🔌 Usage
@@ -2892,8 +2962,21 @@ This endpoint takes a list of customer IDs and returns a map of responses.
```typescript
-await client.customers.bulkRetrieveCustomers({
- customerIds: ["8DDA5NZVBZFGAX0V3HPF81HHE0", "N18CPRVXR5214XPBBA6BZQWF3C", "2GYD7WNXF7BJZW1PMGNXZ3Y8M8"],
+await client.customers.create({
+ givenName: "Amelia",
+ familyName: "Earhart",
+ emailAddress: "Amelia.Earhart@example.com",
+ address: {
+ addressLine1: "500 Electric Ave",
+ addressLine2: "Suite 600",
+ locality: "New York",
+ administrativeDistrictLevel1: "NY",
+ postalCode: "10003",
+ country: "US",
+ },
+ phoneNumber: "+1-212-555-4240",
+ referenceId: "YOUR_REFERENCE_ID",
+ note: "a customer",
});
```
@@ -2910,7 +2993,7 @@ await client.customers.bulkRetrieveCustomers({
-
-**request:** `Square.BulkRetrieveCustomersRequest`
+**request:** `Square.CreateCustomerRequest`
@@ -2929,7 +3012,7 @@ await client.customers.bulkRetrieveCustomers({
-client.customers.bulkUpdateCustomers({ ...params }) -> Square.BulkUpdateCustomersResponse
+client.customers.batchCreate({ ...params }) -> Square.BulkCreateCustomersResponse
-
@@ -2941,14 +3024,21 @@ await client.customers.bulkRetrieveCustomers({
-
-Updates multiple customer profiles.
+Creates multiple [customer profiles](entity:Customer) for a business.
-This endpoint takes a map of individual update requests and returns a map of responses.
+This endpoint takes a map of individual create requests and returns a map of responses.
-
-
-
-
+You must provide at least one of the following values in each create request:
+
+- `given_name`
+- `family_name`
+- `company_name`
+- `email_address`
+- `phone_number`
+
+
+
+
#### 🔌 Usage
@@ -2959,17 +3049,39 @@ This endpoint takes a map of individual update requests and returns a map of res
```typescript
-await client.customers.bulkUpdateCustomers({
+await client.customers.batchCreate({
customers: {
- "8DDA5NZVBZFGAX0V3HPF81HHE0": {
- emailAddress: "New.Amelia.Earhart@example.com",
- note: "updated customer note",
- version: BigInt("2"),
+ "8bb76c4f-e35d-4c5b-90de-1194cd9179f0": {
+ givenName: "Amelia",
+ familyName: "Earhart",
+ emailAddress: "Amelia.Earhart@example.com",
+ address: {
+ addressLine1: "500 Electric Ave",
+ addressLine2: "Suite 600",
+ locality: "New York",
+ administrativeDistrictLevel1: "NY",
+ postalCode: "10003",
+ country: "US",
+ },
+ phoneNumber: "+1-212-555-4240",
+ referenceId: "YOUR_REFERENCE_ID",
+ note: "a customer",
},
- N18CPRVXR5214XPBBA6BZQWF3C: {
+ "d1689f23-b25d-4932-b2f0-aed00f5e2029": {
givenName: "Marie",
familyName: "Curie",
- version: BigInt("0"),
+ emailAddress: "Marie.Curie@example.com",
+ address: {
+ addressLine1: "500 Electric Ave",
+ addressLine2: "Suite 601",
+ locality: "New York",
+ administrativeDistrictLevel1: "NY",
+ postalCode: "10003",
+ country: "US",
+ },
+ phoneNumber: "+1-212-444-4240",
+ referenceId: "YOUR_REFERENCE_ID",
+ note: "another customer",
},
},
});
@@ -2988,7 +3100,7 @@ await client.customers.bulkUpdateCustomers({
-
-**request:** `Square.BulkUpdateCustomersRequest`
+**request:** `Square.BulkCreateCustomersRequest`
@@ -3007,7 +3119,7 @@ await client.customers.bulkUpdateCustomers({
-client.customers.search({ ...params }) -> Square.SearchCustomersResponse
+client.customers.bulkDeleteCustomers({ ...params }) -> Square.BulkDeleteCustomersResponse
-
@@ -3019,15 +3131,9 @@ await client.customers.bulkUpdateCustomers({
-
-Searches the customer profiles associated with a Square account using one or more supported query filters.
-
-Calling `SearchCustomers` without any explicit query filter returns all
-customer profiles ordered alphabetically based on `given_name` and
-`family_name`.
+Deletes multiple customer profiles.
-Under normal operating conditions, newly created or updated customer profiles become available
-for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated
-profiles can take closer to one minute or longer, especially during network incidents and outages.
+The endpoint takes a list of customer IDs and returns a map of responses.
@@ -3043,30 +3149,8 @@ profiles can take closer to one minute or longer, especially during network inci
-
```typescript
-await client.customers.search({
- limit: BigInt("2"),
- query: {
- filter: {
- creationSource: {
- values: ["THIRD_PARTY"],
- rule: "INCLUDE",
- },
- createdAt: {
- startAt: "2018-01-01T00:00:00-00:00",
- endAt: "2018-02-01T00:00:00-00:00",
- },
- emailAddress: {
- fuzzy: "example.com",
- },
- groupIds: {
- all: ["545AXB44B4XXWMVQ4W8SBT3HHF"],
- },
- },
- sort: {
- field: "CREATED_AT",
- order: "ASC",
- },
- },
+await client.customers.bulkDeleteCustomers({
+ customerIds: ["8DDA5NZVBZFGAX0V3HPF81HHE0", "N18CPRVXR5214XPBBA6BZQWF3C", "2GYD7WNXF7BJZW1PMGNXZ3Y8M8"],
});
```
@@ -3083,7 +3167,7 @@ await client.customers.search({
-
-**request:** `Square.SearchCustomersRequest`
+**request:** `Square.BulkDeleteCustomersRequest`
@@ -3102,7 +3186,7 @@ await client.customers.search({
-client.customers.get({ ...params }) -> Square.GetCustomerResponse
+client.customers.bulkRetrieveCustomers({ ...params }) -> Square.BulkRetrieveCustomersResponse
-
@@ -3114,7 +3198,9 @@ await client.customers.search({
-
-Returns details for a single customer.
+Retrieves multiple customer profiles.
+
+This endpoint takes a list of customer IDs and returns a map of responses.
@@ -3130,8 +3216,8 @@ Returns details for a single customer.
-
```typescript
-await client.customers.get({
- customerId: "customer_id",
+await client.customers.bulkRetrieveCustomers({
+ customerIds: ["8DDA5NZVBZFGAX0V3HPF81HHE0", "N18CPRVXR5214XPBBA6BZQWF3C", "2GYD7WNXF7BJZW1PMGNXZ3Y8M8"],
});
```
@@ -3148,7 +3234,7 @@ await client.customers.get({
-
-**request:** `Square.GetCustomersRequest`
+**request:** `Square.BulkRetrieveCustomersRequest`
@@ -3167,7 +3253,7 @@ await client.customers.get({
-client.customers.update({ ...params }) -> Square.UpdateCustomerResponse
+client.customers.bulkUpdateCustomers({ ...params }) -> Square.BulkUpdateCustomersResponse
-
@@ -3179,10 +3265,9 @@ await client.customers.get({
-
-Updates a customer profile. This endpoint supports sparse updates, so only new or changed fields are required in the request.
-To add or update a field, specify the new value. To remove a field, specify `null`.
+Updates multiple customer profiles.
-To update a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
+This endpoint takes a map of individual update requests and returns a map of responses.
@@ -3198,11 +3283,19 @@ To update a customer profile that was created by merging existing profiles, you
-
```typescript
-await client.customers.update({
- customerId: "customer_id",
- emailAddress: "New.Amelia.Earhart@example.com",
- note: "updated customer note",
- version: BigInt("2"),
+await client.customers.bulkUpdateCustomers({
+ customers: {
+ "8DDA5NZVBZFGAX0V3HPF81HHE0": {
+ emailAddress: "New.Amelia.Earhart@example.com",
+ note: "updated customer note",
+ version: BigInt("2"),
+ },
+ N18CPRVXR5214XPBBA6BZQWF3C: {
+ givenName: "Marie",
+ familyName: "Curie",
+ version: BigInt("0"),
+ },
+ },
});
```
@@ -3219,7 +3312,7 @@ await client.customers.update({
-
-**request:** `Square.UpdateCustomerRequest`
+**request:** `Square.BulkUpdateCustomersRequest`
@@ -3238,7 +3331,7 @@ await client.customers.update({
-client.customers.delete({ ...params }) -> Square.DeleteCustomerResponse
+client.customers.search({ ...params }) -> core.Page
-
@@ -3250,9 +3343,15 @@ await client.customers.update({
-
-Deletes a customer profile from a business.
+Searches the customer profiles associated with a Square account using one or more supported query filters.
-To delete a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
+Calling `SearchCustomers` without any explicit query filter returns all
+customer profiles ordered alphabetically based on `given_name` and
+`family_name`.
+
+Under normal operating conditions, newly created or updated customer profiles become available
+for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated
+profiles can take closer to one minute or longer, especially during network incidents and outages.
@@ -3268,9 +3367,64 @@ To delete a customer profile that was created by merging existing profiles, you
-
```typescript
-await client.customers.delete({
- customerId: "customer_id",
+const response = await client.customers.search({
+ limit: BigInt("2"),
+ query: {
+ filter: {
+ creationSource: {
+ values: ["THIRD_PARTY"],
+ rule: "INCLUDE",
+ },
+ createdAt: {
+ startAt: "2018-01-01T00:00:00-00:00",
+ endAt: "2018-02-01T00:00:00-00:00",
+ },
+ emailAddress: {
+ fuzzy: "example.com",
+ },
+ groupIds: {
+ all: ["545AXB44B4XXWMVQ4W8SBT3HHF"],
+ },
+ },
+ sort: {
+ field: "CREATED_AT",
+ order: "ASC",
+ },
+ },
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.customers.search({
+ limit: BigInt("2"),
+ query: {
+ filter: {
+ creationSource: {
+ values: ["THIRD_PARTY"],
+ rule: "INCLUDE",
+ },
+ createdAt: {
+ startAt: "2018-01-01T00:00:00-00:00",
+ endAt: "2018-02-01T00:00:00-00:00",
+ },
+ emailAddress: {
+ fuzzy: "example.com",
+ },
+ groupIds: {
+ all: ["545AXB44B4XXWMVQ4W8SBT3HHF"],
+ },
+ },
+ sort: {
+ field: "CREATED_AT",
+ order: "ASC",
+ },
+ },
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -3286,7 +3440,7 @@ await client.customers.delete({
-
-**request:** `Square.DeleteCustomersRequest`
+**request:** `Square.SearchCustomersRequest`
@@ -3305,9 +3459,7 @@ await client.customers.delete({
-## Devices
-
-client.devices.list({ ...params }) -> core.Page
+client.customers.get({ ...params }) -> Square.GetCustomerResponse
-
@@ -3319,8 +3471,7 @@ await client.customers.delete({
-
-List devices associated with the merchant. Currently, only Terminal API
-devices are supported.
+Returns details for a single customer.
@@ -3336,16 +3487,9 @@ devices are supported.
-
```typescript
-const response = await client.devices.list();
-for await (const item of response) {
- console.log(item);
-}
-
-// Or you can manually iterate page-by-page
-let page = await client.devices.list();
-while (page.hasNextPage()) {
- page = page.getNextPage();
-}
+await client.customers.get({
+ customerId: "customer_id",
+});
```
@@ -3361,7 +3505,7 @@ while (page.hasNextPage()) {
-
-**request:** `Square.ListDevicesRequest`
+**request:** `Square.GetCustomersRequest`
@@ -3369,7 +3513,7 @@ while (page.hasNextPage()) {
-
-**requestOptions:** `Devices.RequestOptions`
+**requestOptions:** `Customers.RequestOptions`
@@ -3380,7 +3524,7 @@ while (page.hasNextPage()) {
-client.devices.get({ ...params }) -> Square.GetDeviceResponse
+client.customers.update({ ...params }) -> Square.UpdateCustomerResponse
-
@@ -3392,7 +3536,10 @@ while (page.hasNextPage()) {
-
-Retrieves Device with the associated `device_id`.
+Updates a customer profile. This endpoint supports sparse updates, so only new or changed fields are required in the request.
+To add or update a field, specify the new value. To remove a field, specify `null`.
+
+To update a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
@@ -3408,8 +3555,11 @@ Retrieves Device with the associated `device_id`.
-
```typescript
-await client.devices.get({
- deviceId: "device_id",
+await client.customers.update({
+ customerId: "customer_id",
+ emailAddress: "New.Amelia.Earhart@example.com",
+ note: "updated customer note",
+ version: BigInt("2"),
});
```
@@ -3426,7 +3576,7 @@ await client.devices.get({
-
-**request:** `Square.GetDevicesRequest`
+**request:** `Square.UpdateCustomerRequest`
@@ -3434,7 +3584,7 @@ await client.devices.get({
-
-**requestOptions:** `Devices.RequestOptions`
+**requestOptions:** `Customers.RequestOptions`
@@ -3445,9 +3595,7 @@ await client.devices.get({
-## Disputes
-
-client.disputes.list({ ...params }) -> core.Page
+client.customers.delete({ ...params }) -> Square.DeleteCustomerResponse
-
@@ -3459,7 +3607,9 @@ await client.devices.get({
-
-Returns a list of disputes associated with a particular account.
+Deletes a customer profile from a business.
+
+To delete a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
@@ -3475,16 +3625,242 @@ Returns a list of disputes associated with a particular account.
-
```typescript
-const response = await client.disputes.list();
-for await (const item of response) {
- console.log(item);
-}
-
-// Or you can manually iterate page-by-page
-let page = await client.disputes.list();
-while (page.hasNextPage()) {
- page = page.getNextPage();
-}
+await client.customers.delete({
+ customerId: "customer_id",
+ version: BigInt("1000000"),
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.DeleteCustomersRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Customers.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+## Devices
+
+client.devices.list({ ...params }) -> core.Page
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+List devices associated with the merchant. Currently, only Terminal API
+devices are supported.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+const response = await client.devices.list({
+ cursor: "cursor",
+ sortOrder: "DESC",
+ limit: 1,
+ locationId: "location_id",
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.devices.list({
+ cursor: "cursor",
+ sortOrder: "DESC",
+ limit: 1,
+ locationId: "location_id",
+});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.ListDevicesRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Devices.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.devices.get({ ...params }) -> Square.GetDeviceResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieves Device with the associated `device_id`.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.devices.get({
+ deviceId: "device_id",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.GetDevicesRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Devices.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+## Disputes
+
+client.disputes.list({ ...params }) -> core.Page
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns a list of disputes associated with a particular account.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+const response = await client.disputes.list({
+ cursor: "cursor",
+ states: "INQUIRY_EVIDENCE_REQUIRED",
+ locationId: "location_id",
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.disputes.list({
+ cursor: "cursor",
+ states: "INQUIRY_EVIDENCE_REQUIRED",
+ locationId: "location_id",
+});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -3886,13 +4262,23 @@ await client.disputes.submitEvidence({
-
```typescript
-const response = await client.employees.list();
+const response = await client.employees.list({
+ locationId: "location_id",
+ status: "ACTIVE",
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.employees.list();
+let page = await client.employees.list({
+ locationId: "location_id",
+ status: "ACTIVE",
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -4198,7 +4584,9 @@ Lists all event types that you can subscribe to as webhooks or query using the E
-
```typescript
-await client.events.listEventTypes();
+await client.events.listEventTypes({
+ apiVersion: "api_version",
+});
```
@@ -4264,13 +4652,25 @@ a subset of the gift cards. Results are sorted by `created_at` in ascending orde
-
```typescript
-const response = await client.giftCards.list();
+const response = await client.giftCards.list({
+ type: "type",
+ state: "state",
+ limit: 1,
+ cursor: "cursor",
+ customerId: "customer_id",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.giftCards.list();
+let page = await client.giftCards.list({
+ type: "type",
+ state: "state",
+ limit: 1,
+ cursor: "cursor",
+ customerId: "customer_id",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -4923,7 +5323,7 @@ await client.inventory.deprecatedBatchChange({
-client.inventory.deprecatedBatchGetChanges({ ...params }) -> Square.BatchGetInventoryChangesResponse
+client.inventory.deprecatedBatchGetChanges({ ...params }) -> core.Page
-
@@ -4952,7 +5352,20 @@ is updated to conform to the standard convention.
-
```typescript
-await client.inventory.deprecatedBatchGetChanges({
+const response = await client.inventory.deprecatedBatchGetChanges({
+ catalogObjectIds: ["W62UWFY35CWMYGVWK6TWJDNI"],
+ locationIds: ["C6W5YS5QM06F5"],
+ types: ["PHYSICAL_COUNT"],
+ states: ["IN_STOCK"],
+ updatedAfter: "2016-11-01T00:00:00.000Z",
+ updatedBefore: "2016-12-01T00:00:00.000Z",
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.inventory.deprecatedBatchGetChanges({
catalogObjectIds: ["W62UWFY35CWMYGVWK6TWJDNI"],
locationIds: ["C6W5YS5QM06F5"],
types: ["PHYSICAL_COUNT"],
@@ -4960,6 +5373,9 @@ await client.inventory.deprecatedBatchGetChanges({
updatedAfter: "2016-11-01T00:00:00.000Z",
updatedBefore: "2016-12-01T00:00:00.000Z",
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -4994,7 +5410,7 @@ await client.inventory.deprecatedBatchGetChanges({
-client.inventory.deprecatedBatchGetCounts({ ...params }) -> Square.BatchGetInventoryCountsResponse
+client.inventory.deprecatedBatchGetCounts({ ...params }) -> core.Page
-
@@ -5023,17 +5439,30 @@ is updated to conform to the standard convention.
-
```typescript
-await client.inventory.deprecatedBatchGetCounts({
+const response = await client.inventory.deprecatedBatchGetCounts({
catalogObjectIds: ["W62UWFY35CWMYGVWK6TWJDNI"],
locationIds: ["59TNP9SA8VGDA"],
updatedAfter: "2016-11-16T00:00:00.000Z",
});
-```
+for await (const item of response) {
+ console.log(item);
+}
-
-
-
-
+// Or you can manually iterate page-by-page
+let page = await client.inventory.deprecatedBatchGetCounts({
+ catalogObjectIds: ["W62UWFY35CWMYGVWK6TWJDNI"],
+ locationIds: ["59TNP9SA8VGDA"],
+ updatedAfter: "2016-11-16T00:00:00.000Z",
+});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
+```
+
+
+
+
+
#### ⚙️ Parameters
@@ -5560,6 +5989,8 @@ For more sophisticated queries, use a batch endpoint.
```typescript
const response = await client.inventory.get({
catalogObjectId: "catalog_object_id",
+ locationIds: "location_ids",
+ cursor: "cursor",
});
for await (const item of response) {
console.log(item);
@@ -5568,6 +5999,8 @@ for await (const item of response) {
// 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();
@@ -5648,6 +6081,8 @@ sophisticated queries, use a batch endpoint.
```typescript
const response = await client.inventory.changes({
catalogObjectId: "catalog_object_id",
+ locationIds: "location_ids",
+ cursor: "cursor",
});
for await (const item of response) {
console.log(item);
@@ -5656,6 +6091,8 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.inventory.changes({
catalogObjectId: "catalog_object_id",
+ locationIds: "location_ids",
+ cursor: "cursor",
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -5728,6 +6165,8 @@ use in a subsequent request to retrieve the next set of invoices.
```typescript
const response = await client.invoices.list({
locationId: "location_id",
+ cursor: "cursor",
+ limit: 1,
});
for await (const item of response) {
console.log(item);
@@ -5736,6 +6175,8 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.invoices.list({
locationId: "location_id",
+ cursor: "cursor",
+ limit: 1,
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -5890,7 +6331,7 @@ await client.invoices.create({
-client.invoices.search({ ...params }) -> Square.SearchInvoicesResponse
+client.invoices.search({ ...params }) -> core.Page
-
@@ -5924,7 +6365,25 @@ that you use in a subsequent request to retrieve the next set of invoices.
-
```typescript
-await client.invoices.search({
+const response = await client.invoices.search({
+ query: {
+ filter: {
+ locationIds: ["ES0RJRZYEC39A"],
+ customerIds: ["JDKYHBWT1D4F8MFH63DBMEN8Y4"],
+ },
+ sort: {
+ field: "INVOICE_SORT_DATE",
+ order: "DESC",
+ },
+ },
+ limit: 100,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.invoices.search({
query: {
filter: {
locationIds: ["ES0RJRZYEC39A"],
@@ -5937,6 +6396,9 @@ await client.invoices.search({
},
limit: 100,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -6146,6 +6608,7 @@ invoice (you cannot delete a published invoice, including one that is scheduled
```typescript
await client.invoices.delete({
invoiceId: "invoice_id",
+ version: 1,
});
```
@@ -7807,7 +8270,7 @@ await client.locations.checkouts({
## Loyalty
-client.loyalty.searchEvents({ ...params }) -> Square.SearchLoyaltyEventsResponse
+client.loyalty.searchEvents({ ...params }) -> core.Page
-
@@ -7842,7 +8305,22 @@ Search results are sorted by `created_at` in descending order.
-
```typescript
-await client.loyalty.searchEvents({
+const response = await client.loyalty.searchEvents({
+ query: {
+ filter: {
+ orderFilter: {
+ orderId: "PyATxhYLfsMqpVkcKJITPydgEYfZY",
+ },
+ },
+ },
+ limit: 30,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.loyalty.searchEvents({
query: {
filter: {
orderFilter: {
@@ -7852,6 +8330,9 @@ await client.loyalty.searchEvents({
},
limit: 30,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -7925,13 +8406,17 @@ endpoint to retrieve the merchant information.
-
```typescript
-const response = await client.merchants.list();
+const response = await client.merchants.list({
+ cursor: 1,
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.merchants.list();
+let page = await client.merchants.list({
+ cursor: 1,
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -8646,7 +9131,7 @@ await client.orders.clone({
-client.orders.search({ ...params }) -> Square.SearchOrdersResponse
+client.orders.search({ ...params }) -> core.Page
-
@@ -8690,7 +9175,34 @@ not the time it was subsequently transmitted to Square.
-
```typescript
-await client.orders.search({
+const response = await client.orders.search({
+ locationIds: ["057P5VYJ4A5X1", "18YC4JDH91E1H"],
+ query: {
+ filter: {
+ stateFilter: {
+ states: ["COMPLETED"],
+ },
+ dateTimeFilter: {
+ closedAt: {
+ startAt: "2018-03-03T20:00:00+00:00",
+ endAt: "2019-03-04T21:54:45+00:00",
+ },
+ },
+ },
+ sort: {
+ sortField: "CLOSED_AT",
+ sortOrder: "DESC",
+ },
+ },
+ limit: 3,
+ returnEntries: true,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.orders.search({
locationIds: ["057P5VYJ4A5X1", "18YC4JDH91E1H"],
query: {
filter: {
@@ -8712,6 +9224,9 @@ await client.orders.search({
limit: 3,
returnEntries: true,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -9021,13 +9536,45 @@ The maximum results per page is 100.
-
```typescript
-const response = await client.payments.list();
+const response = await client.payments.list({
+ beginTime: "begin_time",
+ endTime: "end_time",
+ sortOrder: "sort_order",
+ cursor: "cursor",
+ locationId: "location_id",
+ total: BigInt("1000000"),
+ last4: "last_4",
+ cardBrand: "card_brand",
+ limit: 1,
+ isOfflinePayment: true,
+ offlineBeginTime: "offline_begin_time",
+ offlineEndTime: "offline_end_time",
+ updatedAtBeginTime: "updated_at_begin_time",
+ updatedAtEndTime: "updated_at_end_time",
+ sortField: "CREATED_AT",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.payments.list();
+let page = await client.payments.list({
+ beginTime: "begin_time",
+ endTime: "end_time",
+ sortOrder: "sort_order",
+ cursor: "cursor",
+ locationId: "location_id",
+ total: BigInt("1000000"),
+ last4: "last_4",
+ cardBrand: "card_brand",
+ limit: 1,
+ isOfflinePayment: true,
+ offlineBeginTime: "offline_begin_time",
+ offlineEndTime: "offline_end_time",
+ updatedAtBeginTime: "updated_at_begin_time",
+ updatedAtEndTime: "updated_at_end_time",
+ sortField: "CREATED_AT",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -9535,13 +10082,29 @@ To call this endpoint, set `PAYOUTS_READ` for the OAuth scope.
-
```typescript
-const response = await client.payouts.list();
+const response = await client.payouts.list({
+ locationId: "location_id",
+ status: "SENT",
+ beginTime: "begin_time",
+ endTime: "end_time",
+ sortOrder: "DESC",
+ cursor: "cursor",
+ limit: 1,
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.payouts.list();
+let page = await client.payouts.list({
+ locationId: "location_id",
+ status: "SENT",
+ beginTime: "begin_time",
+ endTime: "end_time",
+ sortOrder: "DESC",
+ cursor: "cursor",
+ limit: 1,
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -9676,6 +10239,9 @@ To call this endpoint, set `PAYOUTS_READ` for the OAuth scope.
```typescript
const response = await client.payouts.listEntries({
payoutId: "payout_id",
+ sortOrder: "DESC",
+ cursor: "cursor",
+ limit: 1,
});
for await (const item of response) {
console.log(item);
@@ -9684,6 +10250,9 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.payouts.listEntries({
payoutId: "payout_id",
+ sortOrder: "DESC",
+ cursor: "cursor",
+ limit: 1,
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -9757,13 +10326,37 @@ The maximum results per page is 100.
-
```typescript
-const response = await client.refunds.list();
+const response = await client.refunds.list({
+ beginTime: "begin_time",
+ endTime: "end_time",
+ sortOrder: "sort_order",
+ cursor: "cursor",
+ locationId: "location_id",
+ status: "status",
+ sourceType: "source_type",
+ limit: 1,
+ updatedAtBeginTime: "updated_at_begin_time",
+ updatedAtEndTime: "updated_at_end_time",
+ sortField: "CREATED_AT",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.refunds.list();
+let page = await client.refunds.list({
+ beginTime: "begin_time",
+ endTime: "end_time",
+ sortOrder: "sort_order",
+ cursor: "cursor",
+ locationId: "location_id",
+ status: "status",
+ sourceType: "source_type",
+ limit: 1,
+ updatedAtBeginTime: "updated_at_begin_time",
+ updatedAtEndTime: "updated_at_end_time",
+ sortField: "CREATED_AT",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -10373,7 +10966,7 @@ await client.subscriptions.bulkSwapPlan({
-client.subscriptions.search({ ...params }) -> Square.SearchSubscriptionsResponse
+client.subscriptions.search({ ...params }) -> core.Page
-
@@ -10414,7 +11007,21 @@ customer by subscription creation date.
-
```typescript
-await client.subscriptions.search({
+const response = await client.subscriptions.search({
+ query: {
+ filter: {
+ customerIds: ["CHFGVKYY8RSV93M5KCYTG4PN0G"],
+ locationIds: ["S8GWD5R9QB376"],
+ sourceNames: ["My App"],
+ },
+ },
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.subscriptions.search({
query: {
filter: {
customerIds: ["CHFGVKYY8RSV93M5KCYTG4PN0G"],
@@ -10423,6 +11030,9 @@ await client.subscriptions.search({
},
},
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -10487,6 +11097,7 @@ Retrieves a specific subscription.
```typescript
await client.subscriptions.get({
subscriptionId: "subscription_id",
+ include: "include",
});
```
@@ -10821,6 +11432,8 @@ Lists all [events](https://developer.squareup.com/docs/subscriptions-api/actions
```typescript
const response = await client.subscriptions.listEvents({
subscriptionId: "subscription_id",
+ cursor: "cursor",
+ limit: 1,
});
for await (const item of response) {
console.log(item);
@@ -10829,6 +11442,8 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.subscriptions.listEvents({
subscriptionId: "subscription_id",
+ cursor: "cursor",
+ limit: 1,
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -11254,7 +11869,637 @@ await client.teamMembers.batchCreate({
-
-**request:** `Square.BatchCreateTeamMembersRequest`
+**request:** `Square.BatchCreateTeamMembersRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `TeamMembers.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.teamMembers.batchUpdate({ ...params }) -> Square.BatchUpdateTeamMembersResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Updates multiple `TeamMember` objects. The updated `TeamMember` objects are returned on successful updates.
+This process is non-transactional and processes as much of the request as possible. If one of the updates in
+the request cannot be successfully processed, the request is not marked as failed, but the body of the response
+contains explicit error information for the failed update.
+Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#bulk-update-team-members).
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.teamMembers.batchUpdate({
+ teamMembers: {
+ "AFMwA08kR-MIF-3Vs0OE": {
+ teamMember: {
+ referenceId: "reference_id_2",
+ isOwner: false,
+ status: "ACTIVE",
+ givenName: "Jane",
+ familyName: "Smith",
+ emailAddress: "jane_smith@gmail.com",
+ phoneNumber: "+14159223334",
+ assignedLocations: {
+ assignmentType: "ALL_CURRENT_AND_FUTURE_LOCATIONS",
+ },
+ },
+ },
+ "fpgteZNMaf0qOK-a4t6P": {
+ teamMember: {
+ referenceId: "reference_id_1",
+ isOwner: false,
+ status: "ACTIVE",
+ givenName: "Joe",
+ familyName: "Doe",
+ emailAddress: "joe_doe@gmail.com",
+ phoneNumber: "+14159283333",
+ assignedLocations: {
+ assignmentType: "EXPLICIT_LOCATIONS",
+ locationIds: ["YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT"],
+ },
+ },
+ },
+ },
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.BatchUpdateTeamMembersRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `TeamMembers.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.teamMembers.search({ ...params }) -> core.Page
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns a paginated list of `TeamMember` objects for a business.
+The list can be filtered by location IDs, `ACTIVE` or `INACTIVE` status, or whether
+the team member is the Square account owner.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+const response = await client.teamMembers.search({
+ query: {
+ filter: {
+ locationIds: ["0G5P3VGACMMQZ"],
+ status: "ACTIVE",
+ },
+ },
+ limit: 10,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.teamMembers.search({
+ query: {
+ filter: {
+ locationIds: ["0G5P3VGACMMQZ"],
+ status: "ACTIVE",
+ },
+ },
+ limit: 10,
+});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.SearchTeamMembersRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `TeamMembers.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.teamMembers.get({ ...params }) -> Square.GetTeamMemberResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieves a `TeamMember` object for the given `TeamMember.id`.
+Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrieve-a-team-member).
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.teamMembers.get({
+ teamMemberId: "team_member_id",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.GetTeamMembersRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `TeamMembers.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.teamMembers.update({ ...params }) -> Square.UpdateTeamMemberResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Updates a single `TeamMember` object. The `TeamMember` object is returned on successful updates.
+Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#update-a-team-member).
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.teamMembers.update({
+ teamMemberId: "team_member_id",
+ body: {
+ teamMember: {
+ referenceId: "reference_id_1",
+ status: "ACTIVE",
+ givenName: "Joe",
+ familyName: "Doe",
+ emailAddress: "joe_doe@gmail.com",
+ phoneNumber: "+14159283333",
+ assignedLocations: {
+ assignmentType: "EXPLICIT_LOCATIONS",
+ locationIds: ["YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT"],
+ },
+ wageSetting: {
+ jobAssignments: [
+ {
+ payType: "SALARY",
+ annualRate: {
+ amount: BigInt("3000000"),
+ currency: "USD",
+ },
+ weeklyHours: 40,
+ jobId: "FjS8x95cqHiMenw4f1NAUH4P",
+ },
+ {
+ payType: "HOURLY",
+ hourlyRate: {
+ amount: BigInt("1200"),
+ currency: "USD",
+ },
+ jobId: "VDNpRv8da51NU8qZFC5zDWpF",
+ },
+ ],
+ isOvertimeExempt: true,
+ },
+ },
+ },
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.UpdateTeamMembersRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `TeamMembers.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+## Team
+
+client.team.listJobs({ ...params }) -> Square.ListJobsResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Lists jobs in a seller account. Results are sorted by title in ascending order.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.team.listJobs({
+ cursor: "cursor",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.ListJobsRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Team.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.team.createJob({ ...params }) -> Square.CreateJobResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Creates a job in a seller account. A job defines a title and tip eligibility. Note that
+compensation is defined in a [job assignment](entity:JobAssignment) in a team member's wage setting.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.team.createJob({
+ job: {
+ title: "Cashier",
+ isTipEligible: true,
+ },
+ idempotencyKey: "idempotency-key-0",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.CreateJobRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Team.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.team.retrieveJob({ ...params }) -> Square.RetrieveJobResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Retrieves a specified job.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.team.retrieveJob({
+ jobId: "job_id",
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.RetrieveJobRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `Team.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+client.team.updateJob({ ...params }) -> Square.UpdateJobResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Updates the title or tip eligibility of a job. Changes to the title propagate to all
+`JobAssignment`, `Shift`, and `TeamMemberWage` objects that reference the job ID. Changes to
+tip eligibility propagate to all `TeamMemberWage` objects that reference the job ID.
+
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.team.updateJob({
+ jobId: "job_id",
+ job: {
+ title: "Cashier 1",
+ isTipEligible: true,
+ },
+});
+```
+
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `Square.UpdateJobRequest`
@@ -11262,7 +12507,7 @@ await client.teamMembers.batchCreate({
-
-**requestOptions:** `TeamMembers.RequestOptions`
+**requestOptions:** `Team.RequestOptions`
@@ -11273,7 +12518,9 @@ await client.teamMembers.batchCreate({
-client.teamMembers.batchUpdate({ ...params }) -> Square.BatchUpdateTeamMembersResponse
+## Terminal
+
+client.terminal.dismissTerminalAction({ ...params }) -> Square.DismissTerminalActionResponse
-
@@ -11285,11 +12532,9 @@ await client.teamMembers.batchCreate({
-
-Updates multiple `TeamMember` objects. The updated `TeamMember` objects are returned on successful updates.
-This process is non-transactional and processes as much of the request as possible. If one of the updates in
-the request cannot be successfully processed, the request is not marked as failed, but the body of the response
-contains explicit error information for the failed update.
-Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#bulk-update-team-members).
+Dismisses a Terminal action request if the status and type of the request permits it.
+
+See [Link and Dismiss Actions](https://developer.squareup.com/docs/terminal-api/advanced-features/custom-workflows/link-and-dismiss-actions) for more details.
@@ -11305,38 +12550,8 @@ Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/t
-
```typescript
-await client.teamMembers.batchUpdate({
- teamMembers: {
- "AFMwA08kR-MIF-3Vs0OE": {
- teamMember: {
- referenceId: "reference_id_2",
- isOwner: false,
- status: "ACTIVE",
- givenName: "Jane",
- familyName: "Smith",
- emailAddress: "jane_smith@gmail.com",
- phoneNumber: "+14159223334",
- assignedLocations: {
- assignmentType: "ALL_CURRENT_AND_FUTURE_LOCATIONS",
- },
- },
- },
- "fpgteZNMaf0qOK-a4t6P": {
- teamMember: {
- referenceId: "reference_id_1",
- isOwner: false,
- status: "ACTIVE",
- givenName: "Joe",
- familyName: "Doe",
- emailAddress: "joe_doe@gmail.com",
- phoneNumber: "+14159283333",
- assignedLocations: {
- assignmentType: "EXPLICIT_LOCATIONS",
- locationIds: ["YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT"],
- },
- },
- },
- },
+await client.terminal.dismissTerminalAction({
+ actionId: "action_id",
});
```
@@ -11353,7 +12568,7 @@ await client.teamMembers.batchUpdate({
-
-**request:** `Square.BatchUpdateTeamMembersRequest`
+**request:** `Square.DismissTerminalActionRequest`
@@ -11361,7 +12576,7 @@ await client.teamMembers.batchUpdate({
-
-**requestOptions:** `TeamMembers.RequestOptions`
+**requestOptions:** `Terminal.RequestOptions`
@@ -11372,7 +12587,7 @@ await client.teamMembers.batchUpdate({
-client.teamMembers.search({ ...params }) -> Square.SearchTeamMembersResponse
+client.terminal.dismissTerminalCheckout({ ...params }) -> Square.DismissTerminalCheckoutResponse
-
@@ -11384,9 +12599,7 @@ await client.teamMembers.batchUpdate({
-
-Returns a paginated list of `TeamMember` objects for a business.
-The list can be filtered by location IDs, `ACTIVE` or `INACTIVE` status, or whether
-the team member is the Square account owner.
+Dismisses a Terminal checkout request if the status and type of the request permits it.
@@ -11402,14 +12615,8 @@ the team member is the Square account owner.
-
```typescript
-await client.teamMembers.search({
- query: {
- filter: {
- locationIds: ["0G5P3VGACMMQZ"],
- status: "ACTIVE",
- },
- },
- limit: 10,
+await client.terminal.dismissTerminalCheckout({
+ checkoutId: "checkout_id",
});
```
@@ -11426,7 +12633,7 @@ await client.teamMembers.search({
-
-**request:** `Square.SearchTeamMembersRequest`
+**request:** `Square.DismissTerminalCheckoutRequest`
@@ -11434,7 +12641,7 @@ await client.teamMembers.search({
-
-**requestOptions:** `TeamMembers.RequestOptions`
+**requestOptions:** `Terminal.RequestOptions`
@@ -11445,7 +12652,7 @@ await client.teamMembers.search({
-client.teamMembers.get({ ...params }) -> Square.GetTeamMemberResponse
+client.terminal.dismissTerminalRefund({ ...params }) -> Square.DismissTerminalRefundResponse
-
@@ -11457,8 +12664,7 @@ await client.teamMembers.search({
-
-Retrieves a `TeamMember` object for the given `TeamMember.id`.
-Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#retrieve-a-team-member).
+Dismisses a Terminal refund request if the status and type of the request permits it.
@@ -11474,8 +12680,8 @@ Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/t
-
```typescript
-await client.teamMembers.get({
- teamMemberId: "team_member_id",
+await client.terminal.dismissTerminalRefund({
+ terminalRefundId: "terminal_refund_id",
});
```
@@ -11492,7 +12698,7 @@ await client.teamMembers.get({
-
-**request:** `Square.GetTeamMembersRequest`
+**request:** `Square.DismissTerminalRefundRequest`
@@ -11500,7 +12706,7 @@ await client.teamMembers.get({
-
-**requestOptions:** `TeamMembers.RequestOptions`
+**requestOptions:** `Terminal.RequestOptions`
@@ -11511,7 +12717,9 @@ await client.teamMembers.get({
-client.teamMembers.update({ ...params }) -> Square.UpdateTeamMemberResponse
+## TransferOrders
+
+client.transferOrders.create({ ...params }) -> Square.CreateTransferOrderResponse
-
@@ -11523,8 +12731,28 @@ await client.teamMembers.get({
-
-Updates a single `TeamMember` object. The `TeamMember` object is returned on successful updates.
-Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/team/troubleshooting#update-a-team-member).
+Creates a new transfer order in [DRAFT](entity:TransferOrderStatus) status. A transfer order represents the intent
+to move [CatalogItemVariation](entity:CatalogItemVariation)s from one [Location](entity:Location) to another.
+The source and destination locations must be different and must belong to your Square account.
+
+In [DRAFT](entity:TransferOrderStatus) status, you can:
+
+- Add or remove items
+- Modify quantities
+- Update shipping information
+- Delete the entire order via [DeleteTransferOrder](api-endpoint:TransferOrders-DeleteTransferOrder)
+
+The request requires source_location_id and destination_location_id.
+Inventory levels are not affected until the order is started via
+[StartTransferOrder](api-endpoint:TransferOrders-StartTransferOrder).
+
+Common integration points:
+
+- Sync with warehouse management systems
+- Automate regular stock transfers
+- Initialize transfers from inventory optimization systems
+
+Creates a [transfer_order.created](webhook:transfer_order.created) webhook event.
@@ -11540,43 +12768,25 @@ Learn about [Troubleshooting the Team API](https://developer.squareup.com/docs/t
-
```typescript
-await client.teamMembers.update({
- teamMemberId: "team_member_id",
- body: {
- teamMember: {
- referenceId: "reference_id_1",
- status: "ACTIVE",
- givenName: "Joe",
- familyName: "Doe",
- emailAddress: "joe_doe@gmail.com",
- phoneNumber: "+14159283333",
- assignedLocations: {
- assignmentType: "EXPLICIT_LOCATIONS",
- locationIds: ["YSGH2WBKG94QZ", "GA2Y9HSJ8KRYT"],
+await client.transferOrders.create({
+ idempotencyKey: "65cc0586-3e82-384s-b524-3885cffd52",
+ transferOrder: {
+ sourceLocationId: "EXAMPLE_SOURCE_LOCATION_ID_123",
+ destinationLocationId: "EXAMPLE_DEST_LOCATION_ID_456",
+ expectedAt: "2025-11-09T05:00:00Z",
+ notes: "Example transfer order for inventory redistribution between locations",
+ trackingNumber: "TRACK123456789",
+ createdByTeamMemberId: "EXAMPLE_TEAM_MEMBER_ID_789",
+ lineItems: [
+ {
+ itemVariationId: "EXAMPLE_ITEM_VARIATION_ID_001",
+ quantityOrdered: "5",
},
- wageSetting: {
- jobAssignments: [
- {
- payType: "SALARY",
- annualRate: {
- amount: BigInt("3000000"),
- currency: "USD",
- },
- weeklyHours: 40,
- jobId: "FjS8x95cqHiMenw4f1NAUH4P",
- },
- {
- payType: "HOURLY",
- hourlyRate: {
- amount: BigInt("1200"),
- currency: "USD",
- },
- jobId: "VDNpRv8da51NU8qZFC5zDWpF",
- },
- ],
- isOvertimeExempt: true,
+ {
+ itemVariationId: "EXAMPLE_ITEM_VARIATION_ID_002",
+ quantityOrdered: "3",
},
- },
+ ],
},
});
```
@@ -11594,7 +12804,7 @@ await client.teamMembers.update({
-
-**request:** `Square.UpdateTeamMembersRequest`
+**request:** `Square.CreateTransferOrderRequest`
@@ -11602,7 +12812,7 @@ await client.teamMembers.update({
-
-**requestOptions:** `TeamMembers.RequestOptions`
+**requestOptions:** `TransferOrders.RequestOptions`
@@ -11613,9 +12823,7 @@ await client.teamMembers.update({
-## Team
-
-client.team.listJobs({ ...params }) -> Square.ListJobsResponse
+client.transferOrders.search({ ...params }) -> core.Page
-
@@ -11627,12 +12835,18 @@ await client.teamMembers.update({
-
-Lists jobs in a seller account. Results are sorted by title in ascending order.
+Searches for transfer orders using filters. Returns a paginated list of matching
+[TransferOrder](entity:TransferOrder)s sorted by creation date.
-
-
-
-
+Common search scenarios:
+
+- Find orders for a source [Location](entity:Location)
+- Find orders for a destination [Location](entity:Location)
+- Find orders in a particular [TransferOrderStatus](entity:TransferOrderStatus)
+
+
+
+
#### 🔌 Usage
@@ -11643,7 +12857,44 @@ Lists jobs in a seller account. Results are sorted by title in ascending order.
```typescript
-await client.team.listJobs();
+const response = await client.transferOrders.search({
+ query: {
+ filter: {
+ sourceLocationIds: ["EXAMPLE_SOURCE_LOCATION_ID_123"],
+ destinationLocationIds: ["EXAMPLE_DEST_LOCATION_ID_456"],
+ statuses: ["STARTED", "PARTIALLY_RECEIVED"],
+ },
+ sort: {
+ field: "UPDATED_AT",
+ order: "DESC",
+ },
+ },
+ cursor: "eyJsYXN0X3VwZGF0ZWRfYXQiOjE3NTMxMTg2NjQ4NzN9",
+ limit: 10,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.transferOrders.search({
+ query: {
+ filter: {
+ sourceLocationIds: ["EXAMPLE_SOURCE_LOCATION_ID_123"],
+ destinationLocationIds: ["EXAMPLE_DEST_LOCATION_ID_456"],
+ statuses: ["STARTED", "PARTIALLY_RECEIVED"],
+ },
+ sort: {
+ field: "UPDATED_AT",
+ order: "DESC",
+ },
+ },
+ cursor: "eyJsYXN0X3VwZGF0ZWRfYXQiOjE3NTMxMTg2NjQ4NzN9",
+ limit: 10,
+});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -11659,7 +12910,7 @@ await client.team.listJobs();
-
-**request:** `Square.ListJobsRequest`
+**request:** `Square.SearchTransferOrdersRequest`
@@ -11667,7 +12918,7 @@ await client.team.listJobs();
-
-**requestOptions:** `Team.RequestOptions`
+**requestOptions:** `TransferOrders.RequestOptions`
@@ -11678,7 +12929,7 @@ await client.team.listJobs();
-client.team.createJob({ ...params }) -> Square.CreateJobResponse
+client.transferOrders.get({ ...params }) -> Square.RetrieveTransferOrderResponse
-
@@ -11690,13 +12941,17 @@ await client.team.listJobs();
-
-Creates a job in a seller account. A job defines a title and tip eligibility. Note that
-compensation is defined in a [job assignment](entity:JobAssignment) in a team member's wage setting.
+Retrieves a specific [TransferOrder](entity:TransferOrder) by ID. Returns the complete
+order details including:
-
-
-
-
+- Basic information (status, dates, notes)
+- Line items with ordered and received quantities
+- Source and destination [Location](entity:Location)s
+- Tracking information (if available)
+
+
+
+
#### 🔌 Usage
@@ -11707,12 +12962,8 @@ compensation is defined in a [job assignment](entity:JobAssignment) in a team me
```typescript
-await client.team.createJob({
- job: {
- title: "Cashier",
- isTipEligible: true,
- },
- idempotencyKey: "idempotency-key-0",
+await client.transferOrders.get({
+ transferOrderId: "transfer_order_id",
});
```
@@ -11729,7 +12980,7 @@ await client.team.createJob({
-
-**request:** `Square.CreateJobRequest`
+**request:** `Square.GetTransferOrdersRequest`
@@ -11737,7 +12988,7 @@ await client.team.createJob({
-
-**requestOptions:** `Team.RequestOptions`
+**requestOptions:** `TransferOrders.RequestOptions`
@@ -11748,7 +12999,7 @@ await client.team.createJob({
-client.team.retrieveJob({ ...params }) -> Square.RetrieveJobResponse
+client.transferOrders.update({ ...params }) -> Square.UpdateTransferOrderResponse
-
@@ -11760,7 +13011,10 @@ await client.team.createJob({
-
-Retrieves a specified job.
+Updates an existing transfer order. This endpoint supports sparse updates,
+allowing you to modify specific fields without affecting others.
+
+Creates a [transfer_order.updated](webhook:transfer_order.updated) webhook event.
@@ -11776,8 +13030,31 @@ Retrieves a specified job.
-
```typescript
-await client.team.retrieveJob({
- jobId: "job_id",
+await client.transferOrders.update({
+ transferOrderId: "transfer_order_id",
+ idempotencyKey: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
+ transferOrder: {
+ sourceLocationId: "EXAMPLE_SOURCE_LOCATION_ID_789",
+ destinationLocationId: "EXAMPLE_DEST_LOCATION_ID_101",
+ expectedAt: "2025-11-10T08:00:00Z",
+ notes: "Updated: Priority transfer due to low stock at destination",
+ trackingNumber: "TRACK987654321",
+ lineItems: [
+ {
+ uid: "1",
+ quantityOrdered: "7",
+ },
+ {
+ itemVariationId: "EXAMPLE_NEW_ITEM_VARIATION_ID_003",
+ quantityOrdered: "2",
+ },
+ {
+ uid: "2",
+ remove: true,
+ },
+ ],
+ },
+ version: BigInt("1753109537351"),
});
```
@@ -11794,7 +13071,7 @@ await client.team.retrieveJob({
-
-**request:** `Square.RetrieveJobRequest`
+**request:** `Square.UpdateTransferOrderRequest`
@@ -11802,7 +13079,7 @@ await client.team.retrieveJob({
-
-**requestOptions:** `Team.RequestOptions`
+**requestOptions:** `TransferOrders.RequestOptions`
@@ -11813,7 +13090,7 @@ await client.team.retrieveJob({
-client.team.updateJob({ ...params }) -> Square.UpdateJobResponse
+client.transferOrders.delete({ ...params }) -> Square.DeleteTransferOrderResponse
-
@@ -11825,9 +13102,11 @@ await client.team.retrieveJob({
-
-Updates the title or tip eligibility of a job. Changes to the title propagate to all
-`JobAssignment`, `Shift`, and `TeamMemberWage` objects that reference the job ID. Changes to
-tip eligibility propagate to all `TeamMemberWage` objects that reference the job ID.
+Deletes a transfer order in [DRAFT](entity:TransferOrderStatus) status.
+Only draft orders can be deleted. Once an order is started via
+[StartTransferOrder](api-endpoint:TransferOrders-StartTransferOrder), it can no longer be deleted.
+
+Creates a [transfer_order.deleted](webhook:transfer_order.deleted) webhook event.
@@ -11843,12 +13122,9 @@ tip eligibility propagate to all `TeamMemberWage` objects that reference the job
-
```typescript
-await client.team.updateJob({
- jobId: "job_id",
- job: {
- title: "Cashier 1",
- isTipEligible: true,
- },
+await client.transferOrders.delete({
+ transferOrderId: "transfer_order_id",
+ version: BigInt("1000000"),
});
```
@@ -11865,7 +13141,7 @@ await client.team.updateJob({
-
-**request:** `Square.UpdateJobRequest`
+**request:** `Square.DeleteTransferOrdersRequest`
@@ -11873,7 +13149,7 @@ await client.team.updateJob({
-
-**requestOptions:** `Team.RequestOptions`
+**requestOptions:** `TransferOrders.RequestOptions`
@@ -11882,11 +13158,9 @@ await client.team.updateJob({
-
-
-## Terminal
+
-client.terminal.dismissTerminalAction({ ...params }) -> Square.DismissTerminalActionResponse
+client.transferOrders.cancel({ ...params }) -> Square.CancelTransferOrderResponse
-
@@ -11898,9 +13172,17 @@ await client.team.updateJob({
-
-Dismisses a Terminal action request if the status and type of the request permits it.
+Cancels a transfer order in [STARTED](entity:TransferOrderStatus) or
+[PARTIALLY_RECEIVED](entity:TransferOrderStatus) status. Any unreceived quantities will no
+longer be receivable and will be immediately returned to the source [Location](entity:Location)'s inventory.
-See [Link and Dismiss Actions](https://developer.squareup.com/docs/terminal-api/advanced-features/custom-workflows/link-and-dismiss-actions) for more details.
+Common reasons for cancellation:
+
+- Items no longer needed at destination
+- Source location needs the inventory
+- Order created in error
+
+Creates a [transfer_order.updated](webhook:transfer_order.updated) webhook event.
@@ -11916,8 +13198,10 @@ See [Link and Dismiss Actions](https://developer.squareup.com/docs/terminal-api/
-
```typescript
-await client.terminal.dismissTerminalAction({
- actionId: "action_id",
+await client.transferOrders.cancel({
+ transferOrderId: "transfer_order_id",
+ idempotencyKey: "65cc0586-3e82-4d08-b524-3885cffd52",
+ version: BigInt("1753117449752"),
});
```
@@ -11934,7 +13218,7 @@ await client.terminal.dismissTerminalAction({
-
-**request:** `Square.DismissTerminalActionRequest`
+**request:** `Square.CancelTransferOrderRequest`
@@ -11942,7 +13226,7 @@ await client.terminal.dismissTerminalAction({
-
-**requestOptions:** `Terminal.RequestOptions`
+**requestOptions:** `TransferOrders.RequestOptions`
@@ -11953,7 +13237,7 @@ await client.terminal.dismissTerminalAction({
-client.terminal.dismissTerminalCheckout({ ...params }) -> Square.DismissTerminalCheckoutResponse
+client.transferOrders.receive({ ...params }) -> Square.ReceiveTransferOrderResponse
-
@@ -11965,7 +13249,23 @@ await client.terminal.dismissTerminalAction({
-
-Dismisses a Terminal checkout request if the status and type of the request permits it.
+Records receipt of [CatalogItemVariation](entity:CatalogItemVariation)s for a transfer order.
+This endpoint supports partial receiving - you can receive items in multiple batches.
+
+For each line item, you can specify:
+
+- Quantity received in good condition (added to destination inventory with [InventoryState](entity:InventoryState) of IN_STOCK)
+- Quantity damaged during transit/handling (added to destination inventory with [InventoryState](entity:InventoryState) of WASTE)
+- Quantity canceled (returned to source location's inventory)
+
+The order must be in [STARTED](entity:TransferOrderStatus) or [PARTIALLY_RECEIVED](entity:TransferOrderStatus) status.
+Received quantities are added to the destination [Location](entity:Location)'s inventory according to their condition.
+Canceled quantities are immediately returned to the source [Location](entity:Location)'s inventory.
+
+When all items are either received, damaged, or canceled, the order moves to
+[COMPLETED](entity:TransferOrderStatus) status.
+
+Creates a [transfer_order.updated](webhook:transfer_order.updated) webhook event.
@@ -11981,8 +13281,25 @@ Dismisses a Terminal checkout request if the status and type of the request perm
-
```typescript
-await client.terminal.dismissTerminalCheckout({
- checkoutId: "checkout_id",
+await client.transferOrders.receive({
+ transferOrderId: "transfer_order_id",
+ idempotencyKey: "EXAMPLE_IDEMPOTENCY_KEY_101",
+ receipt: {
+ lineItems: [
+ {
+ transferOrderLineUid: "transfer_order_line_uid",
+ quantityReceived: "3",
+ quantityDamaged: "1",
+ quantityCanceled: "1",
+ },
+ {
+ transferOrderLineUid: "transfer_order_line_uid",
+ quantityReceived: "2",
+ quantityCanceled: "1",
+ },
+ ],
+ },
+ version: BigInt("1753118664873"),
});
```
@@ -11999,7 +13316,7 @@ await client.terminal.dismissTerminalCheckout({
-
-**request:** `Square.DismissTerminalCheckoutRequest`
+**request:** `Square.ReceiveTransferOrderRequest`
@@ -12007,7 +13324,7 @@ await client.terminal.dismissTerminalCheckout({
-
-**requestOptions:** `Terminal.RequestOptions`
+**requestOptions:** `TransferOrders.RequestOptions`
@@ -12018,7 +13335,7 @@ await client.terminal.dismissTerminalCheckout({
-client.terminal.dismissTerminalRefund({ ...params }) -> Square.DismissTerminalRefundResponse
+client.transferOrders.start({ ...params }) -> Square.StartTransferOrderResponse
-
@@ -12030,7 +13347,14 @@ await client.terminal.dismissTerminalCheckout({
-
-Dismisses a Terminal refund request if the status and type of the request permits it.
+Changes a [DRAFT](entity:TransferOrderStatus) transfer order to [STARTED](entity:TransferOrderStatus) status.
+This decrements inventory at the source [Location](entity:Location) and marks it as in-transit.
+
+The order must be in [DRAFT](entity:TransferOrderStatus) status and have all required fields populated.
+Once started, the order can no longer be deleted, but it can be canceled via
+[CancelTransferOrder](api-endpoint:TransferOrders-CancelTransferOrder).
+
+Creates a [transfer_order.updated](webhook:transfer_order.updated) webhook event.
@@ -12046,8 +13370,10 @@ Dismisses a Terminal refund request if the status and type of the request permit
-
```typescript
-await client.terminal.dismissTerminalRefund({
- terminalRefundId: "terminal_refund_id",
+await client.transferOrders.start({
+ transferOrderId: "transfer_order_id",
+ idempotencyKey: "EXAMPLE_IDEMPOTENCY_KEY_789",
+ version: BigInt("1753109537351"),
});
```
@@ -12064,7 +13390,7 @@ await client.terminal.dismissTerminalRefund({
-
-**request:** `Square.DismissTerminalRefundRequest`
+**request:** `Square.StartTransferOrderRequest`
@@ -12072,7 +13398,7 @@ await client.terminal.dismissTerminalRefund({
-
-**requestOptions:** `Terminal.RequestOptions`
+**requestOptions:** `TransferOrders.RequestOptions`
@@ -12395,7 +13721,7 @@ await client.vendors.create({
-client.vendors.search({ ...params }) -> Square.SearchVendorsResponse
+client.vendors.search({ ...params }) -> core.Page
-
@@ -12423,7 +13749,16 @@ Searches for vendors using a filter against supported [Vendor](entity:Vendor) pr
-
```typescript
-await client.vendors.search();
+const response = await client.vendors.search();
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.vendors.search();
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -12630,13 +13965,19 @@ To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ`
-
```typescript
-const response = await client.bookings.customAttributeDefinitions.list();
+const response = await client.bookings.customAttributeDefinitions.list({
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.bookings.customAttributeDefinitions.list();
+let page = await client.bookings.customAttributeDefinitions.list({
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -12778,6 +14119,7 @@ To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ`
```typescript
await client.bookings.customAttributeDefinitions.get({
key: "key",
+ version: 1,
});
```
@@ -13143,6 +14485,9 @@ To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ`
```typescript
const response = await client.bookings.customAttributes.list({
bookingId: "booking_id",
+ limit: 1,
+ cursor: "cursor",
+ withDefinitions: true,
});
for await (const item of response) {
console.log(item);
@@ -13151,6 +14496,9 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.bookings.customAttributes.list({
bookingId: "booking_id",
+ limit: 1,
+ cursor: "cursor",
+ withDefinitions: true,
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -13223,6 +14571,8 @@ To call this endpoint with seller-level permissions, set `APPOINTMENTS_ALL_READ`
await client.bookings.customAttributes.get({
bookingId: "booking_id",
key: "key",
+ withDefinition: true,
+ version: 1,
});
```
@@ -13433,13 +14783,19 @@ Lists location booking profiles of a seller.
-
```typescript
-const response = await client.bookings.locationProfiles.list();
+const response = await client.bookings.locationProfiles.list({
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.bookings.locationProfiles.list();
+let page = await client.bookings.locationProfiles.list({
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -13507,13 +14863,23 @@ Lists booking profiles for team members.
-
```typescript
-const response = await client.bookings.teamMemberProfiles.list();
+const response = await client.bookings.teamMemberProfiles.list({
+ bookableOnly: true,
+ limit: 1,
+ cursor: "cursor",
+ locationId: "location_id",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.bookings.teamMemberProfiles.list();
+let page = await client.bookings.teamMemberProfiles.list({
+ bookableOnly: true,
+ limit: 1,
+ cursor: "cursor",
+ locationId: "location_id",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -13649,6 +15015,11 @@ in a date range.
```typescript
const response = await client.cashDrawers.shifts.list({
locationId: "location_id",
+ sortOrder: "DESC",
+ beginTime: "begin_time",
+ endTime: "end_time",
+ limit: 1,
+ cursor: "cursor",
});
for await (const item of response) {
console.log(item);
@@ -13657,6 +15028,11 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.cashDrawers.shifts.list({
locationId: "location_id",
+ sortOrder: "DESC",
+ beginTime: "begin_time",
+ endTime: "end_time",
+ limit: 1,
+ cursor: "cursor",
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -13793,6 +15169,8 @@ Provides a paginated list of events for a single cash drawer shift.
const response = await client.cashDrawers.shifts.listEvents({
shiftId: "shift_id",
locationId: "location_id",
+ limit: 1,
+ cursor: "cursor",
});
for await (const item of response) {
console.log(item);
@@ -13802,6 +15180,8 @@ for await (const item of response) {
let page = await client.cashDrawers.shifts.listEvents({
shiftId: "shift_id",
locationId: "location_id",
+ limit: 1,
+ cursor: "cursor",
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -14089,6 +15469,9 @@ any [CatalogTax](entity:CatalogTax) objects that apply to it.
```typescript
await client.catalog.object.get({
objectId: "object_id",
+ includeRelatedObjects: true,
+ catalogVersion: BigInt("1000000"),
+ includeCategoryPathToRoot: true,
});
```
@@ -14228,13 +15611,19 @@ Lists all payment links.
-
```typescript
-const response = await client.checkout.paymentLinks.list();
+const response = await client.checkout.paymentLinks.list({
+ cursor: "cursor",
+ limit: 1,
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.checkout.paymentLinks.list();
+let page = await client.checkout.paymentLinks.list({
+ cursor: "cursor",
+ limit: 1,
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -14583,13 +15972,19 @@ seller-defined custom attributes (also known as custom fields) are always set to
-
```typescript
-const response = await client.customers.customAttributeDefinitions.list();
+const response = await client.customers.customAttributeDefinitions.list({
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.customers.customAttributeDefinitions.list();
+let page = await client.customers.customAttributeDefinitions.list({
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -14744,6 +16139,7 @@ setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note t
```typescript
await client.customers.customAttributeDefinitions.get({
key: "key",
+ version: 1,
});
```
@@ -15068,13 +16464,19 @@ Retrieves the list of customer groups of a business.
-
```typescript
-const response = await client.customers.groups.list();
+const response = await client.customers.groups.list({
+ cursor: "cursor",
+ limit: 1,
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.customers.groups.list();
+let page = await client.customers.groups.list({
+ cursor: "cursor",
+ limit: 1,
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -15547,13 +16949,19 @@ Retrieves the list of customer segments of a business.
-
```typescript
-const response = await client.customers.segments.list();
+const response = await client.customers.segments.list({
+ cursor: "cursor",
+ limit: 1,
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.customers.segments.list();
+let page = await client.customers.segments.list({
+ cursor: "cursor",
+ limit: 1,
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -15842,6 +17250,9 @@ and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
```typescript
const response = await client.customers.customAttributes.list({
customerId: "customer_id",
+ limit: 1,
+ cursor: "cursor",
+ withDefinitions: true,
});
for await (const item of response) {
console.log(item);
@@ -15850,6 +17261,9 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.customers.customAttributes.list({
customerId: "customer_id",
+ limit: 1,
+ cursor: "cursor",
+ withDefinitions: true,
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -15926,6 +17340,8 @@ To retrieve a custom attribute owned by another application, the `visibility` se
await client.customers.customAttributes.get({
customerId: "customer_id",
key: "key",
+ withDefinition: true,
+ version: 1,
});
```
@@ -16138,13 +17554,23 @@ Lists all DeviceCodes associated with the merchant.
-
```typescript
-const response = await client.devices.codes.list();
+const response = await client.devices.codes.list({
+ cursor: "cursor",
+ locationId: "location_id",
+ productType: "TERMINAL_API",
+ status: "UNKNOWN",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.devices.codes.list();
+let page = await client.devices.codes.list({
+ cursor: "cursor",
+ locationId: "location_id",
+ productType: "TERMINAL_API",
+ status: "UNKNOWN",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -16350,6 +17776,7 @@ Returns a list of evidence associated with a dispute.
```typescript
const response = await client.disputes.evidence.list({
disputeId: "dispute_id",
+ cursor: "cursor",
});
for await (const item of response) {
console.log(item);
@@ -16358,6 +17785,7 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.disputes.evidence.list({
disputeId: "dispute_id",
+ cursor: "cursor",
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -16564,13 +17992,31 @@ for all gift cards in a specific region, or for activities within a time window.
-
```typescript
-const response = await client.giftCards.activities.list();
+const response = await client.giftCards.activities.list({
+ giftCardId: "gift_card_id",
+ type: "type",
+ locationId: "location_id",
+ beginTime: "begin_time",
+ endTime: "end_time",
+ limit: 1,
+ cursor: "cursor",
+ sortOrder: "sort_order",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.giftCards.activities.list();
+let page = await client.giftCards.activities.list({
+ giftCardId: "gift_card_id",
+ type: "type",
+ locationId: "location_id",
+ beginTime: "begin_time",
+ endTime: "end_time",
+ limit: 1,
+ cursor: "cursor",
+ sortOrder: "sort_order",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -16713,13 +18159,21 @@ Returns a paginated list of `BreakType` instances for a business.
-
```typescript
-const response = await client.labor.breakTypes.list();
+const response = await client.labor.breakTypes.list({
+ locationId: "location_id",
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.labor.breakTypes.list();
+let page = await client.labor.breakTypes.list({
+ locationId: "location_id",
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -17075,13 +18529,21 @@ Returns a paginated list of `EmployeeWage` instances for a business.
-
```typescript
-const response = await client.labor.employeeWages.list();
+const response = await client.labor.employeeWages.list({
+ employeeId: "employee_id",
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.labor.employeeWages.list();
+let page = await client.labor.employeeWages.list({
+ employeeId: "employee_id",
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -17296,7 +18758,7 @@ await client.labor.shifts.create({
-client.labor.shifts.search({ ...params }) -> Square.SearchShiftsResponse
+client.labor.shifts.search({ ...params }) -> core.Page
-
@@ -17338,7 +18800,27 @@ The list can be sorted by:
-
```typescript
-await client.labor.shifts.search({
+const response = await client.labor.shifts.search({
+ query: {
+ filter: {
+ workday: {
+ dateRange: {
+ startDate: "2019-01-20",
+ endDate: "2019-02-03",
+ },
+ matchShiftsBy: "START_AT",
+ defaultTimezone: "America/Los_Angeles",
+ },
+ },
+ },
+ limit: 100,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.labor.shifts.search({
query: {
filter: {
workday: {
@@ -17353,6 +18835,9 @@ await client.labor.shifts.search({
},
limit: 100,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -17648,13 +19133,21 @@ Returns a paginated list of `TeamMemberWage` instances for a business.
-
```typescript
-const response = await client.labor.teamMemberWages.list();
+const response = await client.labor.teamMemberWages.list({
+ teamMemberId: "team_member_id",
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.labor.teamMemberWages.list();
+let page = await client.labor.teamMemberWages.list({
+ teamMemberId: "team_member_id",
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -17787,13 +19280,19 @@ Returns a list of `WorkweekConfig` instances for a business.
-
```typescript
-const response = await client.labor.workweekConfigs.list();
+const response = await client.labor.workweekConfigs.list({
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.labor.workweekConfigs.list();
+let page = await client.labor.workweekConfigs.list({
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -17934,13 +19433,21 @@ applications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`
-
```typescript
-const response = await client.locations.customAttributeDefinitions.list();
+const response = await client.locations.customAttributeDefinitions.list({
+ visibilityFilter: "ALL",
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.locations.customAttributeDefinitions.list();
+let page = await client.locations.customAttributeDefinitions.list({
+ visibilityFilter: "ALL",
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -18089,6 +19596,7 @@ setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
```typescript
await client.locations.customAttributeDefinitions.get({
key: "key",
+ version: 1,
});
```
@@ -18474,6 +19982,10 @@ and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
```typescript
const response = await client.locations.customAttributes.list({
locationId: "location_id",
+ visibilityFilter: "ALL",
+ limit: 1,
+ cursor: "cursor",
+ withDefinitions: true,
});
for await (const item of response) {
console.log(item);
@@ -18482,6 +19994,10 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.locations.customAttributes.list({
locationId: "location_id",
+ visibilityFilter: "ALL",
+ limit: 1,
+ cursor: "cursor",
+ withDefinitions: true,
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -18555,6 +20071,8 @@ To retrieve a custom attribute owned by another application, the `visibility` se
await client.locations.customAttributes.get({
locationId: "location_id",
key: "key",
+ withDefinition: true,
+ version: 1,
});
```
@@ -18769,6 +20287,10 @@ Max results per [page](https://developer.squareup.com/docs/working-with-apis/pag
```typescript
await client.locations.transactions.list({
locationId: "location_id",
+ beginTime: "begin_time",
+ endTime: "end_time",
+ sortOrder: "DESC",
+ cursor: "cursor",
});
```
@@ -19083,7 +20605,7 @@ await client.loyalty.accounts.create({
-client.loyalty.accounts.search({ ...params }) -> Square.SearchLoyaltyAccountsResponse
+client.loyalty.accounts.search({ ...params }) -> core.Page
-
@@ -19115,7 +20637,22 @@ Search results are sorted by `created_at` in ascending order.
-
```typescript
-await client.loyalty.accounts.search({
+const response = await client.loyalty.accounts.search({
+ query: {
+ mappings: [
+ {
+ phoneNumber: "+14155551234",
+ },
+ ],
+ },
+ limit: 10,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.loyalty.accounts.search({
query: {
mappings: [
{
@@ -19125,6 +20662,9 @@ await client.loyalty.accounts.search({
},
limit: 10,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -19666,7 +21206,7 @@ await client.loyalty.rewards.create({
-client.loyalty.rewards.search({ ...params }) -> Square.SearchLoyaltyRewardsResponse
+client.loyalty.rewards.search({ ...params }) -> core.Page
-
@@ -19700,12 +21240,26 @@ Search results are sorted by `updated_at` in descending order.
-
```typescript
-await client.loyalty.rewards.search({
+const response = await client.loyalty.rewards.search({
+ query: {
+ loyaltyAccountId: "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd",
+ },
+ limit: 10,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.loyalty.rewards.search({
query: {
loyaltyAccountId: "5adcb100-07f1-4ee7-b8c6-6bb9ebc474bd",
},
limit: 10,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -19988,6 +21542,9 @@ Results are sorted by the `created_at` date in descending order (newest to oldes
```typescript
const response = await client.loyalty.programs.promotions.list({
programId: "program_id",
+ status: "ACTIVE",
+ cursor: "cursor",
+ limit: 1,
});
for await (const item of response) {
console.log(item);
@@ -19996,6 +21553,9 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.loyalty.programs.promotions.list({
programId: "program_id",
+ status: "ACTIVE",
+ cursor: "cursor",
+ limit: 1,
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -20157,8 +21717,8 @@ Retrieves a loyalty promotion.
```typescript
await client.loyalty.programs.promotions.get({
- promotionId: "promotion_id",
programId: "program_id",
+ promotionId: "promotion_id",
});
```
@@ -20228,8 +21788,8 @@ This endpoint sets the loyalty promotion to the `CANCELED` state
```typescript
await client.loyalty.programs.promotions.cancel({
- promotionId: "promotion_id",
programId: "program_id",
+ promotionId: "promotion_id",
});
```
@@ -20298,13 +21858,21 @@ applications and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`
-
```typescript
-const response = await client.merchants.customAttributeDefinitions.list();
+const response = await client.merchants.customAttributeDefinitions.list({
+ visibilityFilter: "ALL",
+ limit: 1,
+ cursor: "cursor",
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.merchants.customAttributeDefinitions.list();
+let page = await client.merchants.customAttributeDefinitions.list({
+ visibilityFilter: "ALL",
+ limit: 1,
+ cursor: "cursor",
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -20453,6 +22021,7 @@ setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
```typescript
await client.merchants.customAttributeDefinitions.get({
key: "key",
+ version: 1,
});
```
@@ -20828,6 +22397,10 @@ and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
```typescript
const response = await client.merchants.customAttributes.list({
merchantId: "merchant_id",
+ visibilityFilter: "ALL",
+ limit: 1,
+ cursor: "cursor",
+ withDefinitions: true,
});
for await (const item of response) {
console.log(item);
@@ -20836,6 +22409,10 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.merchants.customAttributes.list({
merchantId: "merchant_id",
+ visibilityFilter: "ALL",
+ limit: 1,
+ cursor: "cursor",
+ withDefinitions: true,
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -20909,6 +22486,8 @@ To retrieve a custom attribute owned by another application, the `visibility` se
await client.merchants.customAttributes.get({
merchantId: "merchant_id",
key: "key",
+ withDefinition: true,
+ version: 1,
});
```
@@ -21121,13 +22700,21 @@ seller-defined custom attributes (also known as custom fields) are always set to
-
```typescript
-const response = await client.orders.customAttributeDefinitions.list();
+const response = await client.orders.customAttributeDefinitions.list({
+ visibilityFilter: "ALL",
+ cursor: "cursor",
+ limit: 1,
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.orders.customAttributeDefinitions.list();
+let page = await client.orders.customAttributeDefinitions.list({
+ visibilityFilter: "ALL",
+ cursor: "cursor",
+ limit: 1,
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
@@ -21277,6 +22864,7 @@ setting must be `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`. Note t
```typescript
await client.orders.customAttributeDefinitions.get({
key: "key",
+ version: 1,
});
```
@@ -21673,6 +23261,10 @@ and set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
```typescript
const response = await client.orders.customAttributes.list({
orderId: "order_id",
+ visibilityFilter: "ALL",
+ cursor: "cursor",
+ limit: 1,
+ withDefinitions: true,
});
for await (const item of response) {
console.log(item);
@@ -21681,6 +23273,10 @@ for await (const item of response) {
// Or you can manually iterate page-by-page
let page = await client.orders.customAttributes.list({
orderId: "order_id",
+ visibilityFilter: "ALL",
+ cursor: "cursor",
+ limit: 1,
+ withDefinitions: true,
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -21757,6 +23353,8 @@ also known as custom fields) are always set to `VISIBILITY_READ_WRITE_VALUES`.
await client.orders.customAttributes.get({
orderId: "order_id",
customAttributeKey: "custom_attribute_key",
+ version: 1,
+ withDefinition: true,
});
```
@@ -22183,7 +23781,7 @@ await client.terminal.actions.create({
-client.terminal.actions.search({ ...params }) -> Square.SearchTerminalActionsResponse
+client.terminal.actions.search({ ...params }) -> core.Page
-
@@ -22211,7 +23809,25 @@ Retrieves a filtered list of Terminal action requests created by the account mak
-
```typescript
-await client.terminal.actions.search({
+const response = await client.terminal.actions.search({
+ query: {
+ filter: {
+ createdAt: {
+ startAt: "2022-04-01T00:00:00.000Z",
+ },
+ },
+ sort: {
+ sortOrder: "DESC",
+ },
+ },
+ limit: 2,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.terminal.actions.search({
query: {
filter: {
createdAt: {
@@ -22224,6 +23840,9 @@ await client.terminal.actions.search({
},
limit: 2,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -22467,7 +24086,7 @@ await client.terminal.checkouts.create({
-client.terminal.checkouts.search({ ...params }) -> Square.SearchTerminalCheckoutsResponse
+client.terminal.checkouts.search({ ...params }) -> core.Page
-
@@ -22495,7 +24114,20 @@ Returns a filtered list of Terminal checkout requests created by the application
-
```typescript
-await client.terminal.checkouts.search({
+const response = await client.terminal.checkouts.search({
+ query: {
+ filter: {
+ status: "COMPLETED",
+ },
+ },
+ limit: 2,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.terminal.checkouts.search({
query: {
filter: {
status: "COMPLETED",
@@ -22503,6 +24135,9 @@ await client.terminal.checkouts.search({
},
limit: 2,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -22743,7 +24378,7 @@ await client.terminal.refunds.create({
-client.terminal.refunds.search({ ...params }) -> Square.SearchTerminalRefundsResponse
+client.terminal.refunds.search({ ...params }) -> core.Page
-
@@ -22771,7 +24406,20 @@ Retrieves a filtered list of Interac Terminal refund requests created by the sel
-
```typescript
-await client.terminal.refunds.search({
+const response = await client.terminal.refunds.search({
+ query: {
+ filter: {
+ status: "COMPLETED",
+ },
+ },
+ limit: 1,
+});
+for await (const item of response) {
+ console.log(item);
+}
+
+// Or you can manually iterate page-by-page
+let page = await client.terminal.refunds.search({
query: {
filter: {
status: "COMPLETED",
@@ -22779,6 +24427,9 @@ await client.terminal.refunds.search({
},
limit: 1,
});
+while (page.hasNextPage()) {
+ page = page.getNextPage();
+}
```
@@ -22973,7 +24624,9 @@ Lists all webhook event types that can be subscribed to.
-
```typescript
-await client.webhooks.eventTypes.list();
+await client.webhooks.eventTypes.list({
+ apiVersion: "api_version",
+});
```
@@ -23038,13 +24691,23 @@ Lists all webhook subscriptions owned by your application.
-
```typescript
-const response = await client.webhooks.subscriptions.list();
+const response = await client.webhooks.subscriptions.list({
+ cursor: "cursor",
+ includeDisabled: true,
+ sortOrder: "DESC",
+ limit: 1,
+});
for await (const item of response) {
console.log(item);
}
// Or you can manually iterate page-by-page
-let page = await client.webhooks.subscriptions.list();
+let page = await client.webhooks.subscriptions.list({
+ cursor: "cursor",
+ includeDisabled: true,
+ sortOrder: "DESC",
+ limit: 1,
+});
while (page.hasNextPage()) {
page = page.getNextPage();
}
diff --git a/src/Client.ts b/src/Client.ts
index 19d30e5b7..dfc978661 100644
--- a/src/Client.ts
+++ b/src/Client.ts
@@ -13,6 +13,7 @@ import { BankAccounts } from "./api/resources/bankAccounts/client/Client";
import { Bookings } from "./api/resources/bookings/client/Client";
import { Cards } from "./api/resources/cards/client/Client";
import { Catalog } from "./api/resources/catalog/client/Client";
+import { Channels } from "./api/resources/channels/client/Client";
import { Customers } from "./api/resources/customers/client/Client";
import { Devices } from "./api/resources/devices/client/Client";
import { Disputes } from "./api/resources/disputes/client/Client";
@@ -36,6 +37,7 @@ import { Subscriptions } from "./api/resources/subscriptions/client/Client";
import { TeamMembers } from "./api/resources/teamMembers/client/Client";
import { Team } from "./api/resources/team/client/Client";
import { Terminal } from "./api/resources/terminal/client/Client";
+import { TransferOrders } from "./api/resources/transferOrders/client/Client";
import { Vendors } from "./api/resources/vendors/client/Client";
import { CashDrawers } from "./api/resources/cashDrawers/client/Client";
import { Webhooks } from "./api/resources/webhooks/client/Client";
@@ -47,7 +49,7 @@ export declare namespace SquareClient {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -61,7 +63,7 @@ export declare namespace SquareClient {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -77,6 +79,7 @@ export class SquareClient {
protected _bookings: Bookings | undefined;
protected _cards: Cards | undefined;
protected _catalog: Catalog | undefined;
+ protected _channels: Channels | undefined;
protected _customers: Customers | undefined;
protected _devices: Devices | undefined;
protected _disputes: Disputes | undefined;
@@ -100,6 +103,7 @@ export class SquareClient {
protected _teamMembers: TeamMembers | undefined;
protected _team: Team | undefined;
protected _terminal: Terminal | undefined;
+ protected _transferOrders: TransferOrders | undefined;
protected _vendors: Vendors | undefined;
protected _cashDrawers: CashDrawers | undefined;
protected _webhooks: Webhooks | undefined;
@@ -109,11 +113,11 @@ export class SquareClient {
..._options,
headers: mergeHeaders(
{
- "Square-Version": _options?.version ?? "2025-09-24",
+ "Square-Version": _options?.version ?? "2025-10-16",
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "square",
- "X-Fern-SDK-Version": "43.1.1",
- "User-Agent": "square/43.1.1",
+ "X-Fern-SDK-Version": "43.1.0",
+ "User-Agent": "square/43.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
@@ -154,6 +158,10 @@ export class SquareClient {
return (this._catalog ??= new Catalog(this._options));
}
+ public get channels(): Channels {
+ return (this._channels ??= new Channels(this._options));
+ }
+
public get customers(): Customers {
return (this._customers ??= new Customers(this._options));
}
@@ -246,6 +254,10 @@ export class SquareClient {
return (this._terminal ??= new Terminal(this._options));
}
+ public get transferOrders(): TransferOrders {
+ return (this._transferOrders ??= new TransferOrders(this._options));
+ }
+
public get vendors(): Vendors {
return (this._vendors ??= new Vendors(this._options));
}
diff --git a/src/api/resources/applePay/client/Client.ts b/src/api/resources/applePay/client/Client.ts
index c3d94787f..c22f1f0b2 100644
--- a/src/api/resources/applePay/client/Client.ts
+++ b/src/api/resources/applePay/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace ApplePay {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace ApplePay {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -90,7 +90,7 @@ export class ApplePay {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/bankAccounts/client/Client.ts b/src/api/resources/bankAccounts/client/Client.ts
index 9b187eb16..6604d5b6f 100644
--- a/src/api/resources/bankAccounts/client/Client.ts
+++ b/src/api/resources/bankAccounts/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace BankAccounts {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace BankAccounts {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,11 @@ export class BankAccounts {
* @param {BankAccounts.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.bankAccounts.list()
+ * await client.bankAccounts.list({
+ * cursor: "cursor",
+ * limit: 1,
+ * locationId: "location_id"
+ * })
*/
public async list(
request: Square.ListBankAccountsRequest = {},
@@ -83,7 +87,7 @@ export class BankAccounts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -177,7 +181,7 @@ export class BankAccounts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -261,7 +265,7 @@ export class BankAccounts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/bankAccounts/client/requests/ListBankAccountsRequest.ts b/src/api/resources/bankAccounts/client/requests/ListBankAccountsRequest.ts
index b5ffadfe8..e7aa36957 100644
--- a/src/api/resources/bankAccounts/client/requests/ListBankAccountsRequest.ts
+++ b/src/api/resources/bankAccounts/client/requests/ListBankAccountsRequest.ts
@@ -4,7 +4,11 @@
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * limit: 1,
+ * locationId: "location_id"
+ * }
*/
export interface ListBankAccountsRequest {
/**
diff --git a/src/api/resources/bookings/client/Client.ts b/src/api/resources/bookings/client/Client.ts
index bb61ca529..995525cbb 100644
--- a/src/api/resources/bookings/client/Client.ts
+++ b/src/api/resources/bookings/client/Client.ts
@@ -20,7 +20,7 @@ export declare namespace Bookings {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -34,7 +34,7 @@ export declare namespace Bookings {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -77,7 +77,15 @@ export class Bookings {
* @param {Bookings.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.bookings.list()
+ * await client.bookings.list({
+ * limit: 1,
+ * cursor: "cursor",
+ * customerId: "customer_id",
+ * teamMemberId: "team_member_id",
+ * locationId: "location_id",
+ * startAtMin: "start_at_min",
+ * startAtMax: "start_at_max"
+ * })
*/
public async list(
request: Square.ListBookingsRequest = {},
@@ -120,7 +128,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -226,7 +234,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -319,7 +327,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -410,7 +418,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -491,7 +499,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -574,7 +582,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -658,7 +666,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -750,7 +758,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -838,7 +846,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -931,7 +939,7 @@ export class Bookings {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/bookings/client/requests/ListBookingsRequest.ts b/src/api/resources/bookings/client/requests/ListBookingsRequest.ts
index e57f99b22..f8d24958d 100644
--- a/src/api/resources/bookings/client/requests/ListBookingsRequest.ts
+++ b/src/api/resources/bookings/client/requests/ListBookingsRequest.ts
@@ -4,7 +4,15 @@
/**
* @example
- * {}
+ * {
+ * limit: 1,
+ * cursor: "cursor",
+ * customerId: "customer_id",
+ * teamMemberId: "team_member_id",
+ * locationId: "location_id",
+ * startAtMin: "start_at_min",
+ * startAtMax: "start_at_max"
+ * }
*/
export interface ListBookingsRequest {
/**
diff --git a/src/api/resources/bookings/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/bookings/resources/customAttributeDefinitions/client/Client.ts
index 0c3e2205e..c73c8d222 100644
--- a/src/api/resources/bookings/resources/customAttributeDefinitions/client/Client.ts
+++ b/src/api/resources/bookings/resources/customAttributeDefinitions/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace CustomAttributeDefinitions {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace CustomAttributeDefinitions {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -53,7 +53,10 @@ export class CustomAttributeDefinitions {
* @param {CustomAttributeDefinitions.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.bookings.customAttributeDefinitions.list()
+ * await client.bookings.customAttributeDefinitions.list({
+ * limit: 1,
+ * cursor: "cursor"
+ * })
*/
public async list(
request: Square.bookings.ListCustomAttributeDefinitionsRequest = {},
@@ -83,7 +86,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -187,7 +190,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -252,7 +255,8 @@ export class CustomAttributeDefinitions {
*
* @example
* await client.bookings.customAttributeDefinitions.get({
- * key: "key"
+ * key: "key",
+ * version: 1
* })
*/
public get(
@@ -284,7 +288,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -375,7 +379,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -470,7 +474,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/bookings/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts b/src/api/resources/bookings/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts
index 9b086bfb6..e4c05d712 100644
--- a/src/api/resources/bookings/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts
+++ b/src/api/resources/bookings/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts
@@ -5,7 +5,8 @@
/**
* @example
* {
- * key: "key"
+ * key: "key",
+ * version: 1
* }
*/
export interface GetCustomAttributeDefinitionsRequest {
diff --git a/src/api/resources/bookings/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts b/src/api/resources/bookings/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts
index ebdc049cc..ded39f5a0 100644
--- a/src/api/resources/bookings/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts
+++ b/src/api/resources/bookings/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts
@@ -4,7 +4,10 @@
/**
* @example
- * {}
+ * {
+ * limit: 1,
+ * cursor: "cursor"
+ * }
*/
export interface ListCustomAttributeDefinitionsRequest {
/**
diff --git a/src/api/resources/bookings/resources/customAttributes/client/Client.ts b/src/api/resources/bookings/resources/customAttributes/client/Client.ts
index db77e7928..a96a72a7f 100644
--- a/src/api/resources/bookings/resources/customAttributes/client/Client.ts
+++ b/src/api/resources/bookings/resources/customAttributes/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace CustomAttributes {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace CustomAttributes {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -88,7 +88,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -187,7 +187,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -252,7 +252,10 @@ export class CustomAttributes {
*
* @example
* await client.bookings.customAttributes.list({
- * bookingId: "booking_id"
+ * bookingId: "booking_id",
+ * limit: 1,
+ * cursor: "cursor",
+ * withDefinitions: true
* })
*/
public async list(
@@ -286,7 +289,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -359,7 +362,9 @@ export class CustomAttributes {
* @example
* await client.bookings.customAttributes.get({
* bookingId: "booking_id",
- * key: "key"
+ * key: "key",
+ * withDefinition: true,
+ * version: 1
* })
*/
public get(
@@ -395,7 +400,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -487,7 +492,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -583,7 +588,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/bookings/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts b/src/api/resources/bookings/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts
index 540eb8c10..2dc919041 100644
--- a/src/api/resources/bookings/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts
+++ b/src/api/resources/bookings/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts
@@ -6,7 +6,9 @@
* @example
* {
* bookingId: "booking_id",
- * key: "key"
+ * key: "key",
+ * withDefinition: true,
+ * version: 1
* }
*/
export interface GetCustomAttributesRequest {
diff --git a/src/api/resources/bookings/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts b/src/api/resources/bookings/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts
index ec23db686..bab55c3f7 100644
--- a/src/api/resources/bookings/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts
+++ b/src/api/resources/bookings/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts
@@ -5,7 +5,10 @@
/**
* @example
* {
- * bookingId: "booking_id"
+ * bookingId: "booking_id",
+ * limit: 1,
+ * cursor: "cursor",
+ * withDefinitions: true
* }
*/
export interface ListCustomAttributesRequest {
diff --git a/src/api/resources/bookings/resources/locationProfiles/client/Client.ts b/src/api/resources/bookings/resources/locationProfiles/client/Client.ts
index 3ef976809..09dd6d406 100644
--- a/src/api/resources/bookings/resources/locationProfiles/client/Client.ts
+++ b/src/api/resources/bookings/resources/locationProfiles/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace LocationProfiles {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace LocationProfiles {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,10 @@ export class LocationProfiles {
* @param {LocationProfiles.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.bookings.locationProfiles.list()
+ * await client.bookings.locationProfiles.list({
+ * limit: 1,
+ * cursor: "cursor"
+ * })
*/
public async list(
request: Square.bookings.ListLocationProfilesRequest = {},
@@ -80,7 +83,7 @@ export class LocationProfiles {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/bookings/resources/locationProfiles/client/requests/ListLocationProfilesRequest.ts b/src/api/resources/bookings/resources/locationProfiles/client/requests/ListLocationProfilesRequest.ts
index 1cc29a3f2..03d1b8bfc 100644
--- a/src/api/resources/bookings/resources/locationProfiles/client/requests/ListLocationProfilesRequest.ts
+++ b/src/api/resources/bookings/resources/locationProfiles/client/requests/ListLocationProfilesRequest.ts
@@ -4,7 +4,10 @@
/**
* @example
- * {}
+ * {
+ * limit: 1,
+ * cursor: "cursor"
+ * }
*/
export interface ListLocationProfilesRequest {
/**
diff --git a/src/api/resources/bookings/resources/teamMemberProfiles/client/Client.ts b/src/api/resources/bookings/resources/teamMemberProfiles/client/Client.ts
index 5841ae00e..d0f230f5f 100644
--- a/src/api/resources/bookings/resources/teamMemberProfiles/client/Client.ts
+++ b/src/api/resources/bookings/resources/teamMemberProfiles/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace TeamMemberProfiles {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace TeamMemberProfiles {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,12 @@ export class TeamMemberProfiles {
* @param {TeamMemberProfiles.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.bookings.teamMemberProfiles.list()
+ * await client.bookings.teamMemberProfiles.list({
+ * bookableOnly: true,
+ * limit: 1,
+ * cursor: "cursor",
+ * locationId: "location_id"
+ * })
*/
public async list(
request: Square.bookings.ListTeamMemberProfilesRequest = {},
@@ -86,7 +91,7 @@ export class TeamMemberProfiles {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -182,7 +187,7 @@ export class TeamMemberProfiles {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/bookings/resources/teamMemberProfiles/client/requests/ListTeamMemberProfilesRequest.ts b/src/api/resources/bookings/resources/teamMemberProfiles/client/requests/ListTeamMemberProfilesRequest.ts
index 126643f74..bb7d124ab 100644
--- a/src/api/resources/bookings/resources/teamMemberProfiles/client/requests/ListTeamMemberProfilesRequest.ts
+++ b/src/api/resources/bookings/resources/teamMemberProfiles/client/requests/ListTeamMemberProfilesRequest.ts
@@ -4,7 +4,12 @@
/**
* @example
- * {}
+ * {
+ * bookableOnly: true,
+ * limit: 1,
+ * cursor: "cursor",
+ * locationId: "location_id"
+ * }
*/
export interface ListTeamMemberProfilesRequest {
/**
diff --git a/src/api/resources/cards/client/Client.ts b/src/api/resources/cards/client/Client.ts
index 7574d82d6..c11419162 100644
--- a/src/api/resources/cards/client/Client.ts
+++ b/src/api/resources/cards/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Cards {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Cards {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -51,7 +51,13 @@ export class Cards {
* @param {Cards.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.cards.list()
+ * await client.cards.list({
+ * cursor: "cursor",
+ * customerId: "customer_id",
+ * includeDisabled: true,
+ * referenceId: "reference_id",
+ * sortOrder: "DESC"
+ * })
*/
public async list(
request: Square.ListCardsRequest = {},
@@ -91,7 +97,7 @@ export class Cards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -198,7 +204,7 @@ export class Cards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -285,7 +291,7 @@ export class Cards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -367,7 +373,7 @@ export class Cards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/cards/client/requests/ListCardsRequest.ts b/src/api/resources/cards/client/requests/ListCardsRequest.ts
index 44df40e49..ae1540aa5 100644
--- a/src/api/resources/cards/client/requests/ListCardsRequest.ts
+++ b/src/api/resources/cards/client/requests/ListCardsRequest.ts
@@ -6,7 +6,13 @@ import * as Square from "../../../../index";
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * customerId: "customer_id",
+ * includeDisabled: true,
+ * referenceId: "reference_id",
+ * sortOrder: "DESC"
+ * }
*/
export interface ListCardsRequest {
/**
diff --git a/src/api/resources/cashDrawers/client/Client.ts b/src/api/resources/cashDrawers/client/Client.ts
index 5b580eb2a..bc71ccec3 100644
--- a/src/api/resources/cashDrawers/client/Client.ts
+++ b/src/api/resources/cashDrawers/client/Client.ts
@@ -13,7 +13,7 @@ export declare namespace CashDrawers {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
diff --git a/src/api/resources/cashDrawers/resources/shifts/client/Client.ts b/src/api/resources/cashDrawers/resources/shifts/client/Client.ts
index 182fea033..090764a15 100644
--- a/src/api/resources/cashDrawers/resources/shifts/client/Client.ts
+++ b/src/api/resources/cashDrawers/resources/shifts/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Shifts {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Shifts {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -52,7 +52,12 @@ export class Shifts {
*
* @example
* await client.cashDrawers.shifts.list({
- * locationId: "location_id"
+ * locationId: "location_id",
+ * sortOrder: "DESC",
+ * beginTime: "begin_time",
+ * endTime: "end_time",
+ * limit: 1,
+ * cursor: "cursor"
* })
*/
public async list(
@@ -96,7 +101,7 @@ export class Shifts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -196,7 +201,7 @@ export class Shifts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -254,7 +259,9 @@ export class Shifts {
* @example
* await client.cashDrawers.shifts.listEvents({
* shiftId: "shift_id",
- * locationId: "location_id"
+ * locationId: "location_id",
+ * limit: 1,
+ * cursor: "cursor"
* })
*/
public async listEvents(
@@ -286,7 +293,7 @@ export class Shifts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/cashDrawers/resources/shifts/client/requests/ListEventsShiftsRequest.ts b/src/api/resources/cashDrawers/resources/shifts/client/requests/ListEventsShiftsRequest.ts
index 33d092715..69d274f2b 100644
--- a/src/api/resources/cashDrawers/resources/shifts/client/requests/ListEventsShiftsRequest.ts
+++ b/src/api/resources/cashDrawers/resources/shifts/client/requests/ListEventsShiftsRequest.ts
@@ -6,7 +6,9 @@
* @example
* {
* shiftId: "shift_id",
- * locationId: "location_id"
+ * locationId: "location_id",
+ * limit: 1,
+ * cursor: "cursor"
* }
*/
export interface ListEventsShiftsRequest {
diff --git a/src/api/resources/cashDrawers/resources/shifts/client/requests/ListShiftsRequest.ts b/src/api/resources/cashDrawers/resources/shifts/client/requests/ListShiftsRequest.ts
index a7ef994f1..711f5a9cf 100644
--- a/src/api/resources/cashDrawers/resources/shifts/client/requests/ListShiftsRequest.ts
+++ b/src/api/resources/cashDrawers/resources/shifts/client/requests/ListShiftsRequest.ts
@@ -7,7 +7,12 @@ import * as Square from "../../../../../../index";
/**
* @example
* {
- * locationId: "location_id"
+ * locationId: "location_id",
+ * sortOrder: "DESC",
+ * beginTime: "begin_time",
+ * endTime: "end_time",
+ * limit: 1,
+ * cursor: "cursor"
* }
*/
export interface ListShiftsRequest {
diff --git a/src/api/resources/catalog/client/Client.ts b/src/api/resources/catalog/client/Client.ts
index e1758f968..c6ce86bfb 100644
--- a/src/api/resources/catalog/client/Client.ts
+++ b/src/api/resources/catalog/client/Client.ts
@@ -18,7 +18,7 @@ export declare namespace Catalog {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -32,7 +32,7 @@ export declare namespace Catalog {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -102,7 +102,7 @@ export class Catalog {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -194,7 +194,7 @@ export class Catalog {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -307,7 +307,7 @@ export class Catalog {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -387,7 +387,7 @@ export class Catalog {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -447,7 +447,11 @@ export class Catalog {
* @param {Catalog.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.catalog.list()
+ * await client.catalog.list({
+ * cursor: "cursor",
+ * types: "types",
+ * catalogVersion: BigInt("1000000")
+ * })
*/
public async list(
request: Square.ListCatalogRequest = {},
@@ -478,7 +482,7 @@ export class Catalog {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -564,79 +568,88 @@ export class Catalog {
* limit: 100
* })
*/
- public search(
- request: Square.SearchCatalogObjectsRequest = {},
- requestOptions?: Catalog.RequestOptions,
- ): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
- }
-
- private async __search(
+ public async search(
request: Square.SearchCatalogObjectsRequest = {},
requestOptions?: Catalog.RequestOptions,
- ): Promise> {
- 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/catalog/search",
- ),
- method: "POST",
- headers: mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({
- Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
- }),
- requestOptions?.headers,
- ),
- contentType: "application/json",
- requestType: "json",
- body: serializers.SearchCatalogObjectsRequest.jsonOrThrow(request, {
- unrecognizedObjectKeys: "strip",
- omitUndefined: true,
- }),
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
- maxRetries: requestOptions?.maxRetries,
- abortSignal: requestOptions?.abortSignal,
- });
- if (_response.ok) {
- return {
- data: serializers.SearchCatalogObjectsResponse.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,
- });
- }
-
- switch (_response.error.reason) {
- case "non-json":
- throw new errors.SquareError({
- statusCode: _response.error.statusCode,
- body: _response.error.rawBody,
- rawResponse: _response.rawResponse,
- });
- case "timeout":
- throw new errors.SquareTimeoutError("Timeout exceeded when calling POST /v2/catalog/search.");
- case "unknown":
- throw new errors.SquareError({
- message: _response.error.errorMessage,
- rawResponse: _response.rawResponse,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: Square.SearchCatalogObjectsRequest,
+ ): Promise> => {
+ 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/catalog/search",
+ ),
+ method: "POST",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ contentType: "application/json",
+ requestType: "json",
+ body: serializers.SearchCatalogObjectsRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ }),
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
});
- }
+ if (_response.ok) {
+ return {
+ data: serializers.SearchCatalogObjectsResponse.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,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError("Timeout exceeded when calling POST /v2/catalog/search.");
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ },
+ );
+ const dataWithRawResponse = await list(request).withRawResponse();
+ return new core.Pageable({
+ response: dataWithRawResponse.data,
+ rawResponse: dataWithRawResponse.rawResponse,
+ hasNextPage: (response) =>
+ response?.cursor != null && !(typeof response?.cursor === "string" && response?.cursor === ""),
+ getItems: (response) => response?.objects ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "cursor", response?.cursor));
+ },
+ });
}
/**
@@ -680,81 +693,90 @@ export class Catalog {
* }]
* })
*/
- public searchItems(
+ public async searchItems(
request: Square.SearchCatalogItemsRequest = {},
requestOptions?: Catalog.RequestOptions,
- ): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__searchItems(request, requestOptions));
- }
-
- private async __searchItems(
- request: Square.SearchCatalogItemsRequest = {},
- requestOptions?: Catalog.RequestOptions,
- ): Promise> {
- 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/catalog/search-catalog-items",
- ),
- method: "POST",
- headers: mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({
- Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
- }),
- requestOptions?.headers,
- ),
- contentType: "application/json",
- requestType: "json",
- body: serializers.SearchCatalogItemsRequest.jsonOrThrow(request, {
- unrecognizedObjectKeys: "strip",
- omitUndefined: true,
- }),
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
- maxRetries: requestOptions?.maxRetries,
- abortSignal: requestOptions?.abortSignal,
- });
- if (_response.ok) {
- return {
- data: serializers.SearchCatalogItemsResponse.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,
- });
- }
-
- switch (_response.error.reason) {
- case "non-json":
- throw new errors.SquareError({
- statusCode: _response.error.statusCode,
- body: _response.error.rawBody,
- rawResponse: _response.rawResponse,
- });
- case "timeout":
- throw new errors.SquareTimeoutError(
- "Timeout exceeded when calling POST /v2/catalog/search-catalog-items.",
- );
- case "unknown":
- throw new errors.SquareError({
- message: _response.error.errorMessage,
- rawResponse: _response.rawResponse,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: Square.SearchCatalogItemsRequest,
+ ): Promise> => {
+ 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/catalog/search-catalog-items",
+ ),
+ method: "POST",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ contentType: "application/json",
+ requestType: "json",
+ body: serializers.SearchCatalogItemsRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ }),
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
});
- }
+ if (_response.ok) {
+ return {
+ data: serializers.SearchCatalogItemsResponse.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,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError(
+ "Timeout exceeded when calling POST /v2/catalog/search-catalog-items.",
+ );
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ },
+ );
+ const dataWithRawResponse = await list(request).withRawResponse();
+ return new core.Pageable({
+ response: dataWithRawResponse.data,
+ rawResponse: dataWithRawResponse.rawResponse,
+ hasNextPage: (response) =>
+ response?.cursor != null && !(typeof response?.cursor === "string" && response?.cursor === ""),
+ getItems: (response) => response?.items ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "cursor", response?.cursor));
+ },
+ });
}
/**
@@ -795,7 +817,7 @@ export class Catalog {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -887,7 +909,7 @@ export class Catalog {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/catalog/client/requests/ListCatalogRequest.ts b/src/api/resources/catalog/client/requests/ListCatalogRequest.ts
index 5a2363cda..def3b3f15 100644
--- a/src/api/resources/catalog/client/requests/ListCatalogRequest.ts
+++ b/src/api/resources/catalog/client/requests/ListCatalogRequest.ts
@@ -4,7 +4,11 @@
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * types: "types",
+ * catalogVersion: BigInt("1000000")
+ * }
*/
export interface ListCatalogRequest {
/**
diff --git a/src/api/resources/catalog/resources/images/client/Client.ts b/src/api/resources/catalog/resources/images/client/Client.ts
index 29dfd4f09..dedc2fcf4 100644
--- a/src/api/resources/catalog/resources/images/client/Client.ts
+++ b/src/api/resources/catalog/resources/images/client/Client.ts
@@ -17,7 +17,7 @@ export declare namespace Images {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -31,7 +31,7 @@ export declare namespace Images {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -99,7 +99,7 @@ export class Images {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
..._maybeEncodedRequest.headers,
}),
requestOptions?.headers,
@@ -204,7 +204,7 @@ export class Images {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
..._maybeEncodedRequest.headers,
}),
requestOptions?.headers,
diff --git a/src/api/resources/catalog/resources/object/client/Client.ts b/src/api/resources/catalog/resources/object/client/Client.ts
index 2c126f730..51bb3c6c5 100644
--- a/src/api/resources/catalog/resources/object/client/Client.ts
+++ b/src/api/resources/catalog/resources/object/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Object_ {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Object_ {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -85,7 +85,7 @@ export class Object_ {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -151,7 +151,10 @@ export class Object_ {
*
* @example
* await client.catalog.object.get({
- * objectId: "object_id"
+ * objectId: "object_id",
+ * includeRelatedObjects: true,
+ * catalogVersion: BigInt("1000000"),
+ * includeCategoryPathToRoot: true
* })
*/
public get(
@@ -191,7 +194,7 @@ export class Object_ {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -284,7 +287,7 @@ export class Object_ {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/catalog/resources/object/client/requests/GetObjectRequest.ts b/src/api/resources/catalog/resources/object/client/requests/GetObjectRequest.ts
index 0a008fb87..a39970258 100644
--- a/src/api/resources/catalog/resources/object/client/requests/GetObjectRequest.ts
+++ b/src/api/resources/catalog/resources/object/client/requests/GetObjectRequest.ts
@@ -5,7 +5,10 @@
/**
* @example
* {
- * objectId: "object_id"
+ * objectId: "object_id",
+ * includeRelatedObjects: true,
+ * catalogVersion: BigInt("1000000"),
+ * includeCategoryPathToRoot: true
* }
*/
export interface GetObjectRequest {
diff --git a/src/api/resources/channels/client/Client.ts b/src/api/resources/channels/client/Client.ts
new file mode 100644
index 000000000..42016aa0d
--- /dev/null
+++ b/src/api/resources/channels/client/Client.ts
@@ -0,0 +1,336 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as environments from "../../../../environments";
+import * as core from "../../../../core";
+import * as Square from "../../../index";
+import * as serializers from "../../../../serialization/index";
+import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers";
+import * as errors from "../../../../errors/index";
+
+export declare namespace Channels {
+ export interface Options {
+ environment?: core.Supplier;
+ /** Specify a custom URL to connect the client to. */
+ baseUrl?: core.Supplier;
+ token?: core.Supplier;
+ /** Override the Square-Version header */
+ version?: "2025-10-16";
+ /** Additional headers to include in requests. */
+ headers?: Record | undefined>;
+ fetcher?: core.FetchFunction;
+ }
+
+ export interface RequestOptions {
+ /** The maximum time to wait for a response in seconds. */
+ timeoutInSeconds?: number;
+ /** The number of times to retry the request. Defaults to 2. */
+ maxRetries?: number;
+ /** A hook to abort the request. */
+ abortSignal?: AbortSignal;
+ /** Override the Square-Version header */
+ version?: "2025-10-16";
+ /** Additional headers to include in the request. */
+ headers?: Record | undefined>;
+ }
+}
+
+export class Channels {
+ protected readonly _options: Channels.Options;
+
+ constructor(_options: Channels.Options = {}) {
+ this._options = _options;
+ }
+
+ /**
+ *
+ *
+ * @param {Square.ListChannelsRequest} request
+ * @param {Channels.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @example
+ * await client.channels.list({
+ * referenceType: "UNKNOWN_TYPE",
+ * referenceId: "reference_id",
+ * status: "ACTIVE",
+ * cursor: "cursor",
+ * limit: 1
+ * })
+ */
+ public async list(
+ request: Square.ListChannelsRequest = {},
+ requestOptions?: Channels.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (request: Square.ListChannelsRequest): Promise> => {
+ const { referenceType, referenceId, status, cursor, limit } = request;
+ const _queryParams: Record = {};
+ if (referenceType !== undefined) {
+ _queryParams["reference_type"] = serializers.ReferenceType.jsonOrThrow(referenceType, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ });
+ }
+ if (referenceId !== undefined) {
+ _queryParams["reference_id"] = referenceId;
+ }
+ if (status !== undefined) {
+ _queryParams["status"] = serializers.ChannelStatus.jsonOrThrow(status, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ });
+ }
+ if (cursor !== undefined) {
+ _queryParams["cursor"] = cursor;
+ }
+ if (limit !== undefined) {
+ _queryParams["limit"] = limit?.toString() ?? null;
+ }
+ 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/channels",
+ ),
+ method: "GET",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ queryParameters: _queryParams,
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.ListChannelsResponse.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,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError("Timeout exceeded when calling GET /v2/channels.");
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ },
+ );
+ const dataWithRawResponse = await list(request).withRawResponse();
+ return new core.Pageable({
+ response: dataWithRawResponse.data,
+ rawResponse: dataWithRawResponse.rawResponse,
+ hasNextPage: (response) =>
+ response?.cursor != null && !(typeof response?.cursor === "string" && response?.cursor === ""),
+ getItems: (response) => response?.channels ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "cursor", response?.cursor));
+ },
+ });
+ }
+
+ /**
+ *
+ *
+ * @param {Square.BulkRetrieveChannelsRequest} request
+ * @param {Channels.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @example
+ * await client.channels.bulkRetrieve({
+ * channelIds: ["CH_9C03D0B59", "CH_6X139B5MN", "NOT_EXISTING"]
+ * })
+ */
+ public bulkRetrieve(
+ request: Square.BulkRetrieveChannelsRequest,
+ requestOptions?: Channels.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__bulkRetrieve(request, requestOptions));
+ }
+
+ private async __bulkRetrieve(
+ request: Square.BulkRetrieveChannelsRequest,
+ requestOptions?: Channels.RequestOptions,
+ ): Promise> {
+ 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/channels/bulk-retrieve",
+ ),
+ method: "POST",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ contentType: "application/json",
+ requestType: "json",
+ body: serializers.BulkRetrieveChannelsRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ }),
+ timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.BulkRetrieveChannelsResponse.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,
+ });
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError("Timeout exceeded when calling POST /v2/channels/bulk-retrieve.");
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ /**
+ *
+ *
+ * @param {Square.GetChannelsRequest} request
+ * @param {Channels.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @example
+ * await client.channels.get({
+ * channelId: "channel_id"
+ * })
+ */
+ public get(
+ request: Square.GetChannelsRequest,
+ requestOptions?: Channels.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
+ }
+
+ private async __get(
+ request: Square.GetChannelsRequest,
+ requestOptions?: Channels.RequestOptions,
+ ): Promise> {
+ const { channelId } = request;
+ 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/channels/${encodeURIComponent(channelId)}`,
+ ),
+ method: "GET",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
+ });
+ if (_response.ok) {
+ return {
+ data: serializers.RetrieveChannelResponse.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,
+ });
+ }
+
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError("Timeout exceeded when calling GET /v2/channels/{channel_id}.");
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ protected async _getAuthorizationHeader(): Promise {
+ const bearer = (await core.Supplier.get(this._options.token)) ?? process?.env["SQUARE_TOKEN"];
+ if (bearer != null) {
+ return `Bearer ${bearer}`;
+ }
+
+ return undefined;
+ }
+}
diff --git a/src/api/resources/channels/client/index.ts b/src/api/resources/channels/client/index.ts
new file mode 100644
index 000000000..f33205a0f
--- /dev/null
+++ b/src/api/resources/channels/client/index.ts
@@ -0,0 +1,2 @@
+export {};
+export * from "./requests";
diff --git a/src/api/resources/channels/client/requests/BulkRetrieveChannelsRequest.ts b/src/api/resources/channels/client/requests/BulkRetrieveChannelsRequest.ts
new file mode 100644
index 000000000..42c908fd0
--- /dev/null
+++ b/src/api/resources/channels/client/requests/BulkRetrieveChannelsRequest.ts
@@ -0,0 +1,13 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {
+ * channelIds: ["CH_9C03D0B59", "CH_6X139B5MN", "NOT_EXISTING"]
+ * }
+ */
+export interface BulkRetrieveChannelsRequest {
+ channelIds: string[];
+}
diff --git a/src/api/resources/channels/client/requests/GetChannelsRequest.ts b/src/api/resources/channels/client/requests/GetChannelsRequest.ts
new file mode 100644
index 000000000..eb452888a
--- /dev/null
+++ b/src/api/resources/channels/client/requests/GetChannelsRequest.ts
@@ -0,0 +1,16 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+/**
+ * @example
+ * {
+ * channelId: "channel_id"
+ * }
+ */
+export interface GetChannelsRequest {
+ /**
+ * A channel id
+ */
+ channelId: string;
+}
diff --git a/src/api/resources/channels/client/requests/ListChannelsRequest.ts b/src/api/resources/channels/client/requests/ListChannelsRequest.ts
new file mode 100644
index 000000000..52e45208d
--- /dev/null
+++ b/src/api/resources/channels/client/requests/ListChannelsRequest.ts
@@ -0,0 +1,39 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+
+import * as Square from "../../../../index";
+
+/**
+ * @example
+ * {
+ * referenceType: "UNKNOWN_TYPE",
+ * referenceId: "reference_id",
+ * status: "ACTIVE",
+ * cursor: "cursor",
+ * limit: 1
+ * }
+ */
+export interface ListChannelsRequest {
+ /**
+ * Type of reference associated to channel
+ */
+ referenceType?: Square.ReferenceType | null;
+ /**
+ * id of reference associated to channel
+ */
+ referenceId?: string | null;
+ /**
+ * Status of channel
+ */
+ status?: Square.ChannelStatus | null;
+ /**
+ * Cursor to fetch the next result
+ */
+ cursor?: string | null;
+ /**
+ * Maximum number of results to return.
+ * When not provided the returned results will be cap at 100 channels.
+ */
+ limit?: number | null;
+}
diff --git a/src/api/resources/channels/client/requests/index.ts b/src/api/resources/channels/client/requests/index.ts
new file mode 100644
index 000000000..8255049a1
--- /dev/null
+++ b/src/api/resources/channels/client/requests/index.ts
@@ -0,0 +1,3 @@
+export { type ListChannelsRequest } from "./ListChannelsRequest";
+export { type BulkRetrieveChannelsRequest } from "./BulkRetrieveChannelsRequest";
+export { type GetChannelsRequest } from "./GetChannelsRequest";
diff --git a/src/api/resources/channels/index.ts b/src/api/resources/channels/index.ts
new file mode 100644
index 000000000..5ec76921e
--- /dev/null
+++ b/src/api/resources/channels/index.ts
@@ -0,0 +1 @@
+export * from "./client";
diff --git a/src/api/resources/checkout/client/Client.ts b/src/api/resources/checkout/client/Client.ts
index ed4bded17..80aca7915 100644
--- a/src/api/resources/checkout/client/Client.ts
+++ b/src/api/resources/checkout/client/Client.ts
@@ -17,7 +17,7 @@ export declare namespace Checkout {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -31,7 +31,7 @@ export declare namespace Checkout {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -84,7 +84,7 @@ export class Checkout {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -168,7 +168,7 @@ export class Checkout {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -251,7 +251,7 @@ export class Checkout {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -333,7 +333,7 @@ export class Checkout {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/checkout/resources/paymentLinks/client/Client.ts b/src/api/resources/checkout/resources/paymentLinks/client/Client.ts
index 74fa15dbd..0cab603d1 100644
--- a/src/api/resources/checkout/resources/paymentLinks/client/Client.ts
+++ b/src/api/resources/checkout/resources/paymentLinks/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace PaymentLinks {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace PaymentLinks {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,10 @@ export class PaymentLinks {
* @param {PaymentLinks.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.checkout.paymentLinks.list()
+ * await client.checkout.paymentLinks.list({
+ * cursor: "cursor",
+ * limit: 1
+ * })
*/
public async list(
request: Square.checkout.ListPaymentLinksRequest = {},
@@ -80,7 +83,7 @@ export class PaymentLinks {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -183,7 +186,7 @@ export class PaymentLinks {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -272,7 +275,7 @@ export class PaymentLinks {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -363,7 +366,7 @@ export class PaymentLinks {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -452,7 +455,7 @@ export class PaymentLinks {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/checkout/resources/paymentLinks/client/requests/ListPaymentLinksRequest.ts b/src/api/resources/checkout/resources/paymentLinks/client/requests/ListPaymentLinksRequest.ts
index eda441448..ebcb3acd2 100644
--- a/src/api/resources/checkout/resources/paymentLinks/client/requests/ListPaymentLinksRequest.ts
+++ b/src/api/resources/checkout/resources/paymentLinks/client/requests/ListPaymentLinksRequest.ts
@@ -4,7 +4,10 @@
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * limit: 1
+ * }
*/
export interface ListPaymentLinksRequest {
/**
diff --git a/src/api/resources/customers/client/Client.ts b/src/api/resources/customers/client/Client.ts
index bf3c05dd8..ac505a324 100644
--- a/src/api/resources/customers/client/Client.ts
+++ b/src/api/resources/customers/client/Client.ts
@@ -21,7 +21,7 @@ export declare namespace Customers {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -35,7 +35,7 @@ export declare namespace Customers {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -84,7 +84,13 @@ export class Customers {
* @param {Customers.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.customers.list()
+ * await client.customers.list({
+ * cursor: "cursor",
+ * limit: 1,
+ * sortField: "DEFAULT",
+ * sortOrder: "DESC",
+ * count: true
+ * })
*/
public async list(
request: Square.ListCustomersRequest = {},
@@ -129,7 +135,7 @@ export class Customers {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -244,7 +250,7 @@ export class Customers {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -373,7 +379,7 @@ export class Customers {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -461,7 +467,7 @@ export class Customers {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -549,7 +555,7 @@ export class Customers {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -648,7 +654,7 @@ export class Customers {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -741,79 +747,88 @@ export class Customers {
* }
* })
*/
- public search(
- request: Square.SearchCustomersRequest = {},
- requestOptions?: Customers.RequestOptions,
- ): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
- }
-
- private async __search(
+ public async search(
request: Square.SearchCustomersRequest = {},
requestOptions?: Customers.RequestOptions,
- ): Promise> {
- 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/customers/search",
- ),
- method: "POST",
- headers: mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({
- Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
- }),
- requestOptions?.headers,
- ),
- contentType: "application/json",
- requestType: "json",
- body: serializers.SearchCustomersRequest.jsonOrThrow(request, {
- unrecognizedObjectKeys: "strip",
- omitUndefined: true,
- }),
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
- maxRetries: requestOptions?.maxRetries,
- abortSignal: requestOptions?.abortSignal,
- });
- if (_response.ok) {
- return {
- data: serializers.SearchCustomersResponse.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,
- });
- }
-
- switch (_response.error.reason) {
- case "non-json":
- throw new errors.SquareError({
- statusCode: _response.error.statusCode,
- body: _response.error.rawBody,
- rawResponse: _response.rawResponse,
- });
- case "timeout":
- throw new errors.SquareTimeoutError("Timeout exceeded when calling POST /v2/customers/search.");
- case "unknown":
- throw new errors.SquareError({
- message: _response.error.errorMessage,
- rawResponse: _response.rawResponse,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: Square.SearchCustomersRequest,
+ ): Promise> => {
+ 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/customers/search",
+ ),
+ method: "POST",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ contentType: "application/json",
+ requestType: "json",
+ body: serializers.SearchCustomersRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ }),
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
});
- }
+ if (_response.ok) {
+ return {
+ data: serializers.SearchCustomersResponse.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,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError("Timeout exceeded when calling POST /v2/customers/search.");
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ },
+ );
+ const dataWithRawResponse = await list(request).withRawResponse();
+ return new core.Pageable({
+ response: dataWithRawResponse.data,
+ rawResponse: dataWithRawResponse.rawResponse,
+ hasNextPage: (response) =>
+ response?.cursor != null && !(typeof response?.cursor === "string" && response?.cursor === ""),
+ getItems: (response) => response?.customers ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "cursor", response?.cursor));
+ },
+ });
}
/**
@@ -851,7 +866,7 @@ export class Customers {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -938,7 +953,7 @@ export class Customers {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -1000,7 +1015,8 @@ export class Customers {
*
* @example
* await client.customers.delete({
- * customerId: "customer_id"
+ * customerId: "customer_id",
+ * version: BigInt("1000000")
* })
*/
public delete(
@@ -1032,7 +1048,7 @@ export class Customers {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/customers/client/requests/DeleteCustomersRequest.ts b/src/api/resources/customers/client/requests/DeleteCustomersRequest.ts
index af3a62bb6..7e0dc540a 100644
--- a/src/api/resources/customers/client/requests/DeleteCustomersRequest.ts
+++ b/src/api/resources/customers/client/requests/DeleteCustomersRequest.ts
@@ -5,7 +5,8 @@
/**
* @example
* {
- * customerId: "customer_id"
+ * customerId: "customer_id",
+ * version: BigInt("1000000")
* }
*/
export interface DeleteCustomersRequest {
diff --git a/src/api/resources/customers/client/requests/ListCustomersRequest.ts b/src/api/resources/customers/client/requests/ListCustomersRequest.ts
index 6d319949c..c10f2c512 100644
--- a/src/api/resources/customers/client/requests/ListCustomersRequest.ts
+++ b/src/api/resources/customers/client/requests/ListCustomersRequest.ts
@@ -6,7 +6,13 @@ import * as Square from "../../../../index";
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * limit: 1,
+ * sortField: "DEFAULT",
+ * sortOrder: "DESC",
+ * count: true
+ * }
*/
export interface ListCustomersRequest {
/**
diff --git a/src/api/resources/customers/resources/cards/client/Client.ts b/src/api/resources/customers/resources/cards/client/Client.ts
index 856308c40..5758d6dca 100644
--- a/src/api/resources/customers/resources/cards/client/Client.ts
+++ b/src/api/resources/customers/resources/cards/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Cards {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Cards {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -92,7 +92,7 @@ export class Cards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -182,7 +182,7 @@ export class Cards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/customers/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/customers/resources/customAttributeDefinitions/client/Client.ts
index c181fe772..20e37876d 100644
--- a/src/api/resources/customers/resources/customAttributeDefinitions/client/Client.ts
+++ b/src/api/resources/customers/resources/customAttributeDefinitions/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace CustomAttributeDefinitions {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace CustomAttributeDefinitions {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -55,7 +55,10 @@ export class CustomAttributeDefinitions {
* @param {CustomAttributeDefinitions.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.customers.customAttributeDefinitions.list()
+ * await client.customers.customAttributeDefinitions.list({
+ * limit: 1,
+ * cursor: "cursor"
+ * })
*/
public async list(
request: Square.customers.ListCustomAttributeDefinitionsRequest = {},
@@ -85,7 +88,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -201,7 +204,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -267,7 +270,8 @@ export class CustomAttributeDefinitions {
*
* @example
* await client.customers.customAttributeDefinitions.get({
- * key: "key"
+ * key: "key",
+ * version: 1
* })
*/
public get(
@@ -299,7 +303,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -393,7 +397,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -487,7 +491,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -618,7 +622,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/customers/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts b/src/api/resources/customers/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts
index 9b086bfb6..e4c05d712 100644
--- a/src/api/resources/customers/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts
+++ b/src/api/resources/customers/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts
@@ -5,7 +5,8 @@
/**
* @example
* {
- * key: "key"
+ * key: "key",
+ * version: 1
* }
*/
export interface GetCustomAttributeDefinitionsRequest {
diff --git a/src/api/resources/customers/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts b/src/api/resources/customers/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts
index ebdc049cc..ded39f5a0 100644
--- a/src/api/resources/customers/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts
+++ b/src/api/resources/customers/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts
@@ -4,7 +4,10 @@
/**
* @example
- * {}
+ * {
+ * limit: 1,
+ * cursor: "cursor"
+ * }
*/
export interface ListCustomAttributeDefinitionsRequest {
/**
diff --git a/src/api/resources/customers/resources/customAttributes/client/Client.ts b/src/api/resources/customers/resources/customAttributes/client/Client.ts
index e7c1b22ac..1f255afb0 100644
--- a/src/api/resources/customers/resources/customAttributes/client/Client.ts
+++ b/src/api/resources/customers/resources/customAttributes/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace CustomAttributes {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace CustomAttributes {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -58,7 +58,10 @@ export class CustomAttributes {
*
* @example
* await client.customers.customAttributes.list({
- * customerId: "customer_id"
+ * customerId: "customer_id",
+ * limit: 1,
+ * cursor: "cursor",
+ * withDefinitions: true
* })
*/
public async list(
@@ -92,7 +95,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -169,7 +172,9 @@ export class CustomAttributes {
* @example
* await client.customers.customAttributes.get({
* customerId: "customer_id",
- * key: "key"
+ * key: "key",
+ * withDefinition: true,
+ * version: 1
* })
*/
public get(
@@ -205,7 +210,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -301,7 +306,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -395,7 +400,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/customers/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts b/src/api/resources/customers/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts
index f59d7efa3..dec991b8a 100644
--- a/src/api/resources/customers/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts
+++ b/src/api/resources/customers/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts
@@ -6,7 +6,9 @@
* @example
* {
* customerId: "customer_id",
- * key: "key"
+ * key: "key",
+ * withDefinition: true,
+ * version: 1
* }
*/
export interface GetCustomAttributesRequest {
diff --git a/src/api/resources/customers/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts b/src/api/resources/customers/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts
index 505056267..61d16f54a 100644
--- a/src/api/resources/customers/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts
+++ b/src/api/resources/customers/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts
@@ -5,7 +5,10 @@
/**
* @example
* {
- * customerId: "customer_id"
+ * customerId: "customer_id",
+ * limit: 1,
+ * cursor: "cursor",
+ * withDefinitions: true
* }
*/
export interface ListCustomAttributesRequest {
diff --git a/src/api/resources/customers/resources/groups/client/Client.ts b/src/api/resources/customers/resources/groups/client/Client.ts
index b3307543e..12c75283d 100644
--- a/src/api/resources/customers/resources/groups/client/Client.ts
+++ b/src/api/resources/customers/resources/groups/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Groups {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Groups {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,10 @@ export class Groups {
* @param {Groups.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.customers.groups.list()
+ * await client.customers.groups.list({
+ * cursor: "cursor",
+ * limit: 1
+ * })
*/
public async list(
request: Square.customers.ListGroupsRequest = {},
@@ -80,7 +83,7 @@ export class Groups {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -177,7 +180,7 @@ export class Groups {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -264,7 +267,7 @@ export class Groups {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -350,7 +353,7 @@ export class Groups {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -439,7 +442,7 @@ export class Groups {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -526,7 +529,7 @@ export class Groups {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -613,7 +616,7 @@ export class Groups {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/customers/resources/groups/client/requests/ListGroupsRequest.ts b/src/api/resources/customers/resources/groups/client/requests/ListGroupsRequest.ts
index f5e1b638e..8f5ce9765 100644
--- a/src/api/resources/customers/resources/groups/client/requests/ListGroupsRequest.ts
+++ b/src/api/resources/customers/resources/groups/client/requests/ListGroupsRequest.ts
@@ -4,7 +4,10 @@
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * limit: 1
+ * }
*/
export interface ListGroupsRequest {
/**
diff --git a/src/api/resources/customers/resources/segments/client/Client.ts b/src/api/resources/customers/resources/segments/client/Client.ts
index a7e416fe4..8417890ef 100644
--- a/src/api/resources/customers/resources/segments/client/Client.ts
+++ b/src/api/resources/customers/resources/segments/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Segments {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Segments {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,10 @@ export class Segments {
* @param {Segments.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.customers.segments.list()
+ * await client.customers.segments.list({
+ * cursor: "cursor",
+ * limit: 1
+ * })
*/
public async list(
request: Square.customers.ListSegmentsRequest = {},
@@ -80,7 +83,7 @@ export class Segments {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -176,7 +179,7 @@ export class Segments {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/customers/resources/segments/client/requests/ListSegmentsRequest.ts b/src/api/resources/customers/resources/segments/client/requests/ListSegmentsRequest.ts
index 259e1b80f..4ee529a9f 100644
--- a/src/api/resources/customers/resources/segments/client/requests/ListSegmentsRequest.ts
+++ b/src/api/resources/customers/resources/segments/client/requests/ListSegmentsRequest.ts
@@ -4,7 +4,10 @@
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * limit: 1
+ * }
*/
export interface ListSegmentsRequest {
/**
diff --git a/src/api/resources/devices/client/Client.ts b/src/api/resources/devices/client/Client.ts
index db4ef046b..b84a26b5b 100644
--- a/src/api/resources/devices/client/Client.ts
+++ b/src/api/resources/devices/client/Client.ts
@@ -17,7 +17,7 @@ export declare namespace Devices {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -31,7 +31,7 @@ export declare namespace Devices {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -57,7 +57,12 @@ export class Devices {
* @param {Devices.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.devices.list()
+ * await client.devices.list({
+ * cursor: "cursor",
+ * sortOrder: "DESC",
+ * limit: 1,
+ * locationId: "location_id"
+ * })
*/
public async list(
request: Square.ListDevicesRequest = {},
@@ -94,7 +99,7 @@ export class Devices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -188,7 +193,7 @@ export class Devices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/devices/client/requests/ListDevicesRequest.ts b/src/api/resources/devices/client/requests/ListDevicesRequest.ts
index 323d264f4..299bd9ec4 100644
--- a/src/api/resources/devices/client/requests/ListDevicesRequest.ts
+++ b/src/api/resources/devices/client/requests/ListDevicesRequest.ts
@@ -6,7 +6,12 @@ import * as Square from "../../../../index";
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * sortOrder: "DESC",
+ * limit: 1,
+ * locationId: "location_id"
+ * }
*/
export interface ListDevicesRequest {
/**
diff --git a/src/api/resources/devices/resources/codes/client/Client.ts b/src/api/resources/devices/resources/codes/client/Client.ts
index 1e9b92476..84c30d8f6 100644
--- a/src/api/resources/devices/resources/codes/client/Client.ts
+++ b/src/api/resources/devices/resources/codes/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Codes {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Codes {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,12 @@ export class Codes {
* @param {Codes.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.devices.codes.list()
+ * await client.devices.codes.list({
+ * cursor: "cursor",
+ * locationId: "location_id",
+ * productType: "TERMINAL_API",
+ * status: "UNKNOWN"
+ * })
*/
public async list(
request: Square.devices.ListCodesRequest = {},
@@ -92,7 +97,7 @@ export class Codes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -191,7 +196,7 @@ export class Codes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -278,7 +283,7 @@ export class Codes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/devices/resources/codes/client/requests/ListCodesRequest.ts b/src/api/resources/devices/resources/codes/client/requests/ListCodesRequest.ts
index dcb084347..c7e5d8399 100644
--- a/src/api/resources/devices/resources/codes/client/requests/ListCodesRequest.ts
+++ b/src/api/resources/devices/resources/codes/client/requests/ListCodesRequest.ts
@@ -6,7 +6,12 @@ import * as Square from "../../../../../../index";
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * locationId: "location_id",
+ * productType: "TERMINAL_API",
+ * status: "UNKNOWN"
+ * }
*/
export interface ListCodesRequest {
/**
diff --git a/src/api/resources/disputes/client/Client.ts b/src/api/resources/disputes/client/Client.ts
index 384b8492f..905d9ad14 100644
--- a/src/api/resources/disputes/client/Client.ts
+++ b/src/api/resources/disputes/client/Client.ts
@@ -18,7 +18,7 @@ export declare namespace Disputes {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -32,7 +32,7 @@ export declare namespace Disputes {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -57,7 +57,11 @@ export class Disputes {
* @param {Disputes.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.disputes.list()
+ * await client.disputes.list({
+ * cursor: "cursor",
+ * states: "INQUIRY_EVIDENCE_REQUIRED",
+ * locationId: "location_id"
+ * })
*/
public async list(
request: Square.ListDisputesRequest = {},
@@ -91,7 +95,7 @@ export class Disputes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -185,7 +189,7 @@ export class Disputes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -270,7 +274,7 @@ export class Disputes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -371,7 +375,7 @@ export class Disputes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
..._maybeEncodedRequest.headers,
}),
requestOptions?.headers,
@@ -461,7 +465,7 @@ export class Disputes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -556,7 +560,7 @@ export class Disputes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/disputes/client/requests/ListDisputesRequest.ts b/src/api/resources/disputes/client/requests/ListDisputesRequest.ts
index eb1e6a560..228295073 100644
--- a/src/api/resources/disputes/client/requests/ListDisputesRequest.ts
+++ b/src/api/resources/disputes/client/requests/ListDisputesRequest.ts
@@ -6,7 +6,11 @@ import * as Square from "../../../../index";
/**
* @example
- * {}
+ * {
+ * cursor: "cursor",
+ * states: "INQUIRY_EVIDENCE_REQUIRED",
+ * locationId: "location_id"
+ * }
*/
export interface ListDisputesRequest {
/**
diff --git a/src/api/resources/disputes/resources/evidence/client/Client.ts b/src/api/resources/disputes/resources/evidence/client/Client.ts
index 27d03dedb..d8d7bfb9c 100644
--- a/src/api/resources/disputes/resources/evidence/client/Client.ts
+++ b/src/api/resources/disputes/resources/evidence/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Evidence {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Evidence {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -51,7 +51,8 @@ export class Evidence {
*
* @example
* await client.disputes.evidence.list({
- * disputeId: "dispute_id"
+ * disputeId: "dispute_id",
+ * cursor: "cursor"
* })
*/
public async list(
@@ -79,7 +80,7 @@ export class Evidence {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -178,7 +179,7 @@ export class Evidence {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -263,7 +264,7 @@ export class Evidence {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/disputes/resources/evidence/client/requests/ListEvidenceRequest.ts b/src/api/resources/disputes/resources/evidence/client/requests/ListEvidenceRequest.ts
index 2a603aa53..b7dcdf22a 100644
--- a/src/api/resources/disputes/resources/evidence/client/requests/ListEvidenceRequest.ts
+++ b/src/api/resources/disputes/resources/evidence/client/requests/ListEvidenceRequest.ts
@@ -5,7 +5,8 @@
/**
* @example
* {
- * disputeId: "dispute_id"
+ * disputeId: "dispute_id",
+ * cursor: "cursor"
* }
*/
export interface ListEvidenceRequest {
diff --git a/src/api/resources/employees/client/Client.ts b/src/api/resources/employees/client/Client.ts
index bcd53029d..2c3743bfd 100644
--- a/src/api/resources/employees/client/Client.ts
+++ b/src/api/resources/employees/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Employees {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Employees {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,12 @@ export class Employees {
* @param {Employees.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.employees.list()
+ * await client.employees.list({
+ * locationId: "location_id",
+ * status: "ACTIVE",
+ * limit: 1,
+ * cursor: "cursor"
+ * })
*/
public async list(
request: Square.ListEmployeesRequest = {},
@@ -89,7 +94,7 @@ export class Employees {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -183,7 +188,7 @@ export class Employees {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/employees/client/requests/ListEmployeesRequest.ts b/src/api/resources/employees/client/requests/ListEmployeesRequest.ts
index 78453e229..1a727fa8e 100644
--- a/src/api/resources/employees/client/requests/ListEmployeesRequest.ts
+++ b/src/api/resources/employees/client/requests/ListEmployeesRequest.ts
@@ -6,7 +6,12 @@ import * as Square from "../../../../index";
/**
* @example
- * {}
+ * {
+ * locationId: "location_id",
+ * status: "ACTIVE",
+ * limit: 1,
+ * cursor: "cursor"
+ * }
*/
export interface ListEmployeesRequest {
/**
diff --git a/src/api/resources/events/client/Client.ts b/src/api/resources/events/client/Client.ts
index 22aabb86c..11aeda797 100644
--- a/src/api/resources/events/client/Client.ts
+++ b/src/api/resources/events/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Events {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Events {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -75,7 +75,7 @@ export class Events {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -158,7 +158,7 @@ export class Events {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -231,7 +231,7 @@ export class Events {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -284,7 +284,9 @@ export class Events {
* @param {Events.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.events.listEventTypes()
+ * await client.events.listEventTypes({
+ * apiVersion: "api_version"
+ * })
*/
public listEventTypes(
request: Square.ListEventTypesRequest = {},
@@ -315,7 +317,7 @@ export class Events {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/events/client/requests/ListEventTypesRequest.ts b/src/api/resources/events/client/requests/ListEventTypesRequest.ts
index 58176164e..dacf1b022 100644
--- a/src/api/resources/events/client/requests/ListEventTypesRequest.ts
+++ b/src/api/resources/events/client/requests/ListEventTypesRequest.ts
@@ -4,7 +4,9 @@
/**
* @example
- * {}
+ * {
+ * apiVersion: "api_version"
+ * }
*/
export interface ListEventTypesRequest {
/**
diff --git a/src/api/resources/giftCards/client/Client.ts b/src/api/resources/giftCards/client/Client.ts
index 4e9e20593..4276c4951 100644
--- a/src/api/resources/giftCards/client/Client.ts
+++ b/src/api/resources/giftCards/client/Client.ts
@@ -17,7 +17,7 @@ export declare namespace GiftCards {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -31,7 +31,7 @@ export declare namespace GiftCards {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -57,7 +57,13 @@ export class GiftCards {
* @param {GiftCards.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.giftCards.list()
+ * await client.giftCards.list({
+ * type: "type",
+ * state: "state",
+ * limit: 1,
+ * cursor: "cursor",
+ * customerId: "customer_id"
+ * })
*/
public async list(
request: Square.ListGiftCardsRequest = {},
@@ -96,7 +102,7 @@ export class GiftCards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -197,7 +203,7 @@ export class GiftCards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -283,7 +289,7 @@ export class GiftCards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -369,7 +375,7 @@ export class GiftCards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -457,7 +463,7 @@ export class GiftCards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -547,7 +553,7 @@ export class GiftCards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -636,7 +642,7 @@ export class GiftCards {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/giftCards/client/requests/ListGiftCardsRequest.ts b/src/api/resources/giftCards/client/requests/ListGiftCardsRequest.ts
index 2a4b28c88..6d23cec0d 100644
--- a/src/api/resources/giftCards/client/requests/ListGiftCardsRequest.ts
+++ b/src/api/resources/giftCards/client/requests/ListGiftCardsRequest.ts
@@ -4,7 +4,13 @@
/**
* @example
- * {}
+ * {
+ * type: "type",
+ * state: "state",
+ * limit: 1,
+ * cursor: "cursor",
+ * customerId: "customer_id"
+ * }
*/
export interface ListGiftCardsRequest {
/**
diff --git a/src/api/resources/giftCards/resources/activities/client/Client.ts b/src/api/resources/giftCards/resources/activities/client/Client.ts
index 0bd5bd348..d7ac9af25 100644
--- a/src/api/resources/giftCards/resources/activities/client/Client.ts
+++ b/src/api/resources/giftCards/resources/activities/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Activities {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Activities {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -53,7 +53,16 @@ export class Activities {
* @param {Activities.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.giftCards.activities.list()
+ * await client.giftCards.activities.list({
+ * giftCardId: "gift_card_id",
+ * type: "type",
+ * locationId: "location_id",
+ * beginTime: "begin_time",
+ * endTime: "end_time",
+ * limit: 1,
+ * cursor: "cursor",
+ * sortOrder: "sort_order"
+ * })
*/
public async list(
request: Square.giftCards.ListActivitiesRequest = {},
@@ -101,7 +110,7 @@ export class Activities {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -206,7 +215,7 @@ export class Activities {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/giftCards/resources/activities/client/requests/ListActivitiesRequest.ts b/src/api/resources/giftCards/resources/activities/client/requests/ListActivitiesRequest.ts
index ef91964a1..88a40604c 100644
--- a/src/api/resources/giftCards/resources/activities/client/requests/ListActivitiesRequest.ts
+++ b/src/api/resources/giftCards/resources/activities/client/requests/ListActivitiesRequest.ts
@@ -4,7 +4,16 @@
/**
* @example
- * {}
+ * {
+ * giftCardId: "gift_card_id",
+ * type: "type",
+ * locationId: "location_id",
+ * beginTime: "begin_time",
+ * endTime: "end_time",
+ * limit: 1,
+ * cursor: "cursor",
+ * sortOrder: "sort_order"
+ * }
*/
export interface ListActivitiesRequest {
/**
diff --git a/src/api/resources/index.ts b/src/api/resources/index.ts
index 23678d5af..84c19b91c 100644
--- a/src/api/resources/index.ts
+++ b/src/api/resources/index.ts
@@ -6,6 +6,7 @@ export * as bankAccounts from "./bankAccounts";
export * as bookings from "./bookings";
export * as cards from "./cards";
export * as catalog from "./catalog";
+export * as channels from "./channels";
export * as customers from "./customers";
export * as devices from "./devices";
export * as disputes from "./disputes";
@@ -29,6 +30,7 @@ export * as subscriptions from "./subscriptions";
export * as teamMembers from "./teamMembers";
export * as team from "./team";
export * as terminal from "./terminal";
+export * as transferOrders from "./transferOrders";
export * as vendors from "./vendors";
export * as cashDrawers from "./cashDrawers";
export * as webhooks from "./webhooks";
@@ -40,6 +42,7 @@ export * from "./bankAccounts/client/requests";
export * from "./bookings/client/requests";
export * from "./cards/client/requests";
export * from "./catalog/client/requests";
+export * from "./channels/client/requests";
export * from "./customers/client/requests";
export * from "./devices/client/requests";
export * from "./disputes/client/requests";
@@ -62,4 +65,5 @@ export * from "./subscriptions/client/requests";
export * from "./teamMembers/client/requests";
export * from "./team/client/requests";
export * from "./terminal/client/requests";
+export * from "./transferOrders/client/requests";
export * from "./vendors/client/requests";
diff --git a/src/api/resources/inventory/client/Client.ts b/src/api/resources/inventory/client/Client.ts
index 7f471db53..6acb85846 100644
--- a/src/api/resources/inventory/client/Client.ts
+++ b/src/api/resources/inventory/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Inventory {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Inventory {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -79,7 +79,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -163,7 +163,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -259,7 +259,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -328,81 +328,90 @@ export class Inventory {
* updatedBefore: "2016-12-01T00:00:00.000Z"
* })
*/
- public deprecatedBatchGetChanges(
+ public async deprecatedBatchGetChanges(
request: Square.BatchRetrieveInventoryChangesRequest,
requestOptions?: Inventory.RequestOptions,
- ): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__deprecatedBatchGetChanges(request, requestOptions));
- }
-
- private async __deprecatedBatchGetChanges(
- request: Square.BatchRetrieveInventoryChangesRequest,
- requestOptions?: Inventory.RequestOptions,
- ): Promise> {
- 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/batch-retrieve-changes",
- ),
- method: "POST",
- headers: mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({
- Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
- }),
- requestOptions?.headers,
- ),
- contentType: "application/json",
- requestType: "json",
- body: serializers.BatchRetrieveInventoryChangesRequest.jsonOrThrow(request, {
- unrecognizedObjectKeys: "strip",
- omitUndefined: true,
- }),
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
- maxRetries: requestOptions?.maxRetries,
- abortSignal: requestOptions?.abortSignal,
- });
- if (_response.ok) {
- return {
- data: serializers.BatchGetInventoryChangesResponse.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,
- });
- }
-
- switch (_response.error.reason) {
- case "non-json":
- throw new errors.SquareError({
- statusCode: _response.error.statusCode,
- body: _response.error.rawBody,
- rawResponse: _response.rawResponse,
- });
- case "timeout":
- throw new errors.SquareTimeoutError(
- "Timeout exceeded when calling POST /v2/inventory/batch-retrieve-changes.",
- );
- case "unknown":
- throw new errors.SquareError({
- message: _response.error.errorMessage,
- rawResponse: _response.rawResponse,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: Square.BatchRetrieveInventoryChangesRequest,
+ ): Promise> => {
+ 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/batch-retrieve-changes",
+ ),
+ method: "POST",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ contentType: "application/json",
+ requestType: "json",
+ body: serializers.BatchRetrieveInventoryChangesRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ }),
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
});
- }
+ if (_response.ok) {
+ return {
+ data: serializers.BatchGetInventoryChangesResponse.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,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError(
+ "Timeout exceeded when calling POST /v2/inventory/batch-retrieve-changes.",
+ );
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ },
+ );
+ const dataWithRawResponse = await list(request).withRawResponse();
+ return new core.Pageable({
+ response: dataWithRawResponse.data,
+ rawResponse: dataWithRawResponse.rawResponse,
+ hasNextPage: (response) =>
+ response?.cursor != null && !(typeof response?.cursor === "string" && response?.cursor === ""),
+ getItems: (response) => response?.changes ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "cursor", response?.cursor));
+ },
+ });
}
/**
@@ -419,81 +428,90 @@ export class Inventory {
* updatedAfter: "2016-11-16T00:00:00.000Z"
* })
*/
- public deprecatedBatchGetCounts(
+ public async deprecatedBatchGetCounts(
request: Square.BatchGetInventoryCountsRequest,
requestOptions?: Inventory.RequestOptions,
- ): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__deprecatedBatchGetCounts(request, requestOptions));
- }
-
- private async __deprecatedBatchGetCounts(
- request: Square.BatchGetInventoryCountsRequest,
- requestOptions?: Inventory.RequestOptions,
- ): Promise> {
- 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/batch-retrieve-counts",
- ),
- method: "POST",
- headers: mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({
- Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
- }),
- requestOptions?.headers,
- ),
- contentType: "application/json",
- requestType: "json",
- body: serializers.BatchGetInventoryCountsRequest.jsonOrThrow(request, {
- unrecognizedObjectKeys: "strip",
- omitUndefined: true,
- }),
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
- maxRetries: requestOptions?.maxRetries,
- abortSignal: requestOptions?.abortSignal,
- });
- if (_response.ok) {
- return {
- data: serializers.BatchGetInventoryCountsResponse.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,
- });
- }
-
- switch (_response.error.reason) {
- case "non-json":
- throw new errors.SquareError({
- statusCode: _response.error.statusCode,
- body: _response.error.rawBody,
- rawResponse: _response.rawResponse,
- });
- case "timeout":
- throw new errors.SquareTimeoutError(
- "Timeout exceeded when calling POST /v2/inventory/batch-retrieve-counts.",
- );
- case "unknown":
- throw new errors.SquareError({
- message: _response.error.errorMessage,
- rawResponse: _response.rawResponse,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: Square.BatchGetInventoryCountsRequest,
+ ): Promise> => {
+ 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/batch-retrieve-counts",
+ ),
+ method: "POST",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ contentType: "application/json",
+ requestType: "json",
+ body: serializers.BatchGetInventoryCountsRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ }),
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
});
- }
+ if (_response.ok) {
+ return {
+ data: serializers.BatchGetInventoryCountsResponse.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,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError(
+ "Timeout exceeded when calling POST /v2/inventory/batch-retrieve-counts.",
+ );
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ },
+ );
+ const dataWithRawResponse = await list(request).withRawResponse();
+ return new core.Pageable({
+ response: dataWithRawResponse.data,
+ rawResponse: dataWithRawResponse.rawResponse,
+ hasNextPage: (response) =>
+ response?.cursor != null && !(typeof response?.cursor === "string" && response?.cursor === ""),
+ getItems: (response) => response?.counts ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "cursor", response?.cursor));
+ },
+ });
}
/**
@@ -547,7 +565,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -644,7 +662,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -753,7 +771,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -855,7 +873,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -939,7 +957,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -1023,7 +1041,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -1082,7 +1100,9 @@ export class Inventory {
*
* @example
* await client.inventory.get({
- * catalogObjectId: "catalog_object_id"
+ * catalogObjectId: "catalog_object_id",
+ * locationIds: "location_ids",
+ * cursor: "cursor"
* })
*/
public async get(
@@ -1113,7 +1133,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -1194,7 +1214,9 @@ export class Inventory {
*
* @example
* await client.inventory.changes({
- * catalogObjectId: "catalog_object_id"
+ * catalogObjectId: "catalog_object_id",
+ * locationIds: "location_ids",
+ * cursor: "cursor"
* })
*/
public async changes(
@@ -1225,7 +1247,7 @@ export class Inventory {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/inventory/client/requests/ChangesInventoryRequest.ts b/src/api/resources/inventory/client/requests/ChangesInventoryRequest.ts
index 0ecaff2d6..4be1ccbc5 100644
--- a/src/api/resources/inventory/client/requests/ChangesInventoryRequest.ts
+++ b/src/api/resources/inventory/client/requests/ChangesInventoryRequest.ts
@@ -5,7 +5,9 @@
/**
* @example
* {
- * catalogObjectId: "catalog_object_id"
+ * catalogObjectId: "catalog_object_id",
+ * locationIds: "location_ids",
+ * cursor: "cursor"
* }
*/
export interface ChangesInventoryRequest {
diff --git a/src/api/resources/inventory/client/requests/GetInventoryRequest.ts b/src/api/resources/inventory/client/requests/GetInventoryRequest.ts
index 7d4dab332..c4cb90342 100644
--- a/src/api/resources/inventory/client/requests/GetInventoryRequest.ts
+++ b/src/api/resources/inventory/client/requests/GetInventoryRequest.ts
@@ -5,7 +5,9 @@
/**
* @example
* {
- * catalogObjectId: "catalog_object_id"
+ * catalogObjectId: "catalog_object_id",
+ * locationIds: "location_ids",
+ * cursor: "cursor"
* }
*/
export interface GetInventoryRequest {
diff --git a/src/api/resources/invoices/client/Client.ts b/src/api/resources/invoices/client/Client.ts
index 5f93306c5..4dbad3bf3 100644
--- a/src/api/resources/invoices/client/Client.ts
+++ b/src/api/resources/invoices/client/Client.ts
@@ -17,7 +17,7 @@ export declare namespace Invoices {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -31,7 +31,7 @@ export declare namespace Invoices {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -54,7 +54,9 @@ export class Invoices {
*
* @example
* await client.invoices.list({
- * locationId: "location_id"
+ * locationId: "location_id",
+ * cursor: "cursor",
+ * limit: 1
* })
*/
public async list(
@@ -84,7 +86,7 @@ export class Invoices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -221,7 +223,7 @@ export class Invoices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -300,79 +302,88 @@ export class Invoices {
* limit: 100
* })
*/
- public search(
+ public async search(
request: Square.SearchInvoicesRequest,
requestOptions?: Invoices.RequestOptions,
- ): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
- }
-
- private async __search(
- request: Square.SearchInvoicesRequest,
- requestOptions?: Invoices.RequestOptions,
- ): Promise> {
- 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/invoices/search",
- ),
- method: "POST",
- headers: mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({
- Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
- }),
- requestOptions?.headers,
- ),
- contentType: "application/json",
- requestType: "json",
- body: serializers.SearchInvoicesRequest.jsonOrThrow(request, {
- unrecognizedObjectKeys: "strip",
- omitUndefined: true,
- }),
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
- maxRetries: requestOptions?.maxRetries,
- abortSignal: requestOptions?.abortSignal,
- });
- if (_response.ok) {
- return {
- data: serializers.SearchInvoicesResponse.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,
- });
- }
-
- switch (_response.error.reason) {
- case "non-json":
- throw new errors.SquareError({
- statusCode: _response.error.statusCode,
- body: _response.error.rawBody,
- rawResponse: _response.rawResponse,
- });
- case "timeout":
- throw new errors.SquareTimeoutError("Timeout exceeded when calling POST /v2/invoices/search.");
- case "unknown":
- throw new errors.SquareError({
- message: _response.error.errorMessage,
- rawResponse: _response.rawResponse,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: Square.SearchInvoicesRequest,
+ ): Promise> => {
+ 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/invoices/search",
+ ),
+ method: "POST",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ contentType: "application/json",
+ requestType: "json",
+ body: serializers.SearchInvoicesRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ }),
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
});
- }
+ if (_response.ok) {
+ return {
+ data: serializers.SearchInvoicesResponse.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,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError("Timeout exceeded when calling POST /v2/invoices/search.");
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ },
+ );
+ const dataWithRawResponse = await list(request).withRawResponse();
+ return new core.Pageable({
+ response: dataWithRawResponse.data,
+ rawResponse: dataWithRawResponse.rawResponse,
+ hasNextPage: (response) =>
+ response?.cursor != null && !(typeof response?.cursor === "string" && response?.cursor === ""),
+ getItems: (response) => response?.invoices ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "cursor", response?.cursor));
+ },
+ });
}
/**
@@ -410,7 +421,7 @@ export class Invoices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -502,7 +513,7 @@ export class Invoices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -564,7 +575,8 @@ export class Invoices {
*
* @example
* await client.invoices.delete({
- * invoiceId: "invoice_id"
+ * invoiceId: "invoice_id",
+ * version: 1
* })
*/
public delete(
@@ -596,7 +608,7 @@ export class Invoices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -702,7 +714,7 @@ export class Invoices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
..._maybeEncodedRequest.headers,
}),
requestOptions?.headers,
@@ -791,7 +803,7 @@ export class Invoices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -878,7 +890,7 @@ export class Invoices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -982,7 +994,7 @@ export class Invoices {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/invoices/client/requests/DeleteInvoicesRequest.ts b/src/api/resources/invoices/client/requests/DeleteInvoicesRequest.ts
index 2cf9546a6..97e237452 100644
--- a/src/api/resources/invoices/client/requests/DeleteInvoicesRequest.ts
+++ b/src/api/resources/invoices/client/requests/DeleteInvoicesRequest.ts
@@ -5,7 +5,8 @@
/**
* @example
* {
- * invoiceId: "invoice_id"
+ * invoiceId: "invoice_id",
+ * version: 1
* }
*/
export interface DeleteInvoicesRequest {
diff --git a/src/api/resources/invoices/client/requests/ListInvoicesRequest.ts b/src/api/resources/invoices/client/requests/ListInvoicesRequest.ts
index d38f8f30a..501cde386 100644
--- a/src/api/resources/invoices/client/requests/ListInvoicesRequest.ts
+++ b/src/api/resources/invoices/client/requests/ListInvoicesRequest.ts
@@ -5,7 +5,9 @@
/**
* @example
* {
- * locationId: "location_id"
+ * locationId: "location_id",
+ * cursor: "cursor",
+ * limit: 1
* }
*/
export interface ListInvoicesRequest {
diff --git a/src/api/resources/labor/client/Client.ts b/src/api/resources/labor/client/Client.ts
index cb58539c6..c30f736c2 100644
--- a/src/api/resources/labor/client/Client.ts
+++ b/src/api/resources/labor/client/Client.ts
@@ -21,7 +21,7 @@ export declare namespace Labor {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -35,7 +35,7 @@ export declare namespace Labor {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -125,7 +125,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -219,7 +219,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -318,7 +318,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -407,7 +407,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -511,7 +511,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -604,7 +604,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -735,7 +735,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -846,7 +846,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -933,7 +933,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -1049,7 +1049,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -1136,7 +1136,7 @@ export class Labor {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/labor/resources/breakTypes/client/Client.ts b/src/api/resources/labor/resources/breakTypes/client/Client.ts
index b67c613d7..40c6efed1 100644
--- a/src/api/resources/labor/resources/breakTypes/client/Client.ts
+++ b/src/api/resources/labor/resources/breakTypes/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace BreakTypes {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace BreakTypes {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,11 @@ export class BreakTypes {
* @param {BreakTypes.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.labor.breakTypes.list()
+ * await client.labor.breakTypes.list({
+ * locationId: "location_id",
+ * limit: 1,
+ * cursor: "cursor"
+ * })
*/
public async list(
request: Square.labor.ListBreakTypesRequest = {},
@@ -83,7 +87,7 @@ export class BreakTypes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -195,7 +199,7 @@ export class BreakTypes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -282,7 +286,7 @@ export class BreakTypes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -370,7 +374,7 @@ export class BreakTypes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -459,7 +463,7 @@ export class BreakTypes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/labor/resources/breakTypes/client/requests/ListBreakTypesRequest.ts b/src/api/resources/labor/resources/breakTypes/client/requests/ListBreakTypesRequest.ts
index 8786dd752..f8d653dfc 100644
--- a/src/api/resources/labor/resources/breakTypes/client/requests/ListBreakTypesRequest.ts
+++ b/src/api/resources/labor/resources/breakTypes/client/requests/ListBreakTypesRequest.ts
@@ -4,7 +4,11 @@
/**
* @example
- * {}
+ * {
+ * locationId: "location_id",
+ * limit: 1,
+ * cursor: "cursor"
+ * }
*/
export interface ListBreakTypesRequest {
/**
diff --git a/src/api/resources/labor/resources/employeeWages/client/Client.ts b/src/api/resources/labor/resources/employeeWages/client/Client.ts
index edd3ca44c..9335b4cf0 100644
--- a/src/api/resources/labor/resources/employeeWages/client/Client.ts
+++ b/src/api/resources/labor/resources/employeeWages/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace EmployeeWages {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace EmployeeWages {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,11 @@ export class EmployeeWages {
* @param {EmployeeWages.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.labor.employeeWages.list()
+ * await client.labor.employeeWages.list({
+ * employeeId: "employee_id",
+ * limit: 1,
+ * cursor: "cursor"
+ * })
*/
public async list(
request: Square.labor.ListEmployeeWagesRequest = {},
@@ -83,7 +87,7 @@ export class EmployeeWages {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -179,7 +183,7 @@ export class EmployeeWages {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/labor/resources/employeeWages/client/requests/ListEmployeeWagesRequest.ts b/src/api/resources/labor/resources/employeeWages/client/requests/ListEmployeeWagesRequest.ts
index cf1e2232d..24a7da1d0 100644
--- a/src/api/resources/labor/resources/employeeWages/client/requests/ListEmployeeWagesRequest.ts
+++ b/src/api/resources/labor/resources/employeeWages/client/requests/ListEmployeeWagesRequest.ts
@@ -4,7 +4,11 @@
/**
* @example
- * {}
+ * {
+ * employeeId: "employee_id",
+ * limit: 1,
+ * cursor: "cursor"
+ * }
*/
export interface ListEmployeeWagesRequest {
/**
diff --git a/src/api/resources/labor/resources/shifts/client/Client.ts b/src/api/resources/labor/resources/shifts/client/Client.ts
index a413facbc..456024d83 100644
--- a/src/api/resources/labor/resources/shifts/client/Client.ts
+++ b/src/api/resources/labor/resources/shifts/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Shifts {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Shifts {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -120,7 +120,7 @@ export class Shifts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -208,79 +208,90 @@ export class Shifts {
* limit: 100
* })
*/
- public search(
+ public async search(
request: Square.labor.SearchShiftsRequest = {},
requestOptions?: Shifts.RequestOptions,
- ): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__search(request, requestOptions));
- }
-
- private async __search(
- request: Square.labor.SearchShiftsRequest = {},
- requestOptions?: Shifts.RequestOptions,
- ): Promise> {
- 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/labor/shifts/search",
- ),
- method: "POST",
- headers: mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({
- Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
- }),
- requestOptions?.headers,
- ),
- contentType: "application/json",
- requestType: "json",
- body: serializers.labor.SearchShiftsRequest.jsonOrThrow(request, {
- unrecognizedObjectKeys: "strip",
- omitUndefined: true,
- }),
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
- maxRetries: requestOptions?.maxRetries,
- abortSignal: requestOptions?.abortSignal,
- });
- if (_response.ok) {
- return {
- data: serializers.SearchShiftsResponse.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,
- });
- }
-
- switch (_response.error.reason) {
- case "non-json":
- throw new errors.SquareError({
- statusCode: _response.error.statusCode,
- body: _response.error.rawBody,
- rawResponse: _response.rawResponse,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: Square.labor.SearchShiftsRequest,
+ ): Promise> => {
+ 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/labor/shifts/search",
+ ),
+ method: "POST",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ contentType: "application/json",
+ requestType: "json",
+ body: serializers.labor.SearchShiftsRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ }),
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
});
- case "timeout":
- throw new errors.SquareTimeoutError("Timeout exceeded when calling POST /v2/labor/shifts/search.");
- case "unknown":
- throw new errors.SquareError({
- message: _response.error.errorMessage,
- rawResponse: _response.rawResponse,
- });
- }
+ if (_response.ok) {
+ return {
+ data: serializers.SearchShiftsResponse.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,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError(
+ "Timeout exceeded when calling POST /v2/labor/shifts/search.",
+ );
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ },
+ );
+ const dataWithRawResponse = await list(request).withRawResponse();
+ return new core.Pageable({
+ response: dataWithRawResponse.data,
+ rawResponse: dataWithRawResponse.rawResponse,
+ hasNextPage: (response) =>
+ response?.cursor != null && !(typeof response?.cursor === "string" && response?.cursor === ""),
+ getItems: (response) => response?.shifts ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "cursor", response?.cursor));
+ },
+ });
}
/**
@@ -318,7 +329,7 @@ export class Shifts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -433,7 +444,7 @@ export class Shifts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -520,7 +531,7 @@ export class Shifts {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/labor/resources/teamMemberWages/client/Client.ts b/src/api/resources/labor/resources/teamMemberWages/client/Client.ts
index 6d1a5c8a1..7d903d3c5 100644
--- a/src/api/resources/labor/resources/teamMemberWages/client/Client.ts
+++ b/src/api/resources/labor/resources/teamMemberWages/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace TeamMemberWages {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace TeamMemberWages {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,11 @@ export class TeamMemberWages {
* @param {TeamMemberWages.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.labor.teamMemberWages.list()
+ * await client.labor.teamMemberWages.list({
+ * teamMemberId: "team_member_id",
+ * limit: 1,
+ * cursor: "cursor"
+ * })
*/
public async list(
request: Square.labor.ListTeamMemberWagesRequest = {},
@@ -83,7 +87,7 @@ export class TeamMemberWages {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -179,7 +183,7 @@ export class TeamMemberWages {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/labor/resources/teamMemberWages/client/requests/ListTeamMemberWagesRequest.ts b/src/api/resources/labor/resources/teamMemberWages/client/requests/ListTeamMemberWagesRequest.ts
index df32649b6..4bdcfeb7a 100644
--- a/src/api/resources/labor/resources/teamMemberWages/client/requests/ListTeamMemberWagesRequest.ts
+++ b/src/api/resources/labor/resources/teamMemberWages/client/requests/ListTeamMemberWagesRequest.ts
@@ -4,7 +4,11 @@
/**
* @example
- * {}
+ * {
+ * teamMemberId: "team_member_id",
+ * limit: 1,
+ * cursor: "cursor"
+ * }
*/
export interface ListTeamMemberWagesRequest {
/**
diff --git a/src/api/resources/labor/resources/workweekConfigs/client/Client.ts b/src/api/resources/labor/resources/workweekConfigs/client/Client.ts
index c6b4a3f98..deab7baab 100644
--- a/src/api/resources/labor/resources/workweekConfigs/client/Client.ts
+++ b/src/api/resources/labor/resources/workweekConfigs/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace WorkweekConfigs {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace WorkweekConfigs {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -50,7 +50,10 @@ export class WorkweekConfigs {
* @param {WorkweekConfigs.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.labor.workweekConfigs.list()
+ * await client.labor.workweekConfigs.list({
+ * limit: 1,
+ * cursor: "cursor"
+ * })
*/
public async list(
request: Square.labor.ListWorkweekConfigsRequest = {},
@@ -80,7 +83,7 @@ export class WorkweekConfigs {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -181,7 +184,7 @@ export class WorkweekConfigs {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/labor/resources/workweekConfigs/client/requests/ListWorkweekConfigsRequest.ts b/src/api/resources/labor/resources/workweekConfigs/client/requests/ListWorkweekConfigsRequest.ts
index 606f88dfa..2f8a70af2 100644
--- a/src/api/resources/labor/resources/workweekConfigs/client/requests/ListWorkweekConfigsRequest.ts
+++ b/src/api/resources/labor/resources/workweekConfigs/client/requests/ListWorkweekConfigsRequest.ts
@@ -4,7 +4,10 @@
/**
* @example
- * {}
+ * {
+ * limit: 1,
+ * cursor: "cursor"
+ * }
*/
export interface ListWorkweekConfigsRequest {
/**
diff --git a/src/api/resources/locations/client/Client.ts b/src/api/resources/locations/client/Client.ts
index 18fa9a7e1..77b9640d7 100644
--- a/src/api/resources/locations/client/Client.ts
+++ b/src/api/resources/locations/client/Client.ts
@@ -19,7 +19,7 @@ export declare namespace Locations {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -33,7 +33,7 @@ export declare namespace Locations {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -89,7 +89,7 @@ export class Locations {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -184,7 +184,7 @@ export class Locations {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -272,7 +272,7 @@ export class Locations {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -371,7 +371,7 @@ export class Locations {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -538,7 +538,7 @@ export class Locations {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts
index d5e85b31f..dfb270ca4 100644
--- a/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts
+++ b/src/api/resources/locations/resources/customAttributeDefinitions/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace CustomAttributeDefinitions {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace CustomAttributeDefinitions {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -53,7 +53,11 @@ export class CustomAttributeDefinitions {
* @param {CustomAttributeDefinitions.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
- * await client.locations.customAttributeDefinitions.list()
+ * await client.locations.customAttributeDefinitions.list({
+ * visibilityFilter: "ALL",
+ * limit: 1,
+ * cursor: "cursor"
+ * })
*/
public async list(
request: Square.locations.ListCustomAttributeDefinitionsRequest = {},
@@ -89,7 +93,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -201,7 +205,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -265,7 +269,8 @@ export class CustomAttributeDefinitions {
*
* @example
* await client.locations.customAttributeDefinitions.get({
- * key: "key"
+ * key: "key",
+ * version: 1
* })
*/
public get(
@@ -297,7 +302,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -388,7 +393,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -480,7 +485,7 @@ export class CustomAttributeDefinitions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/locations/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts b/src/api/resources/locations/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts
index 9b086bfb6..e4c05d712 100644
--- a/src/api/resources/locations/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts
+++ b/src/api/resources/locations/resources/customAttributeDefinitions/client/requests/GetCustomAttributeDefinitionsRequest.ts
@@ -5,7 +5,8 @@
/**
* @example
* {
- * key: "key"
+ * key: "key",
+ * version: 1
* }
*/
export interface GetCustomAttributeDefinitionsRequest {
diff --git a/src/api/resources/locations/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts b/src/api/resources/locations/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts
index 313ea4854..4818482a3 100644
--- a/src/api/resources/locations/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts
+++ b/src/api/resources/locations/resources/customAttributeDefinitions/client/requests/ListCustomAttributeDefinitionsRequest.ts
@@ -6,7 +6,11 @@ import * as Square from "../../../../../../index";
/**
* @example
- * {}
+ * {
+ * visibilityFilter: "ALL",
+ * limit: 1,
+ * cursor: "cursor"
+ * }
*/
export interface ListCustomAttributeDefinitionsRequest {
/**
diff --git a/src/api/resources/locations/resources/customAttributes/client/Client.ts b/src/api/resources/locations/resources/customAttributes/client/Client.ts
index 881484463..9ce72fa20 100644
--- a/src/api/resources/locations/resources/customAttributes/client/Client.ts
+++ b/src/api/resources/locations/resources/customAttributes/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace CustomAttributes {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace CustomAttributes {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -89,7 +89,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -208,7 +208,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -275,7 +275,11 @@ export class CustomAttributes {
*
* @example
* await client.locations.customAttributes.list({
- * locationId: "location_id"
+ * locationId: "location_id",
+ * visibilityFilter: "ALL",
+ * limit: 1,
+ * cursor: "cursor",
+ * withDefinitions: true
* })
*/
public async list(
@@ -315,7 +319,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -389,7 +393,9 @@ export class CustomAttributes {
* @example
* await client.locations.customAttributes.get({
* locationId: "location_id",
- * key: "key"
+ * key: "key",
+ * withDefinition: true,
+ * version: 1
* })
*/
public get(
@@ -425,7 +431,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -518,7 +524,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -610,7 +616,7 @@ export class CustomAttributes {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/locations/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts b/src/api/resources/locations/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts
index da1c7c505..7ca5414a6 100644
--- a/src/api/resources/locations/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts
+++ b/src/api/resources/locations/resources/customAttributes/client/requests/GetCustomAttributesRequest.ts
@@ -6,7 +6,9 @@
* @example
* {
* locationId: "location_id",
- * key: "key"
+ * key: "key",
+ * withDefinition: true,
+ * version: 1
* }
*/
export interface GetCustomAttributesRequest {
diff --git a/src/api/resources/locations/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts b/src/api/resources/locations/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts
index f573b8c2e..a7f35f860 100644
--- a/src/api/resources/locations/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts
+++ b/src/api/resources/locations/resources/customAttributes/client/requests/ListCustomAttributesRequest.ts
@@ -7,7 +7,11 @@ import * as Square from "../../../../../../index";
/**
* @example
* {
- * locationId: "location_id"
+ * locationId: "location_id",
+ * visibilityFilter: "ALL",
+ * limit: 1,
+ * cursor: "cursor",
+ * withDefinitions: true
* }
*/
export interface ListCustomAttributesRequest {
diff --git a/src/api/resources/locations/resources/transactions/client/Client.ts b/src/api/resources/locations/resources/transactions/client/Client.ts
index 9611fb25c..6fbea9efd 100644
--- a/src/api/resources/locations/resources/transactions/client/Client.ts
+++ b/src/api/resources/locations/resources/transactions/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Transactions {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Transactions {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -56,7 +56,11 @@ export class Transactions {
*
* @example
* await client.locations.transactions.list({
- * locationId: "location_id"
+ * locationId: "location_id",
+ * beginTime: "begin_time",
+ * endTime: "end_time",
+ * sortOrder: "DESC",
+ * cursor: "cursor"
* })
*/
public list(
@@ -103,7 +107,7 @@ export class Transactions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -188,7 +192,7 @@ export class Transactions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -277,7 +281,7 @@ export class Transactions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
@@ -366,7 +370,7 @@ export class Transactions {
this._options?.headers,
mergeOnlyDefinedHeaders({
Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
}),
requestOptions?.headers,
),
diff --git a/src/api/resources/locations/resources/transactions/client/requests/ListTransactionsRequest.ts b/src/api/resources/locations/resources/transactions/client/requests/ListTransactionsRequest.ts
index db18e708a..9a850cf0b 100644
--- a/src/api/resources/locations/resources/transactions/client/requests/ListTransactionsRequest.ts
+++ b/src/api/resources/locations/resources/transactions/client/requests/ListTransactionsRequest.ts
@@ -7,7 +7,11 @@ import * as Square from "../../../../../../index";
/**
* @example
* {
- * locationId: "location_id"
+ * locationId: "location_id",
+ * beginTime: "begin_time",
+ * endTime: "end_time",
+ * sortOrder: "DESC",
+ * cursor: "cursor"
* }
*/
export interface ListTransactionsRequest {
diff --git a/src/api/resources/loyalty/client/Client.ts b/src/api/resources/loyalty/client/Client.ts
index b586afbe2..bb9c2d64c 100644
--- a/src/api/resources/loyalty/client/Client.ts
+++ b/src/api/resources/loyalty/client/Client.ts
@@ -19,7 +19,7 @@ export declare namespace Loyalty {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -33,7 +33,7 @@ export declare namespace Loyalty {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record | undefined>;
}
@@ -86,79 +86,90 @@ export class Loyalty {
* limit: 30
* })
*/
- public searchEvents(
+ public async searchEvents(
request: Square.SearchLoyaltyEventsRequest = {},
requestOptions?: Loyalty.RequestOptions,
- ): core.HttpResponsePromise {
- return core.HttpResponsePromise.fromPromise(this.__searchEvents(request, requestOptions));
- }
-
- private async __searchEvents(
- request: Square.SearchLoyaltyEventsRequest = {},
- requestOptions?: Loyalty.RequestOptions,
- ): Promise> {
- 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/loyalty/events/search",
- ),
- method: "POST",
- headers: mergeHeaders(
- this._options?.headers,
- mergeOnlyDefinedHeaders({
- Authorization: await this._getAuthorizationHeader(),
- "Square-Version": requestOptions?.version ?? "2025-09-24",
- }),
- requestOptions?.headers,
- ),
- contentType: "application/json",
- requestType: "json",
- body: serializers.SearchLoyaltyEventsRequest.jsonOrThrow(request, {
- unrecognizedObjectKeys: "strip",
- omitUndefined: true,
- }),
- timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
- maxRetries: requestOptions?.maxRetries,
- abortSignal: requestOptions?.abortSignal,
- });
- if (_response.ok) {
- return {
- data: serializers.SearchLoyaltyEventsResponse.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,
- });
- }
-
- switch (_response.error.reason) {
- case "non-json":
- throw new errors.SquareError({
- statusCode: _response.error.statusCode,
- body: _response.error.rawBody,
- rawResponse: _response.rawResponse,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: Square.SearchLoyaltyEventsRequest,
+ ): Promise> => {
+ 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/loyalty/events/search",
+ ),
+ method: "POST",
+ headers: mergeHeaders(
+ this._options?.headers,
+ mergeOnlyDefinedHeaders({
+ Authorization: await this._getAuthorizationHeader(),
+ "Square-Version": requestOptions?.version ?? "2025-10-16",
+ }),
+ requestOptions?.headers,
+ ),
+ contentType: "application/json",
+ requestType: "json",
+ body: serializers.SearchLoyaltyEventsRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "strip",
+ omitUndefined: true,
+ }),
+ timeoutMs:
+ requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
+ maxRetries: requestOptions?.maxRetries,
+ abortSignal: requestOptions?.abortSignal,
});
- case "timeout":
- throw new errors.SquareTimeoutError("Timeout exceeded when calling POST /v2/loyalty/events/search.");
- case "unknown":
- throw new errors.SquareError({
- message: _response.error.errorMessage,
- rawResponse: _response.rawResponse,
- });
- }
+ if (_response.ok) {
+ return {
+ data: serializers.SearchLoyaltyEventsResponse.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,
+ });
+ }
+ switch (_response.error.reason) {
+ case "non-json":
+ throw new errors.SquareError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.rawBody,
+ rawResponse: _response.rawResponse,
+ });
+ case "timeout":
+ throw new errors.SquareTimeoutError(
+ "Timeout exceeded when calling POST /v2/loyalty/events/search.",
+ );
+ case "unknown":
+ throw new errors.SquareError({
+ message: _response.error.errorMessage,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ },
+ );
+ const dataWithRawResponse = await list(request).withRawResponse();
+ return new core.Pageable({
+ response: dataWithRawResponse.data,
+ rawResponse: dataWithRawResponse.rawResponse,
+ hasNextPage: (response) =>
+ response?.cursor != null && !(typeof response?.cursor === "string" && response?.cursor === ""),
+ getItems: (response) => response?.events ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "cursor", response?.cursor));
+ },
+ });
}
protected async _getAuthorizationHeader(): Promise {
diff --git a/src/api/resources/loyalty/resources/accounts/client/Client.ts b/src/api/resources/loyalty/resources/accounts/client/Client.ts
index e0358a93e..fba88e90e 100644
--- a/src/api/resources/loyalty/resources/accounts/client/Client.ts
+++ b/src/api/resources/loyalty/resources/accounts/client/Client.ts
@@ -16,7 +16,7 @@ export declare namespace Accounts {
baseUrl?: core.Supplier;
token?: core.Supplier;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in requests. */
headers?: Record | undefined>;
fetcher?: core.FetchFunction;
@@ -30,7 +30,7 @@ export declare namespace Accounts {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Square-Version header */
- version?: "2025-09-24";
+ version?: "2025-10-16";
/** Additional headers to include in the request. */
headers?: Record