diff --git a/.fern/metadata.json b/.fern/metadata.json index 6e98b21b2..e860c4655 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,7 +1,7 @@ { - "cliVersion": "4.23.1", + "cliVersion": "3.98.5", "generatorName": "fernapi/fern-typescript-sdk", - "generatorVersion": "3.54.0", + "generatorVersion": "3.43.8", "generatorConfig": { "namespaceExport": "Square", "allowCustomFetcher": true, @@ -54,6 +54,5 @@ } } }, - "originGitCommit": "809bbe97ec8c4928c84c231c117042f8f36cc91d", - "sdkVersion": "44.0.1" + "sdkVersion": "44.1.0" } diff --git a/.fern/replay.lock b/.fern/replay.lock new file mode 100644 index 000000000..fcbffe99a --- /dev/null +++ b/.fern/replay.lock @@ -0,0 +1,10 @@ +# DO NOT EDIT MANUALLY - Managed by Fern Replay +version: "1.0" +generations: + - commit_sha: 5566d34adedb1ff2d8d9add4889da2996ecdb244 + tree_hash: 891973ffaaeb5dcd905ec62f2fac75f155859e53 + timestamp: 2026-05-19T21:17:19.070Z + cli_version: unknown + generator_versions: {} +current_generation: 5566d34adedb1ff2d8d9add4889da2996ecdb244 +patches: [] diff --git a/.fernignore b/.fernignore index db56945d0..58de1ace7 100644 --- a/.fernignore +++ b/.fernignore @@ -12,3 +12,6 @@ tests/unit/fetcher/stream-wrappers/webpack.test.ts tests/integration legacy jest.config.mjs +.fern/replay.lock +.fern/replay.yml +.gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..74928d6a4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.fern/replay.lock linguist-generated=true diff --git a/README.md b/README.md index a2c06fbec..ae4ec5b2a 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ 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) @@ -273,16 +272,6 @@ 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. @@ -470,4 +459,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! \ No newline at end of file diff --git a/biome.json b/biome.json index 5084b70a9..a777468e4 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.4.3/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.1/schema.json", "root": true, "vcs": { "enabled": false diff --git a/package.json b/package.json index 0ea372fed..483ff3dc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "square", - "version": "44.0.1", + "version": "44.1.0", "private": false, "repository": { "type": "git", @@ -44,14 +44,13 @@ "msw": "2.11.2", "@types/node": "^18.19.70", "typescript": "~5.7.2", - "@biomejs/biome": "2.4.3" + "@biomejs/biome": "2.3.1" }, "browser": { "fs": false, "os": false, "path": false, - "stream": false, - "crypto": false + "stream": false }, "packageManager": "yarn@1.22.22", "engines": { diff --git a/reference.md b/reference.md index 1c5ab7ca5..73556c03a 100644 --- a/reference.md +++ b/reference.md @@ -558,7 +558,7 @@ await client.applePay.registerDomain({ ## BankAccounts -
client.bankAccounts.list({ ...params }) -> core.Page<Square.BankAccount, Square.ListBankAccountsResponse> +
client.bankAccounts.list({ ...params }) -> core.Page
@@ -906,7 +906,7 @@ await client.bankAccounts.disableBankAccount({
## Bookings -
client.bookings.list({ ...params }) -> core.Page<Square.Booking, Square.ListBookingsResponse> +
client.bookings.list({ ...params }) -> core.Page
@@ -1615,7 +1615,7 @@ await client.bookings.cancel({
## Cards -
client.cards.list({ ...params }) -> core.Page<Square.Card, Square.ListCardsResponse> +
client.cards.list({ ...params }) -> core.Page
@@ -2211,7 +2211,7 @@ await client.catalog.info();
-
client.catalog.list({ ...params }) -> core.Page<Square.CatalogObject, Square.ListCatalogResponse> +
client.catalog.list({ ...params }) -> core.Page
@@ -2616,7 +2616,7 @@ await client.catalog.updateItemTaxes({
## Channels -
client.channels.list({ ...params }) -> core.Page<Square.Channel, Square.ListChannelsResponse> +
client.channels.list({ ...params }) -> core.Page
@@ -2834,7 +2834,7 @@ await client.channels.get({
## Customers -
client.customers.list({ ...params }) -> core.Page<Square.Customer, Square.ListCustomersResponse> +
client.customers.list({ ...params }) -> core.Page
@@ -3632,7 +3632,7 @@ await client.customers.delete({
## Devices -
client.devices.list({ ...params }) -> core.Page<Square.Device, Square.ListDevicesResponse> +
client.devices.list({ ...params }) -> core.Page
@@ -3784,7 +3784,7 @@ await client.devices.get({
## Disputes -
client.disputes.list({ ...params }) -> core.Page<Square.Dispute, Square.ListDisputesResponse> +
client.disputes.list({ ...params }) -> core.Page
@@ -4207,7 +4207,7 @@ await client.disputes.submitEvidence({
## Employees -
client.employees.list({ ...params }) -> core.Page<Square.Employee, Square.ListEmployeesResponse> +
client.employees.list({ ...params }) -> core.Page
@@ -4599,7 +4599,7 @@ await client.events.listEventTypes({
## GiftCards -
client.giftCards.list({ ...params }) -> core.Page<Square.GiftCard, Square.ListGiftCardsResponse> +
client.giftCards.list({ ...params }) -> core.Page
@@ -5520,7 +5520,7 @@ await client.inventory.batchCreateChanges({
-
client.inventory.batchGetChanges({ ...params }) -> core.Page<Square.InventoryChange, Square.BatchGetInventoryChangesResponse> +
client.inventory.batchGetChanges({ ...params }) -> core.Page
@@ -5616,7 +5616,7 @@ const response = page.response;
-
client.inventory.batchGetCounts({ ...params }) -> core.Page<Square.InventoryCount, Square.BatchGetInventoryCountsResponse> +
client.inventory.batchGetCounts({ ...params }) -> core.Page
@@ -5907,7 +5907,7 @@ await client.inventory.getTransfer({
-
client.inventory.get({ ...params }) -> core.Page<Square.InventoryCount, Square.GetInventoryCountResponse> +
client.inventory.get({ ...params }) -> core.Page
@@ -5993,7 +5993,7 @@ const response = page.response;
-
client.inventory.changes({ ...params }) -> core.Page<Square.InventoryChange, Square.GetInventoryChangesResponse> +
client.inventory.changes({ ...params }) -> core.Page
@@ -6089,7 +6089,7 @@ const response = page.response;
## Invoices -
client.invoices.list({ ...params }) -> core.Page<Square.Invoice, Square.ListInvoicesResponse> +
client.invoices.list({ ...params }) -> core.Page
@@ -8254,7 +8254,7 @@ await client.loyalty.searchEvents({
## Merchants -
client.merchants.list({ ...params }) -> core.Page<Square.Merchant, Square.ListMerchantsResponse> +
client.merchants.list({ ...params }) -> core.Page
@@ -9339,7 +9339,7 @@ await client.orders.pay({
## Payments -
client.payments.list({ ...params }) -> core.Page<Square.Payment, Square.ListPaymentsResponse> +
client.payments.list({ ...params }) -> core.Page
@@ -9890,7 +9890,7 @@ await client.payments.complete({
## Payouts -
client.payouts.list({ ...params }) -> core.Page<Square.Payout, Square.ListPayoutsResponse> +
client.payouts.list({ ...params }) -> core.Page
@@ -10049,7 +10049,7 @@ await client.payouts.get({
-
client.payouts.listEntries({ ...params }) -> core.Page<Square.PayoutEntry, Square.ListPayoutEntriesResponse> +
client.payouts.listEntries({ ...params }) -> core.Page
@@ -10136,7 +10136,7 @@ const response = page.response;
## Refunds -
client.refunds.list({ ...params }) -> core.Page<Square.PaymentRefund, Square.ListPaymentRefundsResponse> +
client.refunds.list({ ...params }) -> core.Page
@@ -11230,7 +11230,7 @@ await client.subscriptions.cancel({
-
client.subscriptions.listEvents({ ...params }) -> core.Page<Square.SubscriptionEvent, Square.ListSubscriptionEventsResponse> +
client.subscriptions.listEvents({ ...params }) -> core.Page
@@ -12619,7 +12619,7 @@ await client.transferOrders.create({
-
client.transferOrders.search({ ...params }) -> core.Page<Square.TransferOrder, Square.SearchTransferOrdersResponse> +
client.transferOrders.search({ ...params }) -> core.Page
@@ -13710,7 +13710,7 @@ await client.vendors.update({
## Bookings CustomAttributeDefinitions -
client.bookings.customAttributeDefinitions.list({ ...params }) -> core.Page<Square.CustomAttributeDefinition, Square.ListBookingCustomAttributeDefinitionsResponse> +
client.bookings.customAttributeDefinitions.list({ ...params }) -> core.Page
@@ -14230,7 +14230,7 @@ await client.bookings.customAttributes.batchUpsert({
-
client.bookings.customAttributes.list({ ...params }) -> core.Page<Square.CustomAttribute, Square.ListBookingCustomAttributesResponse> +
client.bookings.customAttributes.list({ ...params }) -> core.Page
@@ -14535,7 +14535,7 @@ await client.bookings.customAttributes.delete({
## Bookings LocationProfiles -
client.bookings.locationProfiles.list({ ...params }) -> core.Page<Square.LocationBookingProfile, Square.ListLocationBookingProfilesResponse> +
client.bookings.locationProfiles.list({ ...params }) -> core.Page
@@ -14617,7 +14617,7 @@ const response = page.response;
## Bookings TeamMemberProfiles -
client.bookings.teamMemberProfiles.list({ ...params }) -> core.Page<Square.TeamMemberBookingProfile, Square.ListTeamMemberBookingProfilesResponse> +
client.bookings.teamMemberProfiles.list({ ...params }) -> core.Page
@@ -14768,7 +14768,7 @@ await client.bookings.teamMemberProfiles.get({
## CashDrawers Shifts -
client.cashDrawers.shifts.list({ ...params }) -> core.Page<Square.CashDrawerShiftSummary, Square.ListCashDrawerShiftsResponse> +
client.cashDrawers.shifts.list({ ...params }) -> core.Page
@@ -14925,7 +14925,7 @@ await client.cashDrawers.shifts.get({
-
client.cashDrawers.shifts.listEvents({ ...params }) -> core.Page<Square.CashDrawerShiftEvent, Square.ListCashDrawerShiftEventsResponse> +
client.cashDrawers.shifts.listEvents({ ...params }) -> core.Page
@@ -15370,7 +15370,7 @@ await client.catalog.object.delete({
## Checkout PaymentLinks -
client.checkout.paymentLinks.list({ ...params }) -> core.Page<Square.PaymentLink, Square.ListPaymentLinksResponse> +
client.checkout.paymentLinks.list({ ...params }) -> core.Page
@@ -15728,7 +15728,7 @@ await client.checkout.paymentLinks.delete({
## Customers CustomAttributeDefinitions -
client.customers.customAttributeDefinitions.list({ ...params }) -> core.Page<Square.CustomAttributeDefinition, Square.ListCustomerCustomAttributeDefinitionsResponse> +
client.customers.customAttributeDefinitions.list({ ...params }) -> core.Page
@@ -16227,7 +16227,7 @@ await client.customers.customAttributeDefinitions.batchUpsert({
## Customers Groups -
client.customers.groups.list({ ...params }) -> core.Page<Square.CustomerGroup, Square.ListCustomerGroupsResponse> +
client.customers.groups.list({ ...params }) -> core.Page
@@ -16714,7 +16714,7 @@ await client.customers.groups.remove({
## Customers Segments -
client.customers.segments.list({ ...params }) -> core.Page<Square.CustomerSegment, Square.ListCustomerSegmentsResponse> +
client.customers.segments.list({ ...params }) -> core.Page
@@ -17007,7 +17007,7 @@ await client.customers.cards.delete({
## Customers CustomAttributes -
client.customers.customAttributes.list({ ...params }) -> core.Page<Square.CustomAttribute, Square.ListCustomerCustomAttributesResponse> +
client.customers.customAttributes.list({ ...params }) -> core.Page
@@ -17322,7 +17322,7 @@ await client.customers.customAttributes.delete({
## Devices Codes -
client.devices.codes.list({ ...params }) -> core.Page<Square.DeviceCode, Square.ListDeviceCodesResponse> +
client.devices.codes.list({ ...params }) -> core.Page
@@ -17544,7 +17544,7 @@ await client.devices.codes.get({
## Disputes Evidence -
client.disputes.evidence.list({ ...params }) -> core.Page<Square.DisputeEvidence, Square.ListDisputeEvidenceResponse> +
client.disputes.evidence.list({ ...params }) -> core.Page
@@ -17761,7 +17761,7 @@ await client.disputes.evidence.delete({
## GiftCards Activities -
client.giftCards.activities.list({ ...params }) -> core.Page<Square.GiftCardActivity, Square.ListGiftCardActivitiesResponse> +
client.giftCards.activities.list({ ...params }) -> core.Page
@@ -17933,7 +17933,7 @@ await client.giftCards.activities.create({
## Labor BreakTypes -
client.labor.breakTypes.list({ ...params }) -> core.Page<Square.BreakType, Square.ListBreakTypesResponse> +
client.labor.breakTypes.list({ ...params }) -> core.Page
@@ -18305,7 +18305,7 @@ await client.labor.breakTypes.delete({
## Labor EmployeeWages -
client.labor.employeeWages.list({ ...params }) -> core.Page<Square.EmployeeWage, Square.ListEmployeeWagesResponse> +
client.labor.employeeWages.list({ ...params }) -> core.Page
@@ -18882,7 +18882,7 @@ await client.labor.shifts.delete({
## Labor TeamMemberWages -
client.labor.teamMemberWages.list({ ...params }) -> core.Page<Square.TeamMemberWage, Square.ListTeamMemberWagesResponse> +
client.labor.teamMemberWages.list({ ...params }) -> core.Page
@@ -19031,7 +19031,7 @@ await client.labor.teamMemberWages.get({
## Labor WorkweekConfigs -
client.labor.workweekConfigs.list({ ...params }) -> core.Page<Square.WorkweekConfig, Square.ListWorkweekConfigsResponse> +
client.labor.workweekConfigs.list({ ...params }) -> core.Page
@@ -19183,7 +19183,7 @@ await client.labor.workweekConfigs.get({
## Locations CustomAttributeDefinitions -
client.locations.customAttributeDefinitions.list({ ...params }) -> core.Page<Square.CustomAttributeDefinition, Square.ListLocationCustomAttributeDefinitionsResponse> +
client.locations.customAttributeDefinitions.list({ ...params }) -> core.Page
@@ -19730,7 +19730,7 @@ await client.locations.customAttributes.batchUpsert({
-
client.locations.customAttributes.list({ ...params }) -> core.Page<Square.CustomAttribute, Square.ListLocationCustomAttributesResponse> +
client.locations.customAttributes.list({ ...params }) -> core.Page
@@ -21263,7 +21263,7 @@ await client.loyalty.rewards.redeem({
## Loyalty Programs Promotions -
client.loyalty.programs.promotions.list({ ...params }) -> core.Page<Square.LoyaltyPromotion, Square.ListLoyaltyPromotionsResponse> +
client.loyalty.programs.promotions.list({ ...params }) -> core.Page
@@ -21579,7 +21579,7 @@ await client.loyalty.programs.promotions.cancel({
## Merchants CustomAttributeDefinitions -
client.merchants.customAttributeDefinitions.list({ ...params }) -> core.Page<Square.CustomAttributeDefinition, Square.ListMerchantCustomAttributeDefinitionsResponse> +
client.merchants.customAttributeDefinitions.list({ ...params }) -> core.Page
@@ -22116,7 +22116,7 @@ await client.merchants.customAttributes.batchUpsert({
-
client.merchants.customAttributes.list({ ...params }) -> core.Page<Square.CustomAttribute, Square.ListMerchantCustomAttributesResponse> +
client.merchants.customAttributes.list({ ...params }) -> core.Page
@@ -22423,7 +22423,7 @@ await client.merchants.customAttributes.delete({
## Orders CustomAttributeDefinitions -
client.orders.customAttributeDefinitions.list({ ...params }) -> core.Page<Square.CustomAttributeDefinition, Square.ListOrderCustomAttributeDefinitionsResponse> +
client.orders.customAttributeDefinitions.list({ ...params }) -> core.Page
@@ -22982,7 +22982,7 @@ await client.orders.customAttributes.batchUpsert({
-
client.orders.customAttributes.list({ ...params }) -> core.Page<Square.CustomAttribute, Square.ListOrderCustomAttributesResponse> +
client.orders.customAttributes.list({ ...params }) -> core.Page
@@ -24362,7 +24362,7 @@ await client.webhooks.eventTypes.list({
## Webhooks Subscriptions -
client.webhooks.subscriptions.list({ ...params }) -> core.Page<Square.WebhookSubscription, Square.ListWebhookSubscriptionsResponse> +
client.webhooks.subscriptions.list({ ...params }) -> core.Page
@@ -24848,4 +24848,3 @@ await client.webhooks.subscriptions.test({
- diff --git a/src/BaseClient.ts b/src/BaseClient.ts index 99dd360c9..549b355ac 100644 --- a/src/BaseClient.ts +++ b/src/BaseClient.ts @@ -10,7 +10,7 @@ export type BaseClientOptions = { /** Specify a custom URL to connect the client to. */ baseUrl?: core.Supplier; /** Override the Square-Version header */ - version?: "2026-01-22"; + version?: "2026-05-20"; /** Additional headers to include in requests. */ headers?: Record | null | undefined>; /** The default maximum time to wait for a response in seconds. */ @@ -32,7 +32,7 @@ export interface BaseRequestOptions { /** A hook to abort the request. */ abortSignal?: AbortSignal; /** Override the Square-Version header */ - version?: "2026-01-22"; + version?: "2026-05-20"; /** Additional query string parameters to include in the request. */ queryParams?: Record; /** Additional headers to include in the request. */ @@ -56,11 +56,11 @@ export function normalizeClientOptions> { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -242,7 +242,7 @@ export class OAuthClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -300,7 +300,7 @@ export class OAuthClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/oAuth/exports.ts b/src/api/resources/oAuth/exports.ts deleted file mode 100644 index feabce85d..000000000 --- a/src/api/resources/oAuth/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { OAuthClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/orders/client/Client.ts b/src/api/resources/orders/client/Client.ts index 3adb7f550..12f15db0a 100644 --- a/src/api/resources/orders/client/Client.ts +++ b/src/api/resources/orders/client/Client.ts @@ -112,7 +112,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -190,7 +190,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -287,7 +287,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -365,7 +365,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -475,7 +475,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -551,7 +551,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -650,7 +650,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -741,7 +741,7 @@ export class OrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/orders/exports.ts b/src/api/resources/orders/exports.ts deleted file mode 100644 index 4e34b9508..000000000 --- a/src/api/resources/orders/exports.ts +++ /dev/null @@ -1,5 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { OrdersClient } from "./client/Client"; -export * from "./client/index"; -export * from "./resources/index"; diff --git a/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts b/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts index 02592a1a6..e55a6ab4d 100644 --- a/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts +++ b/src/api/resources/orders/resources/customAttributeDefinitions/client/Client.ts @@ -57,7 +57,7 @@ export class CustomAttributeDefinitionsClient { unrecognizedObjectKeys: "strip", omitUndefined: true, }) - : undefined, + : null, cursor, limit, }; @@ -65,7 +65,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -163,7 +163,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -252,7 +252,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -335,7 +335,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -418,7 +418,7 @@ export class CustomAttributeDefinitionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/orders/resources/customAttributeDefinitions/exports.ts b/src/api/resources/orders/resources/customAttributeDefinitions/exports.ts deleted file mode 100644 index 89a965824..000000000 --- a/src/api/resources/orders/resources/customAttributeDefinitions/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { CustomAttributeDefinitionsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/orders/resources/customAttributes/client/Client.ts b/src/api/resources/orders/resources/customAttributes/client/Client.ts index 3f22502be..caff150dc 100644 --- a/src/api/resources/orders/resources/customAttributes/client/Client.ts +++ b/src/api/resources/orders/resources/customAttributes/client/Client.ts @@ -71,7 +71,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -181,7 +181,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -273,7 +273,7 @@ export class CustomAttributesClient { unrecognizedObjectKeys: "strip", omitUndefined: true, }) - : undefined, + : null, cursor, limit, with_definitions: withDefinitions, @@ -282,7 +282,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -382,7 +382,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -471,7 +471,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -557,7 +557,7 @@ export class CustomAttributesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/orders/resources/customAttributes/exports.ts b/src/api/resources/orders/resources/customAttributes/exports.ts deleted file mode 100644 index 52a02441c..000000000 --- a/src/api/resources/orders/resources/customAttributes/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { CustomAttributesClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/payments/client/Client.ts b/src/api/resources/payments/client/Client.ts index f0038faeb..46cb14ef6 100644 --- a/src/api/resources/payments/client/Client.ts +++ b/src/api/resources/payments/client/Client.ts @@ -97,13 +97,13 @@ export class PaymentsClient { unrecognizedObjectKeys: "strip", omitUndefined: true, }) - : undefined, + : null, }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -204,7 +204,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -289,7 +289,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -365,7 +365,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -448,7 +448,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -525,7 +525,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -603,7 +603,7 @@ export class PaymentsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/payments/client/requests/CreatePaymentRequest.ts b/src/api/resources/payments/client/requests/CreatePaymentRequest.ts index bf7db074f..77ef66c24 100644 --- a/src/api/resources/payments/client/requests/CreatePaymentRequest.ts +++ b/src/api/resources/payments/client/requests/CreatePaymentRequest.ts @@ -88,6 +88,13 @@ export interface CreatePaymentRequest { * For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). */ appFeeMoney?: Square.Money; + /** + * Details pertaining to recipients of the application fee. The sum of the amounts in the + * app_fee_allocations must equal the app_fee_money amount, if present. If populated, an + * allocation must be present for every party that expects to receive a portion of the application + * fee, including the application developer. + */ + appFeeAllocations?: unknown[]; /** * The duration of time after the payment's creation when Square automatically * either completes or cancels the payment depending on the `delay_action` field value. diff --git a/src/api/resources/payments/exports.ts b/src/api/resources/payments/exports.ts deleted file mode 100644 index eba9d5cce..000000000 --- a/src/api/resources/payments/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { PaymentsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/payouts/client/Client.ts b/src/api/resources/payouts/client/Client.ts index f0c21867e..a9de82cf3 100644 --- a/src/api/resources/payouts/client/Client.ts +++ b/src/api/resources/payouts/client/Client.ts @@ -57,7 +57,7 @@ export class PayoutsClient { unrecognizedObjectKeys: "strip", omitUndefined: true, }) - : undefined, + : null, begin_time: beginTime, end_time: endTime, sort_order: @@ -66,7 +66,7 @@ export class PayoutsClient { unrecognizedObjectKeys: "strip", omitUndefined: true, }) - : undefined, + : null, cursor, limit, }; @@ -74,7 +74,7 @@ export class PayoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -156,7 +156,7 @@ export class PayoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -230,7 +230,7 @@ export class PayoutsClient { unrecognizedObjectKeys: "strip", omitUndefined: true, }) - : undefined, + : null, cursor, limit, }; @@ -238,7 +238,7 @@ export class PayoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/payouts/exports.ts b/src/api/resources/payouts/exports.ts deleted file mode 100644 index eadf67733..000000000 --- a/src/api/resources/payouts/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { PayoutsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/refunds/client/Client.ts b/src/api/resources/refunds/client/Client.ts index 08658e7f8..aa3ab82da 100644 --- a/src/api/resources/refunds/client/Client.ts +++ b/src/api/resources/refunds/client/Client.ts @@ -87,13 +87,13 @@ export class RefundsClient { unrecognizedObjectKeys: "strip", omitUndefined: true, }) - : undefined, + : null, }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -186,7 +186,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -262,7 +262,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/refunds/client/requests/RefundPaymentRequest.ts b/src/api/resources/refunds/client/requests/RefundPaymentRequest.ts index 887b23384..f84b7db88 100644 --- a/src/api/resources/refunds/client/requests/RefundPaymentRequest.ts +++ b/src/api/resources/refunds/client/requests/RefundPaymentRequest.ts @@ -58,6 +58,13 @@ export interface RefundPaymentRequest { * For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). */ appFeeMoney?: Square.Money; + /** + * Details pertaining to contributors to the refund of the application fee. + * The sum of the amounts in the app_fee_allocations must equal the app_fee_money amount, if + * present. If populated, an allocation must be present for every party that expects to contribute + * a portion of the refunded application fee, including the application developer. + */ + appFeeAllocations?: unknown[] | null; /** * The unique ID of the payment being refunded. * Required when unlinked=false, otherwise must not be set. diff --git a/src/api/resources/refunds/exports.ts b/src/api/resources/refunds/exports.ts deleted file mode 100644 index 1bfb30e22..000000000 --- a/src/api/resources/refunds/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { RefundsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/sites/client/Client.ts b/src/api/resources/sites/client/Client.ts index 52fba3673..f1ae33b79 100644 --- a/src/api/resources/sites/client/Client.ts +++ b/src/api/resources/sites/client/Client.ts @@ -45,7 +45,7 @@ export class SitesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/sites/exports.ts b/src/api/resources/sites/exports.ts deleted file mode 100644 index 5d5012d4c..000000000 --- a/src/api/resources/sites/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { SitesClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/snippets/client/Client.ts b/src/api/resources/snippets/client/Client.ts index e506e6d5a..5136b5906 100644 --- a/src/api/resources/snippets/client/Client.ts +++ b/src/api/resources/snippets/client/Client.ts @@ -55,7 +55,7 @@ export class SnippetsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -134,7 +134,7 @@ export class SnippetsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -215,7 +215,7 @@ export class SnippetsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/snippets/exports.ts b/src/api/resources/snippets/exports.ts deleted file mode 100644 index b8a0dca07..000000000 --- a/src/api/resources/snippets/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { SnippetsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/subscriptions/client/Client.ts b/src/api/resources/subscriptions/client/Client.ts index 24d3cd289..90c244e23 100644 --- a/src/api/resources/subscriptions/client/Client.ts +++ b/src/api/resources/subscriptions/client/Client.ts @@ -69,7 +69,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -147,7 +147,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -246,7 +246,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -326,7 +326,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -405,7 +405,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -487,7 +487,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -564,7 +564,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -647,7 +647,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -725,7 +725,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -811,7 +811,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -892,7 +892,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -979,7 +979,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/subscriptions/exports.ts b/src/api/resources/subscriptions/exports.ts deleted file mode 100644 index c81709609..000000000 --- a/src/api/resources/subscriptions/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { SubscriptionsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/team/client/Client.ts b/src/api/resources/team/client/Client.ts index a1e59e27f..16907dc6f 100644 --- a/src/api/resources/team/client/Client.ts +++ b/src/api/resources/team/client/Client.ts @@ -53,7 +53,7 @@ export class TeamClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -127,7 +127,7 @@ export class TeamClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -203,7 +203,7 @@ export class TeamClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -284,7 +284,7 @@ export class TeamClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/team/exports.ts b/src/api/resources/team/exports.ts deleted file mode 100644 index 51ee1de62..000000000 --- a/src/api/resources/team/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { TeamClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/teamMembers/client/Client.ts b/src/api/resources/teamMembers/client/Client.ts index 6389162b7..7db7a22c4 100644 --- a/src/api/resources/teamMembers/client/Client.ts +++ b/src/api/resources/teamMembers/client/Client.ts @@ -91,7 +91,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -197,7 +197,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -306,7 +306,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -389,7 +389,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -466,7 +466,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -575,7 +575,7 @@ export class TeamMembersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/teamMembers/exports.ts b/src/api/resources/teamMembers/exports.ts deleted file mode 100644 index 454d0d7b4..000000000 --- a/src/api/resources/teamMembers/exports.ts +++ /dev/null @@ -1,5 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { TeamMembersClient } from "./client/Client"; -export * from "./client/index"; -export * from "./resources/index"; diff --git a/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts b/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts index 5abfae9e6..804521edf 100644 --- a/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts +++ b/src/api/resources/teamMembers/resources/wageSetting/client/Client.ts @@ -55,7 +55,7 @@ export class WageSettingClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -156,7 +156,7 @@ export class WageSettingClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/teamMembers/resources/wageSetting/exports.ts b/src/api/resources/teamMembers/resources/wageSetting/exports.ts deleted file mode 100644 index 1caaead85..000000000 --- a/src/api/resources/teamMembers/resources/wageSetting/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { WageSettingClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/terminal/client/Client.ts b/src/api/resources/terminal/client/Client.ts index 534a96487..f0cb9e79c 100644 --- a/src/api/resources/terminal/client/Client.ts +++ b/src/api/resources/terminal/client/Client.ts @@ -70,7 +70,7 @@ export class TerminalClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -145,7 +145,7 @@ export class TerminalClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -220,7 +220,7 @@ export class TerminalClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/terminal/exports.ts b/src/api/resources/terminal/exports.ts deleted file mode 100644 index a2ad5ee01..000000000 --- a/src/api/resources/terminal/exports.ts +++ /dev/null @@ -1,5 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { TerminalClient } from "./client/Client"; -export * from "./client/index"; -export * from "./resources/index"; diff --git a/src/api/resources/terminal/resources/actions/client/Client.ts b/src/api/resources/terminal/resources/actions/client/Client.ts index e9ac30dc2..2bb65adfb 100644 --- a/src/api/resources/terminal/resources/actions/client/Client.ts +++ b/src/api/resources/terminal/resources/actions/client/Client.ts @@ -58,7 +58,7 @@ export class ActionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -143,7 +143,7 @@ export class ActionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -219,7 +219,7 @@ export class ActionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -294,7 +294,7 @@ export class ActionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/terminal/resources/actions/exports.ts b/src/api/resources/terminal/resources/actions/exports.ts deleted file mode 100644 index 1893fe644..000000000 --- a/src/api/resources/terminal/resources/actions/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { ActionsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/terminal/resources/checkouts/client/Client.ts b/src/api/resources/terminal/resources/checkouts/client/Client.ts index 067ad3564..01ab09c89 100644 --- a/src/api/resources/terminal/resources/checkouts/client/Client.ts +++ b/src/api/resources/terminal/resources/checkouts/client/Client.ts @@ -61,7 +61,7 @@ export class CheckoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -141,7 +141,7 @@ export class CheckoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -222,7 +222,7 @@ export class CheckoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -297,7 +297,7 @@ export class CheckoutsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/terminal/resources/checkouts/exports.ts b/src/api/resources/terminal/resources/checkouts/exports.ts deleted file mode 100644 index 2020d5f4a..000000000 --- a/src/api/resources/terminal/resources/checkouts/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { CheckoutsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/terminal/resources/refunds/client/Client.ts b/src/api/resources/terminal/resources/refunds/client/Client.ts index 0979ddfa9..683468d8c 100644 --- a/src/api/resources/terminal/resources/refunds/client/Client.ts +++ b/src/api/resources/terminal/resources/refunds/client/Client.ts @@ -58,7 +58,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -138,7 +138,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -214,7 +214,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -289,7 +289,7 @@ export class RefundsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/terminal/resources/refunds/exports.ts b/src/api/resources/terminal/resources/refunds/exports.ts deleted file mode 100644 index 1bfb30e22..000000000 --- a/src/api/resources/terminal/resources/refunds/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { RefundsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/transferOrders/client/Client.ts b/src/api/resources/transferOrders/client/Client.ts index 6f2dfdb5a..9b6c09075 100644 --- a/src/api/resources/transferOrders/client/Client.ts +++ b/src/api/resources/transferOrders/client/Client.ts @@ -83,7 +83,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -173,7 +173,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -271,7 +271,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -368,7 +368,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -457,7 +457,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -543,7 +543,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -653,7 +653,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -743,7 +743,7 @@ export class TransferOrdersClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/transferOrders/exports.ts b/src/api/resources/transferOrders/exports.ts deleted file mode 100644 index fa2b8c58e..000000000 --- a/src/api/resources/transferOrders/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { TransferOrdersClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/v1Transactions/client/Client.ts b/src/api/resources/v1Transactions/client/Client.ts index 57cfabf53..e599da1d9 100644 --- a/src/api/resources/v1Transactions/client/Client.ts +++ b/src/api/resources/v1Transactions/client/Client.ts @@ -24,8 +24,6 @@ export class V1TransactionsClient { } /** - * @deprecated - * * Provides summary information for a merchant's online store orders. * * @param {Square.V1ListOrdersRequest} request @@ -55,7 +53,7 @@ export class V1TransactionsClient { order: order !== undefined ? serializers.SortOrder.jsonOrThrow(order, { unrecognizedObjectKeys: "strip", omitUndefined: true }) - : undefined, + : null, limit, batch_token: batchToken, }; @@ -63,7 +61,7 @@ export class V1TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -107,8 +105,6 @@ export class V1TransactionsClient { } /** - * @deprecated - * * Provides comprehensive information for a single online store order, including the order's history. * * @param {Square.V1RetrieveOrderRequest} request @@ -136,7 +132,7 @@ export class V1TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -185,8 +181,6 @@ export class V1TransactionsClient { } /** - * @deprecated - * * Updates the details of an online store order. Every update you perform on an order corresponds to one of three actions: * * @param {Square.V1UpdateOrderRequest} request @@ -215,7 +209,7 @@ export class V1TransactionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/v1Transactions/exports.ts b/src/api/resources/v1Transactions/exports.ts deleted file mode 100644 index c349b8a7b..000000000 --- a/src/api/resources/v1Transactions/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { V1TransactionsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/vendors/client/Client.ts b/src/api/resources/vendors/client/Client.ts index 5ed3f17b0..d0255b28d 100644 --- a/src/api/resources/vendors/client/Client.ts +++ b/src/api/resources/vendors/client/Client.ts @@ -69,7 +69,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -144,7 +144,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -226,7 +226,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -320,7 +320,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -393,7 +393,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -469,7 +469,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -548,7 +548,7 @@ export class VendorsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/vendors/exports.ts b/src/api/resources/vendors/exports.ts deleted file mode 100644 index 2d371726a..000000000 --- a/src/api/resources/vendors/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { VendorsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/webhooks/exports.ts b/src/api/resources/webhooks/exports.ts deleted file mode 100644 index f1c7c94fd..000000000 --- a/src/api/resources/webhooks/exports.ts +++ /dev/null @@ -1,5 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { WebhooksClient } from "./client/Client"; -export * from "./client/index"; -export * from "./resources/index"; diff --git a/src/api/resources/webhooks/resources/eventTypes/client/Client.ts b/src/api/resources/webhooks/resources/eventTypes/client/Client.ts index c0273db6d..9dfeb98e0 100644 --- a/src/api/resources/webhooks/resources/eventTypes/client/Client.ts +++ b/src/api/resources/webhooks/resources/eventTypes/client/Client.ts @@ -53,7 +53,7 @@ export class EventTypesClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/webhooks/resources/eventTypes/exports.ts b/src/api/resources/webhooks/resources/eventTypes/exports.ts deleted file mode 100644 index f072eb204..000000000 --- a/src/api/resources/webhooks/resources/eventTypes/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { EventTypesClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/resources/webhooks/resources/subscriptions/client/Client.ts b/src/api/resources/webhooks/resources/subscriptions/client/Client.ts index f4dc413aa..f16a46a9f 100644 --- a/src/api/resources/webhooks/resources/subscriptions/client/Client.ts +++ b/src/api/resources/webhooks/resources/subscriptions/client/Client.ts @@ -55,14 +55,14 @@ export class SubscriptionsClient { unrecognizedObjectKeys: "strip", omitUndefined: true, }) - : undefined, + : null, limit, }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -153,7 +153,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -229,7 +229,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -308,7 +308,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -389,7 +389,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -465,7 +465,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ @@ -547,7 +547,7 @@ export class SubscriptionsClient { const _headers: core.Fetcher.Args["headers"] = mergeHeaders( _authRequest.headers, this._options?.headers, - mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-01-22" }), + mergeOnlyDefinedHeaders({ "Square-Version": requestOptions?.version ?? "2026-05-20" }), requestOptions?.headers, ); const _response = await (this._options.fetcher ?? core.fetcher)({ diff --git a/src/api/resources/webhooks/resources/subscriptions/exports.ts b/src/api/resources/webhooks/resources/subscriptions/exports.ts deleted file mode 100644 index c81709609..000000000 --- a/src/api/resources/webhooks/resources/subscriptions/exports.ts +++ /dev/null @@ -1,4 +0,0 @@ -// This file was auto-generated by Fern from our API Definition. - -export { SubscriptionsClient } from "./client/Client"; -export * from "./client/index"; diff --git a/src/api/types/CardPaymentDetails.ts b/src/api/types/CardPaymentDetails.ts index 8e3fe5843..3bdb7095f 100644 --- a/src/api/types/CardPaymentDetails.ts +++ b/src/api/types/CardPaymentDetails.ts @@ -71,4 +71,16 @@ export interface CardPaymentDetails { refundRequiresCardPresence?: boolean; /** Information about errors encountered during the request. */ errors?: Square.Error_[]; + /** Additional information about a card_surcharge on the payment. */ + appliedCardSurchargeDetails?: Square.CardSurchargeDetails; + /** + * The type of digital wallet used for this card payment, if applicable. + * Currently only populated for in-person Apple Pay payments. Detection has no false + * positives but may have false negatives (some Apple Pay payments may not be detected). + * + * For payments with `source_type` of `WALLET`, see `DigitalWalletDetails` instead. + * + * Values: `APPLE_PAY` + */ + walletType?: string; } diff --git a/src/api/types/CardSurchargeDetails.ts b/src/api/types/CardSurchargeDetails.ts new file mode 100644 index 000000000..2d6862dce --- /dev/null +++ b/src/api/types/CardSurchargeDetails.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Details related to an attempt to apply a card surcharge to this payment. When surcharge + * eligibility is not known in advance, such as when the card type (debit or credit) is required + * to make the eligibility determination, proposed_card_surcharge_money and + * proposed_additional_amount_money will match the values in the request, while card_surcharge_money + * and additional_amount_money are present only when the payment has a surcharge applied. + */ +export interface CardSurchargeDetails { + /** + * A specific surcharge levied by the merchant, if a card payment is used, instead of cash or + * some other payment type. Should only include the base surcharge amount. Any additional fees related + * to the surcharge (e.g. taxes on the surcharge) should only be included in the additional_amount_money. + * This amount is specified in the smallest denomination of the applicable currency (for example, + * US dollar amounts are specified in cents). For more information, see + * [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). + * The currency code must match the currency associated with the business that is accepting the + * payment. + */ + cardSurchargeMoney?: Square.Money; +} diff --git a/src/api/types/DigitalWalletDetails.ts b/src/api/types/DigitalWalletDetails.ts index cd30be5bb..a84702d84 100644 --- a/src/api/types/DigitalWalletDetails.ts +++ b/src/api/types/DigitalWalletDetails.ts @@ -18,6 +18,8 @@ export interface DigitalWalletDetails { brand?: string | null; /** Brand-specific details for payments with the `brand` of `CASH_APP`. */ cashAppDetails?: Square.CashAppDetails; + /** Brand-specific details for payments with the `brand` of `LIGHTNING`. */ + lightningDetails?: Square.LightningDetails; /** Information about errors encountered during the payment. */ errors?: Square.Error_[]; } diff --git a/src/api/types/ElectronicMoneyDetails.ts b/src/api/types/ElectronicMoneyDetails.ts new file mode 100644 index 000000000..bb11fb88f --- /dev/null +++ b/src/api/types/ElectronicMoneyDetails.ts @@ -0,0 +1,11 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Details specific to electronic money payments. + */ +export interface ElectronicMoneyDetails { + /** Details specific to FeliCa payments. */ + felicaDetails?: Square.FelicaDetails; +} diff --git a/src/api/types/FelicaDetails.ts b/src/api/types/FelicaDetails.ts new file mode 100644 index 000000000..41ac1538b --- /dev/null +++ b/src/api/types/FelicaDetails.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../index"; + +/** + * Details for Felica payments. + */ +export interface FelicaDetails { + /** The terminal id for a Felica payment. */ + terminalId?: string | null; + /** The masked card number for a Felica payment. */ + felicaMaskedCardNumber?: string | null; + /** + * The Felica sub-brand of the payment. + * See [FelicaBrand](#type-felicabrand) for possible values + */ + felicaBrand?: Square.FelicaDetailsFelicaBrand; +} diff --git a/src/api/types/FelicaDetailsFelicaBrand.ts b/src/api/types/FelicaDetailsFelicaBrand.ts new file mode 100644 index 000000000..d27085db8 --- /dev/null +++ b/src/api/types/FelicaDetailsFelicaBrand.ts @@ -0,0 +1,10 @@ +// This file was auto-generated by Fern from our API Definition. + +/** A Felica card's "sub-brand"--the actual brand on the Felica card */ +export const FelicaDetailsFelicaBrand = { + Unknown: "UNKNOWN", + FelicaId: "FELICA_ID", + FelicaTransportation: "FELICA_TRANSPORTATION", + FelicaQp: "FELICA_QP", +} as const; +export type FelicaDetailsFelicaBrand = (typeof FelicaDetailsFelicaBrand)[keyof typeof FelicaDetailsFelicaBrand]; diff --git a/src/api/types/LightningDetails.ts b/src/api/types/LightningDetails.ts new file mode 100644 index 000000000..57faa6d9b --- /dev/null +++ b/src/api/types/LightningDetails.ts @@ -0,0 +1,9 @@ +// This file was auto-generated by Fern from our API Definition. + +/** + * Additional details about `WALLET` type payments with the `brand` of `LIGHTNING`. + */ +export interface LightningDetails { + /** Payment URL for the lightning payment, a.k.a. the invoice. */ + paymentUrl?: string | null; +} diff --git a/src/api/types/Payment.ts b/src/api/types/Payment.ts index 2ffb66b93..0750fa14e 100644 --- a/src/api/types/Payment.ts +++ b/src/api/types/Payment.ts @@ -49,6 +49,8 @@ export interface Payment { * For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). */ appFeeMoney?: Square.Money; + /** Details pertaining to recipients of the application fee. */ + appFeeAllocations?: unknown[] | null; /** * The amount of money approved for this payment. This value may change if Square chooses to * obtain reauthorization as part of a call to [UpdatePayment](api-endpoint:Payments-UpdatePayment). @@ -111,6 +113,8 @@ export interface Payment { cashDetails?: Square.CashPaymentDetails; /** Details about a bank account payment. These details are only populated if the source_type is `BANK_ACCOUNT`. */ bankAccountDetails?: Square.BankAccountPaymentDetails; + /** Details specific to electronic money payments. */ + electronicMoneyDetails?: Square.ElectronicMoneyDetails; /** * Details about an external payment. The details are only populated * if the `source_type` is `EXTERNAL`. @@ -215,6 +219,7 @@ export interface Payment { deviceDetails?: Square.DeviceDetails; /** Details about the application that took the payment. */ applicationDetails?: Square.ApplicationDetails; + buyerCurrencyExchange?: unknown; /** Whether or not this payment was taken offline. */ isOfflinePayment?: boolean; /** Additional information about the payment if it was taken offline. */ diff --git a/src/api/types/PaymentRefund.ts b/src/api/types/PaymentRefund.ts index a71e28dd2..4815977b4 100644 --- a/src/api/types/PaymentRefund.ts +++ b/src/api/types/PaymentRefund.ts @@ -45,6 +45,8 @@ export interface PaymentRefund { * [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). */ appFeeMoney?: Square.Money; + /** Details pertaining to contributors to the refund of the application fee. */ + appFeeAllocations?: unknown[]; /** Processing fees and fee adjustments assessed by Square for this refund. */ processingFee?: Square.ProcessingFee[] | null; /** The ID of the payment associated with this refund. */ diff --git a/src/api/types/SearchOrdersSourceFilter.ts b/src/api/types/SearchOrdersSourceFilter.ts index e99802f98..8b9578249 100644 --- a/src/api/types/SearchOrdersSourceFilter.ts +++ b/src/api/types/SearchOrdersSourceFilter.ts @@ -11,18 +11,4 @@ export interface SearchOrdersSourceFilter { * Max: 10 source names. */ sourceNames?: string[] | null; - /** - * Filters by the [Source](entity:OrderSource) `applicationId`. The filter returns any orders - * with a `source.applicationId` that matches any of the listed source applicationIds. - * - * Max: 100 source applicationIds. - */ - sourceApplicationIds?: string[] | null; - /** - * Filters by the [Source](entity:OrderSource) `clientOu`. The filter returns any orders - * with a `source.clientOu` that matches any of the listed source clientOus. - * - * Max: 100 source clientOus. - */ - sourceClientOus?: string[] | null; } diff --git a/src/api/types/index.ts b/src/api/types/index.ts index a5a645063..1626e884f 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -148,6 +148,7 @@ export * from "./CardIssuerAlert"; export * from "./CardPaymentDetails"; export * from "./CardPaymentTimeline"; export * from "./CardPrepaidType"; +export * from "./CardSurchargeDetails"; export * from "./CardType"; export * from "./CardUpdatedEvent"; export * from "./CardUpdatedEventData"; @@ -487,6 +488,7 @@ export * from "./DisputeStateUpdatedEvent"; export * from "./DisputeStateUpdatedEventData"; export * from "./DisputeStateUpdatedEventObject"; export * from "./EcomVisibility"; +export * from "./ElectronicMoneyDetails"; export * from "./Employee"; export * from "./EmployeeStatus"; export * from "./EmployeeWage"; @@ -500,6 +502,8 @@ export * from "./EventMetadata"; export * from "./EventTypeMetadata"; export * from "./ExcludeStrategy"; export * from "./ExternalPaymentDetails"; +export * from "./FelicaDetails"; +export * from "./FelicaDetailsFelicaBrand"; export * from "./FilterValue"; export * from "./FloatNumberRange"; export * from "./Fulfillment"; @@ -731,6 +735,7 @@ export * from "./LaborTimecardDeletedEventData"; export * from "./LaborTimecardUpdatedEvent"; export * from "./LaborTimecardUpdatedEventData"; export * from "./LaborTimecardUpdatedEventObject"; +export * from "./LightningDetails"; export * from "./LinkCustomerToGiftCardResponse"; export * from "./ListBankAccountsResponse"; export * from "./ListBookingCustomAttributeDefinitionsResponse"; diff --git a/src/core/fetcher/BinaryResponse.ts b/src/core/fetcher/BinaryResponse.ts index b9e40fb62..bca7f4c77 100644 --- a/src/core/fetcher/BinaryResponse.ts +++ b/src/core/fetcher/BinaryResponse.ts @@ -14,7 +14,7 @@ export type BinaryResponse = { * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) * Some versions of the Fetch API may not support this method. */ - bytes?(): Promise; + bytes?(): ReturnType; }; export function getBinaryResponse(response: Response): BinaryResponse { diff --git a/src/core/fetcher/Fetcher.ts b/src/core/fetcher/Fetcher.ts index 0858d135d..7c22d4f8f 100644 --- a/src/core/fetcher/Fetcher.ts +++ b/src/core/fetcher/Fetcher.ts @@ -218,13 +218,7 @@ async function getHeaders(args: Fetcher.Args): Promise { newHeaders.set( "Accept", - args.responseType === "json" - ? "application/json" - : args.responseType === "text" - ? "text/plain" - : args.responseType === "sse" - ? "text/event-stream" - : "*/*", + args.responseType === "json" ? "application/json" : args.responseType === "text" ? "text/plain" : "*/*", ); if (args.body !== undefined && args.contentType != null) { newHeaders.set("Content-Type", args.contentType); @@ -282,7 +276,6 @@ export async function fetcherImpl(args: Fetcher.Args): Promise Promise, url: string, @@ -36,7 +10,6 @@ export const makeRequest = async ( abortSignal?: AbortSignal, withCredentials?: boolean, duplex?: "half", - disableCache?: boolean, ): Promise => { const signals: AbortSignal[] = []; @@ -59,7 +32,6 @@ export const makeRequest = async ( credentials: withCredentials ? "include" : undefined, // @ts-ignore duplex, - ...(disableCache && isCacheNoStoreSupported() ? { cache: "no-store" as RequestCache } : {}), }); if (timeoutAbortId != null) { diff --git a/src/core/pagination/CustomPager.ts b/src/core/pagination/CustomPager.ts new file mode 100644 index 000000000..5476b0319 --- /dev/null +++ b/src/core/pagination/CustomPager.ts @@ -0,0 +1,194 @@ +import type { BaseRequestOptions, NormalizedClientOptions } from "../../BaseClient"; +import type { APIResponse } from "../fetcher/APIResponse"; +import type { Fetcher } from "../fetcher/Fetcher"; +import type { RawResponse } from "../fetcher/index"; + +/** + * + * @template TItem The type of the items in the page. + * @template TResponse The type of the API response. + */ +export class CustomPager implements AsyncIterable { + /** The items from the current page */ + public data: TItem[]; + /** The raw HTTP response */ + public rawResponse: RawResponse; + /** The parsed response object */ + public response: TResponse; + + private sendRequest: (request: Fetcher.Args) => Promise>; + private nextRequest?: Fetcher.Args; + private previousRequest?: Fetcher.Args; + private _hasNextPage: boolean; + private _hasPreviousPage: boolean; + + constructor(args: { + response: TResponse; + rawResponse: RawResponse; + items: TItem[]; + hasNextPage: boolean; + hasPreviousPage: boolean; + nextRequest?: Fetcher.Args; + previousRequest?: Fetcher.Args; + sendRequest: (request: Fetcher.Args) => Promise>; + }) { + this.response = args.response; + this.rawResponse = args.rawResponse; + this.data = args.items; + this._hasNextPage = args.hasNextPage; + this._hasPreviousPage = args.hasPreviousPage; + this.nextRequest = args.nextRequest; + this.previousRequest = args.previousRequest; + this.sendRequest = args.sendRequest; + } + + /** + * @returns whether there is a next page to load + */ + public hasNextPage(): boolean { + return this._hasNextPage; + } + + /** + * @returns whether there is a previous page to load + */ + public hasPreviousPage(): boolean { + return this._hasPreviousPage; + } + + /** + * Returns the current page data. + * This is an alias for the `data` property for consistency with other pagination APIs. + * + * @returns the items from the current page + */ + public getCurrentPage(): TItem[] { + return this.data; + } + + /** + * Retrieves the next page of results. + * @returns this pager with updated data + * @throws Error if there is no next page + */ + public async getNextPage(): Promise { + if (!this._hasNextPage || !this.nextRequest) { + throw new Error("No next page available"); + } + const response = await this.sendRequest(this.nextRequest); + if (!response.ok) { + const reason = + response.error.reason === "status-code" ? `HTTP ${response.error.statusCode}` : response.error.reason; + throw new Error(`Failed to fetch next page: ${reason}`); + } + const data = response.body; + const rawResponse = response.rawResponse; + const parsed = await parse({ request: this.nextRequest, data, rawResponse }); + this.response = data; + this.rawResponse = rawResponse; + this.data = parsed.items; + this._hasNextPage = parsed.hasNextPage; + this._hasPreviousPage = parsed.hasPreviousPage; + this.nextRequest = parsed.nextRequest; + this.previousRequest = parsed.previousRequest; + return this; + } + + /** + * Retrieves the previous page of results. + * @returns this pager with updated data + * @throws Error if there is no previous page + */ + public async getPreviousPage(): Promise { + if (!this._hasPreviousPage || !this.previousRequest) { + throw new Error("No previous page available"); + } + const response = await this.sendRequest(this.previousRequest); + if (!response.ok) { + const reason = + response.error.reason === "status-code" ? `HTTP ${response.error.statusCode}` : response.error.reason; + throw new Error(`Failed to fetch previous page: ${reason}`); + } + const data = response.body; + const rawResponse = response.rawResponse; + const parsed = await parse({ request: this.previousRequest, data, rawResponse }); + this.response = data; + this.rawResponse = rawResponse; + this.data = parsed.items; + this._hasNextPage = parsed.hasNextPage; + this._hasPreviousPage = parsed.hasPreviousPage; + this.nextRequest = parsed.nextRequest; + this.previousRequest = parsed.previousRequest; + return this; + } + + private async *iterMessages(): AsyncGenerator { + for (const item of this.data) { + yield item; + } + + while (this.hasNextPage()) { + await this.getNextPage(); + for (const item of this.data) { + yield item; + } + } + } + + async *[Symbol.asyncIterator](): AsyncIterator { + for await (const message of this.iterMessages()) { + yield message; + } + } +} + +export async function createCustomPager({ + sendRequest, + initialHttpRequest, + clientOptions, +}: { + sendRequest: (request: Fetcher.Args) => Promise>; + initialHttpRequest: Fetcher.Args; + clientOptions: NormalizedClientOptions; + requestOptions?: BaseRequestOptions; +}): Promise> { + const response = await sendRequest(initialHttpRequest); + if (!response.ok) { + const reason = + response.error.reason === "status-code" ? `HTTP ${response.error.statusCode}` : response.error.reason; + throw new Error(`Failed to fetch initial page: ${reason}`); + } + const data = response.body; + const rawResponse = response.rawResponse; + const parsed = await parse({ request: initialHttpRequest, data, rawResponse }); + return new CustomPager({ + response: data, + rawResponse, + items: parsed.items, + hasNextPage: parsed.hasNextPage, + hasPreviousPage: parsed.hasPreviousPage, + nextRequest: parsed.nextRequest, + previousRequest: parsed.previousRequest, + sendRequest: sendRequest, + }); +} + +async function parse(_args: { + request: Fetcher.Args; + data: TResponse; + rawResponse: RawResponse; +}): Promise<{ + nextRequest?: Fetcher.Args; + hasNextPage: boolean; + previousRequest?: Fetcher.Args; + hasPreviousPage: boolean; + items: TItem[]; +}> { + // Placeholder implementation. + // TODO: Replace this with actual parsing logic. + return { + items: [], + hasNextPage: false, + hasPreviousPage: false, + }; +} diff --git a/src/core/pagination/Page.ts b/src/core/pagination/Page.ts index a95471400..6e884eccb 100644 --- a/src/core/pagination/Page.ts +++ b/src/core/pagination/Page.ts @@ -68,7 +68,7 @@ export class Page implements AsyncIterable { } } - async *[Symbol.asyncIterator](): AsyncIterator { + async *[Symbol.asyncIterator](): AsyncIterator { for await (const message of this.iterMessages()) { yield message; } diff --git a/src/core/pagination/index.ts b/src/core/pagination/index.ts index 46cc304af..489f59cf6 100644 --- a/src/core/pagination/index.ts +++ b/src/core/pagination/index.ts @@ -1 +1,2 @@ +export { CustomPager, createCustomPager } from "./CustomPager"; export { Page } from "./Page"; diff --git a/src/core/runtime/runtime.ts b/src/core/runtime/runtime.ts index e6e66b2a7..56ebbb87c 100644 --- a/src/core/runtime/runtime.ts +++ b/src/core/runtime/runtime.ts @@ -113,18 +113,18 @@ function evaluateRuntime(): Runtime { /** * A constant that indicates whether the environment the code is running is Node.JS. - * - * We assign `process` to a local variable first to avoid being flagged by - * bundlers that perform static analysis on `process.versions` (e.g. Next.js - * Edge Runtime warns about Node.js APIs even when they are guarded). */ - const _process = typeof process !== "undefined" ? process : undefined; - const isNode = typeof _process !== "undefined" && typeof _process.versions?.node === "string"; + const isNode = + typeof process !== "undefined" && + "version" in process && + !!process.version && + "versions" in process && + !!process.versions?.node; if (isNode) { return { type: "node", - version: _process.versions.node, - parsedVersion: Number(_process.versions.node.split(".")[0]), + version: process.versions.node, + parsedVersion: Number(process.versions.node.split(".")[0]), }; } diff --git a/src/core/schemas/builders/list/list.ts b/src/core/schemas/builders/list/list.ts index 191922f17..7c8fd6e87 100644 --- a/src/core/schemas/builders/list/list.ts +++ b/src/core/schemas/builders/list/list.ts @@ -44,20 +44,30 @@ function validateAndTransformArray( }; } - const result: Parsed[] = []; - const errors: ValidationError[] = []; + const maybeValidItems = value.map((item, index) => transformItem(item, index)); - for (let i = 0; i < value.length; i++) { - const item = transformItem(value[i], i); - if (item.ok) { - result.push(item.value); - } else { - errors.push(...item.errors); - } - } + return maybeValidItems.reduce>( + (acc, item) => { + if (acc.ok && item.ok) { + return { + ok: true, + value: [...acc.value, item.value], + }; + } - if (errors.length === 0) { - return { ok: true, value: result }; - } - return { ok: false, errors }; + const errors: ValidationError[] = []; + if (!acc.ok) { + errors.push(...acc.errors); + } + if (!item.ok) { + errors.push(...item.errors); + } + + return { + ok: false, + errors, + }; + }, + { ok: true, value: [] }, + ); } diff --git a/src/core/schemas/builders/object-like/getObjectLikeUtils.ts b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts index 9f2777f6f..ed96cf771 100644 --- a/src/core/schemas/builders/object-like/getObjectLikeUtils.ts +++ b/src/core/schemas/builders/object-like/getObjectLikeUtils.ts @@ -5,9 +5,6 @@ import { isPlainObject } from "../../utils/isPlainObject"; import { getSchemaUtils } from "../schema-utils/index"; import type { ObjectLikeSchema, ObjectLikeUtils } from "./types"; -// eslint-disable-next-line @typescript-eslint/unbound-method -const _hasOwn = Object.prototype.hasOwnProperty; - export function getObjectLikeUtils(schema: BaseSchema): ObjectLikeUtils { return { withParsedProperties: (properties) => withParsedProperties(schema, properties), @@ -29,14 +26,15 @@ export function withParsedProperties = {}; - for (const key in properties) { - if (_hasOwn.call(properties, key)) { - const value = properties[key as keyof Properties]; - additionalProperties[key] = - typeof value === "function" ? (value as Function)(parsedObject.value) : value; - } - } + const additionalProperties = Object.entries(properties).reduce>( + (processed, [key, value]) => { + return { + ...processed, + [key]: typeof value === "function" ? value(parsedObject.value) : value, + }; + }, + {}, + ); return { ok: true, diff --git a/src/core/schemas/builders/object/object.ts b/src/core/schemas/builders/object/object.ts index eb48a1116..bdad80767 100644 --- a/src/core/schemas/builders/object/object.ts +++ b/src/core/schemas/builders/object/object.ts @@ -19,9 +19,6 @@ import type { PropertySchemas, } from "./types"; -// eslint-disable-next-line @typescript-eslint/unbound-method -const _hasOwn = Object.prototype.hasOwnProperty; - interface ObjectPropertyWithRawKey { rawKey: string; parsedKey: string; @@ -31,128 +28,79 @@ interface ObjectPropertyWithRawKey { export function object>( schemas: T, ): inferObjectSchemaFromPropertySchemas { - // All property metadata is lazily computed on first use. - // This keeps schema construction free of iteration, which matters when - // many schemas are defined but only some are exercised at runtime. - // Required-key computation is also deferred because lazy() schemas may - // not be resolved at construction time. + const baseSchema: BaseObjectSchema< + inferRawObjectFromPropertySchemas, + inferParsedObjectFromPropertySchemas + > = { + _getRawProperties: () => + Object.entries(schemas).map(([parsedKey, propertySchema]) => + isProperty(propertySchema) ? propertySchema.rawKey : parsedKey, + ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], + _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], - let _rawKeyToProperty: Record | undefined; + parse: (raw, opts) => { + const rawKeyToProperty: Record = {}; + const requiredKeys: string[] = []; - function getRawKeyToProperty(): Record { - if (_rawKeyToProperty == null) { - _rawKeyToProperty = {}; for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { - const rawKey = isProperty(schemaOrObjectProperty) - ? schemaOrObjectProperty.rawKey - : (parsedKey as string); + const rawKey = isProperty(schemaOrObjectProperty) ? schemaOrObjectProperty.rawKey : parsedKey; const valueSchema: Schema = isProperty(schemaOrObjectProperty) ? schemaOrObjectProperty.valueSchema : schemaOrObjectProperty; - _rawKeyToProperty[rawKey] = { + const property: ObjectPropertyWithRawKey = { rawKey, parsedKey: parsedKey as string, valueSchema, }; - } - } - return _rawKeyToProperty; - } - let _parseRequiredKeys: string[] | undefined; - let _jsonRequiredKeys: string[] | undefined; - let _parseRequiredKeysSet: Set | undefined; - let _jsonRequiredKeysSet: Set | undefined; + rawKeyToProperty[rawKey] = property; - function getParseRequiredKeys(): string[] { - if (_parseRequiredKeys == null) { - _parseRequiredKeys = []; - _jsonRequiredKeys = []; - for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { - const rawKey = isProperty(schemaOrObjectProperty) - ? schemaOrObjectProperty.rawKey - : (parsedKey as string); - const valueSchema: Schema = isProperty(schemaOrObjectProperty) - ? schemaOrObjectProperty.valueSchema - : schemaOrObjectProperty; if (isSchemaRequired(valueSchema)) { - _parseRequiredKeys.push(rawKey); - _jsonRequiredKeys.push(parsedKey as string); + requiredKeys.push(rawKey); } } - _parseRequiredKeysSet = new Set(_parseRequiredKeys); - _jsonRequiredKeysSet = new Set(_jsonRequiredKeys); - } - return _parseRequiredKeys; - } - function getJsonRequiredKeys(): string[] { - if (_jsonRequiredKeys == null) { - getParseRequiredKeys(); - } - return _jsonRequiredKeys!; - } - - function getParseRequiredKeysSet(): Set { - if (_parseRequiredKeysSet == null) { - getParseRequiredKeys(); - } - return _parseRequiredKeysSet!; - } - - function getJsonRequiredKeysSet(): Set { - if (_jsonRequiredKeysSet == null) { - getParseRequiredKeys(); - } - return _jsonRequiredKeysSet!; - } - - const baseSchema: BaseObjectSchema< - inferRawObjectFromPropertySchemas, - inferParsedObjectFromPropertySchemas - > = { - _getRawProperties: () => - Object.entries(schemas).map(([parsedKey, propertySchema]) => - isProperty(propertySchema) ? propertySchema.rawKey : parsedKey, - ) as unknown as (keyof inferRawObjectFromPropertySchemas)[], - _getParsedProperties: () => keys(schemas) as unknown as (keyof inferParsedObjectFromPropertySchemas)[], - - parse: (raw, opts) => { - const breadcrumbsPrefix = opts?.breadcrumbsPrefix ?? []; return validateAndTransformObject({ value: raw, - requiredKeys: getParseRequiredKeys(), - requiredKeysSet: getParseRequiredKeysSet(), + requiredKeys, getProperty: (rawKey) => { - const property = getRawKeyToProperty()[rawKey]; + const property = rawKeyToProperty[rawKey]; if (property == null) { return undefined; } return { transformedKey: property.parsedKey, - transform: (propertyValue) => { - const childBreadcrumbs = [...breadcrumbsPrefix, rawKey]; - return property.valueSchema.parse(propertyValue, { + transform: (propertyValue) => + property.valueSchema.parse(propertyValue, { ...opts, - breadcrumbsPrefix: childBreadcrumbs, - }); - }, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), rawKey], + }), }; }, unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, skipValidation: opts?.skipValidation, - breadcrumbsPrefix, + breadcrumbsPrefix: opts?.breadcrumbsPrefix, omitUndefined: opts?.omitUndefined, }); }, json: (parsed, opts) => { - const breadcrumbsPrefix = opts?.breadcrumbsPrefix ?? []; + const requiredKeys: string[] = []; + + for (const [parsedKey, schemaOrObjectProperty] of entries(schemas)) { + const valueSchema: Schema = isProperty(schemaOrObjectProperty) + ? schemaOrObjectProperty.valueSchema + : schemaOrObjectProperty; + + if (isSchemaRequired(valueSchema)) { + requiredKeys.push(parsedKey as string); + } + } + return validateAndTransformObject({ value: parsed, - requiredKeys: getJsonRequiredKeys(), - requiredKeysSet: getJsonRequiredKeysSet(), + requiredKeys, getProperty: ( parsedKey, ): { transformedKey: string; transform: (propertyValue: object) => MaybeValid } | undefined => { @@ -166,30 +114,26 @@ export function object { - const childBreadcrumbs = [...breadcrumbsPrefix, parsedKey]; - return property.valueSchema.json(propertyValue, { + transform: (propertyValue) => + property.valueSchema.json(propertyValue, { ...opts, - breadcrumbsPrefix: childBreadcrumbs, - }); - }, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], + }), }; } else { return { transformedKey: parsedKey, - transform: (propertyValue) => { - const childBreadcrumbs = [...breadcrumbsPrefix, parsedKey]; - return property.json(propertyValue, { + transform: (propertyValue) => + property.json(propertyValue, { ...opts, - breadcrumbsPrefix: childBreadcrumbs, - }); - }, + breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), parsedKey], + }), }; } }, unrecognizedObjectKeys: opts?.unrecognizedObjectKeys, skipValidation: opts?.skipValidation, - breadcrumbsPrefix, + breadcrumbsPrefix: opts?.breadcrumbsPrefix, omitUndefined: opts?.omitUndefined, }); }, @@ -208,7 +152,6 @@ export function object({ value, requiredKeys, - requiredKeysSet, getProperty, unrecognizedObjectKeys = "fail", skipValidation = false, @@ -216,7 +159,6 @@ function validateAndTransformObject({ }: { value: unknown; requiredKeys: string[]; - requiredKeysSet: Set; getProperty: ( preTransformedKey: string, ) => { transformedKey: string; transform: (propertyValue: object) => MaybeValid } | undefined; @@ -237,23 +179,15 @@ function validateAndTransformObject({ }; } - // Track which required keys have been seen. - // Use a counter instead of copying the Set to avoid per-call allocation. - let missingRequiredCount = requiredKeys.length; + const missingRequiredKeys = new Set(requiredKeys); const errors: ValidationError[] = []; const transformed: Record = {}; - for (const preTransformedKey in value) { - if (!_hasOwn.call(value, preTransformedKey)) { - continue; - } - const preTransformedItemValue = value[preTransformedKey]; + for (const [preTransformedKey, preTransformedItemValue] of Object.entries(value)) { const property = getProperty(preTransformedKey); if (property != null) { - if (missingRequiredCount > 0 && requiredKeysSet.has(preTransformedKey)) { - missingRequiredCount--; - } + missingRequiredKeys.delete(preTransformedKey); const value = property.transform(preTransformedItemValue as object); if (value.ok) { @@ -279,16 +213,14 @@ function validateAndTransformObject({ } } - if (missingRequiredCount > 0) { - for (const key of requiredKeys) { - if (!(key in (value as Record))) { - errors.push({ - path: breadcrumbsPrefix, - message: `Missing required key "${key}"`, - }); - } - } - } + errors.push( + ...requiredKeys + .filter((key) => missingRequiredKeys.has(key)) + .map((key) => ({ + path: breadcrumbsPrefix, + message: `Missing required key "${key}"`, + })), + ); if (errors.length === 0 || skipValidation) { return { @@ -338,8 +270,6 @@ export function getObjectUtils(schema: BaseObjectSchema { - const knownRawKeys = new Set(schema._getRawProperties() as string[]); - const knownParsedKeys = new Set(schema._getParsedProperties() as string[]); const baseSchema: BaseObjectSchema = { _getParsedProperties: () => schema._getParsedProperties(), @@ -349,18 +279,10 @@ export function getObjectUtils(schema: BaseObjectSchema = {}; - if (typeof raw === "object" && raw != null) { - for (const [key, value] of Object.entries(raw)) { - if (!knownRawKeys.has(key)) { - extraProperties[key] = value; - } - } - } return { ok: true, value: { - ...extraProperties, + ...(raw as any), ...transformed.value, }, }; @@ -370,18 +292,10 @@ export function getObjectUtils(schema: BaseObjectSchema = {}; - if (typeof parsed === "object" && parsed != null) { - for (const [key, value] of Object.entries(parsed)) { - if (!knownParsedKeys.has(key)) { - extraProperties[key] = value; - } - } - } return { ok: true, value: { - ...extraProperties, + ...(parsed as any), ...transformed.value, }, }; diff --git a/src/core/schemas/builders/object/types.ts b/src/core/schemas/builders/object/types.ts index 2ed5e473a..57f874869 100644 --- a/src/core/schemas/builders/object/types.ts +++ b/src/core/schemas/builders/object/types.ts @@ -23,8 +23,9 @@ export interface ObjectUtils { export type inferRawObject> = O extends ObjectSchema ? Raw : never; -export type inferParsedObject> = - O extends ObjectSchema ? Parsed : never; +export type inferParsedObject> = O extends ObjectSchema + ? Parsed + : never; export type inferObjectSchemaFromPropertySchemas> = ObjectSchema< inferRawObjectFromPropertySchemas, @@ -46,11 +47,25 @@ export type PropertySchemas = Recor Property | Schema >; -export type inferRawPropertySchema

| Schema> = - P extends Property ? Raw : P extends Schema ? inferRaw

: never; +export type inferRawPropertySchema

| Schema> = P extends Property< + any, + infer Raw, + any +> + ? Raw + : P extends Schema + ? inferRaw

+ : never; -export type inferParsedPropertySchema

| Schema> = - P extends Property ? Parsed : P extends Schema ? inferParsed

: never; +export type inferParsedPropertySchema

| Schema> = P extends Property< + any, + any, + infer Parsed +> + ? Parsed + : P extends Schema + ? inferParsed

+ : never; export type inferRawKey< ParsedKey extends string | number | symbol, diff --git a/src/core/schemas/builders/record/index.ts b/src/core/schemas/builders/record/index.ts index cbd9b7e6e..82e25c5c2 100644 --- a/src/core/schemas/builders/record/index.ts +++ b/src/core/schemas/builders/record/index.ts @@ -1,2 +1,2 @@ -export { partialRecord, record } from "./record"; -export type { BasePartialRecordSchema, BaseRecordSchema, PartialRecordSchema, RecordSchema } from "./types"; +export { record } from "./record"; +export type { BaseRecordSchema, RecordSchema } from "./types"; diff --git a/src/core/schemas/builders/record/record.ts b/src/core/schemas/builders/record/record.ts index 446f690ba..ba5307a6a 100644 --- a/src/core/schemas/builders/record/record.ts +++ b/src/core/schemas/builders/record/record.ts @@ -1,12 +1,10 @@ import { type MaybeValid, type Schema, SchemaType, type ValidationError } from "../../Schema"; +import { entries } from "../../utils/entries"; import { getErrorMessageForIncorrectType } from "../../utils/getErrorMessageForIncorrectType"; import { isPlainObject } from "../../utils/isPlainObject"; import { maybeSkipValidation } from "../../utils/maybeSkipValidation"; import { getSchemaUtils } from "../schema-utils/index"; -import type { BasePartialRecordSchema, BaseRecordSchema, PartialRecordSchema, RecordSchema } from "./types"; - -// eslint-disable-next-line @typescript-eslint/unbound-method -const _hasOwn = Object.prototype.hasOwnProperty; +import type { BaseRecordSchema, RecordSchema } from "./types"; export function record( keySchema: Schema, @@ -56,54 +54,6 @@ export function record( - keySchema: Schema, - valueSchema: Schema, -): PartialRecordSchema { - const baseSchema: BasePartialRecordSchema = { - parse: (raw, opts) => { - return validateAndTransformRecord({ - value: raw, - isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, - transformKey: (key) => - keySchema.parse(key, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key} (key)`], - }), - transformValue: (value, key) => - valueSchema.parse(value, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key}`], - }), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - json: (parsed, opts) => { - return validateAndTransformRecord({ - value: parsed, - isKeyNumeric: keySchema.getType() === SchemaType.NUMBER, - transformKey: (key) => - keySchema.json(key, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key} (key)`], - }), - transformValue: (value, key) => - valueSchema.json(value, { - ...opts, - breadcrumbsPrefix: [...(opts?.breadcrumbsPrefix ?? []), `${key}`], - }), - breadcrumbsPrefix: opts?.breadcrumbsPrefix, - }); - }, - getType: () => SchemaType.RECORD, - }; - - return { - ...maybeSkipValidation(baseSchema), - ...getSchemaUtils(baseSchema), - }; -} - function validateAndTransformRecord({ value, isKeyNumeric, @@ -129,42 +79,51 @@ function validateAndTransformRecord; - const errors: ValidationError[] = []; + return entries(value).reduce>>( + (accPromise, [stringKey, value]) => { + if (value === undefined) { + return accPromise; + } - for (const stringKey in value) { - if (!_hasOwn.call(value, stringKey)) { - continue; - } - const entryValue = (value as Record)[stringKey]; - if (entryValue === undefined) { - continue; - } + const acc = accPromise; - let key: string | number = stringKey; - if (isKeyNumeric) { - const numberKey = stringKey.length > 0 ? Number(stringKey) : NaN; - if (!Number.isNaN(numberKey)) { - key = numberKey; + let key: string | number = stringKey; + if (isKeyNumeric) { + const numberKey = stringKey.length > 0 ? Number(stringKey) : NaN; + if (!Number.isNaN(numberKey)) { + key = numberKey; + } } - } - const transformedKey = transformKey(key); - const transformedValue = transformValue(entryValue, key); + const transformedKey = transformKey(key); + + const transformedValue = transformValue(value, key); - if (transformedKey.ok && transformedValue.ok) { - result[transformedKey.value] = transformedValue.value; - } else { + if (acc.ok && transformedKey.ok && transformedValue.ok) { + return { + ok: true, + value: { + ...acc.value, + [transformedKey.value]: transformedValue.value, + }, + }; + } + + const errors: ValidationError[] = []; + if (!acc.ok) { + errors.push(...acc.errors); + } if (!transformedKey.ok) { errors.push(...transformedKey.errors); } if (!transformedValue.ok) { errors.push(...transformedValue.errors); } - } - } - if (errors.length === 0) { - return { ok: true, value: result }; - } - return { ok: false, errors }; + return { + ok: false, + errors, + }; + }, + { ok: true, value: {} as Record }, + ); } diff --git a/src/core/schemas/builders/record/types.ts b/src/core/schemas/builders/record/types.ts index 2216e2e67..b99bb9d87 100644 --- a/src/core/schemas/builders/record/types.ts +++ b/src/core/schemas/builders/record/types.ts @@ -15,18 +15,3 @@ export type BaseRecordSchema< ParsedKey extends string | number, ParsedValue, > = BaseSchema, Record>; - -export type PartialRecordSchema< - RawKey extends string | number, - RawValue, - ParsedKey extends string | number, - ParsedValue, -> = BasePartialRecordSchema & - SchemaUtils, Partial>>; - -export type BasePartialRecordSchema< - RawKey extends string | number, - RawValue, - ParsedKey extends string | number, - ParsedValue, -> = BaseSchema, Partial>>; diff --git a/src/core/schemas/builders/union/union.ts b/src/core/schemas/builders/union/union.ts index b324fa2de..7da4271a2 100644 --- a/src/core/schemas/builders/union/union.ts +++ b/src/core/schemas/builders/union/union.ts @@ -16,9 +16,6 @@ import type { UnionSubtypes, } from "./types"; -// eslint-disable-next-line @typescript-eslint/unbound-method -const _hasOwn = Object.prototype.hasOwnProperty; - export function union, U extends UnionSubtypes>( discriminant: D, union: U, @@ -115,13 +112,7 @@ function transformAndValidateUnion< }; } - const discriminantValue = value[discriminant]; - const additionalProperties: Record = {}; - for (const key in value) { - if (_hasOwn.call(value, key) && key !== discriminant) { - additionalProperties[key] = value[key]; - } - } + const { [discriminant]: discriminantValue, ...additionalProperties } = value; if (discriminantValue == null) { return { diff --git a/src/core/schemas/utils/isPlainObject.ts b/src/core/schemas/utils/isPlainObject.ts index 32a17e05f..db82a722c 100644 --- a/src/core/schemas/utils/isPlainObject.ts +++ b/src/core/schemas/utils/isPlainObject.ts @@ -4,11 +4,14 @@ export function isPlainObject(value: unknown): value is Record return false; } - const proto = Object.getPrototypeOf(value); - if (proto === null) { + if (Object.getPrototypeOf(value) === null) { return true; } - // Check that the prototype chain has exactly one level (i.e., proto is Object.prototype) - return Object.getPrototypeOf(proto) === null; + let proto = value; + while (Object.getPrototypeOf(proto) !== null) { + proto = Object.getPrototypeOf(proto); + } + + return Object.getPrototypeOf(value) === proto; } diff --git a/src/serialization/resources/payments/client/requests/CreatePaymentRequest.ts b/src/serialization/resources/payments/client/requests/CreatePaymentRequest.ts index 415c665b1..dd583e40a 100644 --- a/src/serialization/resources/payments/client/requests/CreatePaymentRequest.ts +++ b/src/serialization/resources/payments/client/requests/CreatePaymentRequest.ts @@ -19,6 +19,10 @@ export const CreatePaymentRequest: core.serialization.Schema< amountMoney: core.serialization.property("amount_money", Money.optional()), tipMoney: core.serialization.property("tip_money", Money.optional()), appFeeMoney: core.serialization.property("app_fee_money", Money.optional()), + appFeeAllocations: core.serialization.property( + "app_fee_allocations", + core.serialization.list(core.serialization.unknown()).optional(), + ), delayDuration: core.serialization.property("delay_duration", core.serialization.string().optional()), delayAction: core.serialization.property("delay_action", core.serialization.string().optional()), autocomplete: core.serialization.boolean().optional(), @@ -54,6 +58,7 @@ export declare namespace CreatePaymentRequest { amount_money?: Money.Raw | null; tip_money?: Money.Raw | null; app_fee_money?: Money.Raw | null; + app_fee_allocations?: unknown[] | null; delay_duration?: string | null; delay_action?: string | null; autocomplete?: boolean | null; diff --git a/src/serialization/resources/refunds/client/requests/RefundPaymentRequest.ts b/src/serialization/resources/refunds/client/requests/RefundPaymentRequest.ts index 4850d64f5..513dbdafc 100644 --- a/src/serialization/resources/refunds/client/requests/RefundPaymentRequest.ts +++ b/src/serialization/resources/refunds/client/requests/RefundPaymentRequest.ts @@ -14,6 +14,10 @@ export const RefundPaymentRequest: core.serialization.Schema< idempotencyKey: core.serialization.property("idempotency_key", core.serialization.string()), amountMoney: core.serialization.property("amount_money", Money), appFeeMoney: core.serialization.property("app_fee_money", Money.optional()), + appFeeAllocations: core.serialization.property( + "app_fee_allocations", + core.serialization.list(core.serialization.unknown()).optionalNullable(), + ), paymentId: core.serialization.property("payment_id", core.serialization.string().optionalNullable()), destinationId: core.serialization.property("destination_id", core.serialization.string().optionalNullable()), unlinked: core.serialization.boolean().optionalNullable(), @@ -37,6 +41,7 @@ export declare namespace RefundPaymentRequest { idempotency_key: string; amount_money: Money.Raw; app_fee_money?: Money.Raw | null; + app_fee_allocations?: (unknown[] | null | undefined) | null; payment_id?: (string | null | undefined) | null; destination_id?: (string | null | undefined) | null; unlinked?: (boolean | null | undefined) | null; diff --git a/src/serialization/types/CardPaymentDetails.ts b/src/serialization/types/CardPaymentDetails.ts index 9187abe1a..b250e17d0 100644 --- a/src/serialization/types/CardPaymentDetails.ts +++ b/src/serialization/types/CardPaymentDetails.ts @@ -5,6 +5,7 @@ import * as core from "../../core"; import type * as serializers from "../index"; import { Card } from "./Card"; import { CardPaymentTimeline } from "./CardPaymentTimeline"; +import { CardSurchargeDetails } from "./CardSurchargeDetails"; import { DeviceDetails } from "./DeviceDetails"; import { Error_ } from "./Error_"; @@ -37,6 +38,11 @@ export const CardPaymentDetails: core.serialization.ObjectSchema< core.serialization.boolean().optional(), ), errors: core.serialization.list(Error_).optional(), + appliedCardSurchargeDetails: core.serialization.property( + "applied_card_surcharge_details", + CardSurchargeDetails.optional(), + ), + walletType: core.serialization.property("wallet_type", core.serialization.string().optional()), }); export declare namespace CardPaymentDetails { @@ -57,5 +63,7 @@ export declare namespace CardPaymentDetails { card_payment_timeline?: CardPaymentTimeline.Raw | null; refund_requires_card_presence?: boolean | null; errors?: Error_.Raw[] | null; + applied_card_surcharge_details?: CardSurchargeDetails.Raw | null; + wallet_type?: string | null; } } diff --git a/src/serialization/types/CardSurchargeDetails.ts b/src/serialization/types/CardSurchargeDetails.ts new file mode 100644 index 000000000..3766aca01 --- /dev/null +++ b/src/serialization/types/CardSurchargeDetails.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { Money } from "./Money"; + +export const CardSurchargeDetails: core.serialization.ObjectSchema< + serializers.CardSurchargeDetails.Raw, + Square.CardSurchargeDetails +> = core.serialization.object({ + cardSurchargeMoney: core.serialization.property("card_surcharge_money", Money.optional()), +}); + +export declare namespace CardSurchargeDetails { + export interface Raw { + card_surcharge_money?: Money.Raw | null; + } +} diff --git a/src/serialization/types/DigitalWalletDetails.ts b/src/serialization/types/DigitalWalletDetails.ts index 9b58183dc..a7ed77e7a 100644 --- a/src/serialization/types/DigitalWalletDetails.ts +++ b/src/serialization/types/DigitalWalletDetails.ts @@ -5,6 +5,7 @@ import * as core from "../../core"; import type * as serializers from "../index"; import { CashAppDetails } from "./CashAppDetails"; import { Error_ } from "./Error_"; +import { LightningDetails } from "./LightningDetails"; export const DigitalWalletDetails: core.serialization.ObjectSchema< serializers.DigitalWalletDetails.Raw, @@ -13,6 +14,7 @@ export const DigitalWalletDetails: core.serialization.ObjectSchema< status: core.serialization.string().optionalNullable(), brand: core.serialization.string().optionalNullable(), cashAppDetails: core.serialization.property("cash_app_details", CashAppDetails.optional()), + lightningDetails: core.serialization.property("lightning_details", LightningDetails.optional()), errors: core.serialization.list(Error_).optional(), }); @@ -21,6 +23,7 @@ export declare namespace DigitalWalletDetails { status?: (string | null | undefined) | null; brand?: (string | null | undefined) | null; cash_app_details?: CashAppDetails.Raw | null; + lightning_details?: LightningDetails.Raw | null; errors?: Error_.Raw[] | null; } } diff --git a/src/serialization/types/ElectronicMoneyDetails.ts b/src/serialization/types/ElectronicMoneyDetails.ts new file mode 100644 index 000000000..856b3d57f --- /dev/null +++ b/src/serialization/types/ElectronicMoneyDetails.ts @@ -0,0 +1,19 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { FelicaDetails } from "./FelicaDetails"; + +export const ElectronicMoneyDetails: core.serialization.ObjectSchema< + serializers.ElectronicMoneyDetails.Raw, + Square.ElectronicMoneyDetails +> = core.serialization.object({ + felicaDetails: core.serialization.property("felica_details", FelicaDetails.optional()), +}); + +export declare namespace ElectronicMoneyDetails { + export interface Raw { + felica_details?: FelicaDetails.Raw | null; + } +} diff --git a/src/serialization/types/FelicaDetails.ts b/src/serialization/types/FelicaDetails.ts new file mode 100644 index 000000000..1b9ab8af9 --- /dev/null +++ b/src/serialization/types/FelicaDetails.ts @@ -0,0 +1,24 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; +import { FelicaDetailsFelicaBrand } from "./FelicaDetailsFelicaBrand"; + +export const FelicaDetails: core.serialization.ObjectSchema = + core.serialization.object({ + terminalId: core.serialization.property("terminal_id", core.serialization.string().optionalNullable()), + felicaMaskedCardNumber: core.serialization.property( + "felica_masked_card_number", + core.serialization.string().optionalNullable(), + ), + felicaBrand: core.serialization.property("felica_brand", FelicaDetailsFelicaBrand.optional()), + }); + +export declare namespace FelicaDetails { + export interface Raw { + terminal_id?: (string | null | undefined) | null; + felica_masked_card_number?: (string | null | undefined) | null; + felica_brand?: FelicaDetailsFelicaBrand.Raw | null; + } +} diff --git a/src/serialization/types/FelicaDetailsFelicaBrand.ts b/src/serialization/types/FelicaDetailsFelicaBrand.ts new file mode 100644 index 000000000..8c3777156 --- /dev/null +++ b/src/serialization/types/FelicaDetailsFelicaBrand.ts @@ -0,0 +1,14 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const FelicaDetailsFelicaBrand: core.serialization.Schema< + serializers.FelicaDetailsFelicaBrand.Raw, + Square.FelicaDetailsFelicaBrand +> = core.serialization.enum_(["UNKNOWN", "FELICA_ID", "FELICA_TRANSPORTATION", "FELICA_QP"]); + +export declare namespace FelicaDetailsFelicaBrand { + export type Raw = "UNKNOWN" | "FELICA_ID" | "FELICA_TRANSPORTATION" | "FELICA_QP"; +} diff --git a/src/serialization/types/LightningDetails.ts b/src/serialization/types/LightningDetails.ts new file mode 100644 index 000000000..cb05050a5 --- /dev/null +++ b/src/serialization/types/LightningDetails.ts @@ -0,0 +1,18 @@ +// This file was auto-generated by Fern from our API Definition. + +import type * as Square from "../../api/index"; +import * as core from "../../core"; +import type * as serializers from "../index"; + +export const LightningDetails: core.serialization.ObjectSchema< + serializers.LightningDetails.Raw, + Square.LightningDetails +> = core.serialization.object({ + paymentUrl: core.serialization.property("payment_url", core.serialization.string().optionalNullable()), +}); + +export declare namespace LightningDetails { + export interface Raw { + payment_url?: (string | null | undefined) | null; + } +} diff --git a/src/serialization/types/Payment.ts b/src/serialization/types/Payment.ts index 192c8766a..63185c183 100644 --- a/src/serialization/types/Payment.ts +++ b/src/serialization/types/Payment.ts @@ -11,6 +11,7 @@ import { CardPaymentDetails } from "./CardPaymentDetails"; import { CashPaymentDetails } from "./CashPaymentDetails"; import { DeviceDetails } from "./DeviceDetails"; import { DigitalWalletDetails } from "./DigitalWalletDetails"; +import { ElectronicMoneyDetails } from "./ElectronicMoneyDetails"; import { ExternalPaymentDetails } from "./ExternalPaymentDetails"; import { Money } from "./Money"; import { OfflinePaymentDetails } from "./OfflinePaymentDetails"; @@ -27,6 +28,10 @@ export const Payment: core.serialization.ObjectSchema withFormUrlEncoded(body, resolver, options)); + this.predicates.push((resolver) => withFormUrlEncoded(body, resolver)); return this; } @@ -202,12 +201,6 @@ class ResponseBuilder implements ResponseStatusStage, ResponseHeaderStage, Respo return this; } - public sseBody(body: string): BuildStage { - this.responseHeaders["Content-Type"] = "text/event-stream"; - this.responseBody = body; - return this; - } - public build(): HttpHandler { const responseResolver: HttpResponseResolver = () => { const response = new HttpResponse(this.responseBody, { diff --git a/tests/mock-server/withFormUrlEncoded.ts b/tests/mock-server/withFormUrlEncoded.ts index 2b23448e3..e250cb3c0 100644 --- a/tests/mock-server/withFormUrlEncoded.ts +++ b/tests/mock-server/withFormUrlEncoded.ts @@ -2,26 +2,12 @@ import { type HttpResponseResolver, passthrough } from "msw"; import { toJson } from "../../src/core/json"; -export interface WithFormUrlEncodedOptions { - /** - * List of field names to ignore when comparing request bodies. - * This is useful for pagination cursor fields that change between requests. - */ - ignoredFields?: string[]; -} - /** * Creates a request matcher that validates if the request form-urlencoded body exactly matches the expected object * @param expectedBody - The exact body object to match against * @param resolver - Response resolver to execute if body matches - * @param options - Optional configuration including fields to ignore */ -export function withFormUrlEncoded( - expectedBody: unknown, - resolver: HttpResponseResolver, - options?: WithFormUrlEncodedOptions, -): HttpResponseResolver { - const ignoredFields = options?.ignoredFields ?? []; +export function withFormUrlEncoded(expectedBody: unknown, resolver: HttpResponseResolver): HttpResponseResolver { return async (args) => { const { request } = args; @@ -55,8 +41,7 @@ export function withFormUrlEncoded( } const mismatches = findMismatches(actualBody, expectedBody); - const filteredMismatches = Object.keys(mismatches).filter((key) => !ignoredFields.includes(key)); - if (filteredMismatches.length > 0) { + if (Object.keys(mismatches).length > 0) { console.error("Form-urlencoded body mismatch:", toJson(mismatches, undefined, 2)); return passthrough(); } diff --git a/tests/tsconfig.json b/tests/tsconfig.json index bc43b6c40..fe83070d2 100644 --- a/tests/tsconfig.json +++ b/tests/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../tsconfig.json", "compilerOptions": { "outDir": null, - "rootDir": ".." + "rootDir": "..", + "baseUrl": ".." }, "include": ["../src", "../tests"], "exclude": [] diff --git a/tests/unit/fetcher/makeRequest.test.ts b/tests/unit/fetcher/makeRequest.test.ts index f6f039a29..43ed9d11b 100644 --- a/tests/unit/fetcher/makeRequest.test.ts +++ b/tests/unit/fetcher/makeRequest.test.ts @@ -1,8 +1,4 @@ -import { - isCacheNoStoreSupported, - makeRequest, - resetCacheNoStoreSupported, -} from "../../../src/core/fetcher/makeRequest"; +import { makeRequest } from "../../../src/core/fetcher/makeRequest"; describe("Test makeRequest", () => { const mockPostUrl = "https://httpbin.org/post"; @@ -15,7 +11,6 @@ describe("Test makeRequest", () => { beforeEach(() => { mockFetch = jest.fn(); mockFetch.mockResolvedValue(new Response(JSON.stringify({ test: "successful" }), { status: 200 })); - resetCacheNoStoreSupported(); }); it("should handle POST request correctly", async () => { @@ -55,103 +50,4 @@ describe("Test makeRequest", () => { expect(calledOptions.signal).toBeDefined(); expect(calledOptions.signal).toBeInstanceOf(AbortSignal); }); - - it("should not include cache option when disableCache is not set", async () => { - await makeRequest(mockFetch, mockGetUrl, "GET", mockHeaders, undefined); - const [, calledOptions] = mockFetch.mock.calls[0]; - expect(calledOptions.cache).toBeUndefined(); - }); - - it("should not include cache option when disableCache is false", async () => { - await makeRequest( - mockFetch, - mockGetUrl, - "GET", - mockHeaders, - undefined, - undefined, - undefined, - undefined, - undefined, - false, - ); - const [, calledOptions] = mockFetch.mock.calls[0]; - expect(calledOptions.cache).toBeUndefined(); - }); - - it("should include cache: no-store when disableCache is true and runtime supports it", async () => { - // In Node.js test environment, Request supports the cache option - expect(isCacheNoStoreSupported()).toBe(true); - await makeRequest( - mockFetch, - mockGetUrl, - "GET", - mockHeaders, - undefined, - undefined, - undefined, - undefined, - undefined, - true, - ); - const [, calledOptions] = mockFetch.mock.calls[0]; - expect(calledOptions.cache).toBe("no-store"); - }); - - it("should cache the result of isCacheNoStoreSupported", () => { - const first = isCacheNoStoreSupported(); - const second = isCacheNoStoreSupported(); - expect(first).toBe(second); - }); - - it("should reset cache detection state with resetCacheNoStoreSupported", () => { - // First call caches the result - const first = isCacheNoStoreSupported(); - expect(first).toBe(true); - - // Reset clears the cache - resetCacheNoStoreSupported(); - - // After reset, it should re-detect (and still return true in Node.js) - const second = isCacheNoStoreSupported(); - expect(second).toBe(true); - }); - - it("should not include cache option when runtime does not support it (e.g. Cloudflare Workers)", async () => { - // Mock Request constructor to throw when cache option is passed, - // simulating runtimes like Cloudflare Workers - const OriginalRequest = globalThis.Request; - globalThis.Request = class MockRequest { - constructor(_url: string, init?: RequestInit) { - if (init?.cache != null) { - throw new TypeError("The 'cache' field on 'RequestInitializerDict' is not implemented."); - } - } - } as unknown as typeof Request; - - try { - // Reset so the detection runs fresh with the mocked Request - resetCacheNoStoreSupported(); - expect(isCacheNoStoreSupported()).toBe(false); - - await makeRequest( - mockFetch, - mockGetUrl, - "GET", - mockHeaders, - undefined, - undefined, - undefined, - undefined, - undefined, - true, - ); - const [, calledOptions] = mockFetch.mock.calls[0]; - expect(calledOptions.cache).toBeUndefined(); - } finally { - // Restore original Request - globalThis.Request = OriginalRequest; - resetCacheNoStoreSupported(); - } - }); }); diff --git a/tests/unit/file/file.test.ts b/tests/unit/file/file.test.ts index 6acb74de1..51a8bc463 100644 --- a/tests/unit/file/file.test.ts +++ b/tests/unit/file/file.test.ts @@ -5,7 +5,6 @@ import { toBinaryUploadRequest, type Uploadable } from "../../../src/core/file/i describe("toBinaryUploadRequest", () => { const TEST_FILE_PATH = join(__dirname, "..", "test-file.txt"); - const TEST_FILE_SIZE = fs.statSync(TEST_FILE_PATH).size.toString(); beforeEach(() => { jest.clearAllMocks(); @@ -378,7 +377,7 @@ describe("toBinaryUploadRequest", () => { expect(result.headers).toEqual({ "Content-Disposition": 'attachment; filename="test-file.txt"', // Should extract from path "Content-Type": "text/plain", - "Content-Length": TEST_FILE_SIZE, // Should determine from file system (OS-agnostic) + "Content-Length": "21", // Should determine from file system (test file is 21 bytes) }); }); @@ -392,7 +391,7 @@ describe("toBinaryUploadRequest", () => { expect(result.body).toBeInstanceOf(fs.ReadStream); expect(result.headers).toEqual({ "Content-Disposition": 'attachment; filename="test-file.txt"', // Should extract from path - "Content-Length": TEST_FILE_SIZE, // Should determine from file system (OS-agnostic) + "Content-Length": "21", // Should determine from file system (test file is 21 bytes) }); }); }); diff --git a/tests/unit/form-data-utils/formDataWrapper.test.ts b/tests/unit/form-data-utils/formDataWrapper.test.ts index 0822f91a5..28c9f9bba 100644 --- a/tests/unit/form-data-utils/formDataWrapper.test.ts +++ b/tests/unit/form-data-utils/formDataWrapper.test.ts @@ -92,7 +92,7 @@ describe("CrossPlatformFormData", () => { for await (const chunk of request.body) { data += decoder.decode(chunk); } - expect(data).toContain(`Content-Disposition: form-data; name="file"; filename="${expectedFileName}"`); + expect(data).toContain(`Content-Disposition: form-data; name=\"file\"; filename=\"${expectedFileName}\"`); }); }); diff --git a/tests/wire/applePay.test.ts b/tests/wire/applePay.test.ts index 7b1cd86f9..6cdf02664 100644 --- a/tests/wire/applePay.test.ts +++ b/tests/wire/applePay.test.ts @@ -12,7 +12,6 @@ describe("ApplePayClient", () => { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], status: "VERIFIED", }; - server .mockEndpoint() .post("/v2/apple-pay/domains") diff --git a/tests/wire/bankAccounts.test.ts b/tests/wire/bankAccounts.test.ts index 78af1b550..ce4e74617 100644 --- a/tests/wire/bankAccounts.test.ts +++ b/tests/wire/bankAccounts.test.ts @@ -54,7 +54,6 @@ describe("BankAccountsClient", () => { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/bank-accounts") @@ -160,7 +159,6 @@ describe("BankAccountsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bank-accounts") @@ -234,7 +232,6 @@ describe("BankAccountsClient", () => { customer_id: "customer_id", }, }; - server .mockEndpoint() .get("/v2/bank-accounts/by-v1-id/v1_bank_account_id") @@ -305,7 +302,6 @@ describe("BankAccountsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/bank-accounts/bank_account_id") @@ -376,7 +372,6 @@ describe("BankAccountsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bank-accounts/bank_account_id/disable") diff --git a/tests/wire/bookings.test.ts b/tests/wire/bookings.test.ts index 2032eb5d4..ebabd5061 100644 --- a/tests/wire/bookings.test.ts +++ b/tests/wire/bookings.test.ts @@ -37,7 +37,6 @@ describe("BookingsClient", () => { ], errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server.mockEndpoint().get("/v2/bookings").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const expected = { @@ -141,7 +140,6 @@ describe("BookingsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bookings") @@ -436,7 +434,6 @@ describe("BookingsClient", () => { ], errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bookings/availability/search") @@ -748,7 +745,6 @@ describe("BookingsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bookings/bulk-retrieve") @@ -872,7 +868,6 @@ describe("BookingsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/bookings/business-booking-profile") @@ -932,7 +927,6 @@ describe("BookingsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/bookings/location-booking-profiles/location_id") @@ -989,7 +983,6 @@ describe("BookingsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bookings/team-member-booking-profiles/bulk-retrieve") @@ -1103,7 +1096,6 @@ describe("BookingsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/bookings/booking_id") @@ -1224,7 +1216,6 @@ describe("BookingsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/bookings/booking_id") @@ -1347,7 +1338,6 @@ describe("BookingsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bookings/booking_id/cancel") diff --git a/tests/wire/bookings/customAttributeDefinitions.test.ts b/tests/wire/bookings/customAttributeDefinitions.test.ts index aefccb8e2..aab6e0aca 100644 --- a/tests/wire/bookings/customAttributeDefinitions.test.ts +++ b/tests/wire/bookings/customAttributeDefinitions.test.ts @@ -38,7 +38,6 @@ describe("CustomAttributeDefinitionsClient", () => { cursor: "YEk4UPbUEsu8MUV0xouO5hCiFcD9T5ztB6UWEJq5vZnqBFmoBEi0j1j6HWYTFGMRre4p7T5wAQBj3Th1NX3XgBFcQVEVsIxUQ2NsbwjRitfoEZDml9uxxQXepowyRvCuSThHPbJSn7M7wInl3x8XypQF9ahVVQXegJ0CxEKc0SBH", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/bookings/custom-attribute-definitions") @@ -114,7 +113,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bookings/custom-attribute-definitions") @@ -170,7 +168,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/bookings/custom-attribute-definitions/key") @@ -226,7 +223,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/bookings/custom-attribute-definitions/key") @@ -271,7 +267,6 @@ describe("CustomAttributeDefinitionsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/bookings/custom-attribute-definitions/key") diff --git a/tests/wire/bookings/customAttributes.test.ts b/tests/wire/bookings/customAttributes.test.ts index 1847284f4..1d17c090d 100644 --- a/tests/wire/bookings/customAttributes.test.ts +++ b/tests/wire/bookings/customAttributes.test.ts @@ -25,7 +25,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bookings/custom-attributes/bulk-delete") @@ -153,7 +152,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/bookings/custom-attributes/bulk-upsert") @@ -296,7 +294,6 @@ describe("CustomAttributesClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/bookings/booking_id/custom-attributes") @@ -372,7 +369,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/bookings/booking_id/custom-attributes/key") @@ -444,7 +440,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/bookings/booking_id/custom-attributes/key") @@ -498,7 +493,6 @@ describe("CustomAttributesClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/bookings/booking_id/custom-attributes/key") diff --git a/tests/wire/bookings/locationProfiles.test.ts b/tests/wire/bookings/locationProfiles.test.ts index 3edcbd1ab..92ae16404 100644 --- a/tests/wire/bookings/locationProfiles.test.ts +++ b/tests/wire/bookings/locationProfiles.test.ts @@ -20,7 +20,6 @@ describe("LocationProfilesClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/bookings/location-booking-profiles") diff --git a/tests/wire/bookings/teamMemberProfiles.test.ts b/tests/wire/bookings/teamMemberProfiles.test.ts index 7fe8f68b4..e824ad876 100644 --- a/tests/wire/bookings/teamMemberProfiles.test.ts +++ b/tests/wire/bookings/teamMemberProfiles.test.ts @@ -28,7 +28,6 @@ describe("TeamMemberProfilesClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/bookings/team-member-booking-profiles") @@ -91,7 +90,6 @@ describe("TeamMemberProfilesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/bookings/team-member-booking-profiles/team_member_id") diff --git a/tests/wire/cards.test.ts b/tests/wire/cards.test.ts index 581a4a2b3..b0718d4d1 100644 --- a/tests/wire/cards.test.ts +++ b/tests/wire/cards.test.ts @@ -45,7 +45,6 @@ describe("CardsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/cards") @@ -174,7 +173,6 @@ describe("CardsClient", () => { hsa_fsa: false, }, }; - server .mockEndpoint() .post("/v2/cards") @@ -298,7 +296,6 @@ describe("CardsClient", () => { hsa_fsa: false, }, }; - server.mockEndpoint().get("/v2/cards/card_id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.cards.get({ @@ -401,7 +398,6 @@ describe("CardsClient", () => { hsa_fsa: false, }, }; - server .mockEndpoint() .post("/v2/cards/card_id/disable") diff --git a/tests/wire/cashDrawers/shifts.test.ts b/tests/wire/cashDrawers/shifts.test.ts index b461556b6..c5cbbf20c 100644 --- a/tests/wire/cashDrawers/shifts.test.ts +++ b/tests/wire/cashDrawers/shifts.test.ts @@ -28,7 +28,6 @@ describe("ShiftsClient", () => { }, ], }; - server .mockEndpoint({ once: false }) .get("/v2/cash-drawers/shifts") @@ -118,7 +117,6 @@ describe("ShiftsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/cash-drawers/shifts/shift_id") @@ -248,7 +246,6 @@ describe("ShiftsClient", () => { }, ], }; - server .mockEndpoint({ once: false }) .get("/v2/cash-drawers/shifts/shift_id/events") diff --git a/tests/wire/catalog.test.ts b/tests/wire/catalog.test.ts index 996aa7d3e..bb0c1c9ae 100644 --- a/tests/wire/catalog.test.ts +++ b/tests/wire/catalog.test.ts @@ -13,7 +13,6 @@ describe("CatalogClient", () => { deleted_object_ids: ["W62UWFY35CWMYGVWK6TWJDNI", "AA27W3M2GGTF3H6AVPNB77CK"], deleted_at: "2016-11-16T22:25:24.878Z", }; - server .mockEndpoint() .post("/v2/catalog/batch-delete") @@ -107,7 +106,6 @@ describe("CatalogClient", () => { }, ], }; - server .mockEndpoint() .post("/v2/catalog/batch-retrieve") @@ -282,7 +280,6 @@ describe("CatalogClient", () => { { client_object_id: "#Coffee_Large", object_id: "JE6VHPSRQL6IWSN26C36CJ7W" }, ], }; - server .mockEndpoint() .post("/v2/catalog/batch-upsert") @@ -444,7 +441,6 @@ describe("CatalogClient", () => { }, standard_unit_description_group: { standard_unit_descriptions: [{}], language_code: "language_code" }, }; - server.mockEndpoint().get("/v2/catalog/info").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.catalog.info(); @@ -514,7 +510,6 @@ describe("CatalogClient", () => { }, ], }; - server .mockEndpoint({ once: false }) .get("/v2/catalog/list") @@ -635,7 +630,6 @@ describe("CatalogClient", () => { ], latest_time: "latest_time", }; - server .mockEndpoint() .post("/v2/catalog/search") @@ -756,7 +750,6 @@ describe("CatalogClient", () => { cursor: "cursor", matched_variation_ids: ["VBJNPHCOKDFECR6VU25WRJUD"], }; - server .mockEndpoint() .post("/v2/catalog/search-catalog-items") @@ -838,7 +831,6 @@ describe("CatalogClient", () => { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], updated_at: "2016-11-16T22:25:24.878Z", }; - server .mockEndpoint() .post("/v2/catalog/update-item-modifier-lists") @@ -878,7 +870,6 @@ describe("CatalogClient", () => { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], updated_at: "2016-11-16T22:25:24.878Z", }; - server .mockEndpoint() .post("/v2/catalog/update-item-taxes") diff --git a/tests/wire/catalog/object.test.ts b/tests/wire/catalog/object.test.ts index a0240adea..4225ec38f 100644 --- a/tests/wire/catalog/object.test.ts +++ b/tests/wire/catalog/object.test.ts @@ -56,7 +56,6 @@ describe("ObjectClient", () => { { client_object_id: "#Large", object_id: "NS77DKEIQ3AEQTCP727DSA7U" }, ], }; - server .mockEndpoint() .post("/v2/catalog/object") @@ -215,7 +214,6 @@ describe("ObjectClient", () => { }, ], }; - server .mockEndpoint() .get("/v2/catalog/object/object_id") @@ -327,7 +325,6 @@ describe("ObjectClient", () => { deleted_object_ids: ["7SB3ZQYJ5GDMVFL7JK46JCHT", "KQLFFHA6K6J3YQAQAWDQAL57"], deleted_at: "2016-11-16T22:25:24.878Z", }; - server .mockEndpoint() .delete("/v2/catalog/object/object_id") diff --git a/tests/wire/channels.test.ts b/tests/wire/channels.test.ts index 6ab7620f2..17abe8c51 100644 --- a/tests/wire/channels.test.ts +++ b/tests/wire/channels.test.ts @@ -24,7 +24,6 @@ describe("ChannelsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/channels") @@ -109,7 +108,6 @@ describe("ChannelsClient", () => { NOT_EXISTING: { errors: [{ category: "API_ERROR", code: "NOT_FOUND" }] }, }, }; - server .mockEndpoint() .post("/v2/channels/bulk-retrieve") @@ -203,7 +201,6 @@ describe("ChannelsClient", () => { updated_at: "2022-10-25T16:48:00Z", }, }; - server .mockEndpoint() .get("/v2/channels/channel_id") diff --git a/tests/wire/checkout.test.ts b/tests/wire/checkout.test.ts index c6c90eb1d..ed4cbf351 100644 --- a/tests/wire/checkout.test.ts +++ b/tests/wire/checkout.test.ts @@ -25,7 +25,6 @@ describe("CheckoutClient", () => { updated_at: "2022-06-16T22:25:35Z", }, }; - server .mockEndpoint() .get("/v2/online-checkout/location-settings/location_id") @@ -103,7 +102,6 @@ describe("CheckoutClient", () => { updated_at: "2022-06-16T22:25:35Z", }, }; - server .mockEndpoint() .put("/v2/online-checkout/location-settings/location_id") @@ -185,7 +183,6 @@ describe("CheckoutClient", () => { updated_at: "2022-06-16T22:25:35Z", }, }; - server .mockEndpoint() .get("/v2/online-checkout/merchant-settings") @@ -266,7 +263,6 @@ describe("CheckoutClient", () => { updated_at: "2022-06-16T22:25:35Z", }, }; - server .mockEndpoint() .put("/v2/online-checkout/merchant-settings") diff --git a/tests/wire/checkout/paymentLinks.test.ts b/tests/wire/checkout/paymentLinks.test.ts index c0bd13f5f..89bc7d651 100644 --- a/tests/wire/checkout/paymentLinks.test.ts +++ b/tests/wire/checkout/paymentLinks.test.ts @@ -37,7 +37,6 @@ describe("PaymentLinksClient", () => { ], cursor: "MTY1NQ==", }; - server .mockEndpoint({ once: false }) .get("/v2/online-checkout/payment-links") @@ -173,7 +172,6 @@ describe("PaymentLinksClient", () => { subscription_plans: [{ type: "ITEM", id: "id" }], }, }; - server .mockEndpoint() .post("/v2/online-checkout/payment-links") @@ -370,7 +368,6 @@ describe("PaymentLinksClient", () => { payment_note: "payment_note", }, }; - server .mockEndpoint() .get("/v2/online-checkout/payment-links/id") @@ -456,7 +453,6 @@ describe("PaymentLinksClient", () => { payment_note: "test", }, }; - server .mockEndpoint() .put("/v2/online-checkout/payment-links/id") @@ -528,7 +524,6 @@ describe("PaymentLinksClient", () => { id: "MQASNYL6QB6DFCJ3", cancelled_order_id: "asx8LgZ6MRzD0fObfkJ6obBmSh4F", }; - server .mockEndpoint() .delete("/v2/online-checkout/payment-links/id") diff --git a/tests/wire/customers.test.ts b/tests/wire/customers.test.ts index a0a4ca045..5ed145dca 100644 --- a/tests/wire/customers.test.ts +++ b/tests/wire/customers.test.ts @@ -42,7 +42,6 @@ describe("CustomersClient", () => { cursor: "cursor", count: BigInt(1000000), }; - server .mockEndpoint({ once: false }) .get("/v2/customers") @@ -166,7 +165,6 @@ describe("CustomersClient", () => { tax_ids: { eu_vat: "eu_vat" }, }, }; - server .mockEndpoint() .post("/v2/customers") @@ -338,7 +336,6 @@ describe("CustomersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/customers/bulk-create") @@ -484,7 +481,6 @@ describe("CustomersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/customers/bulk-delete") @@ -585,7 +581,6 @@ describe("CustomersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/customers/bulk-retrieve") @@ -711,7 +706,6 @@ describe("CustomersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/customers/bulk-update") @@ -868,7 +862,6 @@ describe("CustomersClient", () => { cursor: "9dpS093Uy12AzeE", count: BigInt(1000000), }; - server .mockEndpoint() .post("/v2/customers/search") @@ -1020,7 +1013,6 @@ describe("CustomersClient", () => { tax_ids: { eu_vat: "eu_vat" }, }, }; - server .mockEndpoint() .get("/v2/customers/customer_id") @@ -1131,7 +1123,6 @@ describe("CustomersClient", () => { tax_ids: { eu_vat: "eu_vat" }, }, }; - server .mockEndpoint() .put("/v2/customers/customer_id") @@ -1206,7 +1197,6 @@ describe("CustomersClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/customers/customer_id") diff --git a/tests/wire/customers/cards.test.ts b/tests/wire/customers/cards.test.ts index b8a446959..cda7710b6 100644 --- a/tests/wire/customers/cards.test.ts +++ b/tests/wire/customers/cards.test.ts @@ -61,7 +61,6 @@ describe("CardsClient", () => { hsa_fsa: true, }, }; - server .mockEndpoint() .post("/v2/customers/customer_id/cards") @@ -142,7 +141,6 @@ describe("CardsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/customers/customer_id/cards/card_id") diff --git a/tests/wire/customers/customAttributeDefinitions.test.ts b/tests/wire/customers/customAttributeDefinitions.test.ts index f0d8d9859..fb4680123 100644 --- a/tests/wire/customers/customAttributeDefinitions.test.ts +++ b/tests/wire/customers/customAttributeDefinitions.test.ts @@ -38,7 +38,6 @@ describe("CustomAttributeDefinitionsClient", () => { cursor: "YEk4UPbUEsu8MUV0xouO5hCiFcD9T5ztB6UWEJq5vZnqBFmoBEi0j1j6HWYTFGMRre4p7T5wAQBj3Th1NX3XgBFcQVEVsIxUQ2NsbwjRitfoEZDml9uxxQXepowyRvCuSThHPbJSn7M7wInl3x8XypQF9ahVVQXegJ0CxEKc0SBH", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/customers/custom-attribute-definitions") @@ -124,7 +123,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/customers/custom-attribute-definitions") @@ -188,7 +186,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/customers/custom-attribute-definitions/key") @@ -249,7 +246,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/customers/custom-attribute-definitions/key") @@ -297,7 +293,6 @@ describe("CustomAttributeDefinitionsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/customers/custom-attribute-definitions/key") @@ -416,7 +411,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/customers/custom-attributes/bulk-upsert") diff --git a/tests/wire/customers/customAttributes.test.ts b/tests/wire/customers/customAttributes.test.ts index 3fc2ea52b..29ac31498 100644 --- a/tests/wire/customers/customAttributes.test.ts +++ b/tests/wire/customers/customAttributes.test.ts @@ -30,7 +30,6 @@ describe("CustomAttributesClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/customers/customer_id/custom-attributes") @@ -106,7 +105,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/customers/customer_id/custom-attributes/key") @@ -178,7 +176,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/customers/customer_id/custom-attributes/key") @@ -234,7 +231,6 @@ describe("CustomAttributesClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/customers/customer_id/custom-attributes/key") diff --git a/tests/wire/customers/groups.test.ts b/tests/wire/customers/groups.test.ts index 20e0683f0..232b8ee80 100644 --- a/tests/wire/customers/groups.test.ts +++ b/tests/wire/customers/groups.test.ts @@ -26,7 +26,6 @@ describe("GroupsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/customers/groups") @@ -84,7 +83,6 @@ describe("GroupsClient", () => { updated_at: "2020-04-13T21:54:58Z", }, }; - server .mockEndpoint() .post("/v2/customers/groups") @@ -130,7 +128,6 @@ describe("GroupsClient", () => { updated_at: "2020-04-13T21:54:58Z", }, }; - server .mockEndpoint() .get("/v2/customers/groups/group_id") @@ -173,7 +170,6 @@ describe("GroupsClient", () => { updated_at: "2020-04-13T21:54:58Z", }, }; - server .mockEndpoint() .put("/v2/customers/groups/group_id") @@ -214,7 +210,6 @@ describe("GroupsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/customers/groups/group_id") @@ -245,7 +240,6 @@ describe("GroupsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/customers/customer_id/groups/group_id") @@ -277,7 +271,6 @@ describe("GroupsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/customers/customer_id/groups/group_id") diff --git a/tests/wire/customers/segments.test.ts b/tests/wire/customers/segments.test.ts index 5894c38c1..fc67dc35a 100644 --- a/tests/wire/customers/segments.test.ts +++ b/tests/wire/customers/segments.test.ts @@ -38,7 +38,6 @@ describe("SegmentsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/customers/segments") @@ -108,7 +107,6 @@ describe("SegmentsClient", () => { updated_at: "2020-04-13T23:01:13Z", }, }; - server .mockEndpoint() .get("/v2/customers/segments/segment_id") diff --git a/tests/wire/devices.test.ts b/tests/wire/devices.test.ts index 6c6f81b8c..983dc0711 100644 --- a/tests/wire/devices.test.ts +++ b/tests/wire/devices.test.ts @@ -94,7 +94,6 @@ describe("DevicesClient", () => { ], cursor: "GcXjlV2iaizH7R0fMT6wUDbw6l4otigjzx8XOOspUKHo9EPLRByM", }; - server .mockEndpoint({ once: false }) .get("/v2/devices") @@ -287,7 +286,6 @@ describe("DevicesClient", () => { status: { category: "AVAILABLE" }, }, }; - server .mockEndpoint() .get("/v2/devices/device_id") diff --git a/tests/wire/devices/codes.test.ts b/tests/wire/devices/codes.test.ts index 75b0de664..a401ad505 100644 --- a/tests/wire/devices/codes.test.ts +++ b/tests/wire/devices/codes.test.ts @@ -40,7 +40,6 @@ describe("CodesClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/devices/codes") @@ -124,7 +123,6 @@ describe("CodesClient", () => { paired_at: "paired_at", }, }; - server .mockEndpoint() .post("/v2/devices/codes") @@ -187,7 +185,6 @@ describe("CodesClient", () => { paired_at: "paired_at", }, }; - server .mockEndpoint() .get("/v2/devices/codes/id") diff --git a/tests/wire/disputes.test.ts b/tests/wire/disputes.test.ts index ccdb85eb2..808c0af0a 100644 --- a/tests/wire/disputes.test.ts +++ b/tests/wire/disputes.test.ts @@ -50,7 +50,6 @@ describe("DisputesClient", () => { ], cursor: "G1aSTRm48CLjJsg6Sg3hQN1b1OMaoVuG", }; - server .mockEndpoint({ once: false }) .get("/v2/disputes") @@ -155,7 +154,6 @@ describe("DisputesClient", () => { location_id: "L1HN3ZMQK64X9", }, }; - server .mockEndpoint() .get("/v2/disputes/dispute_id") @@ -227,7 +225,6 @@ describe("DisputesClient", () => { location_id: "L1HN3ZMQK64X9", }, }; - server .mockEndpoint() .post("/v2/disputes/dispute_id/accept") @@ -294,7 +291,6 @@ describe("DisputesClient", () => { evidence_type: "REBUTTAL_EXPLANATION", }, }; - server .mockEndpoint() .post("/v2/disputes/dispute_id/evidence-text") @@ -359,7 +355,6 @@ describe("DisputesClient", () => { location_id: "LSY8XKGSMMX94", }, }; - server .mockEndpoint() .post("/v2/disputes/dispute_id/submit-evidence") diff --git a/tests/wire/disputes/evidence.test.ts b/tests/wire/disputes/evidence.test.ts index 120e68ea3..8147f78b6 100644 --- a/tests/wire/disputes/evidence.test.ts +++ b/tests/wire/disputes/evidence.test.ts @@ -32,7 +32,6 @@ describe("EvidenceClient", () => { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/disputes/dispute_id/evidence") @@ -105,7 +104,6 @@ describe("EvidenceClient", () => { evidence_type: "CARDHOLDER_COMMUNICATION", }, }; - server .mockEndpoint() .get("/v2/disputes/dispute_id/evidence/evidence_id") @@ -149,7 +147,6 @@ describe("EvidenceClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/disputes/dispute_id/evidence/evidence_id") diff --git a/tests/wire/employees.test.ts b/tests/wire/employees.test.ts index b2cac47f3..a11e297e6 100644 --- a/tests/wire/employees.test.ts +++ b/tests/wire/employees.test.ts @@ -26,7 +26,6 @@ describe("EmployeesClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/employees") @@ -92,7 +91,6 @@ describe("EmployeesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server.mockEndpoint().get("/v2/employees/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.employees.get({ diff --git a/tests/wire/events.test.ts b/tests/wire/events.test.ts index 09343a2a6..e28083774 100644 --- a/tests/wire/events.test.ts +++ b/tests/wire/events.test.ts @@ -43,7 +43,6 @@ describe("EventsClient", () => { metadata: [{ event_id: "73ecd468-0aba-424f-b862-583d44efe7c8", api_version: "2022-12-13" }], cursor: "6b571fc9773647f=", }; - server .mockEndpoint() .post("/v2/events") @@ -115,7 +114,6 @@ describe("EventsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server.mockEndpoint().put("/v2/events/disable").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.events.disableEvents(); @@ -138,7 +136,6 @@ describe("EventsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server.mockEndpoint().put("/v2/events/enable").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.events.enableEvents(); @@ -169,7 +166,6 @@ describe("EventsClient", () => { }, ], }; - server.mockEndpoint().get("/v2/events/types").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.events.listEventTypes({ diff --git a/tests/wire/giftCards.test.ts b/tests/wire/giftCards.test.ts index 7c5866532..f877a33d2 100644 --- a/tests/wire/giftCards.test.ts +++ b/tests/wire/giftCards.test.ts @@ -34,7 +34,6 @@ describe("GiftCardsClient", () => { ], cursor: "JbFmyvUpaNKsfC1hoLSA4WlqkgkZXTWeKuStajR5BkP7OE0ETAbeWSi6U6u7sH", }; - server .mockEndpoint({ once: false }) .get("/v2/gift-cards") @@ -117,7 +116,6 @@ describe("GiftCardsClient", () => { customer_ids: ["customer_ids"], }, }; - server .mockEndpoint() .post("/v2/gift-cards") @@ -176,7 +174,6 @@ describe("GiftCardsClient", () => { customer_ids: ["customer_ids"], }, }; - server .mockEndpoint() .post("/v2/gift-cards/from-gan") @@ -231,7 +228,6 @@ describe("GiftCardsClient", () => { customer_ids: ["customer_ids"], }, }; - server .mockEndpoint() .post("/v2/gift-cards/from-nonce") @@ -286,7 +282,6 @@ describe("GiftCardsClient", () => { customer_ids: ["GKY0FZ3V717AH8Q2D821PNT2ZW"], }, }; - server .mockEndpoint() .post("/v2/gift-cards/gift_card_id/link-customer") @@ -342,7 +337,6 @@ describe("GiftCardsClient", () => { customer_ids: ["customer_ids"], }, }; - server .mockEndpoint() .post("/v2/gift-cards/gift_card_id/unlink-customer") @@ -398,7 +392,6 @@ describe("GiftCardsClient", () => { customer_ids: ["customer_ids"], }, }; - server.mockEndpoint().get("/v2/gift-cards/id").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.giftCards.get({ diff --git a/tests/wire/giftCards/activities.test.ts b/tests/wire/giftCards/activities.test.ts index c3e4b3f9e..202f8f995 100644 --- a/tests/wire/giftCards/activities.test.ts +++ b/tests/wire/giftCards/activities.test.ts @@ -73,7 +73,6 @@ describe("ActivitiesClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/gift-cards/activities") @@ -299,7 +298,6 @@ describe("ActivitiesClient", () => { }, }, }; - server .mockEndpoint() .post("/v2/gift-cards/activities") diff --git a/tests/wire/inventory.test.ts b/tests/wire/inventory.test.ts index 36c996201..5129dd56b 100644 --- a/tests/wire/inventory.test.ts +++ b/tests/wire/inventory.test.ts @@ -41,7 +41,6 @@ describe("InventoryClient", () => { }, }, }; - server .mockEndpoint() .get("/v2/inventory/adjustment/adjustment_id") @@ -135,7 +134,6 @@ describe("InventoryClient", () => { }, }, }; - server .mockEndpoint() .get("/v2/inventory/adjustments/adjustment_id") @@ -228,7 +226,6 @@ describe("InventoryClient", () => { ], changes: [{ type: "PHYSICAL_COUNT", measurement_unit_id: "measurement_unit_id" }], }; - server .mockEndpoint() .post("/v2/inventory/batch-change") @@ -323,7 +320,6 @@ describe("InventoryClient", () => { ], cursor: "cursor", }; - server .mockEndpoint() .post("/v2/inventory/batch-retrieve-changes") @@ -400,7 +396,6 @@ describe("InventoryClient", () => { ], cursor: "cursor", }; - server .mockEndpoint() .post("/v2/inventory/batch-retrieve-counts") @@ -475,7 +470,6 @@ describe("InventoryClient", () => { ], changes: [{ type: "PHYSICAL_COUNT", measurement_unit_id: "measurement_unit_id" }], }; - server .mockEndpoint() .post("/v2/inventory/changes/batch-create") @@ -570,7 +564,6 @@ describe("InventoryClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .post("/v2/inventory/changes/batch-retrieve") @@ -652,7 +645,6 @@ describe("InventoryClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .post("/v2/inventory/counts/batch-retrieve") @@ -721,7 +713,6 @@ describe("InventoryClient", () => { created_at: "2016-11-16T22:25:24.878Z", }, }; - server .mockEndpoint() .get("/v2/inventory/physical-count/physical_count_id") @@ -788,7 +779,6 @@ describe("InventoryClient", () => { created_at: "2016-11-16T22:25:24.878Z", }, }; - server .mockEndpoint() .get("/v2/inventory/physical-counts/physical_count_id") @@ -856,7 +846,6 @@ describe("InventoryClient", () => { team_member_id: "LRK57NSQ5X7PUD05", }, }; - server .mockEndpoint() .get("/v2/inventory/transfers/transfer_id") @@ -918,7 +907,6 @@ describe("InventoryClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/inventory/catalog_object_id") @@ -995,7 +983,6 @@ describe("InventoryClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/inventory/catalog_object_id/changes") diff --git a/tests/wire/invoices.test.ts b/tests/wire/invoices.test.ts index 8cc1c9bbb..139927a93 100644 --- a/tests/wire/invoices.test.ts +++ b/tests/wire/invoices.test.ts @@ -148,7 +148,6 @@ describe("InvoicesClient", () => { cursor: "ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/invoices") @@ -443,7 +442,6 @@ describe("InvoicesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/invoices") @@ -733,7 +731,6 @@ describe("InvoicesClient", () => { cursor: "ChoIDhIWVm54ZVRhLXhySFBOejBBM2xJb2daUQoFCI4IGAE", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/invoices/search") @@ -988,7 +985,6 @@ describe("InvoicesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/invoices/invoice_id") @@ -1156,7 +1152,6 @@ describe("InvoicesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/invoices/invoice_id") @@ -1268,7 +1263,6 @@ describe("InvoicesClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/invoices/invoice_id") @@ -1300,7 +1294,6 @@ describe("InvoicesClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/invoices/invoice_id/attachments/attachment_id") @@ -1393,7 +1386,6 @@ describe("InvoicesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/invoices/invoice_id/cancel") @@ -1565,7 +1557,6 @@ describe("InvoicesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/invoices/invoice_id/publish") diff --git a/tests/wire/labor.test.ts b/tests/wire/labor.test.ts index 55bde3b5c..14c2c941c 100644 --- a/tests/wire/labor.test.ts +++ b/tests/wire/labor.test.ts @@ -50,7 +50,6 @@ describe("LaborClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/labor/scheduled-shifts") @@ -160,7 +159,6 @@ describe("LaborClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/labor/scheduled-shifts/bulk-publish") @@ -264,7 +262,6 @@ describe("LaborClient", () => { cursor: "xoxp-123-2123-123232", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/labor/scheduled-shifts/search") @@ -351,7 +348,6 @@ describe("LaborClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/labor/scheduled-shifts/id") @@ -447,7 +443,6 @@ describe("LaborClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/labor/scheduled-shifts/id") @@ -547,7 +542,6 @@ describe("LaborClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/labor/scheduled-shifts/id/publish") @@ -658,7 +652,6 @@ describe("LaborClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/labor/timecards") @@ -837,7 +830,6 @@ describe("LaborClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/labor/timecards/search") @@ -995,7 +987,6 @@ describe("LaborClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/labor/timecards/id") @@ -1118,7 +1109,6 @@ describe("LaborClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/labor/timecards/id") @@ -1217,7 +1207,6 @@ describe("LaborClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/labor/timecards/id") diff --git a/tests/wire/labor/breakTypes.test.ts b/tests/wire/labor/breakTypes.test.ts index d2c2c1f0e..26d693d71 100644 --- a/tests/wire/labor/breakTypes.test.ts +++ b/tests/wire/labor/breakTypes.test.ts @@ -34,7 +34,6 @@ describe("BreakTypesClient", () => { cursor: "2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/labor/break-types") @@ -113,7 +112,6 @@ describe("BreakTypesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/labor/break-types") @@ -171,7 +169,6 @@ describe("BreakTypesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/labor/break-types/id") @@ -230,7 +227,6 @@ describe("BreakTypesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/labor/break-types/id") @@ -279,7 +275,6 @@ describe("BreakTypesClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/labor/break-types/id") diff --git a/tests/wire/labor/employeeWages.test.ts b/tests/wire/labor/employeeWages.test.ts index cf065b1c2..20b255e15 100644 --- a/tests/wire/labor/employeeWages.test.ts +++ b/tests/wire/labor/employeeWages.test.ts @@ -38,7 +38,6 @@ describe("EmployeeWagesClient", () => { cursor: "2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/labor/employee-wages") @@ -121,7 +120,6 @@ describe("EmployeeWagesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/labor/employee-wages/id") diff --git a/tests/wire/labor/shifts.test.ts b/tests/wire/labor/shifts.test.ts index 6e2cf23f9..56086aaa4 100644 --- a/tests/wire/labor/shifts.test.ts +++ b/tests/wire/labor/shifts.test.ts @@ -62,7 +62,6 @@ describe("ShiftsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/labor/shifts") @@ -244,7 +243,6 @@ describe("ShiftsClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/labor/shifts/search") @@ -405,7 +403,6 @@ describe("ShiftsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/labor/shifts/id") @@ -529,7 +526,6 @@ describe("ShiftsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/labor/shifts/id") @@ -628,7 +624,6 @@ describe("ShiftsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/labor/shifts/id") diff --git a/tests/wire/labor/teamMemberWages.test.ts b/tests/wire/labor/teamMemberWages.test.ts index 47bdbafde..f1b95d065 100644 --- a/tests/wire/labor/teamMemberWages.test.ts +++ b/tests/wire/labor/teamMemberWages.test.ts @@ -46,7 +46,6 @@ describe("TeamMemberWagesClient", () => { cursor: "2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/labor/team-member-wages") @@ -139,7 +138,6 @@ describe("TeamMemberWagesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/labor/team-member-wages/id") diff --git a/tests/wire/labor/workweekConfigs.test.ts b/tests/wire/labor/workweekConfigs.test.ts index f9415ef6b..0b110a0c0 100644 --- a/tests/wire/labor/workweekConfigs.test.ts +++ b/tests/wire/labor/workweekConfigs.test.ts @@ -22,7 +22,6 @@ describe("WorkweekConfigsClient", () => { cursor: "2fofTniCgT0yIPAq26kmk0YyFQJZfbWkh73OOnlTHmTAx13NgED", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/labor/workweek-configs") @@ -80,7 +79,6 @@ describe("WorkweekConfigsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/labor/workweek-configs/id") diff --git a/tests/wire/locations.test.ts b/tests/wire/locations.test.ts index b6bbcfb35..7b0a51148 100644 --- a/tests/wire/locations.test.ts +++ b/tests/wire/locations.test.ts @@ -77,7 +77,6 @@ describe("LocationsClient", () => { }, ], }; - server.mockEndpoint().get("/v2/locations").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.locations.list(); @@ -230,7 +229,6 @@ describe("LocationsClient", () => { }, }, }; - server .mockEndpoint() .post("/v2/locations") @@ -376,7 +374,6 @@ describe("LocationsClient", () => { }, }, }; - server .mockEndpoint() .get("/v2/locations/location_id") @@ -529,7 +526,6 @@ describe("LocationsClient", () => { }, }, }; - server .mockEndpoint() .put("/v2/locations/location_id") @@ -827,7 +823,6 @@ describe("LocationsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/locations/location_id/checkouts") diff --git a/tests/wire/locations/customAttributeDefinitions.test.ts b/tests/wire/locations/customAttributeDefinitions.test.ts index c0ffffa7c..bc461d255 100644 --- a/tests/wire/locations/customAttributeDefinitions.test.ts +++ b/tests/wire/locations/customAttributeDefinitions.test.ts @@ -38,7 +38,6 @@ describe("CustomAttributeDefinitionsClient", () => { cursor: "ImfNzWVSiAYyiAR4gEcxDJ75KZAOSjX8H2BVHUTR0ofCtp4SdYvrUKbwYY2aCH2WqZ2FsfAuylEVUlTfaINg3ecIlFpP9Y5Ie66w9NSg9nqdI5fCJ6qdH2s0za5m2plFonsjIuFaoN89j78ROUwuSOzD6mFZPcJHhJ0CxEKc0SBH", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/locations/custom-attribute-definitions") @@ -125,7 +124,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/locations/custom-attribute-definitions") @@ -189,7 +187,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/locations/custom-attribute-definitions/key") @@ -250,7 +247,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/locations/custom-attribute-definitions/key") @@ -298,7 +294,6 @@ describe("CustomAttributeDefinitionsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/locations/custom-attribute-definitions/key") diff --git a/tests/wire/locations/customAttributes.test.ts b/tests/wire/locations/customAttributes.test.ts index 59cdee361..4e9b19320 100644 --- a/tests/wire/locations/customAttributes.test.ts +++ b/tests/wire/locations/customAttributes.test.ts @@ -27,7 +27,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/locations/custom-attributes/bulk-delete") @@ -142,7 +141,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/locations/custom-attributes/bulk-upsert") @@ -268,7 +266,6 @@ describe("CustomAttributesClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/locations/location_id/custom-attributes") @@ -345,7 +342,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/locations/location_id/custom-attributes/key") @@ -417,7 +413,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/locations/location_id/custom-attributes/key") @@ -473,7 +468,6 @@ describe("CustomAttributesClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/locations/location_id/custom-attributes/key") diff --git a/tests/wire/locations/transactions.test.ts b/tests/wire/locations/transactions.test.ts index a196aa4e4..c1a5e5bf9 100644 --- a/tests/wire/locations/transactions.test.ts +++ b/tests/wire/locations/transactions.test.ts @@ -67,7 +67,6 @@ describe("TransactionsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint() .get("/v2/locations/location_id/transactions") @@ -231,7 +230,6 @@ describe("TransactionsClient", () => { order_id: "order_id", }, }; - server .mockEndpoint() .get("/v2/locations/location_id/transactions/transaction_id") @@ -333,7 +331,6 @@ describe("TransactionsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/locations/location_id/transactions/transaction_id/capture") @@ -365,7 +362,6 @@ describe("TransactionsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/locations/location_id/transactions/transaction_id/void") diff --git a/tests/wire/loyalty.test.ts b/tests/wire/loyalty.test.ts index 123a6ec3d..ab052ec7a 100644 --- a/tests/wire/loyalty.test.ts +++ b/tests/wire/loyalty.test.ts @@ -65,7 +65,6 @@ describe("LoyaltyClient", () => { ], cursor: "cursor", }; - server .mockEndpoint() .post("/v2/loyalty/events/search") diff --git a/tests/wire/loyalty/accounts.test.ts b/tests/wire/loyalty/accounts.test.ts index 580c37342..a2fb805be 100644 --- a/tests/wire/loyalty/accounts.test.ts +++ b/tests/wire/loyalty/accounts.test.ts @@ -33,7 +33,6 @@ describe("AccountsClient", () => { expiring_point_deadlines: [{ points: 1, expires_at: "expires_at" }], }, }; - server .mockEndpoint() .post("/v2/loyalty/accounts") @@ -111,7 +110,6 @@ describe("AccountsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint() .post("/v2/loyalty/accounts/search") @@ -190,7 +188,6 @@ describe("AccountsClient", () => { expiring_point_deadlines: [{ points: 1, expires_at: "expires_at" }], }, }; - server .mockEndpoint() .get("/v2/loyalty/accounts/account_id") @@ -289,7 +286,6 @@ describe("AccountsClient", () => { }, ], }; - server .mockEndpoint() .post("/v2/loyalty/accounts/account_id/accumulate") @@ -429,7 +425,6 @@ describe("AccountsClient", () => { }, }, }; - server .mockEndpoint() .post("/v2/loyalty/accounts/account_id/adjust") diff --git a/tests/wire/loyalty/programs.test.ts b/tests/wire/loyalty/programs.test.ts index 9effd96e0..5d4c826c0 100644 --- a/tests/wire/loyalty/programs.test.ts +++ b/tests/wire/loyalty/programs.test.ts @@ -46,7 +46,6 @@ describe("ProgramsClient", () => { }, ], }; - server .mockEndpoint() .get("/v2/loyalty/programs") @@ -151,7 +150,6 @@ describe("ProgramsClient", () => { ], }, }; - server .mockEndpoint() .get("/v2/loyalty/programs/program_id") @@ -228,7 +226,6 @@ describe("ProgramsClient", () => { points: 6, promotion_points: 12, }; - server .mockEndpoint() .post("/v2/loyalty/programs/program_id/calculate") diff --git a/tests/wire/loyalty/programs/promotions.test.ts b/tests/wire/loyalty/programs/promotions.test.ts index 9d08f92ee..b69dac25c 100644 --- a/tests/wire/loyalty/programs/promotions.test.ts +++ b/tests/wire/loyalty/programs/promotions.test.ts @@ -64,7 +64,6 @@ describe("PromotionsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/loyalty/programs/program_id/promotions") @@ -210,7 +209,6 @@ describe("PromotionsClient", () => { qualifying_category_ids: ["XTQPYLR3IIU9C44VRCB3XD12"], }, }; - server .mockEndpoint() .post("/v2/loyalty/programs/program_id/promotions") @@ -327,7 +325,6 @@ describe("PromotionsClient", () => { qualifying_category_ids: ["qualifying_category_ids"], }, }; - server .mockEndpoint() .get("/v2/loyalty/programs/program_id/promotions/promotion_id") @@ -420,7 +417,6 @@ describe("PromotionsClient", () => { qualifying_category_ids: ["XTQPYLR3IIU9C44VRCB3XD12"], }, }; - server .mockEndpoint() .post("/v2/loyalty/programs/program_id/promotions/promotion_id/cancel") diff --git a/tests/wire/loyalty/rewards.test.ts b/tests/wire/loyalty/rewards.test.ts index 377c64c45..a3aad78b5 100644 --- a/tests/wire/loyalty/rewards.test.ts +++ b/tests/wire/loyalty/rewards.test.ts @@ -29,7 +29,6 @@ describe("RewardsClient", () => { redeemed_at: "redeemed_at", }, }; - server .mockEndpoint() .post("/v2/loyalty/rewards") @@ -124,7 +123,6 @@ describe("RewardsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint() .post("/v2/loyalty/rewards/search") @@ -217,7 +215,6 @@ describe("RewardsClient", () => { redeemed_at: "2020-05-08T21:56:00Z", }, }; - server .mockEndpoint() .get("/v2/loyalty/rewards/reward_id") @@ -259,7 +256,6 @@ describe("RewardsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/loyalty/rewards/reward_id") @@ -318,7 +314,6 @@ describe("RewardsClient", () => { }, }, }; - server .mockEndpoint() .post("/v2/loyalty/rewards/reward_id/redeem") diff --git a/tests/wire/merchants.test.ts b/tests/wire/merchants.test.ts index 0f3b89da9..b73b6a118 100644 --- a/tests/wire/merchants.test.ts +++ b/tests/wire/merchants.test.ts @@ -24,7 +24,6 @@ describe("MerchantsClient", () => { ], cursor: 1, }; - server .mockEndpoint({ once: false }) .get("/v2/merchants") @@ -83,7 +82,6 @@ describe("MerchantsClient", () => { created_at: "2021-12-10T19:25:52.484Z", }, }; - server .mockEndpoint() .get("/v2/merchants/merchant_id") diff --git a/tests/wire/merchants/customAttributeDefinitions.test.ts b/tests/wire/merchants/customAttributeDefinitions.test.ts index 0a442e0eb..538d60d06 100644 --- a/tests/wire/merchants/customAttributeDefinitions.test.ts +++ b/tests/wire/merchants/customAttributeDefinitions.test.ts @@ -38,7 +38,6 @@ describe("CustomAttributeDefinitionsClient", () => { cursor: "ImfNzWVSiAYyiAR4gEcxDJ75KZAOSjX8H2BVHUTR0ofCtp4SdYvrUKbwYY2aCH2WqZ2FsfAuylEVUlTfaINg3ecIlFpP9Y5Ie66w9NSg9nqdI5fCJ6qdH2s0za5m2plFonsjIuFaoN89j78ROUwuSOzD6mFZPcJHhJ0CxEKc0SBH", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/merchants/custom-attribute-definitions") @@ -125,7 +124,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/merchants/custom-attribute-definitions") @@ -189,7 +187,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/merchants/custom-attribute-definitions/key") @@ -250,7 +247,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/merchants/custom-attribute-definitions/key") @@ -298,7 +294,6 @@ describe("CustomAttributeDefinitionsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/merchants/custom-attribute-definitions/key") diff --git a/tests/wire/merchants/customAttributes.test.ts b/tests/wire/merchants/customAttributes.test.ts index 52e44f392..b90cd452b 100644 --- a/tests/wire/merchants/customAttributes.test.ts +++ b/tests/wire/merchants/customAttributes.test.ts @@ -17,7 +17,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/merchants/custom-attributes/bulk-delete") @@ -108,7 +107,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/merchants/custom-attributes/bulk-upsert") @@ -210,7 +208,6 @@ describe("CustomAttributesClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/merchants/merchant_id/custom-attributes") @@ -287,7 +284,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/merchants/merchant_id/custom-attributes/key") @@ -359,7 +355,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/merchants/merchant_id/custom-attributes/key") @@ -415,7 +410,6 @@ describe("CustomAttributesClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/merchants/merchant_id/custom-attributes/key") diff --git a/tests/wire/oAuth.test.ts b/tests/wire/oAuth.test.ts index 5f5af0d39..a515674c0 100644 --- a/tests/wire/oAuth.test.ts +++ b/tests/wire/oAuth.test.ts @@ -12,7 +12,6 @@ describe("OAuthClient", () => { success: true, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/oauth2/revoke") @@ -61,7 +60,6 @@ describe("OAuthClient", () => { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], refresh_token_expires_at: "refresh_token_expires_at", }; - server .mockEndpoint() .post("/oauth2/token") @@ -110,7 +108,6 @@ describe("OAuthClient", () => { merchant_id: "MERCHANT_ID", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/oauth2/token/status") diff --git a/tests/wire/orders.test.ts b/tests/wire/orders.test.ts index 21a8733ac..ccb7231a9 100644 --- a/tests/wire/orders.test.ts +++ b/tests/wire/orders.test.ts @@ -195,7 +195,6 @@ describe("OrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/orders") @@ -625,7 +624,6 @@ describe("OrdersClient", () => { ], errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/orders/batch-retrieve") @@ -826,7 +824,6 @@ describe("OrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/orders/calculate") @@ -1240,7 +1237,6 @@ describe("OrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/orders/clone") @@ -1614,7 +1610,6 @@ describe("OrdersClient", () => { cursor: "123", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/orders/search") @@ -1815,7 +1810,6 @@ describe("OrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/orders/order_id") @@ -2122,7 +2116,6 @@ describe("OrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/orders/order_id") @@ -2439,7 +2432,6 @@ describe("OrdersClient", () => { net_amount_due_money: { amount: BigInt(1000000), currency: "UNKNOWN_CURRENCY" }, }, }; - server .mockEndpoint() .post("/v2/orders/order_id/pay") diff --git a/tests/wire/orders/customAttributeDefinitions.test.ts b/tests/wire/orders/customAttributeDefinitions.test.ts index fa0c13748..4564532cd 100644 --- a/tests/wire/orders/customAttributeDefinitions.test.ts +++ b/tests/wire/orders/customAttributeDefinitions.test.ts @@ -50,7 +50,6 @@ describe("CustomAttributeDefinitionsClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/orders/custom-attribute-definitions") @@ -150,7 +149,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/orders/custom-attribute-definitions") @@ -215,7 +213,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/orders/custom-attribute-definitions/key") @@ -274,7 +271,6 @@ describe("CustomAttributeDefinitionsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/orders/custom-attribute-definitions/key") @@ -324,7 +320,6 @@ describe("CustomAttributeDefinitionsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/orders/custom-attribute-definitions/key") diff --git a/tests/wire/orders/customAttributes.test.ts b/tests/wire/orders/customAttributes.test.ts index f09270c16..e62d62380 100644 --- a/tests/wire/orders/customAttributes.test.ts +++ b/tests/wire/orders/customAttributes.test.ts @@ -20,7 +20,6 @@ describe("CustomAttributesClient", () => { "table-number": { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR" }] }, }, }; - server .mockEndpoint() .post("/v2/orders/custom-attributes/bulk-delete") @@ -112,7 +111,6 @@ describe("CustomAttributesClient", () => { }, }, }; - server .mockEndpoint() .post("/v2/orders/custom-attributes/bulk-upsert") @@ -204,7 +202,6 @@ describe("CustomAttributesClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/orders/order_id/custom-attributes") @@ -273,7 +270,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/orders/order_id/custom-attributes/custom_attribute_key") @@ -345,7 +341,6 @@ describe("CustomAttributesClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/orders/order_id/custom-attributes/custom_attribute_key") @@ -403,7 +398,6 @@ describe("CustomAttributesClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/orders/order_id/custom-attributes/custom_attribute_key") diff --git a/tests/wire/payments.test.ts b/tests/wire/payments.test.ts index 0bef74988..7ada00977 100644 --- a/tests/wire/payments.test.ts +++ b/tests/wire/payments.test.ts @@ -78,7 +78,6 @@ describe("PaymentsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/payments") @@ -265,6 +264,7 @@ describe("PaymentsClient", () => { }, refund_requires_card_presence: true, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR" }], + wallet_type: "wallet_type", }, cash_details: { buyer_supplied_money: {} }, bank_account_details: { @@ -351,7 +351,6 @@ describe("PaymentsClient", () => { version_token: "TPtNEOBOa6Qq6E3C3IjckSVOM6b3hMbfhjvTxHBQUsB6o", }, }; - server .mockEndpoint() .post("/v2/payments") @@ -454,6 +453,7 @@ describe("PaymentsClient", () => { code: "INTERNAL_SERVER_ERROR", }, ], + walletType: "wallet_type", }, cashDetails: { buyerSuppliedMoney: {}, @@ -580,7 +580,6 @@ describe("PaymentsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/payments/cancel") @@ -661,6 +660,7 @@ describe("PaymentsClient", () => { }, refund_requires_card_presence: true, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR" }], + wallet_type: "wallet_type", }, cash_details: { buyer_supplied_money: {} }, bank_account_details: { @@ -747,7 +747,6 @@ describe("PaymentsClient", () => { version_token: "56pRkL3slrzet2iQrTp9n0bdJVYTB9YEWdTNjQfZOPV6o", }, }; - server .mockEndpoint() .get("/v2/payments/payment_id") @@ -844,6 +843,7 @@ describe("PaymentsClient", () => { code: "INTERNAL_SERVER_ERROR", }, ], + walletType: "wallet_type", }, cashDetails: { buyerSuppliedMoney: {}, @@ -1017,6 +1017,7 @@ describe("PaymentsClient", () => { card_payment_timeline: { authorized_at: "2021-10-13T20:26:44.364Z" }, refund_requires_card_presence: true, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR" }], + wallet_type: "wallet_type", }, cash_details: { buyer_supplied_money: {} }, bank_account_details: { @@ -1103,7 +1104,6 @@ describe("PaymentsClient", () => { version_token: "rDrXnqiS7fJgexccgdpzmwqTiXui1aIKCp9EchZ7trE6o", }, }; - server .mockEndpoint() .put("/v2/payments/payment_id") @@ -1203,6 +1203,7 @@ describe("PaymentsClient", () => { code: "INTERNAL_SERVER_ERROR", }, ], + walletType: "wallet_type", }, cashDetails: { buyerSuppliedMoney: {}, @@ -1372,6 +1373,7 @@ describe("PaymentsClient", () => { }, refund_requires_card_presence: true, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR" }], + wallet_type: "wallet_type", }, cash_details: { buyer_supplied_money: {} }, bank_account_details: { @@ -1458,7 +1460,6 @@ describe("PaymentsClient", () => { version_token: "N8AGYgEjCiY9Q57Jw7aVHEpBq8bzGCDCQMRX8Vs56N06o", }, }; - server .mockEndpoint() .post("/v2/payments/payment_id/cancel") @@ -1546,6 +1547,7 @@ describe("PaymentsClient", () => { code: "INTERNAL_SERVER_ERROR", }, ], + walletType: "wallet_type", }, cashDetails: { buyerSuppliedMoney: {}, @@ -1721,6 +1723,7 @@ describe("PaymentsClient", () => { }, refund_requires_card_presence: true, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR" }], + wallet_type: "wallet_type", }, cash_details: { buyer_supplied_money: {} }, bank_account_details: { @@ -1807,7 +1810,6 @@ describe("PaymentsClient", () => { version_token: "56pRkL3slrzet2iQrTp9n0bdJVYTB9YEWdTNjQfZOPV6o", }, }; - server .mockEndpoint() .post("/v2/payments/payment_id/complete") @@ -1905,6 +1907,7 @@ describe("PaymentsClient", () => { code: "INTERNAL_SERVER_ERROR", }, ], + walletType: "wallet_type", }, cashDetails: { buyerSuppliedMoney: {}, diff --git a/tests/wire/payouts.test.ts b/tests/wire/payouts.test.ts index 070430966..40fe8ebe0 100644 --- a/tests/wire/payouts.test.ts +++ b/tests/wire/payouts.test.ts @@ -48,7 +48,6 @@ describe("PayoutsClient", () => { cursor: "EMPCyStibo64hS8wLayZPp3oedR3AeEUNd3z7u6zphi72LQZFIEMbkKVvot9eefpU", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/payouts") @@ -153,7 +152,6 @@ describe("PayoutsClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/payouts/payout_id") @@ -230,7 +228,6 @@ describe("PayoutsClient", () => { cursor: "TbfI80z98Xc2LdApCyZ2NvCYLpkPurYLR16GRIttpMJ55mrSIMzHgtkcRQdT0mOnTtfHO", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .get("/v2/payouts/payout_id/payout-entries") diff --git a/tests/wire/refunds.test.ts b/tests/wire/refunds.test.ts index ce1958ad4..fb7aa7f87 100644 --- a/tests/wire/refunds.test.ts +++ b/tests/wire/refunds.test.ts @@ -36,7 +36,6 @@ describe("RefundsClient", () => { ], cursor: "5evquW1YswHoT4EoyUhzMmTsCnsSXBU9U0WJ4FU4623nrMQcocH0RGU6Up1YkwfiMcF59ood58EBTEGgzMTGHQJpocic7ExOL0NtrTXCeWcv0UJIJNk8eXb", }; - server .mockEndpoint({ once: false }) .get("/v2/refunds") @@ -140,7 +139,6 @@ describe("RefundsClient", () => { terminal_refund_id: "terminal_refund_id", }, }; - server .mockEndpoint() .post("/v2/refunds") @@ -241,7 +239,6 @@ describe("RefundsClient", () => { terminal_refund_id: "terminal_refund_id", }, }; - server .mockEndpoint() .get("/v2/refunds/refund_id") diff --git a/tests/wire/sites.test.ts b/tests/wire/sites.test.ts index 1c56ac87f..17dd33d54 100644 --- a/tests/wire/sites.test.ts +++ b/tests/wire/sites.test.ts @@ -29,7 +29,6 @@ describe("SitesClient", () => { }, ], }; - server.mockEndpoint().get("/v2/sites").respondWith().statusCode(200).jsonBody(rawResponseBody).build(); const response = await client.sites.list(); diff --git a/tests/wire/snippets.test.ts b/tests/wire/snippets.test.ts index 1cb6d9719..4f5e9dd40 100644 --- a/tests/wire/snippets.test.ts +++ b/tests/wire/snippets.test.ts @@ -18,7 +18,6 @@ describe("SnippetsClient", () => { updated_at: "2021-03-11T25:40:09.000000Z", }, }; - server .mockEndpoint() .get("/v2/sites/site_id/snippet") @@ -63,7 +62,6 @@ describe("SnippetsClient", () => { updated_at: "2021-03-11T25:40:09.000000Z", }, }; - server .mockEndpoint() .post("/v2/sites/site_id/snippet") @@ -105,7 +103,6 @@ describe("SnippetsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/sites/site_id/snippet") diff --git a/tests/wire/subscriptions.test.ts b/tests/wire/subscriptions.test.ts index bf4c21e72..a2d4ee64a 100644 --- a/tests/wire/subscriptions.test.ts +++ b/tests/wire/subscriptions.test.ts @@ -50,7 +50,6 @@ describe("SubscriptionsClient", () => { completed_date: "completed_date", }, }; - server .mockEndpoint() .post("/v2/subscriptions") @@ -136,7 +135,6 @@ describe("SubscriptionsClient", () => { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], affected_subscriptions: 12, }; - server .mockEndpoint() .post("/v2/subscriptions/bulk-swap-plan") @@ -253,7 +251,6 @@ describe("SubscriptionsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint() .post("/v2/subscriptions/search") @@ -396,7 +393,6 @@ describe("SubscriptionsClient", () => { completed_date: "completed_date", }, }; - server .mockEndpoint() .get("/v2/subscriptions/subscription_id") @@ -477,7 +473,6 @@ describe("SubscriptionsClient", () => { completed_date: "completed_date", }, }; - server .mockEndpoint() .put("/v2/subscriptions/subscription_id") @@ -561,7 +556,6 @@ describe("SubscriptionsClient", () => { completed_date: "completed_date", }, }; - server .mockEndpoint() .delete("/v2/subscriptions/subscription_id/actions/action_id") @@ -659,7 +653,6 @@ describe("SubscriptionsClient", () => { }, ], }; - server .mockEndpoint() .post("/v2/subscriptions/subscription_id/billing-anchor") @@ -768,7 +761,6 @@ describe("SubscriptionsClient", () => { }, ], }; - server .mockEndpoint() .post("/v2/subscriptions/subscription_id/cancel") @@ -899,7 +891,6 @@ describe("SubscriptionsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/subscriptions/subscription_id/events") @@ -1039,7 +1030,6 @@ describe("SubscriptionsClient", () => { }, ], }; - server .mockEndpoint() .post("/v2/subscriptions/subscription_id/pause") @@ -1154,7 +1144,6 @@ describe("SubscriptionsClient", () => { }, ], }; - server .mockEndpoint() .post("/v2/subscriptions/subscription_id/resume") @@ -1272,7 +1261,6 @@ describe("SubscriptionsClient", () => { }, ], }; - server .mockEndpoint() .post("/v2/subscriptions/subscription_id/swap-plan") diff --git a/tests/wire/team.test.ts b/tests/wire/team.test.ts index d5789e18b..b5e8959b4 100644 --- a/tests/wire/team.test.ts +++ b/tests/wire/team.test.ts @@ -30,7 +30,6 @@ describe("TeamClient", () => { cursor: "cursor", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/team-members/jobs") @@ -91,7 +90,6 @@ describe("TeamClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/team-members/jobs") @@ -143,7 +141,6 @@ describe("TeamClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/team-members/jobs/job_id") @@ -190,7 +187,6 @@ describe("TeamClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/team-members/jobs/job_id") diff --git a/tests/wire/teamMembers.test.ts b/tests/wire/teamMembers.test.ts index ddc7cf7b1..ab00d9046 100644 --- a/tests/wire/teamMembers.test.ts +++ b/tests/wire/teamMembers.test.ts @@ -80,7 +80,6 @@ describe("TeamMembersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/team-members") @@ -253,7 +252,6 @@ describe("TeamMembersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/team-members/bulk-create") @@ -423,7 +421,6 @@ describe("TeamMembersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/team-members/bulk-update") @@ -750,7 +747,6 @@ describe("TeamMembersClient", () => { cursor: "N:9UglUjOXQ13-hMFypCft", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/team-members/search") @@ -1084,7 +1080,6 @@ describe("TeamMembersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/team-members/team_member_id") @@ -1231,7 +1226,6 @@ describe("TeamMembersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/team-members/team_member_id") diff --git a/tests/wire/teamMembers/wageSetting.test.ts b/tests/wire/teamMembers/wageSetting.test.ts index 9f08f8339..6ef7b1a35 100644 --- a/tests/wire/teamMembers/wageSetting.test.ts +++ b/tests/wire/teamMembers/wageSetting.test.ts @@ -27,7 +27,6 @@ describe("WageSettingClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/team-members/team_member_id/wage-setting") @@ -118,7 +117,6 @@ describe("WageSettingClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/team-members/team_member_id/wage-setting") diff --git a/tests/wire/terminal.test.ts b/tests/wire/terminal.test.ts index 817f4302e..43a025ccc 100644 --- a/tests/wire/terminal.test.ts +++ b/tests/wire/terminal.test.ts @@ -57,7 +57,6 @@ describe("TerminalClient", () => { await_next_action_duration: "PT5M", }, }; - server .mockEndpoint() .post("/v2/terminals/actions/action_id/dismiss") @@ -199,7 +198,6 @@ describe("TerminalClient", () => { tip_money: { amount: BigInt(1000000), currency: "UNKNOWN_CURRENCY" }, }, }; - server .mockEndpoint() .post("/v2/terminals/checkouts/checkout_id/dismiss") @@ -294,7 +292,6 @@ describe("TerminalClient", () => { location_id: "location_id", }, }; - server .mockEndpoint() .post("/v2/terminals/refunds/terminal_refund_id/dismiss") diff --git a/tests/wire/terminal/actions.test.ts b/tests/wire/terminal/actions.test.ts index 2cd9be57b..86aeedc30 100644 --- a/tests/wire/terminal/actions.test.ts +++ b/tests/wire/terminal/actions.test.ts @@ -64,7 +64,6 @@ describe("ActionsClient", () => { await_next_action_duration: "await_next_action_duration", }, }; - server .mockEndpoint() .post("/v2/terminals/actions") @@ -238,7 +237,6 @@ describe("ActionsClient", () => { ], cursor: "CURSOR", }; - server .mockEndpoint() .post("/v2/terminals/actions/search") @@ -429,7 +427,6 @@ describe("ActionsClient", () => { await_next_action_duration: "await_next_action_duration", }, }; - server .mockEndpoint() .get("/v2/terminals/actions/action_id") @@ -578,7 +575,6 @@ describe("ActionsClient", () => { await_next_action_duration: "await_next_action_duration", }, }; - server .mockEndpoint() .post("/v2/terminals/actions/action_id/cancel") diff --git a/tests/wire/terminal/checkouts.test.ts b/tests/wire/terminal/checkouts.test.ts index ab1218787..efadf6ed0 100644 --- a/tests/wire/terminal/checkouts.test.ts +++ b/tests/wire/terminal/checkouts.test.ts @@ -54,7 +54,6 @@ describe("CheckoutsClient", () => { tip_money: { amount: BigInt(1000000), currency: "UNKNOWN_CURRENCY" }, }, }; - server .mockEndpoint() .post("/v2/terminals/checkouts") @@ -194,7 +193,6 @@ describe("CheckoutsClient", () => { ], cursor: "RiTJqBoTuXlbLmmrPvEkX9iG7XnQ4W4RjGnH", }; - server .mockEndpoint() .post("/v2/terminals/checkouts/search") @@ -327,7 +325,6 @@ describe("CheckoutsClient", () => { tip_money: { amount: BigInt(1000000), currency: "UNKNOWN_CURRENCY" }, }, }; - server .mockEndpoint() .get("/v2/terminals/checkouts/checkout_id") @@ -439,7 +436,6 @@ describe("CheckoutsClient", () => { tip_money: { amount: BigInt(1000000), currency: "UNKNOWN_CURRENCY" }, }, }; - server .mockEndpoint() .post("/v2/terminals/checkouts/checkout_id/cancel") diff --git a/tests/wire/terminal/refunds.test.ts b/tests/wire/terminal/refunds.test.ts index 60750e3c8..15e8556b6 100644 --- a/tests/wire/terminal/refunds.test.ts +++ b/tests/wire/terminal/refunds.test.ts @@ -35,7 +35,6 @@ describe("RefundsClient", () => { location_id: "76C9W6K8CNNQ5", }, }; - server .mockEndpoint() .post("/v2/terminals/refunds") @@ -114,7 +113,6 @@ describe("RefundsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint() .post("/v2/terminals/refunds/search") @@ -189,7 +187,6 @@ describe("RefundsClient", () => { location_id: "76C9W6K8CNNQ5", }, }; - server .mockEndpoint() .get("/v2/terminals/refunds/terminal_refund_id") @@ -255,7 +252,6 @@ describe("RefundsClient", () => { location_id: "76C9W6K8CNNQ5", }, }; - server .mockEndpoint() .post("/v2/terminals/refunds/terminal_refund_id/cancel") diff --git a/tests/wire/transferOrders.test.ts b/tests/wire/transferOrders.test.ts index 4e3f1ab45..3def5d6ba 100644 --- a/tests/wire/transferOrders.test.ts +++ b/tests/wire/transferOrders.test.ts @@ -59,7 +59,6 @@ describe("TransferOrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/transfer-orders") @@ -207,7 +206,6 @@ describe("TransferOrdersClient", () => { cursor: "eyJsYXN0X3VwZGF0ZWRfYXQiOjE3NTMxMTU1NDBfMTIzfQ==", errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint({ once: false }) .post("/v2/transfer-orders/search") @@ -343,7 +341,6 @@ describe("TransferOrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .get("/v2/transfer-orders/transfer_order_id") @@ -457,7 +454,6 @@ describe("TransferOrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .put("/v2/transfer-orders/transfer_order_id") @@ -546,7 +542,6 @@ describe("TransferOrdersClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/transfer-orders/transfer_order_id") @@ -615,7 +610,6 @@ describe("TransferOrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/transfer-orders/transfer_order_id/cancel") @@ -731,7 +725,6 @@ describe("TransferOrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/transfer-orders/transfer_order_id/receive") @@ -848,7 +841,6 @@ describe("TransferOrdersClient", () => { }, errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .post("/v2/transfer-orders/transfer_order_id/start") diff --git a/tests/wire/v1Transactions.test.ts b/tests/wire/v1Transactions.test.ts index 887779c8c..462f78c8e 100644 --- a/tests/wire/v1Transactions.test.ts +++ b/tests/wire/v1Transactions.test.ts @@ -65,7 +65,6 @@ describe("V1TransactionsClient", () => { btc_price_satoshi: 1.1, }, ]; - server .mockEndpoint() .get("/v1/location_id/orders") @@ -222,7 +221,6 @@ describe("V1TransactionsClient", () => { btc_receive_address: "btc_receive_address", btc_price_satoshi: 1.1, }; - server .mockEndpoint() .get("/v1/location_id/orders/order_id") @@ -398,7 +396,6 @@ describe("V1TransactionsClient", () => { btc_receive_address: "btc_receive_address", btc_price_satoshi: 1.1, }; - server .mockEndpoint() .put("/v1/location_id/orders/order_id") diff --git a/tests/wire/vendors.test.ts b/tests/wire/vendors.test.ts index 07cfdaf65..438095418 100644 --- a/tests/wire/vendors.test.ts +++ b/tests/wire/vendors.test.ts @@ -67,7 +67,6 @@ describe("VendorsClient", () => { }, }, }; - server .mockEndpoint() .post("/v2/vendors/bulk-create") @@ -190,7 +189,6 @@ describe("VendorsClient", () => { }, }, }; - server .mockEndpoint() .post("/v2/vendors/bulk-retrieve") @@ -320,7 +318,6 @@ describe("VendorsClient", () => { }, }, }; - server .mockEndpoint() .put("/v2/vendors/bulk-update") @@ -486,7 +483,6 @@ describe("VendorsClient", () => { status: "ACTIVE", }, }; - server .mockEndpoint() .post("/v2/vendors/create") @@ -604,7 +600,6 @@ describe("VendorsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint() .post("/v2/vendors/search") @@ -699,7 +694,6 @@ describe("VendorsClient", () => { status: "ACTIVE", }, }; - server .mockEndpoint() .get("/v2/vendors/vendor_id") @@ -808,7 +802,6 @@ describe("VendorsClient", () => { status: "ACTIVE", }, }; - server .mockEndpoint() .put("/v2/vendors/vendor_id") diff --git a/tests/wire/webhooks/eventTypes.test.ts b/tests/wire/webhooks/eventTypes.test.ts index ffbbdae4e..bb8deaa8b 100644 --- a/tests/wire/webhooks/eventTypes.test.ts +++ b/tests/wire/webhooks/eventTypes.test.ts @@ -19,7 +19,6 @@ describe("EventTypesClient", () => { }, ], }; - server .mockEndpoint() .get("/v2/webhooks/event-types") diff --git a/tests/wire/webhooks/subscriptions.test.ts b/tests/wire/webhooks/subscriptions.test.ts index ef7f57712..ebf758bde 100644 --- a/tests/wire/webhooks/subscriptions.test.ts +++ b/tests/wire/webhooks/subscriptions.test.ts @@ -25,7 +25,6 @@ describe("SubscriptionsClient", () => { ], cursor: "cursor", }; - server .mockEndpoint({ once: false }) .get("/v2/webhooks/subscriptions") @@ -97,7 +96,6 @@ describe("SubscriptionsClient", () => { updated_at: "2022-01-10 23:29:48 +0000 UTC", }, }; - server .mockEndpoint() .post("/v2/webhooks/subscriptions") @@ -157,7 +155,6 @@ describe("SubscriptionsClient", () => { updated_at: "2022-01-10 23:29:48 +0000 UTC", }, }; - server .mockEndpoint() .get("/v2/webhooks/subscriptions/subscription_id") @@ -210,7 +207,6 @@ describe("SubscriptionsClient", () => { updated_at: "2022-01-10 23:45:51 +0000 UTC", }, }; - server .mockEndpoint() .put("/v2/webhooks/subscriptions/subscription_id") @@ -257,7 +253,6 @@ describe("SubscriptionsClient", () => { const rawResponseBody = { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], }; - server .mockEndpoint() .delete("/v2/webhooks/subscriptions/subscription_id") @@ -289,7 +284,6 @@ describe("SubscriptionsClient", () => { errors: [{ category: "API_ERROR", code: "INTERNAL_SERVER_ERROR", detail: "detail", field: "field" }], signature_key: "1k9bIJKCeTmSQwyagtNRLg", }; - server .mockEndpoint() .post("/v2/webhooks/subscriptions/subscription_id/signature-key") @@ -336,7 +330,6 @@ describe("SubscriptionsClient", () => { passes_filter: true, payload: { key: "value" }, }; - server .mockEndpoint() .post("/v2/webhooks/subscriptions/subscription_id/test") diff --git a/yarn.lock b/yarn.lock index 9fa812b5f..d5a98fc68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -111,34 +111,34 @@ dependencies: tslib "^2.8.1" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.28.6", "@babel/code-frame@^7.29.0": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.29.0.tgz#7cd7a59f15b3cc0dcd803038f7792712a7d0b15c" - integrity sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw== +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.28.6.tgz#72499312ec58b1e2245ba4a4f550c132be4982f7" + integrity sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q== dependencies: "@babel/helper-validator-identifier" "^7.28.5" js-tokens "^4.0.0" picocolors "^1.1.1" "@babel/compat-data@^7.28.6": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.29.0.tgz#00d03e8c0ac24dd9be942c5370990cbe1f17d88d" - integrity sha512-T1NCJqT/j9+cn8fvkt7jtwbLBfLC/1y1c7NtCeXFRgzGTsafi68MRv8yzkYSapBnFA6L3U2VSc02ciDzoAJhJg== + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.28.6.tgz#103f466803fa0f059e82ccac271475470570d74c" + integrity sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg== "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.23.9": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.29.0.tgz#5286ad785df7f79d656e88ce86e650d16ca5f322" - integrity sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA== + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.28.6.tgz#531bf883a1126e53501ba46eb3bb414047af507f" + integrity sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw== dependencies: - "@babel/code-frame" "^7.29.0" - "@babel/generator" "^7.29.0" + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" "@babel/helper-compilation-targets" "^7.28.6" "@babel/helper-module-transforms" "^7.28.6" "@babel/helpers" "^7.28.6" - "@babel/parser" "^7.29.0" + "@babel/parser" "^7.28.6" "@babel/template" "^7.28.6" - "@babel/traverse" "^7.29.0" - "@babel/types" "^7.29.0" + "@babel/traverse" "^7.28.6" + "@babel/types" "^7.28.6" "@jridgewell/remapping" "^2.3.5" convert-source-map "^2.0.0" debug "^4.1.0" @@ -146,13 +146,13 @@ json5 "^2.2.3" semver "^6.3.1" -"@babel/generator@^7.29.0", "@babel/generator@^7.7.2": - version "7.29.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.29.1.tgz#d09876290111abbb00ef962a7b83a5307fba0d50" - integrity sha512-qsaF+9Qcm2Qv8SRIMMscAvG4O3lJ0F1GuMo5HR/Bp02LopNgnZBC/EkbevHFeGs4ls/oPz9v+Bsmzbkbe+0dUw== +"@babel/generator@^7.28.6", "@babel/generator@^7.7.2": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.28.6.tgz#48dcc65d98fcc8626a48f72b62e263d25fc3c3f1" + integrity sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw== dependencies: - "@babel/parser" "^7.29.0" - "@babel/types" "^7.29.0" + "@babel/parser" "^7.28.6" + "@babel/types" "^7.28.6" "@jridgewell/gen-mapping" "^0.3.12" "@jridgewell/trace-mapping" "^0.3.28" jsesc "^3.0.2" @@ -218,12 +218,12 @@ "@babel/template" "^7.28.6" "@babel/types" "^7.28.6" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.28.6", "@babel/parser@^7.29.0": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.29.0.tgz#669ef345add7d057e92b7ed15f0bac07611831b6" - integrity sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.23.9", "@babel/parser@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.28.6.tgz#f01a8885b7fa1e56dd8a155130226cd698ef13fd" + integrity sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ== dependencies: - "@babel/types" "^7.29.0" + "@babel/types" "^7.28.6" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -353,23 +353,23 @@ "@babel/parser" "^7.28.6" "@babel/types" "^7.28.6" -"@babel/traverse@^7.28.6", "@babel/traverse@^7.29.0": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.29.0.tgz#f323d05001440253eead3c9c858adbe00b90310a" - integrity sha512-4HPiQr0X7+waHfyXPZpWPfWL/J7dcN1mx9gL6WdQVMbPnF3+ZhSMs8tCxN7oHddJE9fhNE7+lxdnlyemKfJRuA== +"@babel/traverse@^7.28.6": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.28.6.tgz#871ddc79a80599a5030c53b1cc48cbe3a5583c2e" + integrity sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg== dependencies: - "@babel/code-frame" "^7.29.0" - "@babel/generator" "^7.29.0" + "@babel/code-frame" "^7.28.6" + "@babel/generator" "^7.28.6" "@babel/helper-globals" "^7.28.0" - "@babel/parser" "^7.29.0" + "@babel/parser" "^7.28.6" "@babel/template" "^7.28.6" - "@babel/types" "^7.29.0" + "@babel/types" "^7.28.6" debug "^4.3.1" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.28.2", "@babel/types@^7.28.6", "@babel/types@^7.29.0", "@babel/types@^7.3.3": - version "7.29.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.29.0.tgz#9f5b1e838c446e72cf3cd4b918152b8c605e37c7" - integrity sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.28.2", "@babel/types@^7.28.6", "@babel/types@^7.3.3": + version "7.28.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.28.6.tgz#c3e9377f1b155005bcc4c46020e7e394e13089df" + integrity sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg== dependencies: "@babel/helper-string-parser" "^7.27.1" "@babel/helper-validator-identifier" "^7.28.5" @@ -379,59 +379,59 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== -"@biomejs/biome@2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.4.3.tgz#eb7a48f1763fe333949665b3ff7814267eda000f" - integrity sha512-cBrjf6PNF6yfL8+kcNl85AjiK2YHNsbU0EvDOwiZjBPbMbQ5QcgVGFpjD0O52p8nec5O8NYw7PKw3xUR7fPAkQ== +"@biomejs/biome@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@biomejs/biome/-/biome-2.3.1.tgz#d1a9284f52986324f288cdaf450331a0f3fb1da7" + integrity sha512-A29evf1R72V5bo4o2EPxYMm5mtyGvzp2g+biZvRFx29nWebGyyeOSsDWGx3tuNNMFRepGwxmA9ZQ15mzfabK2w== optionalDependencies: - "@biomejs/cli-darwin-arm64" "2.4.3" - "@biomejs/cli-darwin-x64" "2.4.3" - "@biomejs/cli-linux-arm64" "2.4.3" - "@biomejs/cli-linux-arm64-musl" "2.4.3" - "@biomejs/cli-linux-x64" "2.4.3" - "@biomejs/cli-linux-x64-musl" "2.4.3" - "@biomejs/cli-win32-arm64" "2.4.3" - "@biomejs/cli-win32-x64" "2.4.3" - -"@biomejs/cli-darwin-arm64@2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.4.3.tgz#ca188065f29940de1bb0029df2fd639719c92750" - integrity sha512-eOafSFlI/CF4id2tlwq9CVHgeEqvTL5SrhWff6ZORp6S3NL65zdsR3ugybItkgF8Pf4D9GSgtbB6sE3UNgOM9w== - -"@biomejs/cli-darwin-x64@2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.4.3.tgz#418c55c0bfd1f5d4d22c48cddf8bbd78b02e7fd7" - integrity sha512-V2+av4ilbWcBMNufTtMMXVW00nPwyIjI5qf7n9wSvUaZ+tt0EvMGk46g9sAFDJBEDOzSyoRXiSP6pCvKTOEbPA== - -"@biomejs/cli-linux-arm64-musl@2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.4.3.tgz#58da6a862764cc6c02c27a2d737a4f187a446bcd" - integrity sha512-QuFzvsGo8BA4Xm7jGX5idkw6BqFblcCPySMTvq0AhGYnhUej5VJIDJbmTKfHqwjHepZiC4fA+T5i6wmiZolZNw== - -"@biomejs/cli-linux-arm64@2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.4.3.tgz#7642518e76df8fc2dcd0675042e85e58c03f6a74" - integrity sha512-0m+O0x9FgK99FAwDK+fiDtjs2wnqq7bvfj17KJVeCkTwT/liI+Q9njJG7lwXK0iSJVXeFNRIxukpVI3SifMYAA== - -"@biomejs/cli-linux-x64-musl@2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.4.3.tgz#2a2fe720f636fc3894debf23925e9fe1c06da079" - integrity sha512-qEc0OCpj/uytruQ4wLM0yWNJLZy0Up8H1Er5MW3SrstqM6J2d4XqdNA86xzCy8MQCHpoVZ3lFye3GBlIL4/ljw== - -"@biomejs/cli-linux-x64@2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-2.4.3.tgz#dad0a81804ed2043e9ea3e4b29b3bb352c4eb26a" - integrity sha512-NVqh0saIU0u5OfOp/0jFdlKRE59+XyMvWmtx0f6Nm/2OpdxBl04coRIftBbY9d1gfu+23JVv4CItAqPYrjYh5w== - -"@biomejs/cli-win32-arm64@2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.4.3.tgz#1da3559be0924e891f9b986c8c0db7d503a34a11" - integrity sha512-gRO96vrIARilv/Cp2ZnmNNL5LSZg3RO75GPp13hsLO3N4YVpE7saaMDp2bcyV48y2N2Pbit1brkGVGta0yd6VQ== - -"@biomejs/cli-win32-x64@2.4.3": - version "2.4.3" - resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.4.3.tgz#58ddb4e205b274d693940f3d334debd6f4c94ff4" - integrity sha512-vSm/vOJe06pf14aGHfHl3Ar91Nlx4YYmohElDJ+17UbRwe99n987S/MhAlQOkONqf1utJor04ChkCPmKb8SWdw== + "@biomejs/cli-darwin-arm64" "2.3.1" + "@biomejs/cli-darwin-x64" "2.3.1" + "@biomejs/cli-linux-arm64" "2.3.1" + "@biomejs/cli-linux-arm64-musl" "2.3.1" + "@biomejs/cli-linux-x64" "2.3.1" + "@biomejs/cli-linux-x64-musl" "2.3.1" + "@biomejs/cli-win32-arm64" "2.3.1" + "@biomejs/cli-win32-x64" "2.3.1" + +"@biomejs/cli-darwin-arm64@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.1.tgz#607835f8ef043e1a80f9ad2a232c9e860941ab60" + integrity sha512-ombSf3MnTUueiYGN1SeI9tBCsDUhpWzOwS63Dove42osNh0PfE1cUtHFx6eZ1+MYCCLwXzlFlYFdrJ+U7h6LcA== + +"@biomejs/cli-darwin-x64@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.1.tgz#654fe4aaa8ea5d5bde5457db4961ad5d214713ac" + integrity sha512-pcOfwyoQkrkbGvXxRvZNe5qgD797IowpJPovPX5biPk2FwMEV+INZqfCaz4G5bVq9hYnjwhRMamg11U4QsRXrQ== + +"@biomejs/cli-linux-arm64-musl@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.1.tgz#5fe502082a575c31ef808cf080cbcd4485964167" + integrity sha512-+DZYv8l7FlUtTrWs1Tdt1KcNCAmRO87PyOnxKGunbWm5HKg1oZBSbIIPkjrCtDZaeqSG1DiGx7qF+CPsquQRcg== + +"@biomejs/cli-linux-arm64@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.1.tgz#81c02547905d379dbb312e6ff24b04908c2e320f" + integrity sha512-td5O8pFIgLs8H1sAZsD6v+5quODihyEw4nv2R8z7swUfIK1FKk+15e4eiYVLcAE4jUqngvh4j3JCNgg0Y4o4IQ== + +"@biomejs/cli-linux-x64-musl@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.1.tgz#c7c00beb5eda1ad25185544897e66eeec6be3b0b" + integrity sha512-Y3Ob4nqgv38Mh+6EGHltuN+Cq8aj/gyMTJYzkFZV2AEj+9XzoXB9VNljz9pjfFNHUxvLEV4b55VWyxozQTBaUQ== + +"@biomejs/cli-linux-x64@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.1.tgz#7481d2e7be98d4de574df233766a5bdda037c897" + integrity sha512-PYWgEO7up7XYwSAArOpzsVCiqxBCXy53gsReAb1kKYIyXaoAlhBaBMvxR/k2Rm9aTuZ662locXUmPk/Aj+Xu+Q== + +"@biomejs/cli-win32-arm64@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.1.tgz#dac8c7c7223e97f86cd0eed7aa95584984761481" + integrity sha512-RHIG/zgo+69idUqVvV3n8+j58dKYABRpMyDmfWu2TITC+jwGPiEaT0Q3RKD+kQHiS80mpBrST0iUGeEXT0bU9A== + +"@biomejs/cli-win32-x64@2.3.1": + version "2.3.1" + resolved "https://registry.yarnpkg.com/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.1.tgz#f8818ab2c1e3a6e2ed8a656935173e5ce4c720be" + integrity sha512-izl30JJ5Dp10mi90Eko47zhxE6pYyWPcnX1NQxKpL/yMhXxf95oLTzfpu4q+MDBh/gemNqyJEwjBpe0MT5iWPA== "@bundled-es-modules/cookie@^2.0.1": version "2.0.1" @@ -765,9 +765,9 @@ integrity sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg== "@sinclair/typebox@^0.27.8": - version "0.27.10" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.10.tgz#beefe675f1853f73676aecc915b2bd2ac98c4fc6" - integrity sha512-MTBk/3jGLNB2tVxv6uLlFh1iu64iYOQ2PbdOSK3NW8JZsmlaOh2q6sdtKowBhfw8QFLmYNzTW4/oK4uATIi6ZA== + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== "@sinonjs/commons@^3.0.0": version "3.0.1" @@ -904,11 +904,11 @@ form-data "^4.0.4" "@types/node@*": - version "25.4.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-25.4.0.tgz#f25d8467984d6667cc4c1be1e2f79593834aaedb" - integrity sha512-9wLpoeWuBlcbBpOY3XmzSTG3oscB6xjBEEtn+pYXTfhyXhIxC5FsBer2KTopBlvKEiW9l13po9fq+SJY/5lkhw== + version "25.0.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-25.0.6.tgz#5ca3c46f2b256b59128f433426e42d464765dab1" + integrity sha512-NNu0sjyNxpoiW3YuVFfNz7mxSQ+S4X2G28uqg2s+CzoqoQjLPsWSbsFFyztIAqt2vb8kfEAsJNepMGPTxFDx3Q== dependencies: - undici-types "~7.18.0" + undici-types "~7.16.0" "@types/node@^14.14.30": version "14.18.63" @@ -1113,16 +1113,16 @@ acorn-import-phases@^1.0.3: integrity sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ== acorn-walk@^8.0.2: - version "8.3.5" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.5.tgz#8a6b8ca8fc5b34685af15dabb44118663c296496" - integrity sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw== + version "8.3.4" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7" + integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g== dependencies: acorn "^8.11.0" -acorn@^8.1.0, acorn@^8.11.0, acorn@^8.15.0, acorn@^8.16.0, acorn@^8.8.1: - version "8.16.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.16.0.tgz#4ce79c89be40afe7afe8f3adb902a1f1ce9ac08a" - integrity sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw== +acorn@^8.1.0, acorn@^8.11.0, acorn@^8.15.0, acorn@^8.8.1: + version "8.15.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.15.0.tgz#a360898bc415edaac46c8241f6383975b930b816" + integrity sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg== agent-base@6: version "6.0.2" @@ -1151,9 +1151,9 @@ ajv-keywords@^5.1.0: fast-deep-equal "^3.1.3" ajv@^8.0.0, ajv@^8.9.0: - version "8.18.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc" - integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A== + version "8.17.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.17.1.tgz#37d9a5c776af6bc92d7f4f9510eba4c0a60d11a6" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: fast-deep-equal "^3.1.3" fast-uri "^3.0.1" @@ -1205,13 +1205,14 @@ asynckit@^0.4.0: integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== axios@^1.8.4: - version "1.13.6" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.13.6.tgz#c3f92da917dc209a15dd29936d20d5089b6b6c98" - integrity sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ== + version "1.16.1" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.16.1.tgz#517e29291d19d6e8cf919ff264f4fe157261ba12" + integrity sha512-caYkukvroVPO8KrzuJEb50Hm07KwfBZPEC3VeFHTsqWHvKTsy54hjJz9BS/cdaypROE2rH6xvm9mHX4fgWkr3A== dependencies: - follow-redirects "^1.15.11" + follow-redirects "^1.16.0" form-data "^4.0.5" - proxy-from-env "^1.1.0" + https-proxy-agent "^5.0.1" + proxy-from-env "^2.1.0" babel-jest@^29.7.0: version "29.7.0" @@ -1287,9 +1288,9 @@ base64-js@^1.3.1: integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== baseline-browser-mapping@^2.9.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.10.0.tgz#5b09935025bf8a80e29130251e337c6a7fc8cbb9" - integrity sha512-lIyg0szRfYbiy67j9KN8IyeD7q7hcmqnJ1ddWmNt19ItGpNN64mnllmxUNFIOdOm6by97jlL6wfpTTJrmnjWAA== + version "2.9.14" + resolved "https://registry.yarnpkg.com/baseline-browser-mapping/-/baseline-browser-mapping-2.9.14.tgz#3b6af0bc032445bca04de58caa9a87cfe921cbb3" + integrity sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg== brace-expansion@^1.1.7: version "1.1.12" @@ -1368,9 +1369,9 @@ camelcase@^6.2.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001759: - version "1.0.30001778" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001778.tgz#79a8a124e3473a20b70616497b987c30d06570a0" - integrity sha512-PN7uxFL+ExFJO61aVmP1aIEG4i9whQd4eoSCebav62UwDyp5OHh06zN4jqKSMePVgxHifCw1QJxdRkA1Pisekg== + version "1.0.30001764" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001764.tgz#03206c56469f236103b90f9ae10bcb8b9e1f6005" + integrity sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g== chalk@^4.0.0, chalk@^4.1.0: version "4.1.2" @@ -1524,9 +1525,9 @@ decimal.js@^10.4.2: integrity sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg== dedent@^1.0.0: - version "1.7.2" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.2.tgz#34e2264ab538301e27cf7b07bf2369c19baa8dd9" - integrity sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA== + version "1.7.1" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.7.1.tgz#364661eea3d73f3faba7089214420ec2f8f13e15" + integrity sha512-9JmrhGZpOlEgOLdQgSm0zxFaYoQon408V1v49aqTWuXENVlnCuY9JBZcXZiCsZQWDjTm5Qf/nIvAy77mXDAjEg== deepmerge@^4.2.2: version "4.3.1" @@ -1575,9 +1576,9 @@ dunder-proto@^1.0.1: gopd "^1.2.0" electron-to-chromium@^1.5.263: - version "1.5.313" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.313.tgz#193e9ae2c2ab6915acb41e833068381e4ef0b3e4" - integrity sha512-QBMrTWEf00GXZmJyx2lbYD45jpI3TUFnNIzJ5BBc8piGUDwMPa1GV6HJWTZVvY/eiN3fSopl7NRbgGp9sZ9LTA== + version "1.5.267" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.267.tgz#5d84f2df8cdb6bfe7e873706bb21bd4bfb574dc7" + integrity sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw== emittery@^0.13.1: version "0.13.1" @@ -1589,13 +1590,13 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -enhanced-resolve@^5.0.0, enhanced-resolve@^5.20.0: - version "5.20.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.20.0.tgz#323c2a70d2aa7fb4bdfd6d3c24dfc705c581295d" - integrity sha512-/ce7+jQ1PQ6rVXwe+jKEg5hW5ciicHwIQUagZkp6IufBoY3YDgdTTY1azVs0qoRgVmvsNB+rbjLJxDAeHHtwsQ== +enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.4: + version "5.18.4" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.4.tgz#c22d33055f3952035ce6a144ce092447c525f828" + integrity sha512-LgQMM4WXU3QI+SYgEc2liRgznaD5ojbmY3sb8LxyguVkIg5FxdpTkvk72te2R38/TGKxH634oLxXRGY6d7AP+Q== dependencies: graceful-fs "^4.2.4" - tapable "^2.3.0" + tapable "^2.2.0" entities@^6.0.0: version "6.0.1" @@ -1775,10 +1776,10 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" -follow-redirects@^1.15.11: - version "1.15.11" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.11.tgz#777d73d72a92f8ec4d2e410eb47352a56b8e8340" - integrity sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ== +follow-redirects@^1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.16.0.tgz#28474a159d3b9d11ef62050a14ed60e4df6d61bc" + integrity sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw== form-data-encoder@^4.0.2: version "4.1.0" @@ -1888,9 +1889,9 @@ graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== graphql@^16.8.1: - version "16.13.1" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.13.1.tgz#38ae5c76fbc4a009e0004dca6c76c370a1da7b54" - integrity sha512-gGgrVCoDKlIZ8fIqXBBb0pPKqDgki0Z/FSKNiQzSGj2uEYHr1tq5wmBegGwJx6QB5S5cM0khSBpi/JFHMCvsmQ== + version "16.12.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.12.0.tgz#28cc2462435b1ac3fdc6976d030cef83a0c13ac7" + integrity sha512-DKKrynuQRne0PNpEbzuEdHlYOMksHSUI8Zc9Unei5gTsMNA2/vMpoMz/yKba50pejK56qj98qM0SjYxAKi13gQ== handlebars@^4.7.8: version "4.7.8" @@ -2671,9 +2672,9 @@ mimic-fn@^2.1.0: integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== minimatch@^3.0.4, minimatch@^3.1.1: - version "3.1.5" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.5.tgz#580c88f8d5445f2bd6aa8f3cadefa0de79fbd69e" - integrity sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w== + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" @@ -2740,9 +2741,9 @@ node-int64@^0.4.0: integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== node-releases@^2.0.27: - version "2.0.36" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.36.tgz#99fd6552aaeda9e17c4713b57a63964a2e325e9d" - integrity sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA== + version "2.0.27" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.27.tgz#eedca519205cf20f650f61d56b070db111231e4e" + integrity sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA== normalize-path@^3.0.0: version "3.0.0" @@ -2892,10 +2893,10 @@ prompts@^2.0.1: kleur "^3.0.3" sisteransi "^1.0.5" -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== +proxy-from-env@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-2.1.0.tgz#a7487568adad577cfaaa7e88c49cab3ab3081aba" + integrity sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA== psl@^1.1.33: version "1.15.0" @@ -2919,6 +2920,13 @@ querystringify@^2.1.1: resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + react-is@^18.0.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" @@ -2981,7 +2989,7 @@ rettime@^0.7.0: resolved "https://registry.yarnpkg.com/rettime/-/rettime-0.7.0.tgz#c040f1a65e396eaa4b8346dd96ed937edc79d96f" integrity sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw== -safe-buffer@~5.2.0: +safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -3014,9 +3022,16 @@ semver@^6.3.0, semver@^6.3.1: integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@^7.3.4, semver@^7.5.3, semver@^7.5.4, semver@^7.7.3: - version "7.7.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.4.tgz#28464e36060e991fa7a11d0279d2d3f3b57a7e8a" - integrity sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA== + version "7.7.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946" + integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q== + +serialize-javascript@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" shebang-command@^2.0.0: version "2.0.0" @@ -3180,25 +3195,26 @@ symbol-tree@^3.2.4: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -tapable@^2.3.0: +tapable@^2.2.0, tapable@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.3.0.tgz#7e3ea6d5ca31ba8e078b560f0d83ce9a14aa8be6" integrity sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg== -terser-webpack-plugin@^5.3.17: - version "5.4.0" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.4.0.tgz#95fc4cf4437e587be11ecf37d08636089174d76b" - integrity sha512-Bn5vxm48flOIfkdl5CaD2+1CiUVbonWQ3KQPyP7/EuIl9Gbzq/gQFOzaMFUEgVjB1396tcK0SG8XcNJ/2kDH8g== +terser-webpack-plugin@^5.3.16: + version "5.3.16" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.16.tgz#741e448cc3f93d8026ebe4f7ef9e4afacfd56330" + integrity sha512-h9oBFCWrq78NyWWVcSwZarJkZ01c2AyGrzs1crmHZO3QUg9D61Wu4NPjBy69n7JqylFF5y+CsUZYmYEIZ3mR+Q== dependencies: "@jridgewell/trace-mapping" "^0.3.25" jest-worker "^27.4.5" schema-utils "^4.3.0" + serialize-javascript "^6.0.2" terser "^5.31.1" terser@^5.31.1: - version "5.46.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.46.0.tgz#1b81e560d584bbdd74a8ede87b4d9477b0ff9695" - integrity sha512-jTwoImyr/QbOWFFso3YoU3ik0jBBDJ6JTOQiy/J2YxVJdZCc+5u7skhNwiOR3FQIygFqVUPHl7qbbxtjW2K3Qg== + version "5.44.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.44.1.tgz#e391e92175c299b8c284ad6ded609e37303b0a9c" + integrity sha512-t/R3R/n0MSwnnazuPpPNVO60LX0SKL45pyl9YlvxIdkH0Of7D5qM2EVe+yASRIlY5pZ73nclYJfNANGWPwFDZw== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.15.0" @@ -3219,17 +3235,17 @@ tiny-warning@^1.0.3: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== -tldts-core@^7.0.25: - version "7.0.25" - resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.25.tgz#eaee57facdfb5528383d961f5586d49784519de5" - integrity sha512-ZjCZK0rppSBu7rjHYDYsEaMOIbbT+nWF57hKkv4IUmZWBNrBWBOjIElc0mKRgLM8bm7x/BBlof6t2gi/Oq/Asw== +tldts-core@^7.0.19: + version "7.0.19" + resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-7.0.19.tgz#9dd8a457a09b4e65c8266c029f1847fa78dead20" + integrity sha512-lJX2dEWx0SGH4O6p+7FPwYmJ/bu1JbcGJ8RLaG9b7liIgZ85itUVEPbMtWRVrde/0fnDPEPHW10ZsKW3kVsE9A== tldts@^7.0.5: - version "7.0.25" - resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.25.tgz#e9034876e09b2ad92db547a9307ae6fa65400f8d" - integrity sha512-keinCnPbwXEUG3ilrWQZU+CqcTTzHq9m2HhoUP2l7Xmi8l1LuijAXLpAJ5zRW+ifKTNscs4NdCkfkDCBYm352w== + version "7.0.19" + resolved "https://registry.yarnpkg.com/tldts/-/tldts-7.0.19.tgz#84cd7a7f04e68ec93b93b106fac038c527b99368" + integrity sha512-8PWx8tvC4jDB39BQw1m4x8y5MH1BcQ5xHeL2n7UVFulMPH/3Q0uiamahFJ3lXA0zO2SUyRXuVVbWSDmstlt9YA== dependencies: - tldts-core "^7.0.25" + tldts-core "^7.0.19" tmpl@1.0.5: version "1.0.5" @@ -3333,10 +3349,10 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~7.18.0: - version "7.18.2" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.18.2.tgz#29357a89e7b7ca4aef3bf0fd3fd0cd73884229e9" - integrity sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w== +undici-types@~7.16.0: + version "7.16.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46" + integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw== universalify@^0.2.0: version "0.2.0" @@ -3382,10 +3398,10 @@ walker@^1.0.8: dependencies: makeerror "1.0.12" -watchpack@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.5.1.tgz#dd38b601f669e0cbf567cb802e75cead82cde102" - integrity sha512-Zn5uXdcFNIA1+1Ei5McRd+iRzfhENPCe7LeABkJtNulSxjma+l7ltNx55BWZkRlwRnpOgHqxnjyaDgJnNXnqzg== +watchpack@^2.4.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.5.0.tgz#fa115d5ccaa4bf3aa594f586257c0bc4768939fd" + integrity sha512-e6vZvY6xboSwLz2GD36c16+O/2Z6fKvIf4pOXptw2rY9MVwE/TXc6RGqxD3I3x0a28lwBY7DE+76uTPSsBrrCA== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -3400,15 +3416,15 @@ webidl-conversions@^7.0.0: resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a" integrity sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g== -webpack-sources@^3.3.4: - version "3.3.4" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.3.4.tgz#a338b95eb484ecc75fbb196cbe8a2890618b4891" - integrity sha512-7tP1PdV4vF+lYPnkMR0jMY5/la2ub5Fc/8VQrrU+lXkiM6C4TjVfGw7iKfyhnTQOsD+6Q/iKw0eFciziRgD58Q== +webpack-sources@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.3.3.tgz#d4bf7f9909675d7a070ff14d0ef2a4f3c982c723" + integrity sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg== webpack@^5.97.1: - version "5.105.4" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.105.4.tgz#1b77fcd55a985ac7ca9de80a746caffa38220169" - integrity sha512-jTywjboN9aHxFlToqb0K0Zs9SbBoW4zRUlGzI2tYNxVYcEi/IPpn+Xi4ye5jTLvX2YeLuic/IvxNot+Q1jMoOw== + version "5.104.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.104.1.tgz#94bd41eb5dbf06e93be165ba8be41b8260d4fb1a" + integrity sha512-Qphch25abbMNtekmEGJmeRUhLDbe+QfiWTiqpKYkpCOWY64v9eyl+KRRLmqOFA2AvKPpc9DC6+u2n76tQLBoaA== dependencies: "@types/eslint-scope" "^3.7.7" "@types/estree" "^1.0.8" @@ -3416,11 +3432,11 @@ webpack@^5.97.1: "@webassemblyjs/ast" "^1.14.1" "@webassemblyjs/wasm-edit" "^1.14.1" "@webassemblyjs/wasm-parser" "^1.14.1" - acorn "^8.16.0" + acorn "^8.15.0" acorn-import-phases "^1.0.3" browserslist "^4.28.1" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.20.0" + enhanced-resolve "^5.17.4" es-module-lexer "^2.0.0" eslint-scope "5.1.1" events "^3.2.0" @@ -3432,9 +3448,9 @@ webpack@^5.97.1: neo-async "^2.6.2" schema-utils "^4.3.3" tapable "^2.3.0" - terser-webpack-plugin "^5.3.17" - watchpack "^2.5.1" - webpack-sources "^3.3.4" + terser-webpack-plugin "^5.3.16" + watchpack "^2.4.4" + webpack-sources "^3.3.3" whatwg-encoding@^2.0.0: version "2.0.0"