Skip to content

Commit ce8f8fd

Browse files
author
Wolfgang Schuster
authored
Merge pull request #96 from square/release/19.1.0
Generated PR for Release: 19.1.0
2 parents 47069bf + f17f32d commit ce8f8fd

File tree

98 files changed

+470
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+470
-240
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
strategy:
2121
matrix:
22-
node-version: [10.x, 12.x, 14.x]
22+
node-version: [14.x, 16.x, 18.x]
2323
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2424

2525
steps:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,4 @@ npm test
170170
[Cards]: doc/api/cards.md
171171
[Payouts]: doc/api/payouts.md
172172
[Gift Cards]: doc/api/gift-cards.md
173-
[Gift Card Activities]: doc/api/gift-card-activities.md
173+
[Gift Card Activities]: doc/api/gift-card-activities.md

doc/api/catalog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ async listCatalog(
471471
| Parameter | Type | Tags | Description |
472472
| --- | --- | --- | --- |
473473
| `cursor` | `string \| undefined` | Query, Optional | The pagination cursor returned in the previous response. Leave unset for an initial request.<br>The page size is currently set to be 100.<br>See [Pagination](https://developer.squareup.com/docs/basics/api101/pagination) for more information. |
474-
| `types` | `string \| undefined` | Query, Optional | An optional case-insensitive, comma-separated list of object types to retrieve.<br><br>The valid values are defined in the [CatalogObjectType](../../doc/models/catalog-object-type.md) enum, for example,<br>`ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,<br>`MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc.<br><br>If this is unspecified, the operation returns objects of all the top level types at the version<br>of the Square API used to make the request. Object types that are nested onto other object types<br>are not included in the defaults.<br><br>At the current API version the default object types are:<br>ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST, DINING_OPTION, TAX_EXEMPTION,<br>SERVICE_CHARGE, PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,<br>SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS. |
474+
| `types` | `string \| undefined` | Query, Optional | An optional case-insensitive, comma-separated list of object types to retrieve.<br><br>The valid values are defined in the [CatalogObjectType](../../doc/models/catalog-object-type.md) enum, for example,<br>`ITEM`, `ITEM_VARIATION`, `CATEGORY`, `DISCOUNT`, `TAX`,<br>`MODIFIER`, `MODIFIER_LIST`, `IMAGE`, etc.<br><br>If this is unspecified, the operation returns objects of all the top level types at the version<br>of the Square API used to make the request. Object types that are nested onto other object types<br>are not included in the defaults.<br><br>At the current API version the default object types are:<br>ITEM, CATEGORY, TAX, DISCOUNT, MODIFIER_LIST,<br>PRICING_RULE, PRODUCT_SET, TIME_PERIOD, MEASUREMENT_UNIT,<br>SUBSCRIPTION_PLAN, ITEM_OPTION, CUSTOM_ATTRIBUTE_DEFINITION, QUICK_AMOUNT_SETTINGS. |
475475
| `catalogVersion` | `bigint \| undefined` | Query, Optional | The specific version of the catalog objects to be included in the response.<br>This allows you to retrieve historical<br>versions of objects. The specified version value is matched against<br>the [CatalogObject](../../doc/models/catalog-object.md)s' `version` attribute. If not included, results will<br>be from the current version of the catalog. |
476476
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |
477477

doc/api/gift-cards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const giftCardsApi = client.giftCardsApi;
2222
# List Gift Cards
2323

2424
Lists all gift cards. You can specify optional filters to retrieve
25-
a subset of the gift cards.
25+
a subset of the gift cards. Results are sorted by `created_at` in ascending order.
2626

2727
```ts
2828
async listGiftCards(

doc/api/loyalty.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ try {
176176

177177
# Accumulate Loyalty Points
178178

179-
Adds points to a loyalty account.
179+
Adds points earned from the base loyalty program to a loyalty account.
180180

181181
- If you are using the Orders API to manage orders, you only provide the `order_id`.
182182
The endpoint reads the order to compute points to add to the buyer's account.
@@ -186,6 +186,8 @@ Adds points to a loyalty account.
186186
[CalculateLoyaltyPoints](../../doc/api/loyalty.md#calculate-loyalty-points) to compute the points
187187
that you provide to this endpoint.
188188

189+
This endpoint excludes additional points earned from loyalty promotions.
190+
189191
```ts
190192
async accumulateLoyaltyPoints(
191193
accountId: string,
@@ -433,7 +435,7 @@ try {
433435

434436
# Calculate Loyalty Points
435437

436-
Calculates the points a purchase earns.
438+
Calculates the points a purchase earns from the base loyalty program.
437439

438440
- If you are using the Orders API to manage orders, you provide the `order_id` in the request. The
439441
endpoint calculates the points by reading the order.

doc/api/terminal.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ const terminalApi = client.terminalApi;
2626

2727
# Create Terminal Action
2828

29-
Creates a Terminal action request and sends it to the specified device to take a payment
30-
for the requested amount.
29+
Creates a Terminal action request and sends it to the specified device.
3130

3231
```ts
3332
async createTerminalAction(

doc/client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The following parameters are configurable for the API Client:
55

66
| Parameter | Type | Description |
77
| --- | --- | --- |
8-
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2022-05-12'` |
8+
| `squareVersion` | `string` | Square Connect API versions<br>*Default*: `'2022-06-16'` |
99
| `customUrl` | `string` | Sets the base URL requests are made to. Defaults to `https://connect.squareup.com`<br>*Default*: `'https://connect.squareup.com'` |
1010
| `environment` | `string` | The API environment. <br> **Default: `production`** |
1111
| `additionalHeaders` | `Readonly<Record<string, string>>` | Additional headers to add to each API call<br>*Default*: `{}` |
@@ -40,7 +40,7 @@ The API client can be initialized as follows:
4040

4141
```ts
4242
const client = new Client({
43-
squareVersion: '2022-05-12',
43+
squareVersion: '2022-06-16',
4444
timeout: 60000,
4545
additionalHeaders: {},
4646
userAgentDetail: '',
@@ -56,7 +56,7 @@ import fs from 'fs';
5656
import { ApiError, Client, FileWrapper, LocationsApi } from 'square';
5757

5858
const client = new Client({
59-
squareVersion: '2022-05-12',
59+
squareVersion: '2022-06-16',
6060
timeout: 60000,
6161
additionalHeaders: {},
6262
userAgentDetail: '',

doc/models/appointment-segment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ Defines an appointment segment of a booking.
1212
| Name | Type | Tags | Description |
1313
| --- | --- | --- | --- |
1414
| `durationMinutes` | `number \| undefined` | Optional | The time span in minutes of an appointment segment.<br>**Constraints**: `<= 1500` |
15-
| `serviceVariationId` | `string` | Required | The ID of the [CatalogItemVariation](../../doc/models/catalog-item-variation.md) object representing the service booked in this segment.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
15+
| `serviceVariationId` | `string \| undefined` | Optional | The ID of the [CatalogItemVariation](../../doc/models/catalog-item-variation.md) object representing the service booked in this segment.<br>**Constraints**: *Maximum Length*: `36` |
1616
| `teamMemberId` | `string` | Required | The ID of the [TeamMember](../../doc/models/team-member.md) object representing the team member booked in this segment.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `32` |
17-
| `serviceVariationVersion` | `bigint` | Required | The current version of the item variation representing the service booked in this segment. |
17+
| `serviceVariationVersion` | `bigint \| undefined` | Optional | The current version of the item variation representing the service booked in this segment. |
1818
| `intermissionMinutes` | `number \| undefined` | Optional | Time between the end of this segment and the beginning of the subsequent segment. |
1919
| `anyTeamMember` | `boolean \| undefined` | Optional | Whether the customer accepts any team member, instead of a specific one, to serve this segment. |
2020
| `resourceIds` | `string[] \| undefined` | Optional | The IDs of the seller-accessible resources used for this appointment segment. |
@@ -24,9 +24,9 @@ Defines an appointment segment of a booking.
2424
```json
2525
{
2626
"duration_minutes": null,
27-
"service_variation_id": "service_variation_id6",
27+
"service_variation_id": null,
2828
"team_member_id": "team_member_id0",
29-
"service_variation_version": 56,
29+
"service_variation_version": null,
3030
"intermission_minutes": null,
3131
"any_team_member": null,
3232
"resource_ids": null

doc/models/batch-retrieve-inventory-changes-request.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
| `locationIds` | `string[] \| undefined` | Optional | The filter to return results by `Location` ID.<br>The filter is only applicable when set. The default value is null. |
1414
| `types` | [`string[] \| undefined`](../../doc/models/inventory-change-type.md) | Optional | The filter to return results by `InventoryChangeType` values other than `TRANSFER`.<br>The default value is `[PHYSICAL_COUNT, ADJUSTMENT]`. |
1515
| `states` | [`string[] \| undefined`](../../doc/models/inventory-state.md) | Optional | The filter to return `ADJUSTMENT` query results by<br>`InventoryState`. This filter is only applied when set.<br>The default value is null. |
16-
| `updatedAfter` | `string \| undefined` | Optional | The filter to return results with their `calculated_at` value <br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
17-
| `updatedBefore` | `string \| undefined` | Optional | The filter to return results with their `created_at` or `calculated_at` value <br>strictly before the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
16+
| `updatedAfter` | `string \| undefined` | Optional | The filter to return results with their `calculated_at` value<br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
17+
| `updatedBefore` | `string \| undefined` | Optional | The filter to return results with their `created_at` or `calculated_at` value<br>strictly before the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
1818
| `cursor` | `string \| undefined` | Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for the original query.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. |
19+
| `limit` | `number \| undefined` | Optional | **Constraints**: `>= 1`, `<= 1000` |
1920

2021
## Example (as JSON)
2122

doc/models/batch-retrieve-inventory-counts-request.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
| `updatedAfter` | `string \| undefined` | Optional | The filter to return results with their `calculated_at` value<br>after the given time as specified in an RFC 3339 timestamp.<br>The default value is the UNIX epoch of (`1970-01-01T00:00:00Z`). |
1515
| `cursor` | `string \| undefined` | Optional | A pagination cursor returned by a previous call to this endpoint.<br>Provide this to retrieve the next set of results for the original query.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. |
1616
| `states` | [`string[] \| undefined`](../../doc/models/inventory-state.md) | Optional | The filter to return results by `InventoryState`. The filter is only applicable when set.<br>Ignored are untracked states of `NONE`, `SOLD`, and `UNLINKED_RETURN`.<br>The default is null. |
17+
| `limit` | `number \| undefined` | Optional | **Constraints**: `>= 1`, `<= 1000` |
1718

1819
## Example (as JSON)
1920

0 commit comments

Comments
 (0)