Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cliVersion": "3.38.0",
"cliVersion": "4.23.1",
"generatorName": "fernapi/fern-typescript-sdk",
"generatorVersion": "3.43.8",
"generatorVersion": "3.54.0",
"generatorConfig": {
"namespaceExport": "Square",
"allowCustomFetcher": true,
Expand Down Expand Up @@ -54,5 +54,6 @@
}
}
},
"sdkVersion": "44.0.0"
"originGitCommit": "809bbe97ec8c4928c84c231c117042f8f36cc91d",
"sdkVersion": "44.0.1"
}
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The Square TypeScript library provides convenient access to the Square APIs from
- [Pagination](#pagination)
- [Webhook Signature Verification](#webhook-signature-verification)
- [Advanced](#advanced)
- [Subpackage Exports](#subpackage-exports)
- [Additional Headers](#additional-headers)
- [Additional Query String Parameters](#additional-query-string-parameters)
- [Retries](#retries)
Expand Down Expand Up @@ -272,6 +273,16 @@ const isValid = WebhooksHelper.verifySignature({

## Advanced

### Subpackage Exports

This SDK supports direct imports of subpackage clients, which allows JavaScript bundlers to tree-shake and include only the imported subpackage code. This results in much smaller bundle sizes.

```typescript
import { OAuthClient } from 'square/oAuth';

const client = new OAuthClient({...});
```

### Additional Headers

If you would like to send additional headers as part of the request, use the `headers` request option.
Expand Down Expand Up @@ -459,4 +470,4 @@ otherwise they would be overwritten upon the next generated release. Feel free t
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
an issue first to discuss with us!

On the other hand, contributions to the README are always very welcome!
On the other hand, contributions to the README are always very welcome!
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.1/schema.json",
"$schema": "https://biomejs.dev/schemas/2.4.3/schema.json",
"root": true,
"vcs": {
"enabled": false
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "square",
"version": "44.0.0",
"version": "44.0.1",
"private": false,
"repository": {
"type": "git",
Expand Down Expand Up @@ -44,13 +44,14 @@
"msw": "2.11.2",
"@types/node": "^18.19.70",
"typescript": "~5.7.2",
"@biomejs/biome": "2.3.1"
"@biomejs/biome": "2.4.3"
},
"browser": {
"fs": false,
"os": false,
"path": false,
"stream": false
"stream": false,
"crypto": false
},
"packageManager": "[email protected]",
"engines": {
Expand Down
97 changes: 49 additions & 48 deletions reference.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
{
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "square",
"X-Fern-SDK-Version": "44.0.0",
"User-Agent": "square/44.0.0",
"X-Fern-SDK-Version": "44.0.1",
"User-Agent": "square/44.0.1",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
"Square-Version": options?.version ?? "2026-01-22",
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/applePay/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { ApplePayClient } from "./client/Client";
export * from "./client/index";
4 changes: 4 additions & 0 deletions src/api/resources/bankAccounts/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { BankAccountsClient } from "./client/Client";
export * from "./client/index";
5 changes: 5 additions & 0 deletions src/api/resources/bookings/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was auto-generated by Fern from our API Definition.

export { BookingsClient } from "./client/Client";
export * from "./client/index";
export * from "./resources/index";
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { CustomAttributeDefinitionsClient } from "./client/Client";
export * from "./client/index";
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { CustomAttributesClient } from "./client/Client";
export * from "./client/index";
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { LocationProfilesClient } from "./client/Client";
export * from "./client/index";
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { TeamMemberProfilesClient } from "./client/Client";
export * from "./client/index";
2 changes: 1 addition & 1 deletion src/api/resources/cards/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class CardsClient {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/cards/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { CardsClient } from "./client/Client";
export * from "./client/index";
5 changes: 5 additions & 0 deletions src/api/resources/cashDrawers/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was auto-generated by Fern from our API Definition.

export { CashDrawersClient } from "./client/Client";
export * from "./client/index";
export * from "./resources/index";
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class ShiftsClient {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
begin_time: beginTime,
end_time: endTime,
limit,
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/cashDrawers/resources/shifts/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { ShiftsClient } from "./client/Client";
export * from "./client/index";
5 changes: 5 additions & 0 deletions src/api/resources/catalog/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was auto-generated by Fern from our API Definition.

export { CatalogClient } from "./client/Client";
export * from "./client/index";
export * from "./resources/index";
4 changes: 4 additions & 0 deletions src/api/resources/catalog/resources/images/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { ImagesClient } from "./client/Client";
export * from "./client/index";
4 changes: 4 additions & 0 deletions src/api/resources/catalog/resources/object/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { ObjectClient } from "./client/Client";
export * from "./client/index";
4 changes: 2 additions & 2 deletions src/api/resources/channels/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ export class ChannelsClient {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
reference_id: referenceId,
status:
status !== undefined
? serializers.ChannelStatus.jsonOrThrow(status, {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
cursor,
limit,
};
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/channels/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { ChannelsClient } from "./client/Client";
export * from "./client/index";
5 changes: 5 additions & 0 deletions src/api/resources/checkout/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was auto-generated by Fern from our API Definition.

export { CheckoutClient } from "./client/Client";
export * from "./client/index";
export * from "./resources/index";
4 changes: 4 additions & 0 deletions src/api/resources/checkout/resources/paymentLinks/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { PaymentLinksClient } from "./client/Client";
export * from "./client/index";
4 changes: 2 additions & 2 deletions src/api/resources/customers/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ export class CustomersClient {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
sort_order:
sortOrder !== undefined
? serializers.SortOrder.jsonOrThrow(sortOrder, {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
count,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
Expand Down
5 changes: 5 additions & 0 deletions src/api/resources/customers/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was auto-generated by Fern from our API Definition.

export { CustomersClient } from "./client/Client";
export * from "./client/index";
export * from "./resources/index";
4 changes: 4 additions & 0 deletions src/api/resources/customers/resources/cards/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export class CardsClient {
}

/**
* @deprecated
*
* Adds a card on file to an existing customer.
*
* As with charges, calls to `CreateCustomerCard` are idempotent. Multiple
Expand Down Expand Up @@ -119,6 +121,8 @@ export class CardsClient {
}

/**
* @deprecated
*
* Removes a card on file from a customer.
*
* @param {Square.customers.DeleteCardsRequest} request
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/customers/resources/cards/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { CardsClient } from "./client/Client";
export * from "./client/index";
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { CustomAttributeDefinitionsClient } from "./client/Client";
export * from "./client/index";
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { CustomAttributesClient } from "./client/Client";
export * from "./client/index";
4 changes: 4 additions & 0 deletions src/api/resources/customers/resources/groups/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { GroupsClient } from "./client/Client";
export * from "./client/index";
4 changes: 4 additions & 0 deletions src/api/resources/customers/resources/segments/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { SegmentsClient } from "./client/Client";
export * from "./client/index";
2 changes: 1 addition & 1 deletion src/api/resources/devices/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class DevicesClient {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
limit,
location_id: locationId,
};
Expand Down
5 changes: 5 additions & 0 deletions src/api/resources/devices/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was auto-generated by Fern from our API Definition.

export { DevicesClient } from "./client/Client";
export * from "./client/index";
export * from "./resources/index";
4 changes: 2 additions & 2 deletions src/api/resources/devices/resources/codes/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ export class CodesClient {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
status:
status !== undefined
? serializers.DeviceCodeStatus.jsonOrThrow(status, {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/devices/resources/codes/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { CodesClient } from "./client/Client";
export * from "./client/index";
2 changes: 1 addition & 1 deletion src/api/resources/disputes/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class DisputesClient {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
location_id: locationId,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
Expand Down
5 changes: 5 additions & 0 deletions src/api/resources/disputes/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was auto-generated by Fern from our API Definition.

export { DisputesClient } from "./client/Client";
export * from "./client/index";
export * from "./resources/index";
4 changes: 4 additions & 0 deletions src/api/resources/disputes/resources/evidence/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { EvidenceClient } from "./client/Client";
export * from "./client/index";
6 changes: 5 additions & 1 deletion src/api/resources/employees/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export class EmployeesClient {
}

/**
* @deprecated
*
* @param {Square.ListEmployeesRequest} request
* @param {EmployeesClient.RequestOptions} requestOptions - Request-specific configuration.
*
Expand Down Expand Up @@ -52,7 +54,7 @@ export class EmployeesClient {
unrecognizedObjectKeys: "strip",
omitUndefined: true,
})
: null,
: undefined,
limit,
cursor,
};
Expand Down Expand Up @@ -115,6 +117,8 @@ export class EmployeesClient {
}

/**
* @deprecated
*
* @param {Square.GetEmployeesRequest} request
* @param {EmployeesClient.RequestOptions} requestOptions - Request-specific configuration.
*
Expand Down
4 changes: 4 additions & 0 deletions src/api/resources/employees/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { EmployeesClient } from "./client/Client";
export * from "./client/index";
4 changes: 4 additions & 0 deletions src/api/resources/events/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { EventsClient } from "./client/Client";
export * from "./client/index";
5 changes: 5 additions & 0 deletions src/api/resources/giftCards/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was auto-generated by Fern from our API Definition.

export { GiftCardsClient } from "./client/Client";
export * from "./client/index";
export * from "./resources/index";
4 changes: 4 additions & 0 deletions src/api/resources/giftCards/resources/activities/exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was auto-generated by Fern from our API Definition.

export { ActivitiesClient } from "./client/Client";
export * from "./client/index";
Loading
Loading