Skip to content

Commit

Permalink
Generated PR for Release: 11.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
autobot committed May 13, 2021
1 parent 807010e commit a5cfcca
Show file tree
Hide file tree
Showing 678 changed files with 3,887 additions and 4,635 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
env:
SQUARE_ENVIRONMENT: sandbox
SQUARE_SANDBOX_TOKEN: ${{ secrets.SQUARE_SANDBOX_TOKEN }}

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install --no-save
- run: npm run build --if-present
- run: npm test
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Change Log

## Version 11.0.0 (2021-05-13)
## New API releases

* **Sites API.** The [Sites API](https://developer.squareup.com/reference/square_2021-05-13/sites-api) lets you retrieve basic details about the Square Online sites that belong to a Square seller. For more information, see [Sites API Overview.](https://developer.squareup.com/docs/sites-api/overview)


* **Snippets API.** The [Snippets API](https://developer.squareup.com/reference/square_2021-05-13/snippets-api) lets you manage snippets that provide custom functionality on Square Online sites. A snippet is a script that is injected into all pages on a site, except for checkout pages. For more information, see [Snippets API Overview.](https://developer.squareup.com/docs/snippets-api/overview)

The Sites API and Snippets API are publicly available to all developers as part of an early access program (EAP). For more information, see [Early access program for Square Online APIs.](https://developer.squareup.com/docs/online-api#early-access-program-for-square-online-apis)

## API updates

* **Payments API.**
* [CreatePayment.](https://developer.squareup.com/reference/square_2021-05-13/payments-api/create-payment) The endpoint now supports ACH bank transfer payments. For more information, see [ACH Payment](https://developer.squareup.com/docs/payments-api/take-payments/ach-payments).

* **Loyalty API:**
* The [Loyalty API](https://developer.squareup.com/docs/loyalty-api/overview) has moved to the [general availability](https://developer.squareup.com/docs/build-basics/api-lifecycle#general-availability) (GA) state.

* The [ListLoyaltyPrograms](https://developer.squareup.com/reference/square_2021-05-13/loyalty-api/list-loyalty-programs) endpoint is deprecated and replaced by the [RetrieveLoyaltyProgram](https://developer.squareup.com/reference/square_2021-05-13/loyalty-api/retrieve-loyalty-program) endpoint when used with the `main` keyword.

* [LoyaltyAccount](https://developer.squareup.com/reference/square_2021-05-13/objects/LoyaltyAccount)  object. The `mappings` field is retired and replaced by `mapping`.

* [LoyaltyAccountMapping](https://developer.squareup.com/reference/square_2021-05-13/objects/LoyaltyAccountMapping) object. The `type` and `value` fields are retired and replaced by `phone_number`.

Starting in Square version 2021-05-13:
* `mappings` is not accepted in `CreateLoyaltyAccount` requests or returned in responses.
* `type` and `value` are not accepted in `CreateLoyaltyAccount` or `SearchLoyaltyAccounts` requests or returned in responses.

For more information, see [Migration notes.](https://developer.squareup.com/docs/loyalty-api/overview#migration-notes)

## Documentation updates
* **Getting Started** Added step that shows how to use the API Logs to examine a transaction.


## Version 10.0.0 (2021-04-21)
## New API releases

Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/square/square-nodejs-sdk.svg?token=7KUGXNa8mbAXsapsn66r&branch=master)](https://travis-ci.com/square/square-nodejs-sdk)
[![Build](https://github.com/square/square-nodejs-sdk/actions/workflows/node.js.yml/badge.svg)](https://github.com/square/square-nodejs-sdk/actions/workflows/node.js.yml)
[![npm version](https://badge.fury.io/js/square.svg)](https://badge.fury.io/js/square)
[![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)

Expand Down Expand Up @@ -118,9 +118,13 @@ const newClient = client.withConfiguration({
### Financials
* [Bank Accounts]

### Online
* [Sites]
* [Snippets]

### Authorization APIs
* [Mobile Authorization]
* [O Auth]
* [OAuth]

### Deprecated APIs
* [V1 Employees]
Expand Down Expand Up @@ -521,8 +525,10 @@ You can also use the Square API to create applications or services that work wit
[Refunds]: doc/api/refunds.md
[Subscriptions]: doc/api/subscriptions.md
[Mobile Authorization]: doc/api/mobile-authorization.md
[O Auth]: doc/api/o-auth.md
[OAuth]: doc/api/o-auth.md
[V1 Employees]: doc/api/v1-employees.md
[V1 Transactions]: doc/api/v1-transactions.md
[V1 Items]: doc/api/v1-items.md
[Transactions]: doc/api/transactions.md
[Sites]: doc/api/sites.md
[Snippets]: doc/api/snippets.md
2 changes: 1 addition & 1 deletion doc/api-error.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ The ApiError extends the ApiResponse interface, so all ApiResponse properties ar
| statusCode | number | Response status codee. |
| headers | Record<string, string> | Response headers. |
| result | T | Response data. |
| body | string | Blob | NodeJS.ReadableStream | Original body from the response. |
| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. |
| errors? | Error[] | Represents an error encountered during a request to the Connect API |

2 changes: 1 addition & 1 deletion doc/api-response.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ An interface for the result of an API call.
| statusCode | number | Response status codee. |
| headers | Record<string, string> | Response headers. |
| result | T | Response data. |
| body | string | Blob | NodeJS.ReadableStream | Original body from the response. |
| body | string \| Blob \| NodeJS.ReadableStream | Original body from the response. |

2 changes: 1 addition & 1 deletion doc/api/apple-pay.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async registerDomain(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `body` | [`RegisterDomainRequest`](/doc/models/register-domain-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down
12 changes: 6 additions & 6 deletions doc/api/bank-accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ async listBankAccounts(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `cursor` | `string` | Query, Optional | The pagination cursor returned by a previous call to this endpoint.<br>Use it in the next `ListBankAccounts` request to retrieve the next set<br>of results.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. |
| `limit` | `number` | Query, Optional | Upper limit on the number of bank accounts to return in the response.<br>Currently, 1000 is the largest supported limit. You can specify a limit<br>of up to 1000 bank accounts. This is also the default limit. |
| `locationId` | `string` | Query, Optional | Location ID. You can specify this optional filter<br>to retrieve only the linked bank accounts belonging to a specific location. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `cursor` | `string \| undefined` | Query, Optional | The pagination cursor returned by a previous call to this endpoint.<br>Use it in the next `ListBankAccounts` request to retrieve the next set<br>of results.<br><br>See the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. |
| `limit` | `number \| undefined` | Query, Optional | Upper limit on the number of bank accounts to return in the response.<br>Currently, 1000 is the largest supported limit. You can specify a limit<br>of up to 1000 bank accounts. This is also the default limit. |
| `locationId` | `string \| undefined` | Query, Optional | Location ID. You can specify this optional filter<br>to retrieve only the linked bank accounts belonging to a specific location. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -76,7 +76,7 @@ async getBankAccountByV1Id(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `v1BankAccountId` | `string` | Template, Required | Connect V1 ID of the desired `BankAccount`. For more information, see<br>[Retrieve a bank account by using an ID issued by V1 Bank Accounts API](https://developer.squareup.com/docs/bank-accounts-api#retrieve-a-bank-account-by-using-an-id-issued-by-v1-bank-accounts-api). |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -116,7 +116,7 @@ async getBankAccount(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bankAccountId` | `string` | Template, Required | Square-issued ID of the desired `BankAccount`. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down
24 changes: 12 additions & 12 deletions doc/api/bookings.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async createBooking(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `body` | [`CreateBookingRequest`](/doc/models/create-booking-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -86,7 +86,7 @@ async searchAvailability(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `body` | [`SearchAvailabilityRequest`](/doc/models/search-availability-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -173,7 +173,7 @@ async retrieveBusinessBookingProfile(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -213,11 +213,11 @@ async listTeamMemberBookingProfiles(

| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bookableOnly` | `boolean` | Query, Optional | Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`).<br>**Default**: `false` |
| `limit` | `number` | Query, Optional | The maximum number of results to return. |
| `cursor` | `string` | Query, Optional | The cursor for paginating through the results. |
| `locationId` | `string` | Query, Optional | Indicates whether to include only team members enabled at the given location in the returned result. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `bookableOnly` | `boolean \| undefined` | Query, Optional | Indicates whether to include only bookable team members in the returned result (`true`) or not (`false`).<br>**Default**: `false` |
| `limit` | `number \| undefined` | Query, Optional | The maximum number of results to return. |
| `cursor` | `string \| undefined` | Query, Optional | The cursor for paginating through the results. |
| `locationId` | `string \| undefined` | Query, Optional | Indicates whether to include only team members enabled at the given location in the returned result. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -259,7 +259,7 @@ async retrieveTeamMemberBookingProfile(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `teamMemberId` | `string` | Template, Required | The ID of the team member to retrieve. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -298,7 +298,7 @@ async retrieveBooking(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the [Booking](/doc/models/booking.md) object representing the to-be-retrieved booking. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -339,7 +339,7 @@ async updateBooking(
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the [Booking](/doc/models/booking.md) object representing the to-be-updated booking. |
| `body` | [`UpdateBookingRequest`](/doc/models/update-booking-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -392,7 +392,7 @@ async cancelBooking(
| --- | --- | --- | --- |
| `bookingId` | `string` | Template, Required | The ID of the [Booking](/doc/models/booking.md) object representing the to-be-cancelled booking. |
| `body` | [`CancelBookingRequest`](/doc/models/cancel-booking-request.md) | Body, Required | An object containing the fields to POST for the request.<br><br>See the corresponding object definition for field details. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down
20 changes: 10 additions & 10 deletions doc/api/cash-drawers.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ async listCashDrawerShifts(
| Parameter | Type | Tags | Description |
| --- | --- | --- | --- |
| `locationId` | `string` | Query, Required | The ID of the location to query for a list of cash drawer shifts. |
| `sortOrder` | [`string`](/doc/models/sort-order.md) | Query, Optional | The order in which cash drawer shifts are listed in the response,<br>based on their opened_at field. Default value: ASC |
| `beginTime` | `string` | Query, Optional | The inclusive start time of the query on opened_at, in ISO 8601 format. |
| `endTime` | `string` | Query, Optional | The exclusive end date of the query on opened_at, in ISO 8601 format. |
| `limit` | `number` | Query, Optional | Number of cash drawer shift events in a page of results (200 by<br>default, 1000 max). |
| `cursor` | `string` | Query, Optional | Opaque cursor for fetching the next page of results. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `sortOrder` | [`string \| undefined`](/doc/models/sort-order.md) | Query, Optional | The order in which cash drawer shifts are listed in the response,<br>based on their opened_at field. Default value: ASC |
| `beginTime` | `string \| undefined` | Query, Optional | The inclusive start time of the query on opened_at, in ISO 8601 format. |
| `endTime` | `string \| undefined` | Query, Optional | The exclusive end date of the query on opened_at, in ISO 8601 format. |
| `limit` | `number \| undefined` | Query, Optional | Number of cash drawer shift events in a page of results (200 by<br>default, 1000 max). |
| `cursor` | `string \| undefined` | Query, Optional | Opaque cursor for fetching the next page of results. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -89,7 +89,7 @@ async retrieveCashDrawerShift(
| --- | --- | --- | --- |
| `locationId` | `string` | Query, Required | The ID of the location to retrieve cash drawer shifts from. |
| `shiftId` | `string` | Template, Required | The shift ID. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down Expand Up @@ -133,9 +133,9 @@ async listCashDrawerShiftEvents(
| --- | --- | --- | --- |
| `locationId` | `string` | Query, Required | The ID of the location to list cash drawer shifts for. |
| `shiftId` | `string` | Template, Required | The shift ID. |
| `limit` | `number` | Query, Optional | Number of resources to be returned in a page of results (200 by<br>default, 1000 max). |
| `cursor` | `string` | Query, Optional | Opaque cursor for fetching the next page of results. |
| `requestOptions` | `RequestOptions` | Optional | Pass additional request options. |
| `limit` | `number \| undefined` | Query, Optional | Number of resources to be returned in a page of results (200 by<br>default, 1000 max). |
| `cursor` | `string \| undefined` | Query, Optional | Opaque cursor for fetching the next page of results. |
| `requestOptions` | `RequestOptions \| undefined` | Optional | Pass additional request options. |

## Response Type

Expand Down
Loading

0 comments on commit a5cfcca

Please sign in to comment.