diff --git a/.changeset/sdks-cart-checkout-order-openapi-ts-0-99.md b/.changeset/sdks-cart-checkout-order-openapi-ts-0-99.md new file mode 100644 index 000000000..e057a52ad --- /dev/null +++ b/.changeset/sdks-cart-checkout-order-openapi-ts-0-99.md @@ -0,0 +1,159 @@ +--- +"@epcc-sdk/sdks-cart-checkout-order": minor +--- + +Regenerate the carts, checkout and orders SDK with `@hey-api/openapi-ts` 0.99.0 (previously +0.61.2), add `createCartCheckoutOrderClient`, and publish the Zod schemas. + +The package still generates from its `cart-checkout-standalone@v1` bundle: the published +specification, unchanged in this repository, plus the cart item union it already carried and +three new corrections in `specs/overrides/cart_checkout_service_corrections.yaml`, where the +specification disagrees with the service. They are listed under "What is fixed". + +What is new: + +- `createCartCheckoutOrderClient` binds the generated `createClient` and `createConfig` to + `@epcc-sdk/sdks-runtime`, so one install and one call give you a client with a caching + token source, the `auth` hook and a `fetch` that refreshes and replays once on a 401 and + backs off on a 429 or a 408, and on a 500, 502, 503, 504 or a transport failure where a + replay cannot duplicate work. + + ```ts + const client = createCartCheckoutOrderClient({ + baseUrl: "https://euwest.api.elasticpath.com", + clientId: process.env.EPCC_CLIENT_ID!, + clientSecret: process.env.EPCC_CLIENT_SECRET!, + }) + ``` + + Credentials are resolved from `source`, `provider`, `token`, `clientId` plus + `clientSecret`, or `clientId` alone for the implicit grant. `retry`, `storage`, + `leewaySeconds`, `fetch` and `config` tune the rest; `config` is merged last, so anything + the factory chose can be overridden. The runtime helpers are re-exported from the package + root, so a consumer who assembles the stack by hand still installs only this package. + +- Zod schemas for every request body, path, header, query and response are generated and + exposed on the `@epcc-sdk/sdks-cart-checkout-order/zod` subpath. `zod` is an optional peer + dependency (3.x) and the root entry never imports it. + +Breaking in practice, although the version is a minor: + +- The `@hey-api/client-fetch` dependency is gone. The fetch client is vendored into + `src/client/{client,core}`, and the root entry exports `createClient`, `createConfig`, + the shared `client` instance and the `Client`, `Config`, `CreateClientConfig`, + `RequestOptions` and `RequestResult` types. Import those from this package instead of + from `@hey-api/client-fetch`, which is deprecated. +- The shared `client` instance now carries a default base URL of + `https://euwest.api.elasticpath.com`; before, it had none. The specification lists US + East first, so the region is chosen in the generator config instead; every other package + on this generator already defaults to EU West, and a consumer installing two of them and + configuring neither would otherwise talk to two regions with no warning and no type + error. +- The eleven `date-time` fields are typed `string`, not `Date`: + + - `snapshot_date` on `BaseCartResponse`, and so on `CartResponse`; + - `start` and `end` on `CondensedPromotionResponse`, and on the promotions in + `CartItemCollectionResponse.included`; + - `start` and `end` on `DeliveryEstimate`; + - `created_at` and `updated_at` on `ShippingGroupResponse`; + - `start` and `end` in the `delivery_estimate` of the `createOrderShippingGroup` body. + + They reach you through 19 operations: `getCarts`, `createACart`, `getACart`, `updateACart`, + `bulkUpdateItemsInCart`, `createCartPaymentIntent`, `updateCartPaymentIntent`, + `checkoutApi`, `getAnOrder`, `updateAnOrder`, `getOrderItems`, `getShippingGroups`, + `createShippingGroup`, `getShippingGroupById`, `updateShippingGroup`, + `getOrderShippingGroups`, `createOrderShippingGroup`, `getShippingGroupsById` and + `putShippingGroupById`. The old `@hey-api/transformers` plugin declared them `Date`, but no + operation called its transformer, so the value at runtime was always the string the API + sends. Code that called a `Date` method on one of these fields stops compiling; wrap the + value in `new Date(...)` where you need one. + +- Four request bodies send a `delivery_estimate`: `createShippingGroup`, + `updateShippingGroup`, `putShippingGroupById` and `createOrderShippingGroup`. A JavaScript + `Date` passed there used to compile, and `JSON.stringify` sent it as an ISO string. It + stops compiling now; pass the string yourself, for example `start: date.toISOString()`. +- More properties are `readonly`: six declarations that the specification marks `readOnly` + beside a `$ref` or an `enum`, which the old generator did not see. They make `unit_price`, + `value` and `promotion_source` on `CartItemObject` (and so on the `manageCarts` body); `type`, + `unit_price`, `value`, `promotion_source` and `custom_attributes` on `CartItemResponse`; + `custom_attributes` on `OrderItemResponse`; and `unit_price`, `value`, `promotion_source` and + `custom_attributes` on `SubscriptionItemObject["data"]` read-only. An object literal that sets them + still compiles; code that assigns to one of them on an existing object stops compiling. +- The inline enum types `Type`, `PromotionSource`, `Gateway`, `Method`, `Status`, `Payment`, + `Shipping`, `TransactionType`, `CaptureMechanism` and `RefundMechanism` are no longer + exported, because the `exportInlineEnums` option does not exist in 0.99. Their unions are + unchanged and are now written inline at each use site. Replace a reference with the + literal union, or derive it: `CustomAttributes[string]["type"]`, + `NonNullable`, `DataBasePayments["gateway"]`, + `NonNullable`, `NonNullable`, + `NonNullable`, `NonNullable`, + `NonNullable`, + `NonNullable` and + `NonNullable`. +- Two fields follow the specification's OpenAPI 3.1 type arrays, where the old generator kept + one type: + - An error's `status` in `ResponseErrorItem`, and in the inline errors of + `UpdateACartError`, is `string | number`, not `number`. That changes the `Error` type of + 44 operations, and the `errors` array that the cart, order and bulk tax responses carry. + Code that assigns it straight to a `number` must narrow it first. + - The `value` of a custom attribute in `CustomAttributes` is `string | boolean | number`, + not `number`, so a string or boolean attribute value now compiles, as the specification's + own examples send. Code that reads it as a `number` must narrow it first. + +Unchanged on purpose: the read/write split is off. This package's generator config sets +`parser.transforms.readWrite` to `false`, the one place it differs from the other packages on +0.99. With the split on, the generator drops a property it treats as free-form from any schema +that has a read-only property, and in this specification that includes properties written as +`type: object` beside a `$ref`: `data` would go from 39 types and `links` from 28, and +responses such as `CartItemTaxesEntityResponse` would become untyped records. With it off, +every property the old types carried is still there, in the types and in `/zod`, no +`*Writable` types are generated, and request bodies keep their 0.61 shape, read-only fields +included. + +What is fixed: + +- A bulk tax item in `CartsBulkTaxes` takes an optional `meta: { component_product_id }`, + the uuid of a component product in the bundle the cart item holds. The service reads it + to put the tax item on that component instead of on the cart item, and the specification's + own description and `bulkBundleComponentTaxItems` example send it, but its schema left + `meta` out: the example did not compile against `bulkAddTaxItemsToCart`'s body, and + `zBulkAddTaxItemsToCartBody` would have stripped it. `CartsBulkTaxes` is also the response + type of `bulkAddTaxItemsToCart`, so `meta` appears there as optional too; the service does + not return it. + +- `updateCustomDiscountForCart` and `updateCustomDiscountForCartItem` take `amount` as a + negative integer in the currency's smallest unit, the only form the service accepts. The + specification pointed both request bodies at the response shape, so `amount` was typed as + an `{ amount, currency, formatted }` object, which the service rejects with a 400. The + bodies are now `CartsCustomDiscountsEntityRequest` over the new + `CartsCustomDiscountsUpdateObject`, with every field optional except `type`. A caller who + sent the object form must send the number instead, for example `amount: -150`. + `CartsCustomDiscountsResponseObject` is still exported, unchanged. +- `addCustomDiscountToCartItem` takes its discount wrapped in `{ data: ... }`, as the + service requires. The specification declared the bare `CartsCustomDiscountsObject` as the + body, and the service answers that with a 422 ("The data field is required"). The body is + now the new `CartsCustomDiscountsCreateRequest`, `{ data: CartsCustomDiscountsObject }`. A + caller who sent the bare object must wrap it in `data`. + +All 60 operations keep their names — `getCarts`, `createACart`, `deleteACart`, `getACart`, +`updateACart`, `deleteAllCartItems`, `getCartItems`, `manageCarts`, `bulkUpdateItemsInCart`, +`deleteACartItem`, `updateACartItem`, `deleteAccountCartAssociation`, +`createAccountCartAssociation`, `deleteCustomerCartAssociation`, +`createCustomerCartAssociation`, `deleteAPromotionViaPromotionCode`, `addTaxItemToCart`, +`addTaxItemToCartItemComponent`, `deleteTaxItemFromCartItemComponent`, +`updateTaxItemFromCartItemComponent`, `bulkDeleteTaxItemsFromCart`, `bulkAddTaxItemsToCart`, +`deleteATaxItem`, `updateATaxItem`, `bulkDeleteCustomDiscountsFromCart`, +`bulkAddCustomDiscountsToCart`, `deleteCustomDiscountFromCart`, +`updateCustomDiscountForCart`, `addCustomDiscountToCartItem`, +`deleteCustomDiscountFromCartItem`, `updateCustomDiscountForCartItem`, `getShippingGroups`, +`createShippingGroup`, `deleteCartShippingGroup`, `getShippingGroupById`, +`updateShippingGroup`, `createCartPaymentIntent`, `updateCartPaymentIntent`, `checkoutApi`, +`getCustomerOrders`, `getAnOrder`, `updateAnOrder`, `getOrderItems`, `anonymizeOrders`, +`confirmOrder`, `paymentSetup`, `confirmPayment`, `captureATransaction`, +`refundATransaction`, `getOrderTransactions`, `getATransaction`, `cancelATransaction`, +`getOrderShippingGroups`, `createOrderShippingGroup`, `getShippingGroupsById`, +`putShippingGroupById`, `getV2SettingsCart`, `putV2SettingsCart`, +`getV2SettingsCartStoreId` and `putV2SettingsCartStoreId` — and their `Data` / `Response` / +`Error` types. `ClientOptions`, the known base URL union, `CartsCustomDiscountsUpdateObject` and `CartsCustomDiscountsCreateRequest` are new; apart from the changes +listed above, nothing in the exported type surface is renamed or removed. The old types +declared no `BigInt`. diff --git a/.changeset/sdks-catalog-search-openapi-ts-0-99.md b/.changeset/sdks-catalog-search-openapi-ts-0-99.md new file mode 100644 index 000000000..080178f10 --- /dev/null +++ b/.changeset/sdks-catalog-search-openapi-ts-0-99.md @@ -0,0 +1,101 @@ +--- +"@epcc-sdk/sdks-catalog-search": minor +--- + +Regenerate the catalog search SDK with `@hey-api/openapi-ts` 0.99.0 (previously 0.61.2), add +`createCatalogSearchClient`, and publish the Zod schemas. + +The package still generates from the `catalog_search-standalone@v1` bundle. The specification +is unchanged in this repository; the bundle now applies two preprocessors to it, both listed +below. + +What is new: + +- `createCatalogSearchClient` binds the generated `createClient` and `createConfig` to + `@epcc-sdk/sdks-runtime`, so one install and one call give you a client with a caching + token source, the `auth` hook and a `fetch` that refreshes and replays once on a 401 and + backs off on a 429 or a 408, and on a 500, 502, 503, 504 or a transport failure where a + replay cannot duplicate work. + + ```ts + const client = createCatalogSearchClient({ + baseUrl: "https://euwest.api.elasticpath.com", + clientId: process.env.EPCC_CLIENT_ID!, + clientSecret: process.env.EPCC_CLIENT_SECRET!, + }) + ``` + + Credentials are resolved from `source`, `provider`, `token`, `clientId` plus + `clientSecret`, or `clientId` alone for the implicit grant. `retry`, `storage`, + `leewaySeconds`, `fetch` and `config` tune the rest; `config` is merged last, so + anything the factory chose can be overridden. The runtime helpers are re-exported from + the package root, so a consumer who assembles the stack by hand still installs only this + package. + +- Zod schemas for every request body, path, query and response are generated and exposed on + the `@epcc-sdk/sdks-catalog-search/zod` subpath. `zod` is an optional peer dependency (3.x) + and the root entry never imports it. `zTextMatchInfo` coerces `num_tokens_dropped`, which + the specification declares `int64`, to `bigint`, as the zod plugin does for every `int64`; + the TypeScript types keep it `number`. + +Breaking in practice, although the version is a minor: + +- The `@hey-api/client-fetch` dependency is gone. The fetch client is vendored into + `src/client/{client,core}`, and the root entry exports `createClient`, `createConfig`, + the shared `client` instance and the `Client`, `Config`, `CreateClientConfig`, + `RequestOptions` and `RequestResult` types. Import those from this package instead of + from `@hey-api/client-fetch`, which is deprecated. +- The shared `client` instance now carries a default base URL of + `https://euwest.api.elasticpath.com`; before, it had none. The specification already lists + EU West first; the region is set in the generator config as well, so a refresh that + reorders the servers cannot change it. +- The base URL is the host, with no `/v2`. The specification's server URLs end in `/v2`, but + the service answers at `/pcm/...` and returns 404 at `/v2/pcm/...`, so the + bundle drops the `/v2` and `ClientOptions` lists `https://euwest.api.elasticpath.com` and + `https://useast.api.elasticpath.com`. A client configured with a `/v2` base URL gets a 404 + on every operation; pass the host. +- The ten `date-time` fields are typed `string`, not `Date`: `created_at` and `updated_at` on + `SearchRuleGroupMeta` and `SearchRuleMeta`, and `created_at`, `updated_at` and + `last_synced_at` on `StopwordSetMeta` and `SynonymSetMeta`. They reach the responses of the + create, list, get and update operations for stopword sets, synonym sets, rule groups and + rules, and of `moveSearchRule`. The old `@hey-api/transformers` plugin declared them `Date`, + but no operation called its transformer, so the value at runtime was always the string the + API sends. Code that called a `Date` method on one of these fields stops compiling; wrap the + value in `new Date(...)` where you need one. No request body carries a `date-time`. +- The inline enum types `Match`, `Placement`, `SplitJoinTokens`, `Status`, `SyncStatus` and + `Type` are no longer exported, because the `exportInlineEnums` option does not exist in + 0.99. Their unions are unchanged and are now written inline at each use site. Replace a + reference with the literal union, or derive it: + `NonNullable`, + `MoveSearchRuleRequest["data"]["attributes"]["placement"]`, + `NonNullable["split_join_tokens"]>`, + `CatalogSearchJobAttributes["status"]`, `StopwordSetMeta["sync_status"]` and + `SearchRuleType` (the old `Type`, `"catalog_search_rule"`). + +What is fixed: + +- `num_tokens_dropped` on `TextMatchInfo`, and so on every search hit's `text_match_info` in + `postMultiSearch`, `multiSearchByCatalogRelease`, `searchByContext` and + `searchByCatalogRelease`, is typed `number`, not `BigInt`. The `@hey-api/transformers` + plugin declared `BigInt` for this `int64` field while nothing converted the value, so the + declared type was wrong: the value at runtime was always a number. +- The specification gives a job's `type` a default of `index`, which is not one of its job + types. Generated as declared, the `/zod` declarations did not compile, so the package could + not build its `/zod` types, and a job without a `type` was reported as carrying `index`. The + bundle now removes any `default` that is not one of its schema's `enum` values, so the + schema behind `reindexTenantReleases`' response reports a missing `type` as missing. The + service always sends `type`, and the TypeScript types are unchanged. + +All 40 operations keep their names — `postMultiSearch`, `multiSearchByCatalogRelease`, +`searchByContext`, `searchByCatalogRelease`, `reindexTenantReleases`, `listIndexableFields`, +`createIndexableFields`, `deleteIndexableFields`, `getIndexableFields`, +`updateIndexableFields`, `listSearchableFields`, `listIndexedFields`, `listSearchProfiles`, +`createSearchProfile`, `deleteSearchProfile`, `getSearchProfile`, `updateSearchProfile`, +`setDefaultSearchProfile`, `listStopwordSets`, `createStopwordSet`, `deleteStopwordSet`, +`getStopwordSet`, `updateStopwordSet`, `listSynonymSets`, `createSynonymSet`, +`deleteSynonymSet`, `getSynonymSet`, `updateSynonymSet`, `listSearchRuleGroups`, +`createSearchRuleGroup`, `deleteSearchRuleGroup`, `getSearchRuleGroup`, +`updateSearchRuleGroup`, `listSearchRules`, `createSearchRule`, `deleteSearchRule`, +`getSearchRule`, `updateSearchRule`, `moveSearchRule` and `listSearchIndexes` — and their +`Data` / `Response` / `Error` types. `ClientOptions`, the known base URL union, is new; apart +from the changes listed above, nothing in the exported type surface is renamed or removed. diff --git a/packages/sdks/cart-checkout-order/README.md b/packages/sdks/cart-checkout-order/README.md index be44ad20f..6e9284880 100644 --- a/packages/sdks/cart-checkout-order/README.md +++ b/packages/sdks/cart-checkout-order/README.md @@ -139,15 +139,46 @@ client.interceptors.response.eject((response) => { ## Authentication -We are working to provide helpers to handle auth easier for you but for now using an interceptor is the easiest method. +`createCartCheckoutOrderClient` is the short way. It returns a client that holds a caching token +source, sets the `auth` hook, refreshes and replays once on a 401, and backs off on a 429. ```ts -import { client } from "@epcc-sdk/sdks-cart-checkout-order"; - -client.interceptors.request.use((request, options) => { - request.headers.set('Authorization', 'Bearer MY_TOKEN'); - return request; +import { + createCartCheckoutOrderClient, + getCarts, +} from "@epcc-sdk/sdks-cart-checkout-order"; + +const client = createCartCheckoutOrderClient({ + baseUrl: "https://euwest.api.elasticpath.com", + clientId: process.env.EPCC_CLIENT_ID!, + clientSecret: process.env.EPCC_CLIENT_SECRET!, }); + +const { data } = await getCarts({ client }); +``` + +Credentials come from `source`, `provider`, `token`, `clientId` plus `clientSecret`, or +`clientId` alone for the implicit grant. `retry`, `storage`, `leewaySeconds`, `fetch` and +`config` tune the rest. `config` is merged last, so anything the factory chose can be +overridden. + +Pass the client to every operation. The module-level `client` exported by this package +carries no credentials, so an operation called without `{ client }` gets a 401. + +To assemble the stack by hand, `createTokenSource`, `createAuthenticatedFetch`, +`createRetryFetch` and `createConfiguredClient` are re-exported from this package, so you +still install only `@epcc-sdk/sdks-cart-checkout-order`. Do not authenticate with a request +interceptor: an interceptor cannot see the response, so it can never retry a 401. + +## Validation schemas + +Zod schemas for every request body, path and response are published under the `/zod` +subpath. `zod` is an optional peer dependency (3.x), so the root entry never imports it. + +```ts +import { zCartResponse } from "@epcc-sdk/sdks-cart-checkout-order/zod"; + +const cart = zCartResponse.parse(data?.data[0]); ``` ## Build URL diff --git a/packages/sdks/cart-checkout-order/openapi-ts.config.ts b/packages/sdks/cart-checkout-order/openapi-ts.config.ts index be9cca244..43ea0554c 100644 --- a/packages/sdks/cart-checkout-order/openapi-ts.config.ts +++ b/packages/sdks/cart-checkout-order/openapi-ts.config.ts @@ -1,24 +1,16 @@ -import { defaultPlugins, defineConfig } from "@hey-api/openapi-ts" -import { defineConfig as defineReadmeConfig } from "../specs/heyapi/plugins" +import { defineConfig } from "@hey-api/openapi-ts" export default defineConfig({ - client: "@hey-api/client-fetch", - experimentalParser: true, input: "../specs/bundled/cart_checkout_standalone.yaml", - output: { path: "src/client", format: "prettier" }, + output: { path: "src/client", postProcess: ["prettier"] }, + parser: { transforms: { readWrite: false } }, plugins: [ - ...defaultPlugins, { - exportInlineEnums: true, - name: "@hey-api/typescript", + baseUrl: "https://euwest.api.elasticpath.com", + name: "@hey-api/client-fetch", }, - { - dates: true, - name: "@hey-api/transformers", - }, - defineReadmeConfig({ - name: "generate-readme", - targetOperation: "getACart", - }), + { name: "@hey-api/typescript" }, + { name: "@hey-api/sdk" }, + { compatibilityVersion: 3, name: "zod" }, ], }) diff --git a/packages/sdks/cart-checkout-order/package.json b/packages/sdks/cart-checkout-order/package.json index 558e940e8..542aa3ad7 100644 --- a/packages/sdks/cart-checkout-order/package.json +++ b/packages/sdks/cart-checkout-order/package.json @@ -10,7 +10,9 @@ "build": "pnpm oas:build && pnpm openapi-ts && pnpm build:tsup", "oas:build": "redocly bundle cart-checkout-standalone@v1 --config ../specs/config/redocly.yaml", "build:tsup": "tsup", - "openapi-ts": "openapi-ts" + "openapi-ts": "openapi-ts", + "test": "vitest run", + "test:watch": "vitest" }, "exports": { ".": { @@ -23,8 +25,25 @@ "default": "./dist/index.cjs" } }, + "./zod": { + "import": { + "types": "./dist/zod.d.ts", + "default": "./dist/zod.mjs" + }, + "require": { + "types": "./dist/zod.d.cts", + "default": "./dist/zod.cjs" + } + }, "./package.json": "./package.json" }, + "typesVersions": { + "*": { + "zod": [ + "./dist/zod.d.ts" + ] + } + }, "files": [ "dist/**" ], @@ -32,19 +51,28 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@epcc-sdk/sdks-runtime": "workspace:*" + }, "devDependencies": { - "@hey-api/openapi-ts": "0.61.2", + "@hey-api/openapi-ts": "0.99.0", "@redocly/cli": "^1.21.0", "@redocly/openapi-core": "^1.21.0", - "lodash": "^4.17.21", - "typescript": "^5.5.3", "@types/ejs": "^3.1.5", "ejs": "^3.1.10", "esbuild-fix-imports-plugin": "^1.0.19", "esbuild-plugin-file-path-extensions": "^1.0.0", - "tsup": "^8.4.0" + "tsup": "^8.4.0", + "typescript": "^5.5.3", + "vitest": "^3.0.7", + "zod": "3.25.76" }, - "dependencies": { - "@hey-api/client-fetch": "0.6.0" + "peerDependencies": { + "zod": "^3.22.0" + }, + "peerDependenciesMeta": { + "zod": { + "optional": true + } } } diff --git a/packages/sdks/cart-checkout-order/pnpm-lock.yaml b/packages/sdks/cart-checkout-order/pnpm-lock.yaml index 16b39f4fb..987aaca8b 100644 --- a/packages/sdks/cart-checkout-order/pnpm-lock.yaml +++ b/packages/sdks/cart-checkout-order/pnpm-lock.yaml @@ -8,13 +8,13 @@ importers: .: dependencies: - '@hey-api/client-fetch': - specifier: 0.6.0 - version: 0.6.0 + '@epcc-sdk/sdks-runtime': + specifier: workspace:* + version: link:../runtime devDependencies: '@hey-api/openapi-ts': - specifier: 0.61.2 - version: 0.61.2(typescript@5.8.2) + specifier: 0.99.0 + version: 0.99.0(typescript@5.8.2) '@redocly/cli': specifier: ^1.21.0 version: 1.34.20(ajv@8.20.0) @@ -33,15 +33,18 @@ importers: esbuild-plugin-file-path-extensions: specifier: ^1.0.0 version: 1.0.0 - lodash: - specifier: ^4.17.21 - version: 4.18.1 tsup: specifier: ^8.4.0 - version: 8.4.0(jiti@2.4.2)(typescript@5.8.2) + version: 8.4.0(jiti@2.7.0)(postcss@8.5.28)(typescript@5.8.2) typescript: specifier: ^5.5.3 version: 5.8.2 + vitest: + specifier: ^3.0.7 + version: 3.2.7(jiti@2.7.0) + zod: + specifier: 3.25.76 + version: 3.25.76 packages: @@ -69,150 +72,306 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.28.2': + resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.25.2': resolution: {integrity: sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==} engines: {node: '>=18'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.28.2': + resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.25.2': resolution: {integrity: sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==} engines: {node: '>=18'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.28.2': + resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.25.2': resolution: {integrity: sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==} engines: {node: '>=18'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.28.2': + resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.25.2': resolution: {integrity: sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.28.2': + resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.25.2': resolution: {integrity: sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.28.2': + resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.25.2': resolution: {integrity: sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.28.2': + resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.25.2': resolution: {integrity: sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.28.2': + resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.25.2': resolution: {integrity: sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==} engines: {node: '>=18'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.28.2': + resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.25.2': resolution: {integrity: sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==} engines: {node: '>=18'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.28.2': + resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.25.2': resolution: {integrity: sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.28.2': + resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.25.2': resolution: {integrity: sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==} engines: {node: '>=18'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.28.2': + resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.25.2': resolution: {integrity: sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.28.2': + resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.25.2': resolution: {integrity: sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.28.2': + resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.25.2': resolution: {integrity: sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.28.2': + resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.25.2': resolution: {integrity: sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==} engines: {node: '>=18'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.28.2': + resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.25.2': resolution: {integrity: sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==} engines: {node: '>=18'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.28.2': + resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-arm64@0.25.2': resolution: {integrity: sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] + '@esbuild/netbsd-arm64@0.28.2': + resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-x64@0.25.2': resolution: {integrity: sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.28.2': + resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-arm64@0.25.2': resolution: {integrity: sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] + '@esbuild/openbsd-arm64@0.28.2': + resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.25.2': resolution: {integrity: sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.28.2': + resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.2': + resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + '@esbuild/sunos-x64@0.25.2': resolution: {integrity: sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.28.2': + resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.25.2': resolution: {integrity: sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==} engines: {node: '>=18'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.28.2': + resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.25.2': resolution: {integrity: sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==} engines: {node: '>=18'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.28.2': + resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.25.2': resolution: {integrity: sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==} engines: {node: '>=18'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.28.2': + resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@exodus/schemasafe@1.3.0': resolution: {integrity: sha512-5Aap/GaRupgNx/feGBwLLTVv8OQFfv3pq2lPRzPg9R+IOBnDgghTGW7l7EuVXOvg5cc/xSAlRW8rBrjIC3Nvqw==} @@ -220,19 +379,30 @@ packages: resolution: {integrity: sha512-XK6BTq1NDMo9Xqw/YkYyGjSsg44fbNwYRx7QK2CuoQgyy+f1rrTDHoExVM5PsyXCtfl2vs2vVJ0MN0yN6LppRw==} engines: {node: '>=14.0.0', npm: '>=6.0.0'} - '@hey-api/client-fetch@0.6.0': - resolution: {integrity: sha512-FlhFsVeH8RxJe/nq8xUzxNbiOpe+GadxlD2pfvDyOyLdCTU4o/LRv46ZVWstaW7DgF4nxhI328chy3+AulwVXw==} + '@hey-api/codegen-core@0.9.1': + resolution: {integrity: sha512-s97jL1dgTMuiMHv2BZ1X4Tgd99Mf9GOvGdNqNcGwIMmnR+PgYNoraj4Zvp134MKsNCap/m7k0r0vKKnl56pj4w==} + engines: {node: '>=22.18.0'} - '@hey-api/json-schema-ref-parser@1.0.1': - resolution: {integrity: sha512-dBt0A7op9kf4BcK++x6HBYDmvCvnJUZEGe5QytghPFHnMXPyKwDKomwL/v5e9ERk6E0e1GzL/e/y6pWUso9zrQ==} - engines: {node: '>= 16'} + '@hey-api/json-schema-ref-parser@1.4.4': + resolution: {integrity: sha512-otmd+zCxbYVBIp/mlMTnGkvlNYLkVKgs3VOIq0kSnenhB1+fRwLPQIeSwyWM6E51oXhUedkYjVsVpkVexeuJOA==} + engines: {node: '>=22.18.0'} - '@hey-api/openapi-ts@0.61.2': - resolution: {integrity: sha512-E0b8PibVqmZd/E/MB0h8Q2VXObZc+nhHHx3quLwNM08QgEtkC29vMcayzmuG+rR4nGvZGvREP1a4rZc0v6Xjgg==} - engines: {node: ^18.0.0 || >=20.0.0} + '@hey-api/openapi-ts@0.99.0': + resolution: {integrity: sha512-SePU/5oEWWkvUBYmvzdYRctseoLuskyhs4ET0RvLIcmzc8yLQoA2R+KtBIQ8bPsoSUB0m4E5SmBnl6aGSA0szQ==} + engines: {node: '>=22.18.0'} hasBin: true peerDependencies: - typescript: ^5.x + typescript: '>=5.5.3 || >=6.0.0 || 6.0.1-rc' + + '@hey-api/shared@0.5.0': + resolution: {integrity: sha512-JN/j4Ebh4cJGYIQ5cwWuqe7GeSUyQoz7oC51WqyhKOcrejK6DKZMDkshc5d1eKTRuRL+rjozuRcoUaZZn2DGPw==} + engines: {node: '>=22.18.0'} + + '@hey-api/spec-types@0.2.0': + resolution: {integrity: sha512-ibQ8Is7evMavzr8GNyJCcTg975d8DpaMUyLmOrQ85UBdy1l6t1KuRAwgChAbesJsIlNV6gjmlXruWyegDX18Fg==} + + '@hey-api/types@0.1.4': + resolution: {integrity: sha512-thWfawrDIP7wSI9ioT13I5soaaqB5vAPIiZmgD8PbeEVKNrkonc0N/Sjj97ezl7oQgusZmaNphGdMKipPO6IBg==} '@humanwhocodes/momoa@2.0.4': resolution: {integrity: sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==} @@ -261,6 +431,9 @@ packages: '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} @@ -279,8 +452,18 @@ packages: peerDependencies: jsep: ^0.4.0||^1.0.0 - '@nodable/entities@3.0.0': - resolution: {integrity: sha512-8L9xFeTYKhm49xfIypoe2W5wV1m/3Z58kT+7kR9A8OyFxcPduI4VmxaUMQyKYrRjUoLLSXv6EKKID5Tvj9cUVw==} + '@lukeed/ms@2.0.2': + resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==} + engines: {node: '>=8'} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} + engines: {node: ^22.20 || ^24.12 || >=25} + cpu: [x64] + os: [linux] + + '@nodable/entities@3.1.0': + resolution: {integrity: sha512-LsS/DjHr+uDM647Gru/cA8+J3a3HfhttwCKLyuoyN7yXTFCxKBtSgMQBvrW9yNPa2/zDRUNuGPaH5QUFoa4arQ==} '@opentelemetry/api-logs@0.222.0': resolution: {integrity: sha512-9mb1If+IF6u0ZVXkHQ6ogEae5HwA6ajIVUgpSDQyRASxft6BSXHvBvPooRle3yFN/fKnCdSOnuu0OC3PLcF6+g==} @@ -392,51 +575,111 @@ packages: cpu: [arm] os: [android] + '@rollup/rollup-android-arm-eabi@4.63.5': + resolution: {integrity: sha512-J25QJU+B78T4FhhBsNpLJyVWOi31mwtpcMwywHmOKH65Q9IWGA81gPj+dnwlhU8wktVriYE+tFAaQgrnJRzAZg==} + cpu: [arm] + os: [android] + '@rollup/rollup-android-arm64@4.40.0': resolution: {integrity: sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==} cpu: [arm64] os: [android] + '@rollup/rollup-android-arm64@4.63.5': + resolution: {integrity: sha512-LDopB3zuZM5Ux9TT2luNEBJW/tYbGU2g1d+VpKk6I+gSKDb+/7sYE6M225gRQt4RbMX6MSwMsVR/phdjVUgRLg==} + cpu: [arm64] + os: [android] + '@rollup/rollup-darwin-arm64@4.40.0': resolution: {integrity: sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==} cpu: [arm64] os: [darwin] + '@rollup/rollup-darwin-arm64@4.63.5': + resolution: {integrity: sha512-wlJEERGfeuHeBavCL2qVnNacOK43NDoZM4sjkeRPymd04OAE9T1zBqDJgmZ+CIsPTYKwdzpUC8vmOw84dwY4Tg==} + cpu: [arm64] + os: [darwin] + '@rollup/rollup-darwin-x64@4.40.0': resolution: {integrity: sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==} cpu: [x64] os: [darwin] + '@rollup/rollup-darwin-x64@4.63.5': + resolution: {integrity: sha512-4nJJGg5jbo2wwPP4JP+LfEBA3bvP8rU9CLuhp7jWvq9sxEyhjQFTFdrqi+/dHEin/pd8jpT0vcehIpnZtmEdcQ==} + cpu: [x64] + os: [darwin] + '@rollup/rollup-freebsd-arm64@4.40.0': resolution: {integrity: sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==} cpu: [arm64] os: [freebsd] + '@rollup/rollup-freebsd-arm64@4.63.5': + resolution: {integrity: sha512-DrZbyCDF1hneuO6jRbvZ2D7+PIBM6yIwYnJpg2vIk58T+wuFpiaGZrfUr59lDWw45bg+IrpTGLPiNi/Fk4w3Cg==} + cpu: [arm64] + os: [freebsd] + '@rollup/rollup-freebsd-x64@4.40.0': resolution: {integrity: sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==} cpu: [x64] os: [freebsd] + '@rollup/rollup-freebsd-x64@4.63.5': + resolution: {integrity: sha512-gqfUVMJMB3mehqywxp6hTBFfgtMQykZY19+cfiaYP0toIJLb/1DZRJHVkQQGP13W4TAwfZDWeg1qBcheTRioXQ==} + cpu: [x64] + os: [freebsd] + '@rollup/rollup-linux-arm-gnueabihf@4.40.0': resolution: {integrity: sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-gnueabihf@4.63.5': + resolution: {integrity: sha512-CFmhpvAwzSaWMlN3VN7UtmoTihlZNzoP0juQib5TQRnYUyDV8dXeWOp29sobWAT6gXl/hQgAClLlEiYozQG3OQ==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.40.0': resolution: {integrity: sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==} cpu: [arm] os: [linux] + '@rollup/rollup-linux-arm-musleabihf@4.63.5': + resolution: {integrity: sha512-Uc9H8eXCOayV6JLTH5bXKMId6qbhNHa818/BgYjm4jrlq3vZquC9cqyvHBw17xy5Mnj5f+I3gFK5JcEf3hSqrw==} + cpu: [arm] + os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.40.0': resolution: {integrity: sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-gnu@4.63.5': + resolution: {integrity: sha512-VcPr/szv/1BFw112Kt//fxulXt/JPqzzidU84iW68L2DdjnOO8QFUv2zTSYBEPHD6movBD4z+bbr5y60GYM7Jw==} + cpu: [arm64] + os: [linux] + '@rollup/rollup-linux-arm64-musl@4.40.0': resolution: {integrity: sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==} cpu: [arm64] os: [linux] + '@rollup/rollup-linux-arm64-musl@4.63.5': + resolution: {integrity: sha512-BnxtJ5/91BrIHYIkGrmjz/lbMhqEHt1dPFqIxIFR+jPn0xVc/oUSCtIT089zfp5ufwGDlYz2UC+Fe1SRBpYFbQ==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-loong64-gnu@4.63.5': + resolution: {integrity: sha512-LrYcHZwF+fAMNKHYTOQ5osWM4AZF7YF6D+XtsjDyEvljtt11twc+zHVXBLNEjxVSUnKYsOhvVz4Z213eW02COQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-loong64-musl@4.63.5': + resolution: {integrity: sha512-nj7QKQePAAUpCpJHtg0pR0W/b92A9NO17JS3BAQmHDn/yhmkir2p8llrKY9TOhleKIaSzy1JhxS3T9FVld6coA==} + cpu: [loong64] + os: [linux] + '@rollup/rollup-linux-loongarch64-gnu@4.40.0': resolution: {integrity: sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==} cpu: [loong64] @@ -447,70 +690,168 @@ packages: cpu: [ppc64] os: [linux] + '@rollup/rollup-linux-ppc64-gnu@4.63.5': + resolution: {integrity: sha512-5ylkX6dWMeBKge9nTU+Rxfb+ZfaCIJ9lRqIFaK0eAMcWp7OJbYnLveLgXmm0VrvuLKb8qIK+mHyH0qu88RM+iA==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-ppc64-musl@4.63.5': + resolution: {integrity: sha512-oHK4ZHYFDKjZviK34I+NwgfbGxgI7ztrNxj2hPTSSNFgeq1a/lEd7dHV2fdGAuTH4Iym3RHJg+vAbWaWG4B7Zg==} + cpu: [ppc64] + os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.40.0': resolution: {integrity: sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-gnu@4.63.5': + resolution: {integrity: sha512-UcetmHZ6XOXuUByiKZyQmb55ZPr0LABr3Ec/HB9wKZn6CEAFWZkE+hsJErJ9hbPBC7nI0dKuELx7CoV6IM7TMg==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-riscv64-musl@4.40.0': resolution: {integrity: sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==} cpu: [riscv64] os: [linux] + '@rollup/rollup-linux-riscv64-musl@4.63.5': + resolution: {integrity: sha512-C5CmDPQBtvjVo8cgQsBs+w6WB0JLkiixhgi6hVLV11hERWdn/p0XcPU2OUcZzac9BPOFq7SbaHFa8r3SWEysCQ==} + cpu: [riscv64] + os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.40.0': resolution: {integrity: sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==} cpu: [s390x] os: [linux] + '@rollup/rollup-linux-s390x-gnu@4.63.5': + resolution: {integrity: sha512-lHVQHJFKsuuxLMi3MQO9XVL8Tje3JR82CzB+QDKC5NWBcsIWuwsn9uIM5e3lBhI+fF1/s63qnyYqsg65+8rV/w==} + cpu: [s390x] + os: [linux] + '@rollup/rollup-linux-x64-gnu@4.40.0': resolution: {integrity: sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-gnu@4.63.5': + resolution: {integrity: sha512-3W9bTFcQNJn71cSJVM9RKIiZOy8DO/XLDii8Uv/Pm6WKqDRj7JV3ZfuXIEfyuy5LXpIzAbB/1M4Ukp9GKNa7nA==} + cpu: [x64] + os: [linux] + '@rollup/rollup-linux-x64-musl@4.40.0': resolution: {integrity: sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==} cpu: [x64] os: [linux] + '@rollup/rollup-linux-x64-musl@4.63.5': + resolution: {integrity: sha512-VDC7rRJlee/scpki96GZ27Omf6yU87s1YXwVTpjE5841faVlDYYT565rgfmoR1U0sqL7z5ivQSDjcsF6VRXyBA==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openbsd-x64@4.63.5': + resolution: {integrity: sha512-z86Ok2p4pTdv5xqCKZsTooO7yBEiaJR/HzU3Wx8RmWsPoLppnMKROhJusQob8B3IE1ghC343kUW9rC2r+Wf3ig==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.63.5': + resolution: {integrity: sha512-IzQmj+xXwQFGhMAMKMQVXkMwMZN3TqkJgAE0nSsqvVwWWciP4AIPMmWRqOQ2GfX7TUDZr+xqGFcBS36CRPGw0g==} + cpu: [arm64] + os: [openharmony] + '@rollup/rollup-win32-arm64-msvc@4.40.0': resolution: {integrity: sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==} cpu: [arm64] os: [win32] + '@rollup/rollup-win32-arm64-msvc@4.63.5': + resolution: {integrity: sha512-F6qpTaPc9bwBH85kjy0/BLmLSW1uv7AoOXCoRIkg2arlgCYlWYcAbiMkvZuAcaWk9TpCRG//okznLAqLGshkMw==} + cpu: [arm64] + os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.40.0': resolution: {integrity: sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==} cpu: [ia32] os: [win32] + '@rollup/rollup-win32-ia32-msvc@4.63.5': + resolution: {integrity: sha512-igoDsTFhhwECBeGbUuLeIk7t8Y1apa+cs6mDWpx2EZ0ch7oEQgzHbFUXN9euoHekCAQzXdXApAGkV6jznS7tWw==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.63.5': + resolution: {integrity: sha512-U3teMeMbXFmaM5D+OTJpsOXd+wV/qftIeYF9kBKL4v73641qyJmoXFtA28DQLsnmlyayEsTe72xpLHrArq6vHw==} + cpu: [x64] + os: [win32] + '@rollup/rollup-win32-x64-msvc@4.40.0': resolution: {integrity: sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==} cpu: [x64] os: [win32] + '@rollup/rollup-win32-x64-msvc@4.63.5': + resolution: {integrity: sha512-ypfC34F3RKXvCXBglGqGMsUSMKlgwd1HX9AOAlx9RoZZ6GaI42YHVeKpzg3JG+wpBUJYTG+NNZhqbDWL8tBZkw==} + cpu: [x64] + os: [win32] + '@sinclair/typebox@0.27.12': resolution: {integrity: sha512-hhyNJ+nbR6ZR7pToHvllEFun9TL0sbL+tk/ON75lo+Xas054uez98qRbsuNt7MBCyZKK4+8Yli/OAGZhmfBZ/g==} + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/ejs@3.1.5': resolution: {integrity: sha512-nv+GSx77ZtXiJzwKdsASqi+YQ5Z7vwHsTP0JY2SiQgjGckkBRKZnk8nIM+7oUZ1VCtuTz0+By4qVR7fqzp/Dfg==} '@types/estree@1.0.7': resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + '@vitest/expect@3.2.7': + resolution: {integrity: sha512-E8eBXaKibuvH2pSZErOjdVb5vF4PbKYcrnluBTYxEk1l/VhhwZg1kZQsdtjq+CsF5CFydf2Rdkz7jDHKSisi3w==} + + '@vitest/mocker@3.2.7': + resolution: {integrity: sha512-Trr0hYO9CM3Wj6ksWHRhK9IZpIY6wTMO5u/MqXurMxT57sWBaOPEtP3Oq60ihZuh5JsiagKfz95OcxdEP6dBrA==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@3.2.7': + resolution: {integrity: sha512-KUHlwqVu0sRlhCdyPdQ/wBoTfRahjUky1MubOmYw9fWfIZy1gNoHpuaaQBPAaMaVYdQYHJLurzj8ECCj5OwTqA==} + + '@vitest/runner@3.2.7': + resolution: {integrity: sha512-sB9y4ovltoQP+WaUPwmSxO9WIg9Ig694Di5PalVPsYHklAdE027mehpWF2SQSVq+k6sFgaivbTjTJwZLSHbedA==} + + '@vitest/snapshot@3.2.7': + resolution: {integrity: sha512-7C+MwShwtBSI5Buwoyg3s/iY1eHL9PKAf+O1wVh/TdnjXUtkoL/9YQtre90i4MtNXM6edP1wJ2zOBpfCyhIS7g==} + + '@vitest/spy@3.2.7': + resolution: {integrity: sha512-Q2eQGI6d2L/hBtZ0qNuKcAGid68XK6cv1xsoaIma6PaJhHPoqcEJhYpXZ/5myCMqkNgtP6UKuBhbc0nHKnrkuQ==} + + '@vitest/utils@3.2.7': + resolution: {integrity: sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==} + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} - acorn@8.14.1: - resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==} - engines: {node: '>=0.4.0'} - hasBin: true - agent-base@7.1.4: resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} @@ -518,6 +859,10 @@ packages: ajv@8.20.0: resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -551,6 +896,10 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} @@ -583,8 +932,8 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - bundle-name@4.1.0: - resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} + bundle-name@4.1.1: + resolution: {integrity: sha512-DdH81/zPLVS11EUgWq3tEu/xn+EzljlMYooDNdzWEnFha3R3NBMpMV1UqYIpjYHV/SgpFKMIX1Oh7o06SjM/oA==} engines: {node: '>=18'} bundle-require@5.1.0: @@ -593,10 +942,10 @@ packages: peerDependencies: esbuild: '>=0.18' - c12@2.0.1: - resolution: {integrity: sha512-Z4JgsKXHG37C6PYUtIxCfLJZvo6FyhHJoClwwb9ftUkLpPSkuYqn6Tr+vnaN8hymm0kIbcg6Ey3kv/Q71k5w/A==} + c12@3.3.4: + resolution: {integrity: sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==} peerDependencies: - magicast: ^0.3.5 + magicast: '*' peerDependenciesMeta: magicast: optional: true @@ -612,10 +961,18 @@ packages: call-me-maybe@1.0.2: resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + chai@5.3.3: + resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} + engines: {node: '>=18'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + check-error@2.1.3: + resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==} + engines: {node: '>= 16'} + chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -624,12 +981,9 @@ packages: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} - chownr@2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} - - citty@0.1.6: - resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} classnames@2.5.1: resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} @@ -648,6 +1002,10 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + color-support@1.1.3: + resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} + hasBin: true + colorette@1.4.0: resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} @@ -658,9 +1016,9 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} - commander@13.0.0: - resolution: {integrity: sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==} - engines: {node: '>=18'} + commander@15.0.0: + resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==} + engines: {node: '>=22.12.0'} commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} @@ -673,8 +1031,11 @@ packages: resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} engines: {'0': node >= 6.0} - confbox@0.1.8: - resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + confbox@0.2.4: + resolution: {integrity: sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==} + + confbox@0.3.1: + resolution: {integrity: sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA==} consola@3.4.2: resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} @@ -703,9 +1064,22 @@ packages: supports-color: optional: true + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decko@1.2.0: resolution: {integrity: sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ==} + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + default-browser-id@5.0.1: resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==} engines: {node: '>=18'} @@ -718,27 +1092,31 @@ packages: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} - defu@6.1.4: - resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - destr@2.0.3: - resolution: {integrity: sha512-2N3BOUU4gYMpTP24s5rF5iP7BDr7uNTCs4ozw3kf/eKfvWSIu93GEBi5m427YoyJoeOzQ5smuu4nNAPGb8idSQ==} + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dompurify@3.4.15: - resolution: {integrity: sha512-EUBjM+B+lkDE41iE82DDSCfkoPGfXx8IxFxPMjNzm/Uk4xDet77rTN9wqlxlVg71kK7XGuUMv6wUxJUwwv+Xyw==} + dompurify@3.4.16: + resolution: {integrity: sha512-sqo+pNp3qRhCIpbgRi1y8Tgk27Bo2Ry7w0dC1NBeNTdZChWjz9Xb/KOoZbRP/R6pQZ80Qw8YhXw13hWWBbMRnQ==} dotenv@16.4.7: resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} + dotenv@17.4.2: + resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} + engines: {node: '>=12'} + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -765,6 +1143,9 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + es-object-atoms@1.1.2: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} engines: {node: '>= 0.4'} @@ -788,10 +1169,18 @@ packages: engines: {node: '>=18'} hasBin: true + esbuild@0.28.2: + resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -799,6 +1188,13 @@ packages: eventemitter3@5.0.4: resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + exsolve@1.1.1: + resolution: {integrity: sha512-9U/jZUgjnSGyntRr6y5Muu1MJcwFl6kPu7k8qLF0IMNfLqvw0NZ4nnVDq0RVoZ0RvCyumib4Ez3KYrVfilrw+g==} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -811,8 +1207,8 @@ packages: fast-xml-builder@1.3.1: resolution: {integrity: sha512-pIM/1n3ntFXKYrUZwW7QCK0gAW7XY+wzj1YMIV3tLDvPj/V+zTGJK5e3/4WJfwj0qWw2ElNXiTixda/R+3YSug==} - fast-xml-parser@5.11.1: - resolution: {integrity: sha512-TBw6K/fxoQGGjCmZDw9w/ZwP3uDcnTM4YH/g+PFRWr8sbe5idXtxNN6vITh4+1ruCZaho6uBFurElsA7F0zzgw==} + fast-xml-parser@5.11.2: + resolution: {integrity: sha512-R9iDuNrQYeQut46cn2r2wHKn4HYzVDvDm5J1wW+koZewykv0yuO2HChTYeZtrULyHIDM9cj9TUXloCsueCQUog==} hasBin: true fdir@6.4.3: @@ -823,6 +1219,15 @@ packages: picomatch: optional: true + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -841,10 +1246,6 @@ packages: resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} engines: {node: '>= 6'} - fs-minipass@2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -871,8 +1272,11 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} - giget@1.2.5: - resolution: {integrity: sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==} + get-tsconfig@4.14.0: + resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} + + giget@3.3.1: + resolution: {integrity: sha512-r+mvuDjrjMpsdw46Kmeydb8bdHm7wOKw8wNBtTndkjbPjgAp5oUJUxRE76wZFknxIPokfWvep2qSXK37aXE6zg==} hasBin: true glob-parent@5.1.2: @@ -891,11 +1295,6 @@ packages: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} - handlebars@4.7.8: - resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} - engines: {node: '>=0.4.7'} - hasBin: true - handlebars@4.7.9: resolution: {integrity: sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==} engines: {node: '>=0.4.7'} @@ -952,6 +1351,10 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-in-ssh@1.0.0: + resolution: {integrity: sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==} + engines: {node: '>=20'} + is-inside-container@1.0.0: resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} engines: {node: '>=14.16'} @@ -991,8 +1394,8 @@ packages: resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jiti@2.4.2: - resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} hasBin: true joycon@3.1.1: @@ -1006,8 +1409,11 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + + js-yaml@4.2.0: + resolution: {integrity: sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==} hasBin: true js-yaml@4.3.2: @@ -1051,19 +1457,22 @@ packages: lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} - lodash@4.18.1: - resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} - loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true + loupe@3.2.1: + resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} + lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + mark.js@8.11.1: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} @@ -1102,30 +1511,10 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass@3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - - minipass@5.0.0: - resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} - engines: {node: '>=8'} - minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} - minizlib@2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} - - mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - - mlly@1.7.4: - resolution: {integrity: sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==} - mobx-react-lite@4.1.1: resolution: {integrity: sha512-iUxiMpsvNraCKXU+yPotsOncNNmyeS2B5DKL+TL6Tar/xm+wwNJAubJmtRSeAoYawdZqwv8Z/+5nPRHeQxTiXg==} peerDependencies: @@ -1161,6 +1550,11 @@ packages: mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + nanoid@3.3.19: + resolution: {integrity: sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} @@ -1168,9 +1562,6 @@ packages: resolution: {integrity: sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==} engines: {node: 4.x || >=6.0.0} - node-fetch-native@1.6.6: - resolution: {integrity: sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==} - node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -1187,11 +1578,6 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - nypm@0.5.4: - resolution: {integrity: sha512-X0SNNrZiGU8/e/zAB7sCTtdxWTMSIO73q+xuKgglm2Yvzwlo8UoC5FNySQFCvl84uPaeADkqHUZUkWy4aH4xOA==} - engines: {node: ^14.16.0 || >=16.10.0} - hasBin: true - oas-kit-common@1.0.8: resolution: {integrity: sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==} @@ -1212,8 +1598,8 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - ohash@1.1.6: - resolution: {integrity: sha512-TBu7PtV8YkAZn0tSxobKY2n2aAQva936lhRrj6957aDaCf9IEtqsKbgMzXE/F/sjqYOwmrukeORHNLe5glk7Cg==} + ohash@2.0.12: + resolution: {integrity: sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw==} once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -1222,6 +1608,10 @@ packages: resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} engines: {node: '>=18'} + open@11.0.0: + resolution: {integrity: sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==} + engines: {node: '>=20'} + openapi-sampler@1.7.0: resolution: {integrity: sha512-fWq32F5vqGpgRJYIarC/9Y1wC9tKnRDcCOjsDJ7MIcSv2HsE7kNifcXIZ8FVtNStBUWxYrEk/MKqVF0SwZ5gog==} @@ -1253,14 +1643,15 @@ packages: resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} engines: {node: '>=16 || 14 >=14.18'} - pathe@1.1.2: - resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} - pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - perfect-debounce@1.0.0: - resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + pathval@2.0.1: + resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} + engines: {node: '>= 14.16'} + + perfect-debounce@2.1.0: + resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} perfect-scrollbar@1.5.6: resolution: {integrity: sha512-rixgxw3SxyJbCaSpo1n35A/fwI1r2rdwMKOTCg/AcG+xOEyZcE8UHVjpZMFCVImzsFoCZeJTT+M/rdEIQYO2nw==} @@ -1276,12 +1667,16 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + pirates@4.0.7: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} - pkg-types@1.3.1: - resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} + pkg-types@2.3.3: + resolution: {integrity: sha512-j/lCFdcppV0JxWpCEITdbDltBxPP6cHT+yNJ6Go2OgoSA9518X847X9z0p6LtA4Nc16+eQzCZjRrWanTGvHJ5w==} pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} @@ -1309,6 +1704,14 @@ packages: yaml: optional: true + postcss@8.5.28: + resolution: {integrity: sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==} + engines: {node: ^10 || ^12 || >=14} + + powershell-utils@0.1.0: + resolution: {integrity: sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==} + engines: {node: '>=20'} + pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1330,8 +1733,8 @@ packages: randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - rc9@2.1.2: - resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==} + rc9@3.1.0: + resolution: {integrity: sha512-ufjkNVzbRHKcCOmTahZkmVsyc3W+MSk3jY03m+a7tGHkIsdVMG9l10/3HvFbWkkKzY5VFp3pkRsIo/UYgmFL7Q==} react-dom@19.3.0: resolution: {integrity: sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==} @@ -1365,6 +1768,10 @@ packages: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} + readdirp@5.1.1: + resolution: {integrity: sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==} + engines: {node: '>= 20.19.0'} + redoc@2.5.3: resolution: {integrity: sha512-bBbat+Sx6xKWdyoCGTtA0BWeTEW9Vs4VnEja7q7ZLOk4IM7cHQLrf+kDxWF6dKeKxT8kOBnoy/OsNXCeLttpyQ==} engines: {node: '>=6.9', npm: '>=3.0.0'} @@ -1390,11 +1797,19 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + rollup@4.40.0: resolution: {integrity: sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rollup@4.63.5: + resolution: {integrity: sha512-KRWwmNLlPw5M7HcdYfm15oBv9n9LPtjzpzCIxS/phwqvPyxHSoKX6Y2YU3pxSPfy0CLquVgsx/j/hBi6OvH1Nw==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + run-applescript@7.1.0: resolution: {integrity: sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==} engines: {node: '>=18'} @@ -1410,6 +1825,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.8.4: + resolution: {integrity: sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==} + engines: {node: '>=10'} + hasBin: true + set-cookie-parser@2.7.1: resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==} @@ -1439,6 +1859,9 @@ packages: should@13.2.3: resolution: {integrity: sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -1450,6 +1873,10 @@ packages: resolution: {integrity: sha512-tf+h5W1IrjNm/9rKKj0JU2MDMruiopx0jjVA5zCdBtcGjfp0+c5rHw/zADLC3IeKlGHtVbHtpfzvYA0OYT+HKg==} engines: {node: '>=8.0.0'} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -1458,6 +1885,12 @@ packages: resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + stickyfill@1.1.1: resolution: {integrity: sha512-GCp7vHAfpao+Qh/3Flh9DXEJ/qSi0KJwJw6zYlZOtRYXWUIpMM6mC2rIep/dK8RQqwW0KxGJIllmjPIBOGN8AA==} @@ -1480,6 +1913,9 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} + strip-literal@3.1.0: + resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} + strnum@2.4.2: resolution: {integrity: sha512-rDG3Ah4TV0k1hWvLSzkZtMmLN9+eS+h3knq4MP6A42Y3Yh5qGNnOUs1jJkoSr8FG5dsL28c7KgkIBzSEykqtuw==} @@ -1515,10 +1951,6 @@ packages: resolution: {integrity: sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==} hasBin: true - tar@6.2.1: - resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} - engines: {node: '>=10'} - thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -1526,6 +1958,9 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} @@ -1533,6 +1968,22 @@ packages: resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==} engines: {node: '>=12.0.0'} + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} + engines: {node: '>=14.0.0'} + + tinyspy@4.0.6: + resolution: {integrity: sha512-u8KszXvGfU68hVcZpRHKG28T0krMuv2G5nDhiHaMLen/gIuFEgIJhaJuO69qjnXg5paSrbPMFfx3brNuN8eVSg==} + engines: {node: '>=14.0.0'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -1577,9 +2028,6 @@ packages: engines: {node: '>=14.17'} hasBin: true - ufo@1.5.4: - resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} - uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} @@ -1603,6 +2051,79 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + + vite@7.3.6: + resolution: {integrity: sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + jiti: '>=1.21.0' + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@3.2.7: + resolution: {integrity: sha512-KrxIJ62Fd89gfysR4WotlgZABiz2dqFPgqGzX7s+CwsqLFomRH7777ZcrOD6+WVAh7khPQP41A+BKbpcJFrdEg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.2.7 + '@vitest/ui': 3.2.7 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/debug': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -1620,6 +2141,11 @@ packages: engines: {node: '>= 8'} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} @@ -1646,6 +2172,10 @@ packages: utf-8-validate: optional: true + wsl-utils@0.3.1: + resolution: {integrity: sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==} + engines: {node: '>=20'} + xml-naming@0.3.0: resolution: {integrity: sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==} engines: {node: '>=16.0.0'} @@ -1654,9 +2184,6 @@ packages: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml-ast-parser@0.0.43: resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} @@ -1672,6 +2199,9 @@ packages: resolution: {integrity: sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==} engines: {node: '>=12'} + zod@3.25.76: + resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + snapshots: '@babel/code-frame@7.29.7': @@ -1693,100 +2223,210 @@ snapshots: '@esbuild/aix-ppc64@0.25.2': optional: true + '@esbuild/aix-ppc64@0.28.2': + optional: true + '@esbuild/android-arm64@0.25.2': optional: true + '@esbuild/android-arm64@0.28.2': + optional: true + '@esbuild/android-arm@0.25.2': optional: true + '@esbuild/android-arm@0.28.2': + optional: true + '@esbuild/android-x64@0.25.2': optional: true - '@esbuild/darwin-arm64@0.25.2': + '@esbuild/android-x64@0.28.2': + optional: true + + '@esbuild/darwin-arm64@0.25.2': + optional: true + + '@esbuild/darwin-arm64@0.28.2': optional: true '@esbuild/darwin-x64@0.25.2': optional: true + '@esbuild/darwin-x64@0.28.2': + optional: true + '@esbuild/freebsd-arm64@0.25.2': optional: true + '@esbuild/freebsd-arm64@0.28.2': + optional: true + '@esbuild/freebsd-x64@0.25.2': optional: true + '@esbuild/freebsd-x64@0.28.2': + optional: true + '@esbuild/linux-arm64@0.25.2': optional: true + '@esbuild/linux-arm64@0.28.2': + optional: true + '@esbuild/linux-arm@0.25.2': optional: true + '@esbuild/linux-arm@0.28.2': + optional: true + '@esbuild/linux-ia32@0.25.2': optional: true + '@esbuild/linux-ia32@0.28.2': + optional: true + '@esbuild/linux-loong64@0.25.2': optional: true + '@esbuild/linux-loong64@0.28.2': + optional: true + '@esbuild/linux-mips64el@0.25.2': optional: true + '@esbuild/linux-mips64el@0.28.2': + optional: true + '@esbuild/linux-ppc64@0.25.2': optional: true + '@esbuild/linux-ppc64@0.28.2': + optional: true + '@esbuild/linux-riscv64@0.25.2': optional: true + '@esbuild/linux-riscv64@0.28.2': + optional: true + '@esbuild/linux-s390x@0.25.2': optional: true + '@esbuild/linux-s390x@0.28.2': + optional: true + '@esbuild/linux-x64@0.25.2': optional: true + '@esbuild/linux-x64@0.28.2': + optional: true + '@esbuild/netbsd-arm64@0.25.2': optional: true + '@esbuild/netbsd-arm64@0.28.2': + optional: true + '@esbuild/netbsd-x64@0.25.2': optional: true + '@esbuild/netbsd-x64@0.28.2': + optional: true + '@esbuild/openbsd-arm64@0.25.2': optional: true + '@esbuild/openbsd-arm64@0.28.2': + optional: true + '@esbuild/openbsd-x64@0.25.2': optional: true + '@esbuild/openbsd-x64@0.28.2': + optional: true + + '@esbuild/openharmony-arm64@0.28.2': + optional: true + '@esbuild/sunos-x64@0.25.2': optional: true + '@esbuild/sunos-x64@0.28.2': + optional: true + '@esbuild/win32-arm64@0.25.2': optional: true + '@esbuild/win32-arm64@0.28.2': + optional: true + '@esbuild/win32-ia32@0.25.2': optional: true + '@esbuild/win32-ia32@0.28.2': + optional: true + '@esbuild/win32-x64@0.25.2': optional: true + '@esbuild/win32-x64@0.28.2': + optional: true + '@exodus/schemasafe@1.3.0': {} '@faker-js/faker@7.6.0': {} - '@hey-api/client-fetch@0.6.0': {} + '@hey-api/codegen-core@0.9.1': + dependencies: + '@hey-api/types': 0.1.4 + ansi-colors: 4.1.3 + c12: 3.3.4 + color-support: 1.1.3 + transitivePeerDependencies: + - magicast - '@hey-api/json-schema-ref-parser@1.0.1': + '@hey-api/json-schema-ref-parser@1.4.4': dependencies: '@jsdevtools/ono': 7.1.3 '@types/json-schema': 7.0.15 - js-yaml: 4.1.0 + js-yaml: 4.2.0 + + '@hey-api/openapi-ts@0.99.0(typescript@5.8.2)': + dependencies: + '@hey-api/codegen-core': 0.9.1 + '@hey-api/json-schema-ref-parser': 1.4.4 + '@hey-api/shared': 0.5.0 + '@hey-api/spec-types': 0.2.0 + '@hey-api/types': 0.1.4 + '@lukeed/ms': 2.0.2 + ansi-colors: 4.1.3 + color-support: 1.1.3 + commander: 15.0.0 + get-tsconfig: 4.14.0 + typescript: 5.8.2 + transitivePeerDependencies: + - magicast - '@hey-api/openapi-ts@0.61.2(typescript@5.8.2)': + '@hey-api/shared@0.5.0': dependencies: - '@hey-api/json-schema-ref-parser': 1.0.1 - c12: 2.0.1 - commander: 13.0.0 - handlebars: 4.7.8 - typescript: 5.8.2 + '@hey-api/codegen-core': 0.9.1 + '@hey-api/json-schema-ref-parser': 1.4.4 + '@hey-api/spec-types': 0.2.0 + '@hey-api/types': 0.1.4 + ansi-colors: 4.1.3 + cross-spawn: 7.0.6 + open: 11.0.0 + semver: 7.8.4 transitivePeerDependencies: - magicast + '@hey-api/spec-types@0.2.0': + dependencies: + '@hey-api/types': 0.1.4 + + '@hey-api/types@0.1.4': {} + '@humanwhocodes/momoa@2.0.4': {} '@isaacs/cliui@8.0.2': @@ -1814,6 +2454,8 @@ snapshots: '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/sourcemap-codec@1.6.0': {} + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 @@ -1829,7 +2471,12 @@ snapshots: dependencies: jsep: 1.4.0 - '@nodable/entities@3.0.0': {} + '@lukeed/ms@2.0.2': {} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + optional: true + + '@nodable/entities@3.1.0': {} '@opentelemetry/api-logs@0.222.0': dependencies: @@ -2007,80 +2654,204 @@ snapshots: '@rollup/rollup-android-arm-eabi@4.40.0': optional: true + '@rollup/rollup-android-arm-eabi@4.63.5': + optional: true + '@rollup/rollup-android-arm64@4.40.0': optional: true + '@rollup/rollup-android-arm64@4.63.5': + optional: true + '@rollup/rollup-darwin-arm64@4.40.0': optional: true + '@rollup/rollup-darwin-arm64@4.63.5': + optional: true + '@rollup/rollup-darwin-x64@4.40.0': optional: true + '@rollup/rollup-darwin-x64@4.63.5': + optional: true + '@rollup/rollup-freebsd-arm64@4.40.0': optional: true + '@rollup/rollup-freebsd-arm64@4.63.5': + optional: true + '@rollup/rollup-freebsd-x64@4.40.0': optional: true + '@rollup/rollup-freebsd-x64@4.63.5': + optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.40.0': optional: true + '@rollup/rollup-linux-arm-gnueabihf@4.63.5': + optional: true + '@rollup/rollup-linux-arm-musleabihf@4.40.0': optional: true + '@rollup/rollup-linux-arm-musleabihf@4.63.5': + optional: true + '@rollup/rollup-linux-arm64-gnu@4.40.0': optional: true + '@rollup/rollup-linux-arm64-gnu@4.63.5': + optional: true + '@rollup/rollup-linux-arm64-musl@4.40.0': optional: true + '@rollup/rollup-linux-arm64-musl@4.63.5': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.63.5': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.63.5': + optional: true + '@rollup/rollup-linux-loongarch64-gnu@4.40.0': optional: true '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': optional: true + '@rollup/rollup-linux-ppc64-gnu@4.63.5': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.63.5': + optional: true + '@rollup/rollup-linux-riscv64-gnu@4.40.0': optional: true + '@rollup/rollup-linux-riscv64-gnu@4.63.5': + optional: true + '@rollup/rollup-linux-riscv64-musl@4.40.0': optional: true + '@rollup/rollup-linux-riscv64-musl@4.63.5': + optional: true + '@rollup/rollup-linux-s390x-gnu@4.40.0': optional: true + '@rollup/rollup-linux-s390x-gnu@4.63.5': + optional: true + '@rollup/rollup-linux-x64-gnu@4.40.0': optional: true + '@rollup/rollup-linux-x64-gnu@4.63.5': + optional: true + '@rollup/rollup-linux-x64-musl@4.40.0': optional: true + '@rollup/rollup-linux-x64-musl@4.63.5': + optional: true + + '@rollup/rollup-openbsd-x64@4.63.5': + optional: true + + '@rollup/rollup-openharmony-arm64@4.63.5': + optional: true + '@rollup/rollup-win32-arm64-msvc@4.40.0': optional: true + '@rollup/rollup-win32-arm64-msvc@4.63.5': + optional: true + '@rollup/rollup-win32-ia32-msvc@4.40.0': optional: true + '@rollup/rollup-win32-ia32-msvc@4.63.5': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.63.5': + optional: true + '@rollup/rollup-win32-x64-msvc@4.40.0': optional: true + '@rollup/rollup-win32-x64-msvc@4.63.5': + optional: true + '@sinclair/typebox@0.27.12': {} + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + '@types/ejs@3.1.5': {} '@types/estree@1.0.7': {} + '@types/estree@1.0.9': {} + '@types/json-schema@7.0.15': {} '@types/trusted-types@2.0.7': optional: true + '@vitest/expect@3.2.7': + dependencies: + '@types/chai': 5.2.3 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 + chai: 5.3.3 + tinyrainbow: 2.0.0 + + '@vitest/mocker@3.2.7(vite@7.3.6(jiti@2.7.0))': + dependencies: + '@vitest/spy': 3.2.7 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 7.3.6(jiti@2.7.0) + + '@vitest/pretty-format@3.2.7': + dependencies: + tinyrainbow: 2.0.0 + + '@vitest/runner@3.2.7': + dependencies: + '@vitest/utils': 3.2.7 + pathe: 2.0.3 + strip-literal: 3.1.0 + + '@vitest/snapshot@3.2.7': + dependencies: + '@vitest/pretty-format': 3.2.7 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@3.2.7': + dependencies: + tinyspy: 4.0.6 + + '@vitest/utils@3.2.7': + dependencies: + '@vitest/pretty-format': 3.2.7 + loupe: 3.2.1 + tinyrainbow: 2.0.0 + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 - acorn@8.14.1: {} - agent-base@7.1.4: {} ajv@8.20.0: @@ -2090,6 +2861,8 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 + ansi-colors@4.1.3: {} + ansi-regex@5.0.1: {} ansi-regex@6.1.0: {} @@ -2113,6 +2886,8 @@ snapshots: argparse@2.0.1: {} + assertion-error@2.0.1: {} + async@3.2.6: {} asynckit@0.4.0: {} @@ -2145,7 +2920,7 @@ snapshots: buffer-from@1.1.2: {} - bundle-name@4.1.0: + bundle-name@4.1.1: dependencies: run-applescript: 7.1.0 @@ -2154,20 +2929,20 @@ snapshots: esbuild: 0.25.2 load-tsconfig: 0.2.5 - c12@2.0.1: + c12@3.3.4: dependencies: - chokidar: 4.0.3 - confbox: 0.1.8 - defu: 6.1.4 - dotenv: 16.4.7 - giget: 1.2.5 - jiti: 2.4.2 - mlly: 1.7.4 - ohash: 1.1.6 - pathe: 1.1.2 - perfect-debounce: 1.0.0 - pkg-types: 1.3.1 - rc9: 2.1.2 + chokidar: 5.0.0 + confbox: 0.2.4 + defu: 6.1.7 + dotenv: 17.4.2 + exsolve: 1.1.1 + giget: 3.3.1 + jiti: 2.7.0 + ohash: 2.0.12 + pathe: 2.0.3 + perfect-debounce: 2.1.0 + pkg-types: 2.3.3 + rc9: 3.1.0 cac@6.7.14: {} @@ -2178,11 +2953,21 @@ snapshots: call-me-maybe@1.0.2: {} + chai@5.3.3: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.3 + deep-eql: 5.0.2 + loupe: 3.2.1 + pathval: 2.0.1 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + check-error@2.1.3: {} + chokidar@3.5.3: dependencies: anymatch: 3.1.3 @@ -2199,11 +2984,9 @@ snapshots: dependencies: readdirp: 4.1.2 - chownr@2.0.0: {} - - citty@0.1.6: + chokidar@5.0.0: dependencies: - consola: 3.4.2 + readdirp: 5.1.1 classnames@2.5.1: {} @@ -2221,6 +3004,8 @@ snapshots: color-name@1.1.4: {} + color-support@1.1.3: {} + colorette@1.4.0: {} colorette@2.0.20: {} @@ -2229,7 +3014,7 @@ snapshots: dependencies: delayed-stream: 1.0.0 - commander@13.0.0: {} + commander@15.0.0: {} commander@4.1.1: {} @@ -2242,7 +3027,9 @@ snapshots: readable-stream: 3.6.2 typedarray: 0.0.6 - confbox@0.1.8: {} + confbox@0.2.4: {} + + confbox@0.3.1: {} consola@3.4.2: {} @@ -2262,31 +3049,39 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.4.3: + dependencies: + ms: 2.1.3 + decko@1.2.0: {} + deep-eql@5.0.2: {} + default-browser-id@5.0.1: {} default-browser@5.5.1: dependencies: - bundle-name: 4.1.0 + bundle-name: 4.1.1 default-browser-id: 5.0.1 define-lazy-prop@3.0.0: {} - defu@6.1.4: {} + defu@6.1.7: {} delayed-stream@1.0.0: {} - destr@2.0.3: {} + destr@2.0.5: {} diff-sequences@29.6.3: {} - dompurify@3.4.15: + dompurify@3.4.16: optionalDependencies: '@types/trusted-types': 2.0.7 dotenv@16.4.7: {} + dotenv@17.4.2: {} + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -2307,6 +3102,8 @@ snapshots: es-errors@1.3.0: {} + es-module-lexer@1.7.0: {} + es-object-atoms@1.1.2: dependencies: es-errors: 1.3.0 @@ -2352,12 +3149,49 @@ snapshots: '@esbuild/win32-ia32': 0.25.2 '@esbuild/win32-x64': 0.25.2 + esbuild@0.28.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.2 + '@esbuild/android-arm': 0.28.2 + '@esbuild/android-arm64': 0.28.2 + '@esbuild/android-x64': 0.28.2 + '@esbuild/darwin-arm64': 0.28.2 + '@esbuild/darwin-x64': 0.28.2 + '@esbuild/freebsd-arm64': 0.28.2 + '@esbuild/freebsd-x64': 0.28.2 + '@esbuild/linux-arm': 0.28.2 + '@esbuild/linux-arm64': 0.28.2 + '@esbuild/linux-ia32': 0.28.2 + '@esbuild/linux-loong64': 0.28.2 + '@esbuild/linux-mips64el': 0.28.2 + '@esbuild/linux-ppc64': 0.28.2 + '@esbuild/linux-riscv64': 0.28.2 + '@esbuild/linux-s390x': 0.28.2 + '@esbuild/linux-x64': 0.28.2 + '@esbuild/netbsd-arm64': 0.28.2 + '@esbuild/netbsd-x64': 0.28.2 + '@esbuild/openbsd-arm64': 0.28.2 + '@esbuild/openbsd-x64': 0.28.2 + '@esbuild/openharmony-arm64': 0.28.2 + '@esbuild/sunos-x64': 0.28.2 + '@esbuild/win32-arm64': 0.28.2 + '@esbuild/win32-ia32': 0.28.2 + '@esbuild/win32-x64': 0.28.2 + escalade@3.2.0: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.7 + event-target-shim@5.0.1: {} eventemitter3@5.0.4: {} + expect-type@1.4.0: {} + + exsolve@1.1.1: {} + fast-deep-equal@3.1.3: {} fast-safe-stringify@2.1.1: {} @@ -2369,9 +3203,9 @@ snapshots: path-expression-matcher: 1.6.2 xml-naming: 0.3.0 - fast-xml-parser@5.11.1: + fast-xml-parser@5.11.2: dependencies: - '@nodable/entities': 3.0.0 + '@nodable/entities': 3.1.0 fast-xml-builder: 1.3.1 is-unsafe: 2.0.2 path-expression-matcher: 1.6.2 @@ -2382,6 +3216,10 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 + filelist@1.0.4: dependencies: minimatch: 5.1.6 @@ -2405,10 +3243,6 @@ snapshots: hasown: 2.0.4 mime-types: 2.1.35 - fs-minipass@2.1.0: - dependencies: - minipass: 3.3.6 - fs.realpath@1.0.0: {} fsevents@2.3.3: @@ -2438,15 +3272,11 @@ snapshots: dunder-proto: 1.0.1 es-object-atoms: 1.1.2 - giget@1.2.5: + get-tsconfig@4.14.0: dependencies: - citty: 0.1.6 - consola: 3.4.2 - defu: 6.1.4 - node-fetch-native: 1.6.6 - nypm: 0.5.4 - pathe: 2.0.3 - tar: 6.2.1 + resolve-pkg-maps: 1.0.0 + + giget@3.3.1: {} glob-parent@5.1.2: dependencies: @@ -2472,15 +3302,6 @@ snapshots: gopd@1.2.0: {} - handlebars@4.7.8: - dependencies: - minimist: 1.2.8 - neo-async: 2.6.2 - source-map: 0.6.1 - wordwrap: 1.0.0 - optionalDependencies: - uglify-js: 3.19.3 - handlebars@4.7.9: dependencies: minimist: 1.2.8 @@ -2507,7 +3328,7 @@ snapshots: https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.4 - debug: 4.4.0 + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -2532,6 +3353,8 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-in-ssh@1.0.0: {} + is-inside-container@1.0.0: dependencies: is-docker: 3.0.0 @@ -2575,7 +3398,7 @@ snapshots: jest-get-type: 29.6.3 pretty-format: 29.7.0 - jiti@2.4.2: {} + jiti@2.7.0: {} joycon@3.1.1: {} @@ -2583,7 +3406,9 @@ snapshots: js-tokens@4.0.0: {} - js-yaml@4.1.0: + js-tokens@9.0.1: {} + + js-yaml@4.2.0: dependencies: argparse: 2.0.1 @@ -2617,16 +3442,20 @@ snapshots: lodash.sortby@4.7.0: {} - lodash@4.18.1: {} - loose-envify@1.4.0: dependencies: js-tokens: 4.0.0 + loupe@3.2.1: {} + lru-cache@10.4.3: {} lunr@2.3.9: {} + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + mark.js@8.11.1: {} marked@4.3.0: {} @@ -2657,28 +3486,8 @@ snapshots: minimist@1.2.8: {} - minipass@3.3.6: - dependencies: - yallist: 4.0.0 - - minipass@5.0.0: {} - minipass@7.1.2: {} - minizlib@2.1.2: - dependencies: - minipass: 3.3.6 - yallist: 4.0.0 - - mkdirp@1.0.4: {} - - mlly@1.7.4: - dependencies: - acorn: 8.14.1 - pathe: 2.0.3 - pkg-types: 1.3.1 - ufo: 1.5.4 - mobx-react-lite@4.1.1(mobx@6.12.3)(react-dom@19.3.0(react@19.3.0))(react@19.3.0): dependencies: mobx: 6.12.3 @@ -2705,14 +3514,14 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 + nanoid@3.3.19: {} + neo-async@2.6.2: {} node-fetch-h2@2.3.0: dependencies: http2-client: 1.3.5 - node-fetch-native@1.6.6: {} - node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 @@ -2723,15 +3532,6 @@ snapshots: normalize-path@3.0.0: {} - nypm@0.5.4: - dependencies: - citty: 0.1.6 - consola: 3.4.2 - pathe: 2.0.3 - pkg-types: 1.3.1 - tinyexec: 0.3.2 - ufo: 1.5.4 - oas-kit-common@1.0.8: dependencies: fast-safe-stringify: 2.1.1 @@ -2765,7 +3565,7 @@ snapshots: object-assign@4.1.1: {} - ohash@1.1.6: {} + ohash@2.0.12: {} once@1.4.0: dependencies: @@ -2778,16 +3578,25 @@ snapshots: is-inside-container: 1.0.0 is-wsl: 3.1.1 + open@11.0.0: + dependencies: + default-browser: 5.5.1 + define-lazy-prop: 3.0.0 + is-in-ssh: 1.0.0 + is-inside-container: 1.0.0 + powershell-utils: 0.1.0 + wsl-utils: 0.3.1 + openapi-sampler@1.7.0: dependencies: '@types/json-schema': 7.0.15 - fast-xml-parser: 5.11.1 + fast-xml-parser: 5.11.2 json-pointer: 0.6.2 openapi-sampler@1.7.6: dependencies: '@types/json-schema': 7.0.15 - fast-xml-parser: 5.11.1 + fast-xml-parser: 5.11.2 json-pointer: 0.6.2 outdent@0.8.0: {} @@ -2807,11 +3616,11 @@ snapshots: lru-cache: 10.4.3 minipass: 7.1.2 - pathe@1.1.2: {} - pathe@2.0.3: {} - perfect-debounce@1.0.0: {} + pathval@2.0.1: {} + + perfect-debounce@2.1.0: {} perfect-scrollbar@1.5.6: {} @@ -2821,12 +3630,14 @@ snapshots: picomatch@4.0.2: {} + picomatch@4.0.7: {} + pirates@4.0.7: {} - pkg-types@1.3.1: + pkg-types@2.3.3: dependencies: - confbox: 0.1.8 - mlly: 1.7.4 + confbox: 0.3.1 + exsolve: 1.1.1 pathe: 2.0.3 pluralize@8.0.0: {} @@ -2835,11 +3646,20 @@ snapshots: dependencies: '@babel/runtime': 7.29.7 - postcss-load-config@6.0.1(jiti@2.4.2): + postcss-load-config@6.0.1(jiti@2.7.0)(postcss@8.5.28): dependencies: lilconfig: 3.1.3 optionalDependencies: - jiti: 2.4.2 + jiti: 2.7.0 + postcss: 8.5.28 + + postcss@8.5.28: + dependencies: + nanoid: 3.3.19 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + powershell-utils@0.1.0: {} pretty-format@29.7.0: dependencies: @@ -2863,10 +3683,10 @@ snapshots: dependencies: safe-buffer: 5.2.1 - rc9@2.1.2: + rc9@3.1.0: dependencies: - defu: 6.1.4 - destr: 2.0.3 + defu: 6.1.7 + destr: 2.0.5 react-dom@19.3.0(react@19.3.0): dependencies: @@ -2897,13 +3717,15 @@ snapshots: readdirp@4.1.2: {} + readdirp@5.1.1: {} + redoc@2.5.3(core-js@3.32.1)(mobx@6.12.3)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(styled-components@6.5.3(react-dom@19.3.0(react@19.3.0))(react@19.3.0)): dependencies: '@redocly/openapi-core': 1.34.20 classnames: 2.5.1 core-js: 3.32.1 decko: 1.2.0 - dompurify: 3.4.15 + dompurify: 3.4.16 eventemitter3: 5.0.4 json-pointer: 0.6.2 lunr: 2.3.9 @@ -2938,6 +3760,8 @@ snapshots: resolve-from@5.0.0: {} + resolve-pkg-maps@1.0.0: {} + rollup@4.40.0: dependencies: '@types/estree': 1.0.7 @@ -2964,6 +3788,38 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.40.0 fsevents: 2.3.3 + rollup@4.63.5: + dependencies: + '@types/estree': 1.0.9 + optionalDependencies: + '@napi-rs/lzma-linux-x64-gnu': 1.5.1 + '@rollup/rollup-android-arm-eabi': 4.63.5 + '@rollup/rollup-android-arm64': 4.63.5 + '@rollup/rollup-darwin-arm64': 4.63.5 + '@rollup/rollup-darwin-x64': 4.63.5 + '@rollup/rollup-freebsd-arm64': 4.63.5 + '@rollup/rollup-freebsd-x64': 4.63.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.63.5 + '@rollup/rollup-linux-arm-musleabihf': 4.63.5 + '@rollup/rollup-linux-arm64-gnu': 4.63.5 + '@rollup/rollup-linux-arm64-musl': 4.63.5 + '@rollup/rollup-linux-loong64-gnu': 4.63.5 + '@rollup/rollup-linux-loong64-musl': 4.63.5 + '@rollup/rollup-linux-ppc64-gnu': 4.63.5 + '@rollup/rollup-linux-ppc64-musl': 4.63.5 + '@rollup/rollup-linux-riscv64-gnu': 4.63.5 + '@rollup/rollup-linux-riscv64-musl': 4.63.5 + '@rollup/rollup-linux-s390x-gnu': 4.63.5 + '@rollup/rollup-linux-x64-gnu': 4.63.5 + '@rollup/rollup-linux-x64-musl': 4.63.5 + '@rollup/rollup-openbsd-x64': 4.63.5 + '@rollup/rollup-openharmony-arm64': 4.63.5 + '@rollup/rollup-win32-arm64-msvc': 4.63.5 + '@rollup/rollup-win32-ia32-msvc': 4.63.5 + '@rollup/rollup-win32-x64-gnu': 4.63.5 + '@rollup/rollup-win32-x64-msvc': 4.63.5 + fsevents: 2.3.3 + run-applescript@7.1.0: {} safe-buffer@5.2.1: {} @@ -2972,6 +3828,8 @@ snapshots: semver@7.7.4: {} + semver@7.8.4: {} + set-cookie-parser@2.7.1: {} shebang-command@2.0.0: @@ -3006,11 +3864,13 @@ snapshots: should-type-adaptors: 1.1.0 should-util: 1.0.1 + siginfo@2.0.0: {} + signal-exit@4.1.0: {} simple-websocket@9.1.0: dependencies: - debug: 4.4.0 + debug: 4.4.3 queue-microtask: 1.2.3 randombytes: 2.1.0 readable-stream: 3.6.2 @@ -3022,12 +3882,18 @@ snapshots: slugify@1.4.7: {} + source-map-js@1.2.1: {} + source-map@0.6.1: {} source-map@0.8.0-beta.0: dependencies: whatwg-url: 7.1.0 + stackback@0.0.2: {} + + std-env@3.10.0: {} + stickyfill@1.1.1: {} string-width@4.2.3: @@ -3054,6 +3920,10 @@ snapshots: dependencies: ansi-regex: 6.1.0 + strip-literal@3.1.0: + dependencies: + js-tokens: 9.0.1 + strnum@2.4.2: dependencies: anynum: 1.0.1 @@ -3099,15 +3969,6 @@ snapshots: transitivePeerDependencies: - encoding - tar@6.2.1: - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 5.0.0 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -3116,6 +3977,8 @@ snapshots: dependencies: any-promise: 1.3.0 + tinybench@2.9.0: {} + tinyexec@0.3.2: {} tinyglobby@0.2.12: @@ -3123,6 +3986,17 @@ snapshots: fdir: 6.4.3(picomatch@4.0.2) picomatch: 4.0.2 + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + + tinypool@1.1.1: {} + + tinyrainbow@2.0.0: {} + + tinyspy@4.0.6: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -3137,7 +4011,7 @@ snapshots: ts-interface-checker@0.1.13: {} - tsup@8.4.0(jiti@2.4.2)(typescript@5.8.2): + tsup@8.4.0(jiti@2.7.0)(postcss@8.5.28)(typescript@5.8.2): dependencies: bundle-require: 5.1.0(esbuild@0.25.2) cac: 6.7.14 @@ -3147,7 +4021,7 @@ snapshots: esbuild: 0.25.2 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.4.2) + postcss-load-config: 6.0.1(jiti@2.7.0)(postcss@8.5.28) resolve-from: 5.0.0 rollup: 4.40.0 source-map: 0.8.0-beta.0 @@ -3156,6 +4030,7 @@ snapshots: tinyglobby: 0.2.12 tree-kill: 1.2.2 optionalDependencies: + postcss: 8.5.28 typescript: 5.8.2 transitivePeerDependencies: - jiti @@ -3167,8 +4042,6 @@ snapshots: typescript@5.8.2: {} - ufo@1.5.4: {} - uglify-js@3.19.3: optional: true @@ -3184,6 +4057,78 @@ snapshots: util-deprecate@1.0.2: {} + vite-node@3.2.4(jiti@2.7.0): + dependencies: + cac: 6.7.14 + debug: 4.4.3 + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 7.3.6(jiti@2.7.0) + transitivePeerDependencies: + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + vite@7.3.6(jiti@2.7.0): + dependencies: + esbuild: 0.28.2 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + postcss: 8.5.28 + rollup: 4.63.5 + tinyglobby: 0.2.17 + optionalDependencies: + fsevents: 2.3.3 + jiti: 2.7.0 + + vitest@3.2.7(jiti@2.7.0): + dependencies: + '@types/chai': 5.2.3 + '@vitest/expect': 3.2.7 + '@vitest/mocker': 3.2.7(vite@7.3.6(jiti@2.7.0)) + '@vitest/pretty-format': 3.2.7 + '@vitest/runner': 3.2.7 + '@vitest/snapshot': 3.2.7 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 + chai: 5.3.3 + debug: 4.4.3 + expect-type: 1.4.0 + magic-string: 0.30.21 + pathe: 2.0.3 + picomatch: 4.0.2 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.17 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 + vite: 7.3.6(jiti@2.7.0) + vite-node: 3.2.4(jiti@2.7.0) + why-is-node-running: 2.3.0 + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + webidl-conversions@3.0.1: {} webidl-conversions@4.0.2: {} @@ -3203,6 +4148,11 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + wordwrap@1.0.0: {} wrap-ansi@7.0.0: @@ -3221,12 +4171,15 @@ snapshots: ws@7.5.13: {} + wsl-utils@0.3.1: + dependencies: + is-wsl: 3.1.1 + powershell-utils: 0.1.0 + xml-naming@0.3.0: {} y18n@5.0.8: {} - yallist@4.0.0: {} - yaml-ast-parser@0.0.43: {} yaml@1.10.3: {} @@ -3242,3 +4195,5 @@ snapshots: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 20.2.9 + + zod@3.25.76: {} diff --git a/packages/sdks/cart-checkout-order/src/client/client.gen.ts b/packages/sdks/cart-checkout-order/src/client/client.gen.ts new file mode 100644 index 000000000..cde984e4f --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/client.gen.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { + type Client, + type ClientOptions, + type Config, + createClient, + createConfig, +} from "./client" +import type { ClientOptions as ClientOptions2 } from "./types.gen" + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = ( + override?: Config, +) => Config & T> + +export const client: Client = createClient( + createConfig({ + baseUrl: "https://euwest.api.elasticpath.com", + }), +) diff --git a/packages/sdks/cart-checkout-order/src/client/client/client.gen.ts b/packages/sdks/cart-checkout-order/src/client/client/client.gen.ts new file mode 100644 index 000000000..92fec3f6e --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/client/client.gen.ts @@ -0,0 +1,301 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { createSseClient } from "../core/serverSentEvents.gen" +import type { HttpMethod } from "../core/types.gen" +import { getValidRequestBody } from "../core/utils.gen" +import type { + Client, + Config, + RequestOptions, + ResolvedRequestOptions, +} from "./types.gen" +import { + buildUrl, + createConfig, + createInterceptors, + getParseAs, + mergeConfigs, + mergeHeaders, + setAuthParams, +} from "./utils.gen" + +type ReqInit = Omit & { + body?: any + headers: ReturnType +} + +export const createClient = (config: Config = {}): Client => { + let _config = mergeConfigs(createConfig(), config) + + const getConfig = (): Config => ({ ..._config }) + + const setConfig = (config: Config): Config => { + _config = mergeConfigs(_config, config) + return getConfig() + } + + const interceptors = createInterceptors< + Request, + Response, + unknown, + ResolvedRequestOptions + >() + + const beforeRequest = async < + TData = unknown, + TResponseStyle extends "data" | "fields" = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, + >( + options: RequestOptions, + ) => { + const opts = { + ..._config, + ...options, + fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, + headers: mergeHeaders(_config.headers, options.headers), + serializedBody: undefined as string | undefined, + } + + if (opts.security) { + await setAuthParams(opts) + } + + if (opts.requestValidator) { + await opts.requestValidator(opts) + } + + if (opts.body !== undefined && opts.bodySerializer) { + opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined + } + + // remove Content-Type header if body is empty to avoid sending invalid requests + if (opts.body === undefined || opts.serializedBody === "") { + opts.headers.delete("Content-Type") + } + + const resolvedOpts = opts as typeof opts & + ResolvedRequestOptions + const url = buildUrl(resolvedOpts) + + return { opts: resolvedOpts, url } + } + + const request: Client["request"] = async (options) => { + const throwOnError = options.throwOnError ?? _config.throwOnError + const responseStyle = options.responseStyle ?? _config.responseStyle + + let request: Request | undefined + let response: Response | undefined + + try { + const { opts, url } = await beforeRequest(options) + const requestInit: ReqInit = { + redirect: "follow", + ...opts, + body: getValidRequestBody(opts), + } + + request = new Request(url, requestInit) + + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts) + } + } + + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = opts.fetch! + + response = await _fetch(request) + + for (const fn of interceptors.response.fns) { + if (fn) { + response = await fn(response, request, opts) + } + } + + const result = { + request, + response, + } + + if (response.ok) { + const parseAs = + (opts.parseAs === "auto" + ? getParseAs(response.headers.get("Content-Type")) + : opts.parseAs) ?? "json" + + if ( + response.status === 204 || + response.headers.get("Content-Length") === "0" + ) { + let emptyData: any + switch (parseAs) { + case "arrayBuffer": + case "blob": + case "text": + emptyData = await response[parseAs]() + break + case "formData": + emptyData = new FormData() + break + case "stream": + emptyData = response.body + break + case "json": + default: + emptyData = {} + break + } + return opts.responseStyle === "data" + ? emptyData + : { + data: emptyData, + ...result, + } + } + + let data: any + switch (parseAs) { + case "arrayBuffer": + case "blob": + case "formData": + case "text": + data = await response[parseAs]() + break + case "json": { + // Some servers return 200 with no Content-Length and empty body. + // response.json() would throw; read as text and parse if non-empty. + const text = await response.text() + data = text ? JSON.parse(text) : {} + break + } + case "stream": + return opts.responseStyle === "data" + ? response.body + : { + data: response.body, + ...result, + } + } + + if (parseAs === "json") { + if (opts.responseValidator) { + await opts.responseValidator(data) + } + + if (opts.responseTransformer) { + data = await opts.responseTransformer(data) + } + } + + return opts.responseStyle === "data" + ? data + : { + data, + ...result, + } + } + + const textError = await response.text() + let jsonError: unknown + + try { + jsonError = JSON.parse(textError) + } catch { + // noop + } + + throw jsonError ?? textError + } catch (error) { + let finalError = error + + for (const fn of interceptors.error.fns) { + if (fn) { + finalError = await fn( + finalError, + response, + request, + options as ResolvedRequestOptions, + ) + } + } + + finalError = finalError || {} + + if (throwOnError) { + throw finalError + } + + // TODO: we probably want to return error and improve types + return responseStyle === "data" + ? undefined + : { + error: finalError, + request, + response, + } + } + } + + const makeMethodFn = + (method: Uppercase) => (options: RequestOptions) => + request({ ...options, method }) + + const makeSseFn = + (method: Uppercase) => async (options: RequestOptions) => { + const { opts, url } = await beforeRequest(options) + return createSseClient({ + ...opts, + body: opts.body as BodyInit | null | undefined, + method, + onRequest: async (url, init) => { + let request = new Request(url, init) + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts) + } + } + return request + }, + serializedBody: getValidRequestBody(opts) as + | BodyInit + | null + | undefined, + url, + }) + } + + const _buildUrl: Client["buildUrl"] = (options) => + buildUrl({ ..._config, ...options }) + + return { + buildUrl: _buildUrl, + connect: makeMethodFn("CONNECT"), + delete: makeMethodFn("DELETE"), + get: makeMethodFn("GET"), + getConfig, + head: makeMethodFn("HEAD"), + interceptors, + options: makeMethodFn("OPTIONS"), + patch: makeMethodFn("PATCH"), + post: makeMethodFn("POST"), + put: makeMethodFn("PUT"), + request, + setConfig, + sse: { + connect: makeSseFn("CONNECT"), + delete: makeSseFn("DELETE"), + get: makeSseFn("GET"), + head: makeSseFn("HEAD"), + options: makeSseFn("OPTIONS"), + patch: makeSseFn("PATCH"), + post: makeSseFn("POST"), + put: makeSseFn("PUT"), + trace: makeSseFn("TRACE"), + }, + trace: makeMethodFn("TRACE"), + } as Client +} diff --git a/packages/sdks/cart-checkout-order/src/client/client/index.ts b/packages/sdks/cart-checkout-order/src/client/client/index.ts new file mode 100644 index 000000000..4ea77791a --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/client/index.ts @@ -0,0 +1,27 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type { Auth } from "../core/auth.gen" +export type { QuerySerializerOptions } from "../core/bodySerializer.gen" +export { + formDataBodySerializer, + jsonBodySerializer, + urlSearchParamsBodySerializer, +} from "../core/bodySerializer.gen" +export { buildClientParams } from "../core/params.gen" +export { serializeQueryKeyValue } from "../core/queryKeySerializer.gen" +export type { ServerSentEventsResult } from "../core/serverSentEvents.gen" +export type { ClientMeta } from "../core/types.gen" +export { createClient } from "./client.gen" +export type { + Client, + ClientOptions, + Config, + CreateClientConfig, + Options, + RequestOptions, + RequestResult, + ResolvedRequestOptions, + ResponseStyle, + TDataShape, +} from "./types.gen" +export { createConfig, mergeHeaders } from "./utils.gen" diff --git a/packages/sdks/cart-checkout-order/src/client/client/types.gen.ts b/packages/sdks/cart-checkout-order/src/client/client/types.gen.ts new file mode 100644 index 000000000..ac04362b5 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/client/types.gen.ts @@ -0,0 +1,246 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth } from "../core/auth.gen" +import type { + ServerSentEventsOptions, + ServerSentEventsResult, +} from "../core/serverSentEvents.gen" +import type { + Client as CoreClient, + Config as CoreConfig, +} from "../core/types.gen" +import type { Middleware } from "./utils.gen" + +export type ResponseStyle = "data" | "fields" + +export interface Config + extends Omit, + CoreConfig { + /** + * Base URL for all requests made by this client. + */ + baseUrl?: T["baseUrl"] + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch + /** + * Please don't use the Fetch client for Next.js applications. The `next` + * options won't have any effect. + * + * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. + */ + next?: never + /** + * Return the response data parsed in a specified format. By default, `auto` + * will infer the appropriate method from the `Content-Type` response header. + * You can override this behavior with any of the {@link Body} methods. + * Select `stream` if you don't want to parse response data at all. + * + * @default 'auto' + */ + parseAs?: + | "arrayBuffer" + | "auto" + | "blob" + | "formData" + | "json" + | "stream" + | "text" + /** + * Should we return only data or multiple fields (data, error, response, etc.)? + * + * @default 'fields' + */ + responseStyle?: ResponseStyle + /** + * Throw an error instead of returning it in the response? + * + * @default false + */ + throwOnError?: T["throwOnError"] +} + +export interface RequestOptions< + TData = unknown, + TResponseStyle extends ResponseStyle = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, +> extends Config<{ + responseStyle: TResponseStyle + throwOnError: ThrowOnError + }>, + Pick< + ServerSentEventsOptions, + | "onRequest" + | "onSseError" + | "onSseEvent" + | "sseDefaultRetryDelay" + | "sseMaxRetryAttempts" + | "sseMaxRetryDelay" + > { + /** + * Any body that you want to add to your request. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} + */ + body?: unknown + path?: Record + query?: Record + /** + * Security mechanism(s) to use for the request. + */ + security?: ReadonlyArray + url: Url +} + +export interface ResolvedRequestOptions< + TResponseStyle extends ResponseStyle = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, +> extends RequestOptions { + headers: Headers + serializedBody?: string +} + +export type RequestResult< + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = boolean, + TResponseStyle extends ResponseStyle = "fields", +> = ThrowOnError extends true + ? Promise< + TResponseStyle extends "data" + ? TData extends Record + ? TData[keyof TData] + : TData + : { + data: TData extends Record + ? TData[keyof TData] + : TData + request: Request + response: Response + } + > + : Promise< + TResponseStyle extends "data" + ? + | (TData extends Record + ? TData[keyof TData] + : TData) + | undefined + : ( + | { + data: TData extends Record + ? TData[keyof TData] + : TData + error: undefined + } + | { + data: undefined + error: TError extends Record + ? TError[keyof TError] + : TError + } + ) & { + /** request may be undefined, because error may be from building the request object itself */ + request?: Request + /** response may be undefined, because error may be from building the request object itself or from a network error */ + response?: Response + } + > + +export interface ClientOptions { + baseUrl?: string + responseStyle?: ResponseStyle + throwOnError?: boolean +} + +type MethodFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = "fields", +>( + options: Omit, "method">, +) => RequestResult + +type SseFn = < + TData = unknown, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + _TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = "fields", +>( + options: Omit, "method">, +) => Promise> + +type RequestFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = "fields", +>( + options: Omit, "method"> & + Pick< + Required>, + "method" + >, +) => RequestResult + +type BuildUrlFn = < + TData extends { + body?: unknown + path?: Record + query?: Record + url: string + }, +>( + options: TData & Options, +) => string + +export type Client = CoreClient< + RequestFn, + Config, + MethodFn, + BuildUrlFn, + SseFn +> & { + interceptors: Middleware +} + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = ( + override?: Config, +) => Config & T> + +export interface TDataShape { + body?: unknown + headers?: unknown + path?: unknown + query?: unknown + url: string +} + +type OmitKeys = Pick> + +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, + TResponse = unknown, + TResponseStyle extends ResponseStyle = "fields", +> = OmitKeys< + RequestOptions, + "body" | "path" | "query" | "url" +> & + ([TData] extends [never] ? unknown : Omit) diff --git a/packages/sdks/cart-checkout-order/src/client/client/utils.gen.ts b/packages/sdks/cart-checkout-order/src/client/client/utils.gen.ts new file mode 100644 index 000000000..b0164e73e --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/client/utils.gen.ts @@ -0,0 +1,332 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { getAuthToken } from "../core/auth.gen" +import type { QuerySerializerOptions } from "../core/bodySerializer.gen" +import { jsonBodySerializer } from "../core/bodySerializer.gen" +import { + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from "../core/pathSerializer.gen" +import { getUrl } from "../core/utils.gen" +import type { Client, ClientOptions, Config, RequestOptions } from "./types.gen" + +export const createQuerySerializer = ({ + parameters = {}, + ...args +}: QuerySerializerOptions = {}): ((queryParams: T) => string) => { + const querySerializer = (queryParams: T): string => { + const search: string[] = [] + if (queryParams && typeof queryParams === "object") { + for (const name in queryParams) { + const value = queryParams[name] + + if (value === undefined || value === null) { + continue + } + + const options = parameters[name] || args + + if (Array.isArray(value)) { + const serializedArray = serializeArrayParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: "form", + value, + ...options.array, + }) + if (serializedArray) search.push(serializedArray) + } else if (typeof value === "object") { + const serializedObject = serializeObjectParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: "deepObject", + value: value as Record, + ...options.object, + }) + if (serializedObject) search.push(serializedObject) + } else { + const serializedPrimitive = serializePrimitiveParam({ + allowReserved: options.allowReserved, + name, + value: value as string, + }) + if (serializedPrimitive) search.push(serializedPrimitive) + } + } + } + return search.join("&") + } + return querySerializer +} + +/** + * Infers parseAs value from provided Content-Type header. + */ +export const getParseAs = ( + contentType: string | null, +): Exclude => { + if (!contentType) { + // If no Content-Type header is provided, the best we can do is return the raw response body, + // which is effectively the same as the 'stream' option. + return "stream" + } + + const cleanContent = contentType.split(";")[0]?.trim() + + if (!cleanContent) { + return + } + + if ( + cleanContent.startsWith("application/json") || + cleanContent.endsWith("+json") + ) { + return "json" + } + + if (cleanContent === "multipart/form-data") { + return "formData" + } + + if ( + ["application/", "audio/", "image/", "video/"].some((type) => + cleanContent.startsWith(type), + ) + ) { + return "blob" + } + + if (cleanContent.startsWith("text/")) { + return "text" + } + + return +} + +const checkForExistence = ( + options: Pick & { + headers: Headers + }, + name?: string, +): boolean => { + if (!name) { + return false + } + if ( + options.headers.has(name) || + options.query?.[name] || + options.headers.get("Cookie")?.includes(`${name}=`) + ) { + return true + } + return false +} + +export async function setAuthParams( + options: Pick & { + headers: Headers + }, +): Promise { + for (const auth of options.security ?? []) { + if (checkForExistence(options, auth.name)) { + continue + } + + const token = await getAuthToken(auth, options.auth) + + if (!token) { + continue + } + + const name = auth.name ?? "Authorization" + + switch (auth.in) { + case "query": + if (!options.query) { + options.query = {} + } + options.query[name] = token + break + case "cookie": + options.headers.append("Cookie", `${name}=${token}`) + break + case "header": + default: + options.headers.set(name, token) + break + } + } +} + +export const buildUrl: Client["buildUrl"] = (options) => + getUrl({ + baseUrl: options.baseUrl as string, + path: options.path, + query: options.query, + querySerializer: + typeof options.querySerializer === "function" + ? options.querySerializer + : createQuerySerializer(options.querySerializer), + url: options.url, + }) + +export const mergeConfigs = (a: Config, b: Config): Config => { + const config = { ...a, ...b } + if (config.baseUrl?.endsWith("/")) { + config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1) + } + config.headers = mergeHeaders(a.headers, b.headers) + return config +} + +const headersEntries = (headers: Headers): Array<[string, string]> => { + const entries: Array<[string, string]> = [] + headers.forEach((value, key) => { + entries.push([key, value]) + }) + return entries +} + +export const mergeHeaders = ( + ...headers: Array["headers"] | undefined> +): Headers => { + const mergedHeaders = new Headers() + for (const header of headers) { + if (!header) { + continue + } + + const iterator = + header instanceof Headers + ? headersEntries(header) + : Object.entries(header) + + for (const [key, value] of iterator) { + if (value === null) { + mergedHeaders.delete(key) + } else if (Array.isArray(value)) { + for (const v of value) { + mergedHeaders.append(key, v as string) + } + } else if (value !== undefined) { + // assume object headers are meant to be JSON stringified, i.e., their + // content value in OpenAPI specification is 'application/json' + mergedHeaders.set( + key, + typeof value === "object" ? JSON.stringify(value) : (value as string), + ) + } + } + } + return mergedHeaders +} + +type ErrInterceptor = ( + error: Err, + /** response may be undefined due to a network error where no response object is produced */ + response: Res | undefined, + /** request may be undefined, because error may be from building the request object itself */ + request: Req | undefined, + options: Options, +) => Err | Promise + +type ReqInterceptor = ( + request: Req, + options: Options, +) => Req | Promise + +type ResInterceptor = ( + response: Res, + request: Req, + options: Options, +) => Res | Promise + +class Interceptors { + fns: Array = [] + + clear(): void { + this.fns = [] + } + + eject(id: number | Interceptor): void { + const index = this.getInterceptorIndex(id) + if (this.fns[index]) { + this.fns[index] = null + } + } + + exists(id: number | Interceptor): boolean { + const index = this.getInterceptorIndex(id) + return Boolean(this.fns[index]) + } + + getInterceptorIndex(id: number | Interceptor): number { + if (typeof id === "number") { + return this.fns[id] ? id : -1 + } + return this.fns.indexOf(id) + } + + update( + id: number | Interceptor, + fn: Interceptor, + ): number | Interceptor | false { + const index = this.getInterceptorIndex(id) + if (this.fns[index]) { + this.fns[index] = fn + return id + } + return false + } + + use(fn: Interceptor): number { + this.fns.push(fn) + return this.fns.length - 1 + } +} + +export interface Middleware { + error: Interceptors> + request: Interceptors> + response: Interceptors> +} + +export const createInterceptors = (): Middleware< + Req, + Res, + Err, + Options +> => ({ + error: new Interceptors>(), + request: new Interceptors>(), + response: new Interceptors>(), +}) + +const defaultQuerySerializer = createQuerySerializer({ + allowReserved: false, + array: { + explode: true, + style: "form", + }, + object: { + explode: true, + style: "deepObject", + }, +}) + +const defaultHeaders = { + "Content-Type": "application/json", +} + +export const createConfig = ( + override: Config & T> = {}, +): Config & T> => ({ + ...jsonBodySerializer, + headers: defaultHeaders, + parseAs: "auto", + querySerializer: defaultQuerySerializer, + ...override, +}) diff --git a/packages/sdks/cart-checkout-order/src/client/core/auth.gen.ts b/packages/sdks/cart-checkout-order/src/client/core/auth.gen.ts new file mode 100644 index 000000000..9ea469ea0 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/core/auth.gen.ts @@ -0,0 +1,48 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type AuthToken = string | undefined + +export interface Auth { + /** + * Which part of the request do we use to send the auth? + * + * @default 'header' + */ + in?: "header" | "query" | "cookie" + /** + * A unique identifier for the security scheme. + * + * Defined only when there are multiple security schemes whose `Auth` + * shape would otherwise be identical. + */ + key?: string + /** + * Header or query parameter name. + * + * @default 'Authorization' + */ + name?: string + scheme?: "basic" | "bearer" + type: "apiKey" | "http" +} + +export const getAuthToken = async ( + auth: Auth, + callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, +): Promise => { + const token = typeof callback === "function" ? await callback(auth) : callback + + if (!token) { + return + } + + if (auth.scheme === "bearer") { + return `Bearer ${token}` + } + + if (auth.scheme === "basic") { + return `Basic ${btoa(token)}` + } + + return token +} diff --git a/packages/sdks/cart-checkout-order/src/client/core/bodySerializer.gen.ts b/packages/sdks/cart-checkout-order/src/client/core/bodySerializer.gen.ts new file mode 100644 index 000000000..8f1ea241d --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/core/bodySerializer.gen.ts @@ -0,0 +1,96 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { + ArrayStyle, + ObjectStyle, + SerializerOptions, +} from "./pathSerializer.gen" + +export type QuerySerializer = (query: Record) => string + +export type BodySerializer = (body: unknown) => unknown + +type QuerySerializerOptionsObject = { + allowReserved?: boolean + array?: Partial> + object?: Partial> +} + +export type QuerySerializerOptions = QuerySerializerOptionsObject & { + /** + * Per-parameter serialization overrides. When provided, these settings + * override the global array/object settings for specific parameter names. + */ + parameters?: Record +} + +const serializeFormDataPair = ( + data: FormData, + key: string, + value: unknown, +): void => { + if (typeof value === "string" || value instanceof Blob) { + data.append(key, value) + } else if (value instanceof Date) { + data.append(key, value.toISOString()) + } else { + data.append(key, JSON.stringify(value)) + } +} + +const serializeUrlSearchParamsPair = ( + data: URLSearchParams, + key: string, + value: unknown, +): void => { + if (typeof value === "string") { + data.append(key, value) + } else { + data.append(key, JSON.stringify(value)) + } +} + +export const formDataBodySerializer = { + bodySerializer: (body: unknown): FormData => { + const data = new FormData() + + Object.entries(body as Record).forEach(([key, value]) => { + if (value === undefined || value === null) { + return + } + if (Array.isArray(value)) { + value.forEach((v) => serializeFormDataPair(data, key, v)) + } else { + serializeFormDataPair(data, key, value) + } + }) + + return data + }, +} + +export const jsonBodySerializer = { + bodySerializer: (body: unknown): string => + JSON.stringify(body, (_key, value) => + typeof value === "bigint" ? value.toString() : value, + ), +} + +export const urlSearchParamsBodySerializer = { + bodySerializer: (body: unknown): string => { + const data = new URLSearchParams() + + Object.entries(body as Record).forEach(([key, value]) => { + if (value === undefined || value === null) { + return + } + if (Array.isArray(value)) { + value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)) + } else { + serializeUrlSearchParamsPair(data, key, value) + } + }) + + return data.toString() + }, +} diff --git a/packages/sdks/cart-checkout-order/src/client/core/params.gen.ts b/packages/sdks/cart-checkout-order/src/client/core/params.gen.ts new file mode 100644 index 000000000..8aa1d8b66 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/core/params.gen.ts @@ -0,0 +1,186 @@ +// This file is auto-generated by @hey-api/openapi-ts + +type Slot = "body" | "headers" | "path" | "query" + +export type Field = + | { + in: Exclude + /** + * Field name. This is the name we want the user to see and use. + */ + key: string + /** + * Field mapped name. This is the name we want to use in the request. + * If omitted, we use the same value as `key`. + */ + map?: string + } + | { + in: Extract + /** + * Key isn't required for bodies. + */ + key?: string + map?: string + } + | { + /** + * Field name. This is the name we want the user to see and use. + */ + key: string + /** + * Field mapped name. This is the name we want to use in the request. + * If `in` is omitted, `map` aliases `key` to the transport layer. + */ + map: Slot + } + +export interface Fields { + allowExtra?: Partial> + args?: ReadonlyArray +} + +export type FieldsConfig = ReadonlyArray + +const extraPrefixesMap: Record = { + $body_: "body", + $headers_: "headers", + $path_: "path", + $query_: "query", +} +const extraPrefixes = Object.entries(extraPrefixesMap) + +type KeyMap = Map< + string, + | { + in: Slot + map?: string + } + | { + in?: never + map: Slot + } +> + +function buildKeyMap(fields: FieldsConfig, map?: KeyMap): KeyMap { + if (!map) { + map = new Map() + } + + for (const config of fields) { + if ("in" in config) { + if (config.key) { + map.set(config.key, { + in: config.in, + map: config.map, + }) + } + } else if ("key" in config) { + map.set(config.key, { + map: config.map, + }) + } else if (config.args) { + buildKeyMap(config.args, map) + } + } + + return map +} + +interface Params { + body?: unknown + headers: Record + path: Record + query: Record +} + +function stripEmptySlots(params: Params): void { + for (const [slot, value] of Object.entries(params)) { + if (slot === "body") continue + if ( + value && + typeof value === "object" && + !Array.isArray(value) && + !Object.keys(value).length + ) { + delete params[slot as Slot] + } + } +} + +export function buildClientParams( + args: ReadonlyArray, + fields: FieldsConfig, +): Params { + const params: Params = { + headers: Object.create(null), + path: Object.create(null), + query: Object.create(null), + } + + const map = buildKeyMap(fields) + + function writeSlot(slot: Slot, key: string, value: unknown): void { + let record = params[slot] as Record | undefined + if (record === undefined) { + record = Object.create(null) as Record + params[slot] = record + } + record[key] = value + } + + let config: FieldsConfig[number] | undefined + + for (const [index, arg] of args.entries()) { + if (fields[index]) { + config = fields[index] + } + + if (!config) { + continue + } + + if ("in" in config) { + if (config.key) { + const field = map.get(config.key)! + const name = field.map || config.key + if (field.in) { + writeSlot(field.in, name, arg) + } + } else { + params.body = arg + } + } else { + for (const [key, value] of Object.entries(arg ?? {})) { + const field = map.get(key) + + if (field) { + if (field.in) { + const name = field.map || key + writeSlot(field.in, name, value) + } else { + params[field.map] = value + } + } else { + const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix)) + + if (extra) { + const [prefix, slot] = extra + writeSlot(slot, key.slice(prefix.length), value) + } else if ("allowExtra" in config && config.allowExtra) { + for (const [slot, allowed] of Object.entries(config.allowExtra)) { + if (allowed) { + writeSlot(slot as Slot, key, value) + break + } + } + } + } + } + } + } + + stripEmptySlots(params) + + return params +} diff --git a/packages/sdks/cart-checkout-order/src/client/core/pathSerializer.gen.ts b/packages/sdks/cart-checkout-order/src/client/core/pathSerializer.gen.ts new file mode 100644 index 000000000..f297a0634 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/core/pathSerializer.gen.ts @@ -0,0 +1,187 @@ +// This file is auto-generated by @hey-api/openapi-ts + +interface SerializeOptions + extends SerializePrimitiveOptions, + SerializerOptions {} + +interface SerializePrimitiveOptions { + allowReserved?: boolean + name: string +} + +export interface SerializerOptions { + /** + * @default true + */ + explode: boolean + style: T +} + +export type ArrayStyle = "form" | "spaceDelimited" | "pipeDelimited" +export type ArraySeparatorStyle = ArrayStyle | MatrixStyle +type MatrixStyle = "label" | "matrix" | "simple" +export type ObjectStyle = "form" | "deepObject" +type ObjectSeparatorStyle = ObjectStyle | MatrixStyle + +interface SerializePrimitiveParam extends SerializePrimitiveOptions { + value: string +} + +export const separatorArrayExplode = ( + style: ArraySeparatorStyle, +): "." | ";" | "," | "&" => { + switch (style) { + case "label": + return "." + case "matrix": + return ";" + case "simple": + return "," + default: + return "&" + } +} + +export const separatorArrayNoExplode = ( + style: ArraySeparatorStyle, +): "," | "|" | "%20" => { + switch (style) { + case "form": + return "," + case "pipeDelimited": + return "|" + case "spaceDelimited": + return "%20" + default: + return "," + } +} + +export const separatorObjectExplode = ( + style: ObjectSeparatorStyle, +): "." | ";" | "," | "&" => { + switch (style) { + case "label": + return "." + case "matrix": + return ";" + case "simple": + return "," + default: + return "&" + } +} + +export const serializeArrayParam = ({ + allowReserved, + explode, + name, + style, + value, +}: SerializeOptions & { + value: unknown[] +}): string => { + if (!explode) { + const joinedValues = ( + allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) + ).join(separatorArrayNoExplode(style)) + switch (style) { + case "label": + return `.${joinedValues}` + case "matrix": + return `;${name}=${joinedValues}` + case "simple": + return joinedValues + default: + return `${name}=${joinedValues}` + } + } + + const separator = separatorArrayExplode(style) + const joinedValues = value + .map((v) => { + if (style === "label" || style === "simple") { + return allowReserved ? v : encodeURIComponent(v as string) + } + + return serializePrimitiveParam({ + allowReserved, + name, + value: v as string, + }) + }) + .join(separator) + return style === "label" || style === "matrix" + ? separator + joinedValues + : joinedValues +} + +export const serializePrimitiveParam = ({ + allowReserved, + name, + value, +}: SerializePrimitiveParam): string => { + if (value === undefined || value === null) { + return "" + } + + if (typeof value === "object") { + throw new Error( + "Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.", + ) + } + + return `${name}=${allowReserved ? value : encodeURIComponent(value)}` +} + +export const serializeObjectParam = ({ + allowReserved, + explode, + name, + style, + value, + valueOnly, +}: SerializeOptions & { + value: Record | Date + valueOnly?: boolean +}): string => { + if (value instanceof Date) { + return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}` + } + + if (style !== "deepObject" && !explode) { + let values: string[] = [] + Object.entries(value).forEach(([key, v]) => { + values = [ + ...values, + key, + allowReserved ? (v as string) : encodeURIComponent(v as string), + ] + }) + const joinedValues = values.join(",") + switch (style) { + case "form": + return `${name}=${joinedValues}` + case "label": + return `.${joinedValues}` + case "matrix": + return `;${name}=${joinedValues}` + default: + return joinedValues + } + } + + const separator = separatorObjectExplode(style) + const joinedValues = Object.entries(value) + .map(([key, v]) => + serializePrimitiveParam({ + allowReserved, + name: style === "deepObject" ? `${name}[${key}]` : key, + value: v as string, + }), + ) + .join(separator) + return style === "label" || style === "matrix" + ? separator + joinedValues + : joinedValues +} diff --git a/packages/sdks/cart-checkout-order/src/client/core/queryKeySerializer.gen.ts b/packages/sdks/cart-checkout-order/src/client/core/queryKeySerializer.gen.ts new file mode 100644 index 000000000..4fb8b9b08 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/core/queryKeySerializer.gen.ts @@ -0,0 +1,139 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * JSON-friendly union that mirrors what Pinia Colada can hash. + */ +export type JsonValue = + | null + | string + | number + | boolean + | JsonValue[] + | { [key: string]: JsonValue } + +/** + * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. + */ +export const queryKeyJsonReplacer = ( + _key: string, + value: unknown, +): unknown | undefined => { + if ( + value === undefined || + typeof value === "function" || + typeof value === "symbol" + ) { + return undefined + } + if (typeof value === "bigint") { + return value.toString() + } + if (value instanceof Date) { + return value.toISOString() + } + return value +} + +/** + * Safely stringifies a value and parses it back into a JsonValue. + */ +export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { + try { + const json = JSON.stringify(input, queryKeyJsonReplacer) + if (json === undefined) { + return undefined + } + return JSON.parse(json) as JsonValue + } catch { + return undefined + } +} + +/** + * Detects plain objects (including objects with a null prototype). + */ +const isPlainObject = (value: unknown): value is Record => { + if (value === null || typeof value !== "object") { + return false + } + const prototype = Object.getPrototypeOf(value as object) + return prototype === Object.prototype || prototype === null +} + +/** + * Turns URLSearchParams into a sorted JSON object for deterministic keys. + */ +const serializeSearchParams = (params: URLSearchParams): JsonValue => { + const entries = Array.from(params.entries()).sort(([a], [b]) => + a.localeCompare(b), + ) + const result: Record = {} + + for (const [key, value] of entries) { + const existing = result[key] + if (existing === undefined) { + result[key] = value + continue + } + + if (Array.isArray(existing)) { + ;(existing as string[]).push(value) + } else { + result[key] = [existing, value] + } + } + + return result +} + +/** + * Normalizes any accepted value into a JSON-friendly shape for query keys. + */ +export const serializeQueryKeyValue = ( + value: unknown, +): JsonValue | undefined => { + if (value === null) { + return null + } + + if ( + typeof value === "string" || + typeof value === "number" || + typeof value === "boolean" + ) { + return value + } + + if ( + value === undefined || + typeof value === "function" || + typeof value === "symbol" + ) { + return undefined + } + + if (typeof value === "bigint") { + return value.toString() + } + + if (value instanceof Date) { + return value.toISOString() + } + + if (Array.isArray(value)) { + return stringifyToJsonValue(value) + } + + if ( + typeof URLSearchParams !== "undefined" && + value instanceof URLSearchParams + ) { + return serializeSearchParams(value) + } + + if (isPlainObject(value)) { + return stringifyToJsonValue(value) + } + + return undefined +} diff --git a/packages/sdks/cart-checkout-order/src/client/core/serverSentEvents.gen.ts b/packages/sdks/cart-checkout-order/src/client/core/serverSentEvents.gen.ts new file mode 100644 index 000000000..5595f73e8 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/core/serverSentEvents.gen.ts @@ -0,0 +1,265 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Config } from "./types.gen" + +export type ServerSentEventsOptions = Omit< + RequestInit, + "method" +> & + Pick & { + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch + /** + * Implementing clients can call request interceptors inside this hook. + */ + onRequest?: (url: string, init: RequestInit) => Promise + /** + * Callback invoked when a network or parsing error occurs during streaming. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param error The error that occurred. + */ + onSseError?: (error: unknown) => void + /** + * Callback invoked when an event is streamed from the server. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param event Event streamed from the server. + * @returns Nothing (void). + */ + onSseEvent?: (event: StreamEvent) => void + serializedBody?: RequestInit["body"] + /** + * Default retry delay in milliseconds. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 3000 + */ + sseDefaultRetryDelay?: number + /** + * Maximum number of retry attempts before giving up. + */ + sseMaxRetryAttempts?: number + /** + * Maximum retry delay in milliseconds. + * + * Applies only when exponential backoff is used. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 30000 + */ + sseMaxRetryDelay?: number + /** + * Optional sleep function for retry backoff. + * + * Defaults to using `setTimeout`. + */ + sseSleepFn?: (ms: number) => Promise + url: string + } + +export interface StreamEvent { + data: TData + event?: string + id?: string + retry?: number +} + +export type ServerSentEventsResult< + TData = unknown, + TReturn = void, + TNext = unknown, +> = { + stream: AsyncGenerator< + TData extends Record ? TData[keyof TData] : TData, + TReturn, + TNext + > +} + +export function createSseClient({ + onRequest, + onSseError, + onSseEvent, + responseTransformer, + responseValidator, + sseDefaultRetryDelay, + sseMaxRetryAttempts, + sseMaxRetryDelay, + sseSleepFn, + url, + ...options +}: ServerSentEventsOptions): ServerSentEventsResult { + let lastEventId: string | undefined + + const sleep = + sseSleepFn ?? + ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))) + + const createStream = async function* () { + let retryDelay: number = sseDefaultRetryDelay ?? 3000 + let attempt = 0 + const signal = options.signal ?? new AbortController().signal + + while (true) { + if (signal.aborted) break + + attempt++ + + const headers = + options.headers instanceof Headers + ? options.headers + : new Headers(options.headers as Record | undefined) + + if (lastEventId !== undefined) { + headers.set("Last-Event-ID", lastEventId) + } + + try { + const requestInit: RequestInit = { + redirect: "follow", + ...options, + body: options.serializedBody, + headers, + signal, + } + let request = new Request(url, requestInit) + if (onRequest) { + request = await onRequest(url, requestInit) + } + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = options.fetch ?? globalThis.fetch + const response = await _fetch(request) + + if (!response.ok) + throw new Error( + `SSE failed: ${response.status} ${response.statusText}`, + ) + + if (!response.body) throw new Error("No body in SSE response") + + const reader = response.body + .pipeThrough(new TextDecoderStream()) + .getReader() + + let buffer = "" + + const abortHandler = () => { + try { + reader.cancel() + } catch { + // noop + } + } + + signal.addEventListener("abort", abortHandler) + + try { + while (true) { + const { done, value } = await reader.read() + if (done) break + buffer += value + buffer = buffer.replace(/\r\n?/g, "\n") // normalize line endings + + const chunks = buffer.split("\n\n") + buffer = chunks.pop() ?? "" + + for (const chunk of chunks) { + const lines = chunk.split("\n") + const dataLines: Array = [] + let eventName: string | undefined + + for (const line of lines) { + if (line.startsWith("data:")) { + dataLines.push(line.replace(/^data:\s*/, "")) + } else if (line.startsWith("event:")) { + eventName = line.replace(/^event:\s*/, "") + } else if (line.startsWith("id:")) { + lastEventId = line.replace(/^id:\s*/, "") + } else if (line.startsWith("retry:")) { + const parsed = Number.parseInt( + line.replace(/^retry:\s*/, ""), + 10, + ) + if (!Number.isNaN(parsed)) { + retryDelay = parsed + } + } + } + + let data: unknown + let parsedJson = false + + if (dataLines.length) { + const rawData = dataLines.join("\n") + try { + data = JSON.parse(rawData) + parsedJson = true + } catch { + data = rawData + } + } + + if (parsedJson) { + if (responseValidator) { + await responseValidator(data) + } + + if (responseTransformer) { + data = await responseTransformer(data) + } + } + + onSseEvent?.({ + data, + event: eventName, + id: lastEventId, + retry: retryDelay, + }) + + if (dataLines.length) { + yield data as any + } + } + } + } finally { + signal.removeEventListener("abort", abortHandler) + reader.releaseLock() + } + + break // exit loop on normal completion + } catch (error) { + // connection failed or aborted; retry after delay + onSseError?.(error) + + if ( + sseMaxRetryAttempts !== undefined && + attempt >= sseMaxRetryAttempts + ) { + break // stop after firing error + } + + // exponential backoff: double retry each attempt, cap at 30s + const backoff = Math.min( + retryDelay * 2 ** (attempt - 1), + sseMaxRetryDelay ?? 30000, + ) + await sleep(backoff) + } + } + } + + const stream = createStream() + + return { stream } +} diff --git a/packages/sdks/cart-checkout-order/src/client/core/types.gen.ts b/packages/sdks/cart-checkout-order/src/client/core/types.gen.ts new file mode 100644 index 000000000..221ae41e7 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/core/types.gen.ts @@ -0,0 +1,124 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth, AuthToken } from "./auth.gen" +import type { + BodySerializer, + QuerySerializer, + QuerySerializerOptions, +} from "./bodySerializer.gen" + +export type HttpMethod = + | "connect" + | "delete" + | "get" + | "head" + | "options" + | "patch" + | "post" + | "put" + | "trace" + +export type Client< + RequestFn = never, + Config = unknown, + MethodFn = never, + BuildUrlFn = never, + SseFn = never, +> = { + /** + * Returns the final request URL. + */ + buildUrl: BuildUrlFn + getConfig: () => Config + request: RequestFn + setConfig: (config: Config) => Config +} & { + [K in HttpMethod]: MethodFn +} & ([SseFn] extends [never] + ? { sse?: never } + : { sse: { [K in HttpMethod]: SseFn } }) + +export interface Config { + /** + * Auth token or a function returning auth token. The resolved value will be + * added to the request payload as defined by its `security` array. + */ + auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken + /** + * A function for serializing request body parameter. By default, + * {@link JSON.stringify()} will be used. + */ + bodySerializer?: BodySerializer | null + /** + * An object containing any HTTP headers that you want to pre-populate your + * `Headers` object with. + * + * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} + */ + headers?: + | RequestInit["headers"] + | Record< + string, + | string + | number + | boolean + | (string | number | boolean)[] + | null + | undefined + | unknown + > + /** + * The request method. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} + */ + method?: Uppercase + /** + * A function for serializing request query parameters. By default, arrays + * will be exploded in form style, objects will be exploded in deepObject + * style, and reserved characters are percent-encoded. + * + * This method will have no effect if the native `paramsSerializer()` Axios + * API function is used. + * + * {@link https://swagger.io/docs/specification/serialization/#query View examples} + */ + querySerializer?: QuerySerializer | QuerySerializerOptions + /** + * A function validating request data. This is useful if you want to ensure + * the request conforms to the desired shape, so it can be safely sent to + * the server. + */ + requestValidator?: (data: unknown) => Promise + /** + * A function transforming response data before it's returned. This is useful + * for post-processing data, e.g., converting ISO strings into Date objects. + */ + responseTransformer?: (data: unknown) => Promise + /** + * A function validating response data. This is useful if you want to ensure + * the response conforms to the desired shape, so it can be safely passed to + * the transformers and returned to the user. + */ + responseValidator?: (data: unknown) => Promise +} + +/** + * Arbitrary metadata passed through the `meta` request option. + */ +// eslint-disable-next-line @typescript-eslint/no-empty-object-type +export interface ClientMeta {} + +type IsExactlyNeverOrNeverUndefined = [T] extends [never] + ? true + : [T] extends [never | undefined] + ? [undefined] extends [T] + ? false + : true + : false + +export type OmitNever> = { + [K in keyof T as IsExactlyNeverOrNeverUndefined extends true + ? never + : K]: T[K] +} diff --git a/packages/sdks/cart-checkout-order/src/client/core/utils.gen.ts b/packages/sdks/cart-checkout-order/src/client/core/utils.gen.ts new file mode 100644 index 000000000..0d46c8d44 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/core/utils.gen.ts @@ -0,0 +1,146 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { BodySerializer, QuerySerializer } from "./bodySerializer.gen" +import { + type ArraySeparatorStyle, + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from "./pathSerializer.gen" + +export interface PathSerializer { + path: Record + url: string +} + +export const PATH_PARAM_RE: RegExp = /\{[^{}]+\}/g + +export const defaultPathSerializer = ({ + path, + url: _url, +}: PathSerializer): string => { + let url = _url + const matches = _url.match(PATH_PARAM_RE) + if (matches) { + for (const match of matches) { + let explode = false + let name = match.substring(1, match.length - 1) + let style: ArraySeparatorStyle = "simple" + + if (name.endsWith("*")) { + explode = true + name = name.substring(0, name.length - 1) + } + + if (name.startsWith(".")) { + name = name.substring(1) + style = "label" + } else if (name.startsWith(";")) { + name = name.substring(1) + style = "matrix" + } + + const value = path[name] + + if (value === undefined || value === null) { + continue + } + + if (Array.isArray(value)) { + url = url.replace( + match, + serializeArrayParam({ explode, name, style, value }), + ) + continue + } + + if (typeof value === "object") { + url = url.replace( + match, + serializeObjectParam({ + explode, + name, + style, + value: value as Record, + valueOnly: true, + }), + ) + continue + } + + if (style === "matrix") { + url = url.replace( + match, + `;${serializePrimitiveParam({ + name, + value: value as string, + })}`, + ) + continue + } + + const replaceValue = encodeURIComponent( + style === "label" ? `.${value as string}` : (value as string), + ) + url = url.replace(match, replaceValue) + } + } + return url +} + +export const getUrl = ({ + baseUrl, + path, + query, + querySerializer, + url: _url, +}: { + baseUrl?: string + path?: Record + query?: Record + querySerializer: QuerySerializer + url: string +}): string => { + const pathUrl = _url.startsWith("/") ? _url : `/${_url}` + let url = (baseUrl ?? "") + pathUrl + if (path) { + url = defaultPathSerializer({ path, url }) + } + let search = query ? querySerializer(query) : "" + if (search.startsWith("?")) { + search = search.substring(1) + } + if (search) { + url += `?${search}` + } + return url +} + +export function getValidRequestBody(options: { + body?: unknown + bodySerializer?: BodySerializer | null + serializedBody?: unknown +}): unknown { + const hasBody = options.body !== undefined + const isSerializedBody = hasBody && options.bodySerializer + + if (isSerializedBody) { + if ("serializedBody" in options) { + const hasSerializedBody = + options.serializedBody !== undefined && options.serializedBody !== "" + + return hasSerializedBody ? options.serializedBody : null + } + + // not all clients implement a serializedBody property (i.e., client-axios) + return options.body !== "" ? options.body : null + } + + // plain/text body + if (hasBody) { + return options.body + } + + // no body was provided + return undefined +} diff --git a/packages/sdks/cart-checkout-order/src/client/index.ts b/packages/sdks/cart-checkout-order/src/client/index.ts index 44d2c904f..220d2cb0d 100644 --- a/packages/sdks/cart-checkout-order/src/client/index.ts +++ b/packages/sdks/cart-checkout-order/src/client/index.ts @@ -1,3 +1,478 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from "./types.gen" -export * from "./sdk.gen" + +export { + addCustomDiscountToCartItem, + addTaxItemToCart, + addTaxItemToCartItemComponent, + anonymizeOrders, + bulkAddCustomDiscountsToCart, + bulkAddTaxItemsToCart, + bulkDeleteCustomDiscountsFromCart, + bulkDeleteTaxItemsFromCart, + bulkUpdateItemsInCart, + cancelATransaction, + captureATransaction, + checkoutApi, + confirmOrder, + confirmPayment, + createACart, + createAccountCartAssociation, + createCartPaymentIntent, + createCustomerCartAssociation, + createOrderShippingGroup, + createShippingGroup, + deleteACart, + deleteACartItem, + deleteAccountCartAssociation, + deleteAllCartItems, + deleteAPromotionViaPromotionCode, + deleteATaxItem, + deleteCartShippingGroup, + deleteCustomDiscountFromCart, + deleteCustomDiscountFromCartItem, + deleteCustomerCartAssociation, + deleteTaxItemFromCartItemComponent, + getACart, + getAnOrder, + getATransaction, + getCartItems, + getCarts, + getCustomerOrders, + getOrderItems, + getOrderShippingGroups, + getOrderTransactions, + getShippingGroupById, + getShippingGroups, + getShippingGroupsById, + getV2SettingsCart, + getV2SettingsCartStoreId, + manageCarts, + type Options, + paymentSetup, + putShippingGroupById, + putV2SettingsCart, + putV2SettingsCartStoreId, + refundATransaction, + updateACart, + updateACartItem, + updateAnOrder, + updateATaxItem, + updateCartPaymentIntent, + updateCustomDiscountForCart, + updateCustomDiscountForCartItem, + updateShippingGroup, + updateTaxItemFromCartItemComponent, +} from "./sdk.gen" +export type { + AccountCheckout, + AddAllOrNothingOptionsObject, + AddCustomDiscountToCartItemData, + AddCustomDiscountToCartItemError, + AddCustomDiscountToCartItemErrors, + AddCustomDiscountToCartItemResponse, + AddCustomDiscountToCartItemResponses, + AddressCommon, + AddressWithCounty, + AddressWithRegion, + AddTaxItemToCartData, + AddTaxItemToCartError, + AddTaxItemToCartErrors, + AddTaxItemToCartItemComponentData, + AddTaxItemToCartItemComponentError, + AddTaxItemToCartItemComponentErrors, + AddTaxItemToCartItemComponentResponse, + AddTaxItemToCartItemComponentResponses, + AddTaxItemToCartResponse, + AddTaxItemToCartResponses, + AnonymizeOrdersData, + AnonymizeOrdersError, + AnonymizeOrdersErrors, + AnonymizeOrdersResponse, + AnonymizeOrdersResponses, + BaseCartResponse, + BaseItemObjectData, + BillingAddress, + BulkAddCustomDiscountsToCartData, + BulkAddCustomDiscountsToCartError, + BulkAddCustomDiscountsToCartErrors, + BulkAddCustomDiscountsToCartResponse, + BulkAddCustomDiscountsToCartResponses, + BulkAddItemsRequest, + BulkAddTaxItemsToCartData, + BulkAddTaxItemsToCartError, + BulkAddTaxItemsToCartErrors, + BulkAddTaxItemsToCartResponse, + BulkAddTaxItemsToCartResponses, + BulkDeleteCustomDiscountsFromCartData, + BulkDeleteCustomDiscountsFromCartResponse, + BulkDeleteCustomDiscountsFromCartResponses, + BulkDeleteTaxItemsFromCartData, + BulkDeleteTaxItemsFromCartError, + BulkDeleteTaxItemsFromCartErrors, + BulkDeleteTaxItemsFromCartResponse, + BulkDeleteTaxItemsFromCartResponses, + BulkUpdateCartsItems, + BulkUpdateCartsItemsCommon, + BulkUpdateCartsItemsWithCustomInputs, + BulkUpdateCartsItemsWithQuantity, + BulkUpdateCartsItemsWithShippingGroup, + BulkUpdateItemsInCartData, + BulkUpdateItemsInCartError, + BulkUpdateItemsInCartErrors, + BulkUpdateItemsInCartResponse, + BulkUpdateItemsInCartResponses, + CancelATransactionData, + CancelATransactionError, + CancelATransactionErrors, + CancelATransactionResponse, + CancelATransactionResponses, + CaptureATransactionData, + CaptureATransactionError, + CaptureATransactionErrors, + CaptureATransactionResponse, + CaptureATransactionResponses, + CartCollectionResponse, + CartContact, + CartEntityResponse, + CartItemBulkCustomDiscountObject, + CartItemCollectionResponse, + CartItemFormattedPriceData, + CartItemObject, + CartItemObjectData, + CartItemObjectRequest, + CartItemRelationship, + CartItemResponse, + CartItemsResponse, + CartItemTaxesEntityResponse, + CartMergeObject, + CartMergeObjectRequest, + CartPaymentUpdate, + CartResponse, + CartsBulkCustomDiscounts, + CartsBulkCustomDiscountsCollectionResponse, + CartsBulkCustomDiscountsResponse, + CartsBulkTaxes, + CartsCustomDiscountsCollectionResponse, + CartsCustomDiscountsCreateRequest, + CartsCustomDiscountsEntityRequest, + CartsCustomDiscountsEntityResponse, + CartsCustomDiscountsObject, + CartsCustomDiscountsResponseObject, + CartsCustomDiscountsUpdateObject, + CartsItemsTaxesCommon, + CartsItemsTaxesObject, + CartsItemsTaxesWithAmount, + CartsItemsTaxesWithRate, + CartsRelationshipsAccountsData, + CartsRelationshipsCustomersData, + CartsRequest, + CartsResponse, + CartTimestamps, + CheckoutApiData, + CheckoutApiError, + CheckoutApiErrors, + CheckoutApiResponse, + CheckoutApiResponses, + ClientOptions, + CondensedPromotionResponse, + ConfirmOrderData, + ConfirmOrderError, + ConfirmOrderErrors, + ConfirmOrderResponse, + ConfirmOrderResponses, + ConfirmPaymentData, + ConfirmPaymentError, + ConfirmPaymentErrors, + ConfirmPaymentResponse, + ConfirmPaymentResponses, + Contact, + CreateACartData, + CreateACartError, + CreateACartErrors, + CreateACartResponse, + CreateACartResponses, + CreateAccountCartAssociationData, + CreateAccountCartAssociationError, + CreateAccountCartAssociationErrors, + CreateAccountCartAssociationResponse, + CreateAccountCartAssociationResponses, + CreateCartPaymentIntentData, + CreateCartPaymentIntentResponse, + CreateCartPaymentIntentResponses, + CreateCustomerCartAssociationData, + CreateCustomerCartAssociationError, + CreateCustomerCartAssociationErrors, + CreateCustomerCartAssociationResponse, + CreateCustomerCartAssociationResponses, + CreateOrderShippingGroupData, + CreateOrderShippingGroupError, + CreateOrderShippingGroupErrors, + CreateOrderShippingGroupResponse, + CreateOrderShippingGroupResponses, + CreateShippingGroupData, + CreateShippingGroupError, + CreateShippingGroupErrors, + CreateShippingGroupRequest, + CreateShippingGroupResponse, + CreateShippingGroupResponses, + CustomAttributes, + CustomDiscountRelationshipsCartItemRequest, + CustomDiscountResponse, + Customer, + CustomerCheckout, + CustomItemObject, + CustomItemObjectData, + DataAdyenPayment, + DataAuthorizeNetPayment, + DataBasePayments, + DataBraintreePayment, + DataCardConnectPayment, + DataCyberSourcePayment, + DataManualPayment, + DataPaymentObject, + DataPayPalExpressCheckoutPayment, + DataStripeConnectPayment, + DataStripePayment, + DataStripePaymentIntentsPayment, + DeleteACartData, + DeleteACartError, + DeleteACartErrors, + DeleteACartItemData, + DeleteACartItemResponse, + DeleteACartItemResponses, + DeleteACartResponse, + DeleteACartResponses, + DeleteAccountCartAssociationData, + DeleteAccountCartAssociationError, + DeleteAccountCartAssociationErrors, + DeleteAccountCartAssociationResponse, + DeleteAccountCartAssociationResponses, + DeleteAllCartItemsData, + DeleteAllCartItemsError, + DeleteAllCartItemsErrors, + DeleteAllCartItemsResponse, + DeleteAllCartItemsResponses, + DeleteAPromotionViaPromotionCodeData, + DeleteAPromotionViaPromotionCodeResponse, + DeleteAPromotionViaPromotionCodeResponses, + DeleteATaxItemData, + DeleteATaxItemResponse, + DeleteATaxItemResponses, + DeleteCartShippingGroupData, + DeleteCartShippingGroupError, + DeleteCartShippingGroupErrors, + DeleteCartShippingGroupResponse, + DeleteCartShippingGroupResponses, + DeleteCustomDiscountFromCartData, + DeleteCustomDiscountFromCartItemData, + DeleteCustomDiscountFromCartItemResponse, + DeleteCustomDiscountFromCartItemResponses, + DeleteCustomDiscountFromCartResponse, + DeleteCustomDiscountFromCartResponses, + DeleteCustomerCartAssociationData, + DeleteCustomerCartAssociationError, + DeleteCustomerCartAssociationErrors, + DeleteCustomerCartAssociationResponse, + DeleteCustomerCartAssociationResponses, + DeleteTaxItemFromCartItemComponentData, + DeleteTaxItemFromCartItemComponentError, + DeleteTaxItemFromCartItemComponentErrors, + DeleteTaxItemFromCartItemComponentResponse, + DeleteTaxItemFromCartItemComponentResponses, + DeliveryEstimate, + Discount, + DiscountData, + DiscountFormattedPriceData, + Discounts, + DiscountSettings, + ElasticPathPaymentsPoweredByStripePayment, + FailureDetails, + FormattedPriceData, + GetACartData, + GetACartError, + GetACartErrors, + GetACartResponse, + GetACartResponses, + GetAnOrderData, + GetAnOrderError, + GetAnOrderErrors, + GetAnOrderResponse, + GetAnOrderResponses, + GetATransactionData, + GetATransactionResponse, + GetATransactionResponses, + GetCartItemsData, + GetCartItemsResponse, + GetCartItemsResponses, + GetCartsData, + GetCartsError, + GetCartsErrors, + GetCartsResponse, + GetCartsResponses, + GetCustomerOrdersData, + GetCustomerOrdersResponse, + GetCustomerOrdersResponses, + GetOrderItemsData, + GetOrderItemsResponse, + GetOrderItemsResponses, + GetOrderShippingGroupsData, + GetOrderShippingGroupsError, + GetOrderShippingGroupsErrors, + GetOrderShippingGroupsResponse, + GetOrderShippingGroupsResponses, + GetOrderTransactionsData, + GetOrderTransactionsError, + GetOrderTransactionsErrors, + GetOrderTransactionsResponse, + GetOrderTransactionsResponses, + GetShippingGroupByIdData, + GetShippingGroupByIdError, + GetShippingGroupByIdErrors, + GetShippingGroupByIdResponse, + GetShippingGroupByIdResponses, + GetShippingGroupsByIdData, + GetShippingGroupsByIdError, + GetShippingGroupsByIdErrors, + GetShippingGroupsByIdResponse, + GetShippingGroupsByIdResponses, + GetShippingGroupsData, + GetShippingGroupsError, + GetShippingGroupsErrors, + GetShippingGroupsResponse, + GetShippingGroupsResponses, + GetV2SettingsCartData, + GetV2SettingsCartError, + GetV2SettingsCartErrors, + GetV2SettingsCartResponse, + GetV2SettingsCartResponses, + GetV2SettingsCartStoreIdData, + GetV2SettingsCartStoreIdError, + GetV2SettingsCartStoreIdErrors, + GetV2SettingsCartStoreIdResponse, + GetV2SettingsCartStoreIdResponses, + InventorySettings, + ItemPriceData, + ItemSettings, + ManageCartsData, + ManageCartsError, + ManageCartsErrors, + ManageCartsResponse, + ManageCartsResponses, + Money, + NonNegativeFormattedPriceData, + OrderCollectionResponse, + OrderEntityResponse, + OrderItemCollectionResponse, + OrderItemFormattedUnitPriceData, + OrderItemResponse, + OrderMeta, + OrderPriceData, + OrderPriceWrapperMeta, + OrderResponse, + OrdersAddressData, + OrdersAnonymizeData, + OrdersAnonymizeRequest, + OrdersCancelData, + OrdersFulfilledData, + OrdersListResponse, + OrdersTransactionsCancelRequest, + OrdersTransactionsCaptureRequest, + OrdersTransactionsConfirmRequest, + OrdersTransactionsRefundRequest, + OrdersUpdateRequest, + OrderTimestamps, + PaymentSetupData, + PaymentSetupError, + PaymentSetupErrors, + PaymentSetupResponse, + PaymentSetupResponses, + PaymentsRequest, + PromotionItemObject, + PromotionItemObjectData, + PutShippingGroupByIdData, + PutShippingGroupByIdError, + PutShippingGroupByIdErrors, + PutShippingGroupByIdResponse, + PutShippingGroupByIdResponses, + PutV2SettingsCartData, + PutV2SettingsCartError, + PutV2SettingsCartErrors, + PutV2SettingsCartResponse, + PutV2SettingsCartResponses, + PutV2SettingsCartStoreIdData, + PutV2SettingsCartStoreIdError, + PutV2SettingsCartStoreIdErrors, + PutV2SettingsCartStoreIdResponse, + PutV2SettingsCartStoreIdResponses, + RefundATransactionData, + RefundATransactionError, + RefundATransactionErrors, + RefundATransactionResponse, + RefundATransactionResponses, + RelationshipArray, + RelationshipItem, + ReOrderObject, + ReOrderObjectRequest, + ResponseData, + ResponseErrorItem, + ResponseErrorResponse, + ResponseMetaCarts, + ResponseMetaOrders, + ResponsePageLinks, + ResponsePaginationPage, + ResponsePaginationResults, + SettingsCart, + ShippingAddress, + ShippingGroupEntityResponse, + ShippingGroupMeta, + ShippingGroupResponse, + ShippingPriceRequest, + ShippingPriceResponse, + SingleRelationship, + SubscriptionItemObject, + SubscriptionItemObjectData, + TaxItemResponse, + Timestamps, + TransactionEntityResponse, + TransactionListResponse, + TransactionResponse, + UpdateACartData, + UpdateACartError, + UpdateACartErrors, + UpdateACartItemData, + UpdateACartItemError, + UpdateACartItemErrors, + UpdateACartItemResponse, + UpdateACartItemResponses, + UpdateACartResponse, + UpdateACartResponses, + UpdateAllOrNothingOptionsObject, + UpdateAnOrderData, + UpdateAnOrderError, + UpdateAnOrderErrors, + UpdateAnOrderResponse, + UpdateAnOrderResponses, + UpdateATaxItemData, + UpdateATaxItemResponse, + UpdateATaxItemResponses, + UpdateCartPaymentIntentData, + UpdateCartPaymentIntentResponse, + UpdateCartPaymentIntentResponses, + UpdateCartShippingGroupRequest, + UpdateCartsItems, + UpdateCustomDiscountForCartData, + UpdateCustomDiscountForCartItemData, + UpdateCustomDiscountForCartItemResponse, + UpdateCustomDiscountForCartItemResponses, + UpdateCustomDiscountForCartResponse, + UpdateCustomDiscountForCartResponses, + UpdateOrderShippingGroupRequest, + UpdateShippingGroupData, + UpdateShippingGroupError, + UpdateShippingGroupErrors, + UpdateShippingGroupResponse, + UpdateShippingGroupResponses, + UpdateTaxItemFromCartItemComponentData, + UpdateTaxItemFromCartItemComponentResponse, + UpdateTaxItemFromCartItemComponentResponses, +} from "./types.gen" diff --git a/packages/sdks/cart-checkout-order/src/client/sdk.gen.ts b/packages/sdks/cart-checkout-order/src/client/sdk.gen.ts index 130bfead7..7ffe94005 100644 --- a/packages/sdks/cart-checkout-order/src/client/sdk.gen.ts +++ b/packages/sdks/cart-checkout-order/src/client/sdk.gen.ts @@ -1,177 +1,201 @@ // This file is auto-generated by @hey-api/openapi-ts -import { createClient, createConfig, type Options } from "@hey-api/client-fetch" import type { - GetCartsData, - GetCartsResponse, - GetCartsError, + Client, + ClientMeta, + Options as Options2, + RequestResult, + TDataShape, +} from "./client" +import { client } from "./client.gen" +import type { + AddCustomDiscountToCartItemData, + AddCustomDiscountToCartItemErrors, + AddCustomDiscountToCartItemResponses, + AddTaxItemToCartData, + AddTaxItemToCartErrors, + AddTaxItemToCartItemComponentData, + AddTaxItemToCartItemComponentErrors, + AddTaxItemToCartItemComponentResponses, + AddTaxItemToCartResponses, + AnonymizeOrdersData, + AnonymizeOrdersErrors, + AnonymizeOrdersResponses, + BulkAddCustomDiscountsToCartData, + BulkAddCustomDiscountsToCartErrors, + BulkAddCustomDiscountsToCartResponses, + BulkAddTaxItemsToCartData, + BulkAddTaxItemsToCartErrors, + BulkAddTaxItemsToCartResponses, + BulkDeleteCustomDiscountsFromCartData, + BulkDeleteCustomDiscountsFromCartResponses, + BulkDeleteTaxItemsFromCartData, + BulkDeleteTaxItemsFromCartErrors, + BulkDeleteTaxItemsFromCartResponses, + BulkUpdateItemsInCartData, + BulkUpdateItemsInCartErrors, + BulkUpdateItemsInCartResponses, + CancelATransactionData, + CancelATransactionErrors, + CancelATransactionResponses, + CaptureATransactionData, + CaptureATransactionErrors, + CaptureATransactionResponses, + CheckoutApiData, + CheckoutApiErrors, + CheckoutApiResponses, + ConfirmOrderData, + ConfirmOrderErrors, + ConfirmOrderResponses, + ConfirmPaymentData, + ConfirmPaymentErrors, + ConfirmPaymentResponses, CreateACartData, - CreateACartResponse, - CreateACartError, + CreateACartErrors, + CreateACartResponses, + CreateAccountCartAssociationData, + CreateAccountCartAssociationErrors, + CreateAccountCartAssociationResponses, + CreateCartPaymentIntentData, + CreateCartPaymentIntentResponses, + CreateCustomerCartAssociationData, + CreateCustomerCartAssociationErrors, + CreateCustomerCartAssociationResponses, + CreateOrderShippingGroupData, + CreateOrderShippingGroupErrors, + CreateOrderShippingGroupResponses, + CreateShippingGroupData, + CreateShippingGroupErrors, + CreateShippingGroupResponses, DeleteACartData, - DeleteACartResponse, - DeleteACartError, - GetACartData, - GetACartResponse, - GetACartError, - UpdateACartData, - UpdateACartResponse, - UpdateACartError, - DeleteAllCartItemsData, - DeleteAllCartItemsResponse, - DeleteAllCartItemsError, - GetCartItemsData, - GetCartItemsResponse, - ManageCartsData, - ManageCartsResponse, - ManageCartsError, - BulkUpdateItemsInCartData, - BulkUpdateItemsInCartResponse, - BulkUpdateItemsInCartError, + DeleteACartErrors, DeleteACartItemData, - DeleteACartItemResponse, - UpdateACartItemData, - UpdateACartItemResponse, - UpdateACartItemError, + DeleteACartItemResponses, + DeleteACartResponses, DeleteAccountCartAssociationData, - DeleteAccountCartAssociationResponse, - DeleteAccountCartAssociationError, - CreateAccountCartAssociationData, - CreateAccountCartAssociationResponse, - CreateAccountCartAssociationError, - DeleteCustomerCartAssociationData, - DeleteCustomerCartAssociationResponse, - DeleteCustomerCartAssociationError, - CreateCustomerCartAssociationData, - CreateCustomerCartAssociationResponse, - CreateCustomerCartAssociationError, + DeleteAccountCartAssociationErrors, + DeleteAccountCartAssociationResponses, + DeleteAllCartItemsData, + DeleteAllCartItemsErrors, + DeleteAllCartItemsResponses, DeleteAPromotionViaPromotionCodeData, - DeleteAPromotionViaPromotionCodeResponse, - AddTaxItemToCartData, - AddTaxItemToCartResponse, - AddTaxItemToCartError, - AddTaxItemToCartItemComponentData, - AddTaxItemToCartItemComponentResponse, - AddTaxItemToCartItemComponentError, - DeleteTaxItemFromCartItemComponentData, - DeleteTaxItemFromCartItemComponentResponse, - DeleteTaxItemFromCartItemComponentError, - UpdateTaxItemFromCartItemComponentData, - UpdateTaxItemFromCartItemComponentResponse, - BulkDeleteTaxItemsFromCartData, - BulkDeleteTaxItemsFromCartResponse, - BulkDeleteTaxItemsFromCartError, - BulkAddTaxItemsToCartData, - BulkAddTaxItemsToCartResponse, - BulkAddTaxItemsToCartError, + DeleteAPromotionViaPromotionCodeResponses, DeleteATaxItemData, - DeleteATaxItemResponse, - UpdateATaxItemData, - UpdateATaxItemResponse, - BulkDeleteCustomDiscountsFromCartData, - BulkDeleteCustomDiscountsFromCartResponse, - BulkAddCustomDiscountsToCartData, - BulkAddCustomDiscountsToCartResponse, - BulkAddCustomDiscountsToCartError, + DeleteATaxItemResponses, + DeleteCartShippingGroupData, + DeleteCartShippingGroupErrors, + DeleteCartShippingGroupResponses, DeleteCustomDiscountFromCartData, - DeleteCustomDiscountFromCartResponse, - UpdateCustomDiscountForCartData, - UpdateCustomDiscountForCartResponse, - AddCustomDiscountToCartItemData, - AddCustomDiscountToCartItemResponse, - AddCustomDiscountToCartItemError, DeleteCustomDiscountFromCartItemData, - DeleteCustomDiscountFromCartItemResponse, - UpdateCustomDiscountForCartItemData, - UpdateCustomDiscountForCartItemResponse, - GetShippingGroupsData, - GetShippingGroupsResponse, - GetShippingGroupsError, - CreateShippingGroupData, - CreateShippingGroupResponse, - CreateShippingGroupError, - DeleteCartShippingGroupData, - DeleteCartShippingGroupResponse, - DeleteCartShippingGroupError, - GetShippingGroupByIdData, - GetShippingGroupByIdResponse, - GetShippingGroupByIdError, - UpdateShippingGroupData, - UpdateShippingGroupResponse, - UpdateShippingGroupError, - CreateCartPaymentIntentData, - CreateCartPaymentIntentResponse, - UpdateCartPaymentIntentData, - UpdateCartPaymentIntentResponse, - CheckoutApiData, - CheckoutApiResponse, - CheckoutApiError, - GetCustomerOrdersData, - GetCustomerOrdersResponse, + DeleteCustomDiscountFromCartItemResponses, + DeleteCustomDiscountFromCartResponses, + DeleteCustomerCartAssociationData, + DeleteCustomerCartAssociationErrors, + DeleteCustomerCartAssociationResponses, + DeleteTaxItemFromCartItemComponentData, + DeleteTaxItemFromCartItemComponentErrors, + DeleteTaxItemFromCartItemComponentResponses, + GetACartData, + GetACartErrors, + GetACartResponses, GetAnOrderData, - GetAnOrderResponse, - GetAnOrderError, - UpdateAnOrderData, - UpdateAnOrderResponse, - UpdateAnOrderError, - GetOrderItemsData, - GetOrderItemsResponse, - AnonymizeOrdersData, - AnonymizeOrdersResponse, - AnonymizeOrdersError, - ConfirmOrderData, - ConfirmOrderResponse, - ConfirmOrderError, - PaymentSetupData, - PaymentSetupResponse, - PaymentSetupError, - ConfirmPaymentData, - ConfirmPaymentResponse, - ConfirmPaymentError, - CaptureATransactionData, - CaptureATransactionResponse, - CaptureATransactionError, - RefundATransactionData, - RefundATransactionResponse, - RefundATransactionError, - GetOrderTransactionsData, - GetOrderTransactionsResponse, - GetOrderTransactionsError, + GetAnOrderErrors, + GetAnOrderResponses, GetATransactionData, - GetATransactionResponse, - CancelATransactionData, - CancelATransactionResponse, - CancelATransactionError, + GetATransactionResponses, + GetCartItemsData, + GetCartItemsResponses, + GetCartsData, + GetCartsErrors, + GetCartsResponses, + GetCustomerOrdersData, + GetCustomerOrdersResponses, + GetOrderItemsData, + GetOrderItemsResponses, GetOrderShippingGroupsData, - GetOrderShippingGroupsResponse, - GetOrderShippingGroupsError, - CreateOrderShippingGroupData, - CreateOrderShippingGroupResponse, - CreateOrderShippingGroupError, + GetOrderShippingGroupsErrors, + GetOrderShippingGroupsResponses, + GetOrderTransactionsData, + GetOrderTransactionsErrors, + GetOrderTransactionsResponses, + GetShippingGroupByIdData, + GetShippingGroupByIdErrors, + GetShippingGroupByIdResponses, GetShippingGroupsByIdData, - GetShippingGroupsByIdResponse, - GetShippingGroupsByIdError, - PutShippingGroupByIdData, - PutShippingGroupByIdResponse, - PutShippingGroupByIdError, + GetShippingGroupsByIdErrors, + GetShippingGroupsByIdResponses, + GetShippingGroupsData, + GetShippingGroupsErrors, + GetShippingGroupsResponses, GetV2SettingsCartData, - GetV2SettingsCartResponse, - GetV2SettingsCartError, - PutV2SettingsCartData, - PutV2SettingsCartResponse, - PutV2SettingsCartError, + GetV2SettingsCartErrors, + GetV2SettingsCartResponses, GetV2SettingsCartStoreIdData, - GetV2SettingsCartStoreIdResponse, - GetV2SettingsCartStoreIdError, + GetV2SettingsCartStoreIdErrors, + GetV2SettingsCartStoreIdResponses, + ManageCartsData, + ManageCartsErrors, + ManageCartsResponses, + PaymentSetupData, + PaymentSetupErrors, + PaymentSetupResponses, + PutShippingGroupByIdData, + PutShippingGroupByIdErrors, + PutShippingGroupByIdResponses, + PutV2SettingsCartData, + PutV2SettingsCartErrors, + PutV2SettingsCartResponses, PutV2SettingsCartStoreIdData, - PutV2SettingsCartStoreIdResponse, - PutV2SettingsCartStoreIdError, + PutV2SettingsCartStoreIdErrors, + PutV2SettingsCartStoreIdResponses, + RefundATransactionData, + RefundATransactionErrors, + RefundATransactionResponses, + UpdateACartData, + UpdateACartErrors, + UpdateACartItemData, + UpdateACartItemErrors, + UpdateACartItemResponses, + UpdateACartResponses, + UpdateAnOrderData, + UpdateAnOrderErrors, + UpdateAnOrderResponses, + UpdateATaxItemData, + UpdateATaxItemResponses, + UpdateCartPaymentIntentData, + UpdateCartPaymentIntentResponses, + UpdateCustomDiscountForCartData, + UpdateCustomDiscountForCartItemData, + UpdateCustomDiscountForCartItemResponses, + UpdateCustomDiscountForCartResponses, + UpdateShippingGroupData, + UpdateShippingGroupErrors, + UpdateShippingGroupResponses, + UpdateTaxItemFromCartItemComponentData, + UpdateTaxItemFromCartItemComponentResponses, } from "./types.gen" -export const client = createClient(createConfig()) +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, + TResponse = unknown, +> = Options2 & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: keyof ClientMeta extends never ? Record : ClientMeta +} /** * Get Carts + * * Retrieves a list of carts. The carts returned depend on the authentication method used: * * | Authentication Method | Header | Returns | @@ -191,32 +215,22 @@ export const client = createClient(createConfig()) */ export const getCarts = ( options?: Options, -) => { - return (options?.client ?? client).get< - GetCartsResponse, - GetCartsError, +): RequestResult => + (options?.client ?? client).get< + GetCartsResponses, + GetCartsErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - querySerializer: { - array: { - explode: false, - style: "form", - }, - }, + querySerializer: { parameters: { include: { array: { explode: false } } } }, + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts", + ...options, }) -} /** * Create a Cart * + * * Creates a cart. Call this endpoint each time a customer creates a cart. * * Each shopper can have multiple carts. Use the carts API to create a cart. The carts are distinct from one another. Shoppers can add different items to their carts. They can check out one of the carts without affecting the content or status of their other carts. @@ -279,29 +293,24 @@ export const getCarts = ( */ export const createACart = ( options?: Options, -) => { - return (options?.client ?? client).post< - CreateACartResponse, - CreateACartError, +): RequestResult => + (options?.client ?? client).post< + CreateACartResponses, + CreateACartErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts", }) -} /** * Delete a Cart + * * You can delete a cart, including the items, name, description, and remove all associations. * * ### Errors @@ -323,25 +332,20 @@ export const createACart = ( */ export const deleteACart = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteACartResponse, - DeleteACartError, +): RequestResult => + (options.client ?? client).delete< + DeleteACartResponses, + DeleteACartErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}", + ...options, }) -} /** * Get a Cart + * * Use this endpoint to retrieve a specific cart. If a cart ID does not exist, a new cart will be automatically created. If the cart is associated with shipping groups, calling this endpoint displays the associated shipping group IDs in the `relationships` section. * * You can easily get a new or existing cart by providing the unique cart reference in the request. If the cart is associated with shipping groups, calling this endpoint displays the associated shipping group IDs in the relationships section. @@ -369,31 +373,21 @@ export const deleteACart = ( */ export const getACart = ( options: Options, -) => { - return (options?.client ?? client).get< - GetACartResponse, - GetACartError, +): RequestResult => + (options.client ?? client).get< + GetACartResponses, + GetACartErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - querySerializer: { - array: { - explode: false, - style: "form", - }, - }, + querySerializer: { parameters: { include: { array: { explode: false } } } }, + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}", + ...options, }) -} /** * Update a Cart + * * Updates cart properties for the specified cartID. * * You can update a cart to specify custom discounts. You can enable custom discounts when the `discount_settings.custom_discounts_enabled` field is set to `true`. Default is set from cart discount settings for the store. See [Cart Settings](/docs/api/carts/put-v-2-settings-cart). @@ -403,54 +397,48 @@ export const getACart = ( */ export const updateACart = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateACartResponse, - UpdateACartError, +): RequestResult => + (options.client ?? client).put< + UpdateACartResponses, + UpdateACartErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}", }) -} /** * Delete all Cart Items + * * A shopper can clean up their cart, deleting custom items, promotions, and so on, while the empty cart remains available. The cart id, name, description, and any account or customer associations persist. The shopper can continue to add items to the cart. * */ export const deleteAllCartItems = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteAllCartItemsResponse, - DeleteAllCartItemsError, +): RequestResult< + DeleteAllCartItemsResponses, + DeleteAllCartItemsErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteAllCartItemsResponses, + DeleteAllCartItemsErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/items", + ...options, }) -} /** * Get Cart Items * + * * Use this endpoint to retrieve cart items. If the cart is associated with shipping groups, calling this endpoint displays the associated shipping group IDs. * * You can use this endpoint to retrieve the breakdown of cart items by promotion ID. For example, if you have Promotions Standard item discount with code *sale2024*, Rule Promotions item discount with code *sale2024*, and Rule Promotions cart discount with code *sale2024*, the `discounts.constituents` field in the response example will show the breakdown of the same promotion code used in both Promotions Standard and Rule Promotions. @@ -633,32 +621,18 @@ export const deleteAllCartItems = ( */ export const getCartItems = ( options: Options, -) => { - return (options?.client ?? client).get< - GetCartItemsResponse, - unknown, - ThrowOnError - >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - querySerializer: { - array: { - explode: false, - style: "form", - }, - }, +): RequestResult => + (options.client ?? client).get({ + querySerializer: { parameters: { include: { array: { explode: false } } } }, + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/items", + ...options, }) -} /** * Add Items to Cart * + * * ### Add Product to Cart * * Adding a Product to Cart is the most common Cart action. If you want to add any custom products or promotions, you need to do that as a separate action. @@ -1034,29 +1008,24 @@ export const getCartItems = ( */ export const manageCarts = ( options: Options, -) => { - return (options?.client ?? client).post< - ManageCartsResponse, - ManageCartsError, +): RequestResult => + (options.client ?? client).post< + ManageCartsResponses, + ManageCartsErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/items", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/items", }) -} /** * Bulk Update Items in Cart + * * The bulk update feature allows shoppers to update an array of items to their cart in one action, rather than updating each item one at a time. Shoppers can update quantity and shipping group details in bulk requests. This minimizes the time for shoppers while updating items to their cart. Shoppers can even update multiple items with the same or different shipping groups to their cart. * * When you update multiple items that qualify for free gifts in the cart, the corresponding free gifts for all eligible products are also automatically updated in the cart. @@ -1064,221 +1033,209 @@ export const manageCarts = ( */ export const bulkUpdateItemsInCart = ( options: Options, -) => { - return (options?.client ?? client).put< - BulkUpdateItemsInCartResponse, - BulkUpdateItemsInCartError, +): RequestResult< + BulkUpdateItemsInCartResponses, + BulkUpdateItemsInCartErrors, + ThrowOnError +> => + (options.client ?? client).put< + BulkUpdateItemsInCartResponses, + BulkUpdateItemsInCartErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/items", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/items", }) -} /** * Delete a Cart Item + * * Use this endpoint to delete a cart item. */ export const deleteACartItem = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteACartItemResponse, +): RequestResult => + (options.client ?? client).delete< + DeleteACartItemResponses, unknown, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/items/{cartitemID}", + ...options, }) -} /** * Update a Cart Item + * * You can easily update a cart item. A successful update returns the cart items. */ export const updateACartItem = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateACartItemResponse, - UpdateACartItemError, +): RequestResult< + UpdateACartItemResponses, + UpdateACartItemErrors, + ThrowOnError +> => + (options.client ?? client).put< + UpdateACartItemResponses, + UpdateACartItemErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/items/{cartitemID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/items/{cartitemID}", }) -} /** * Delete Account Cart Association + * * You can delete an association between an account and a cart. */ export const deleteAccountCartAssociation = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteAccountCartAssociationResponse, - DeleteAccountCartAssociationError, +): RequestResult< + DeleteAccountCartAssociationResponses, + DeleteAccountCartAssociationErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteAccountCartAssociationResponses, + DeleteAccountCartAssociationErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/relationships/accounts", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/relationships/accounts", }) -} /** * Create an Account Cart Association + * * You can create associations between an account and one or more carts. After cart associations exist for an account, the account can access those carts across any device. */ export const createAccountCartAssociation = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).post< - CreateAccountCartAssociationResponse, - CreateAccountCartAssociationError, +): RequestResult< + CreateAccountCartAssociationResponses, + CreateAccountCartAssociationErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateAccountCartAssociationResponses, + CreateAccountCartAssociationErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/relationships/accounts", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/relationships/accounts", }) -} /** * Delete Customer Cart Association + * * You can delete an association between a customer and a cart. */ export const deleteCustomerCartAssociation = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteCustomerCartAssociationResponse, - DeleteCustomerCartAssociationError, +): RequestResult< + DeleteCustomerCartAssociationResponses, + DeleteCustomerCartAssociationErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteCustomerCartAssociationResponses, + DeleteCustomerCartAssociationErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/relationships/customers", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/relationships/customers", }) -} /** * Create a Customer Cart Association + * * You can create associations between a customer and one or more carts. After cart associations exist for a customer, the customer can access those carts across any device. */ export const createCustomerCartAssociation = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).post< - CreateCustomerCartAssociationResponse, - CreateCustomerCartAssociationError, +): RequestResult< + CreateCustomerCartAssociationResponses, + CreateCustomerCartAssociationErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateCustomerCartAssociationResponses, + CreateCustomerCartAssociationErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/relationships/customers", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/relationships/customers", }) -} /** * Delete a Promotion via Promotion Code + * * You can remove promotion code from a cart if it was applied manually. This endpoint does not work if the promotion is applied automatically. */ export const deleteAPromotionViaPromotionCode = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteAPromotionViaPromotionCodeResponse, +): RequestResult< + DeleteAPromotionViaPromotionCodeResponses, + unknown, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteAPromotionViaPromotionCodeResponses, unknown, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/discounts/{promoCode}", + ...options, }) -} /** * Add Tax Item to Cart * + * * Use this endpoint to add a tax item to a cart. * * :::note @@ -1290,30 +1247,29 @@ export const deleteAPromotionViaPromotionCode = < */ export const addTaxItemToCart = ( options: Options, -) => { - return (options?.client ?? client).post< - AddTaxItemToCartResponse, - AddTaxItemToCartError, +): RequestResult< + AddTaxItemToCartResponses, + AddTaxItemToCartErrors, + ThrowOnError +> => + (options.client ?? client).post< + AddTaxItemToCartResponses, + AddTaxItemToCartErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/items/{cartitemID}/taxes", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/items/{cartitemID}/taxes", }) -} /** * Add Tax Item to Bundle Component * + * * Use this endpoint to add a tax item to a specific bundle component (component product) within a cart item. * * :::note @@ -1327,30 +1283,29 @@ export const addTaxItemToCartItemComponent = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).post< - AddTaxItemToCartItemComponentResponse, - AddTaxItemToCartItemComponentError, +): RequestResult< + AddTaxItemToCartItemComponentResponses, + AddTaxItemToCartItemComponentErrors, + ThrowOnError +> => + (options.client ?? client).post< + AddTaxItemToCartItemComponentResponses, + AddTaxItemToCartItemComponentErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes", }) -} /** * Delete Tax Item from Bundle Component * + * * Use this endpoint to delete a tax item from a specific bundle component (component product) within a cart item. * */ @@ -1358,54 +1313,52 @@ export const deleteTaxItemFromCartItemComponent = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteTaxItemFromCartItemComponentResponse, - DeleteTaxItemFromCartItemComponentError, +): RequestResult< + DeleteTaxItemFromCartItemComponentResponses, + DeleteTaxItemFromCartItemComponentErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteTaxItemFromCartItemComponentResponses, + DeleteTaxItemFromCartItemComponentErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes/{taxitemID}", + ...options, }) -} /** * Update Tax Item on Bundle Component + * * Use this endpoint to update a tax item on a specific bundle component (component product) within a cart item. To change tax value from `rate` to `amount`, set `rate` to `null`, then set `amount` value and vice versa. */ export const updateTaxItemFromCartItemComponent = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).put< - UpdateTaxItemFromCartItemComponentResponse, +): RequestResult< + UpdateTaxItemFromCartItemComponentResponses, + unknown, + ThrowOnError +> => + (options.client ?? client).put< + UpdateTaxItemFromCartItemComponentResponses, unknown, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes/{taxitemID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/items/{cartitemID}/components/{productID}/taxes/{taxitemID}", }) -} /** * Bulk Delete Tax Items from Cart + * * Use this endpoint to bulk delete all tax items from all cart items and bundle component products in the cart. * * :::warning @@ -1441,25 +1394,24 @@ export const bulkDeleteTaxItemsFromCart = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).delete< - BulkDeleteTaxItemsFromCartResponse, - BulkDeleteTaxItemsFromCartError, +): RequestResult< + BulkDeleteTaxItemsFromCartResponses, + BulkDeleteTaxItemsFromCartErrors, + ThrowOnError +> => + (options.client ?? client).delete< + BulkDeleteTaxItemsFromCartResponses, + BulkDeleteTaxItemsFromCartErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/taxes", + ...options, }) -} /** * Bulk Add Tax Items to Cart + * * Use this endpoint to bulk add tax items to cart items and bundle component products. * * :::note @@ -1573,104 +1525,92 @@ export const bulkDeleteTaxItemsFromCart = < */ export const bulkAddTaxItemsToCart = ( options: Options, -) => { - return (options?.client ?? client).post< - BulkAddTaxItemsToCartResponse, - BulkAddTaxItemsToCartError, +): RequestResult< + BulkAddTaxItemsToCartResponses, + BulkAddTaxItemsToCartErrors, + ThrowOnError +> => + (options.client ?? client).post< + BulkAddTaxItemsToCartResponses, + BulkAddTaxItemsToCartErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/taxes", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/taxes", }) -} /** * Delete a Tax Item + * * Use this endpoint to delete a tax item. */ export const deleteATaxItem = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteATaxItemResponse, +): RequestResult => + (options.client ?? client).delete< + DeleteATaxItemResponses, unknown, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}", + ...options, }) -} /** * Update a Tax Item + * * Use this endpoint to update a tax item. To change tax value from `rate` to `amount`, set `rate` to `null`, then set `amount` value and vice versa. */ export const updateATaxItem = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateATaxItemResponse, +): RequestResult => + (options.client ?? client).put< + UpdateATaxItemResponses, unknown, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/items/{cartitemID}/taxes/{taxitemID}", }) -} /** * Bulk Delete Custom Discounts From Cart + * * Use this endpoint to bulk delete custom discounts from cart. */ export const bulkDeleteCustomDiscountsFromCart = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).delete< - BulkDeleteCustomDiscountsFromCartResponse, +): RequestResult< + BulkDeleteCustomDiscountsFromCartResponses, + unknown, + ThrowOnError +> => + (options.client ?? client).delete< + BulkDeleteCustomDiscountsFromCartResponses, unknown, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/custom-discounts", + ...options, }) -} /** * Bulk Add Custom Discounts to Cart + * * The default value for custom discounts on both the cart and cart items is set to 5 if this parameter is not configured in the store. To verify the custom discount limit value, call [Get all settings](/docs/api/settings/get-v-2-settings) endpoint. * * To increase the custom discount value, contact [Elastic Path Support team](https://support.elasticpath.com/hc/en-us). @@ -1682,291 +1622,276 @@ export const bulkAddCustomDiscountsToCart = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).post< - BulkAddCustomDiscountsToCartResponse, - BulkAddCustomDiscountsToCartError, +): RequestResult< + BulkAddCustomDiscountsToCartResponses, + BulkAddCustomDiscountsToCartErrors, + ThrowOnError +> => + (options.client ?? client).post< + BulkAddCustomDiscountsToCartResponses, + BulkAddCustomDiscountsToCartErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/custom-discounts", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/custom-discounts", }) -} /** * Delete Custom Discount From Cart + * * Use this endpoint to delete custom discount from cart. */ export const deleteCustomDiscountFromCart = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteCustomDiscountFromCartResponse, +): RequestResult< + DeleteCustomDiscountFromCartResponses, + unknown, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteCustomDiscountFromCartResponses, unknown, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}", + ...options, }) -} /** * Update Custom Discount For Cart + * * Use this endpoint to update a custom discount in your cart. */ export const updateCustomDiscountForCart = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).put< - UpdateCustomDiscountForCartResponse, +): RequestResult => + (options.client ?? client).put< + UpdateCustomDiscountForCartResponses, unknown, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/custom-discounts/{customdiscountID}", }) -} /** * Add Custom Discount To Cart Item + * * Use this endpoint to add a custom discount to cart item. Custom discounts cannot be combined with Elastic Path promotions. If the cart already contains Elastic Path promotions, remove them before adding custom discounts. */ export const addCustomDiscountToCartItem = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).post< - AddCustomDiscountToCartItemResponse, - AddCustomDiscountToCartItemError, +): RequestResult< + AddCustomDiscountToCartItemResponses, + AddCustomDiscountToCartItemErrors, + ThrowOnError +> => + (options.client ?? client).post< + AddCustomDiscountToCartItemResponses, + AddCustomDiscountToCartItemErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts", }) -} /** * Delete Custom Discount From Cart Item + * * Use this endpoint to delete custom discount from cart item. */ export const deleteCustomDiscountFromCartItem = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteCustomDiscountFromCartItemResponse, +): RequestResult< + DeleteCustomDiscountFromCartItemResponses, + unknown, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteCustomDiscountFromCartItemResponses, unknown, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}", + ...options, }) -} /** * Update Custom Discount For Cart Item + * * Use this endpoint to update a custom discount in your cart item. */ export const updateCustomDiscountForCartItem = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).put< - UpdateCustomDiscountForCartItemResponse, +): RequestResult< + UpdateCustomDiscountForCartItemResponses, + unknown, + ThrowOnError +> => + (options.client ?? client).put< + UpdateCustomDiscountForCartItemResponses, unknown, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/items/{cartitemID}/custom-discounts/{customdiscountID}", }) -} /** * Retrieve all shipping groups for a cart + * * Retrieve all shipping groups for a cart */ export const getShippingGroups = ( options: Options, -) => { - return (options?.client ?? client).get< - GetShippingGroupsResponse, - GetShippingGroupsError, +): RequestResult< + GetShippingGroupsResponses, + GetShippingGroupsErrors, + ThrowOnError +> => + (options.client ?? client).get< + GetShippingGroupsResponses, + GetShippingGroupsErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartID}/shipping-groups", + ...options, }) -} /** * Create a new shipping group for a cart + * * Create a new shipping group for a cart */ export const createShippingGroup = ( options: Options, -) => { - return (options?.client ?? client).post< - CreateShippingGroupResponse, - CreateShippingGroupError, +): RequestResult< + CreateShippingGroupResponses, + CreateShippingGroupErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateShippingGroupResponses, + CreateShippingGroupErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/shipping-groups", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/shipping-groups", }) -} /** * Delete Cart Shipping Group + * * Deletes a shipping group from a cart. You cannot delete a shipping group that is attached to cart items. * You must first remove the shipping group from all cart items before deleting the shipping group. * */ export const deleteCartShippingGroup = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteCartShippingGroupResponse, - DeleteCartShippingGroupError, +): RequestResult< + DeleteCartShippingGroupResponses, + DeleteCartShippingGroupErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteCartShippingGroupResponses, + DeleteCartShippingGroupErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}", + ...options, }) -} /** * Retrieve a specific shipping group for a cart + * * Retrieve a specific shipping group for a cart */ export const getShippingGroupById = ( options: Options, -) => { - return (options?.client ?? client).get< - GetShippingGroupByIdResponse, - GetShippingGroupByIdError, +): RequestResult< + GetShippingGroupByIdResponses, + GetShippingGroupByIdErrors, + ThrowOnError +> => + (options.client ?? client).get< + GetShippingGroupByIdResponses, + GetShippingGroupByIdErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}", + ...options, }) -} /** * Update a shipping group for a cart + * * Update a specific shipping group for a cart */ export const updateShippingGroup = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateShippingGroupResponse, - UpdateShippingGroupError, +): RequestResult< + UpdateShippingGroupResponses, + UpdateShippingGroupErrors, + ThrowOnError +> => + (options.client ?? client).put< + UpdateShippingGroupResponses, + UpdateShippingGroupErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartId}/shipping-groups/{shippingGroupId}", }) -} /** * Create Stripe Payment Intent for a Cart + * * The Cart Payment Intent feature enables the creation of a Stripe Payment Intent specifically tied to a shopping cart and its subsequent order. This allows Payment Intent users to track payment details from the cart stage and seamlessly maintain consistency in payment information throughout the order stage. Using these features, you can create Payment Intents for their carts, update Payment Intents with final cart details, and synchronize Payment Intents from Stripe to Commerce. * * :::note @@ -1995,56 +1920,46 @@ export const updateShippingGroup = ( */ export const createCartPaymentIntent = ( options: Options, -) => { - return (options?.client ?? client).post< - CreateCartPaymentIntentResponse, +): RequestResult => + (options.client ?? client).post< + CreateCartPaymentIntentResponses, unknown, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/payments", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/payments", }) -} /** * Update a Payment Intent on a Cart + * * Updates the payment information for a specific payment intent on a cart. */ export const updateCartPaymentIntent = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateCartPaymentIntentResponse, +): RequestResult => + (options.client ?? client).put< + UpdateCartPaymentIntentResponses, unknown, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/payments/{paymentIntentID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/payments/{paymentIntentID}", }) -} /** * Checkout API + * * When a Cart is ready for checkout, you can convert the cart to an order. The cart remains and can be modified and checked out again if required. * * A cart can be checked out with a customer ID, customer object, or with an account by authenticating with the `Client Credentials Token`. @@ -2101,29 +2016,24 @@ export const updateCartPaymentIntent = ( */ export const checkoutApi = ( options: Options, -) => { - return (options?.client ?? client).post< - CheckoutApiResponse, - CheckoutApiError, +): RequestResult => + (options.client ?? client).post< + CheckoutApiResponses, + CheckoutApiErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/carts/{cartID}/checkout", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/carts/{cartID}/checkout", }) -} /** * Get all Orders + * * This endpoint returns all orders with custom flow fields. The pagination offset is set to fetch a maximum of 10,000 orders. If the store has 10,000 orders, and you fetch the orders without using filters, an error is returned. Use a filter to view orders when the order is beyond the 10,000 mark. * * :::note @@ -2170,25 +2080,20 @@ export const checkoutApi = ( */ export const getCustomerOrders = ( options?: Options, -) => { - return (options?.client ?? client).get< - GetCustomerOrdersResponse, +): RequestResult => + (options?.client ?? client).get< + GetCustomerOrdersResponses, unknown, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/orders", + ...options, }) -} /** * Get an Order + * * Use this endpoint to retrieve a specific order. * * ### Includes @@ -2201,25 +2106,20 @@ export const getCustomerOrders = ( */ export const getAnOrder = ( options: Options, -) => { - return (options?.client ?? client).get< - GetAnOrderResponse, - GetAnOrderError, +): RequestResult => + (options.client ?? client).get< + GetAnOrderResponses, + GetAnOrderErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/orders/{orderID}", + ...options, }) -} /** * Update an Order + * * You can only update custom data, `shipping`, `shipping_address`, and status of orders. All other settings in the order object are immutable. * * This endpoint allows you to: @@ -2245,29 +2145,24 @@ export const getAnOrder = ( */ export const updateAnOrder = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateAnOrderResponse, - UpdateAnOrderError, +): RequestResult => + (options.client ?? client).put< + UpdateAnOrderResponses, + UpdateAnOrderErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/{orderID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/{orderID}", }) -} /** * Get Order Items + * * Use this endpoint to retrieve order items. * * ### Includes @@ -2280,25 +2175,18 @@ export const updateAnOrder = ( */ export const getOrderItems = ( options: Options, -) => { - return (options?.client ?? client).get< - GetOrderItemsResponse, - unknown, - ThrowOnError - >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/{orderID}/items", - }) -} +): RequestResult => + (options.client ?? client).get( + { + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/{orderID}/items", + ...options, + }, + ) /** * Anonymize Orders + * * You can anonymize an order when it is fulfilled, canceled, or fully refunded. * * When anonymization is successful, Personal Identifiable Information such as customer details, `shipping_address`, and `billing_address` are replaced with *. @@ -2306,53 +2194,47 @@ export const getOrderItems = ( */ export const anonymizeOrders = ( options?: Options, -) => { - return (options?.client ?? client).post< - AnonymizeOrdersResponse, - AnonymizeOrdersError, +): RequestResult< + AnonymizeOrdersResponses, + AnonymizeOrdersErrors, + ThrowOnError +> => + (options?.client ?? client).post< + AnonymizeOrdersResponses, + AnonymizeOrdersErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/anonymize", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/anonymize", }) -} /** * Confirm Order + * * Use this endpoint to confirm an order. Confirming an order finalizes it and makes it ready for processing. * */ export const confirmOrder = ( options: Options, -) => { - return (options?.client ?? client).post< - ConfirmOrderResponse, - ConfirmOrderError, +): RequestResult => + (options.client ?? client).post< + ConfirmOrderResponses, + ConfirmOrderErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/orders/{orderID}/confirm", + ...options, }) -} /** * Payments + * * Depending on the payment gateway, you may have access to different transaction types such as capturing funds immediately or authorizing them for later. For more information, see [Payments](/docs/api/carts/payments). * * The following types of payment methods are available depending on the payment gateway: @@ -2377,29 +2259,24 @@ export const confirmOrder = ( */ export const paymentSetup = ( options: Options, -) => { - return (options?.client ?? client).post< - PaymentSetupResponse, - PaymentSetupError, +): RequestResult => + (options.client ?? client).post< + PaymentSetupResponses, + PaymentSetupErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/{orderID}/payments", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/{orderID}/payments", }) -} /** * Confirm Payment + * * Confirm Payment serves as a mechanism to synchronize transaction information from the third-party payment provider back to our system. This ensures that Composable Commerce accurately reflects the values from the payment provider. * * ### Handling 3D Secure Validations for Stripe Payments @@ -2409,56 +2286,50 @@ export const paymentSetup = ( */ export const confirmPayment = ( options: Options, -) => { - return (options?.client ?? client).post< - ConfirmPaymentResponse, - ConfirmPaymentError, +): RequestResult => + (options.client ?? client).post< + ConfirmPaymentResponses, + ConfirmPaymentErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/{orderID}/transactions/{transactionID}/confirm", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/{orderID}/transactions/{transactionID}/confirm", }) -} /** * Capture a Transaction + * * Use this endpoint to capture a previously authorized payment. In this step, you can also pass in a custom reference, such as the payment reference from your chosen gateway. */ export const captureATransaction = ( options: Options, -) => { - return (options?.client ?? client).post< - CaptureATransactionResponse, - CaptureATransactionError, +): RequestResult< + CaptureATransactionResponses, + CaptureATransactionErrors, + ThrowOnError +> => + (options.client ?? client).post< + CaptureATransactionResponses, + CaptureATransactionErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/{orderID}/transactions/{transactionID}/capture", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/{orderID}/transactions/{transactionID}/capture", }) -} /** * Refund a Transaction + * * There are two ways to refund; through your payment gateway and mark it refunded in Commerce Manager, or directly through Commerce Manager or API. * * * Mark as Refunded: You can manually mark a transaction as refunded. Before you can mark the order as refunded, you need to handle the actual refund on your side with your payment provider. Mark as Refunded is a full refund made to the transaction. @@ -2473,75 +2344,68 @@ export const captureATransaction = ( */ export const refundATransaction = ( options: Options, -) => { - return (options?.client ?? client).post< - RefundATransactionResponse, - RefundATransactionError, +): RequestResult< + RefundATransactionResponses, + RefundATransactionErrors, + ThrowOnError +> => + (options.client ?? client).post< + RefundATransactionResponses, + RefundATransactionErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/{orderID}/transactions/{transactionID}/refund", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/{orderID}/transactions/{transactionID}/refund", }) -} /** * Get Order Transactions + * * Get order transactions */ export const getOrderTransactions = ( options: Options, -) => { - return (options?.client ?? client).get< - GetOrderTransactionsResponse, - GetOrderTransactionsError, +): RequestResult< + GetOrderTransactionsResponses, + GetOrderTransactionsErrors, + ThrowOnError +> => + (options.client ?? client).get< + GetOrderTransactionsResponses, + GetOrderTransactionsErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/orders/{orderID}/transactions", + ...options, }) -} /** * Get a Transaction + * * Retrieves a transaction */ export const getATransaction = ( options: Options, -) => { - return (options?.client ?? client).get< - GetATransactionResponse, +): RequestResult => + (options.client ?? client).get< + GetATransactionResponses, unknown, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/orders/{orderID}/transactions/{transactionID}", + ...options, }) -} /** * Cancel a Transaction + * * Use this endpoint to cancel or void a pending or authorized transaction. The transaction can be canceled or voided when it is in `pending` and `completed` statuses. * * :::caution @@ -2553,152 +2417,146 @@ export const getATransaction = ( */ export const cancelATransaction = ( options: Options, -) => { - return (options?.client ?? client).post< - CancelATransactionResponse, - CancelATransactionError, +): RequestResult< + CancelATransactionResponses, + CancelATransactionErrors, + ThrowOnError +> => + (options.client ?? client).post< + CancelATransactionResponses, + CancelATransactionErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/{orderID}/transactions/{transactionID}/cancel", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/{orderID}/transactions/{transactionID}/cancel", }) -} /** * Retrieve all shipping groups for an order + * * Retrieve all shipping groups for an order */ export const getOrderShippingGroups = ( options: Options, -) => { - return (options?.client ?? client).get< - GetOrderShippingGroupsResponse, - GetOrderShippingGroupsError, +): RequestResult< + GetOrderShippingGroupsResponses, + GetOrderShippingGroupsErrors, + ThrowOnError +> => + (options.client ?? client).get< + GetOrderShippingGroupsResponses, + GetOrderShippingGroupsErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/orders/{orderID}/shipping-groups", + ...options, }) -} /** * Create a shipping group for an order + * * Create a new shipping group for an order */ export const createOrderShippingGroup = ( options: Options, -) => { - return (options?.client ?? client).post< - CreateOrderShippingGroupResponse, - CreateOrderShippingGroupError, +): RequestResult< + CreateOrderShippingGroupResponses, + CreateOrderShippingGroupErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateOrderShippingGroupResponses, + CreateOrderShippingGroupErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/{orderID}/shipping-groups", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/{orderID}/shipping-groups", }) -} /** * Retrieve a specific shipping group for an order + * * Retrieve a specific shipping group for an order */ export const getShippingGroupsById = ( options: Options, -) => { - return (options?.client ?? client).get< - GetShippingGroupsByIdResponse, - GetShippingGroupsByIdError, +): RequestResult< + GetShippingGroupsByIdResponses, + GetShippingGroupsByIdErrors, + ThrowOnError +> => + (options.client ?? client).get< + GetShippingGroupsByIdResponses, + GetShippingGroupsByIdErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/orders/{orderID}/shipping-groups/{shippingGroupID}", + ...options, }) -} /** * Update a shipping group for an order + * * Update a shipping group for an order */ export const putShippingGroupById = ( options: Options, -) => { - return (options?.client ?? client).put< - PutShippingGroupByIdResponse, - PutShippingGroupByIdError, +): RequestResult< + PutShippingGroupByIdResponses, + PutShippingGroupByIdErrors, + ThrowOnError +> => + (options.client ?? client).put< + PutShippingGroupByIdResponses, + PutShippingGroupByIdErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/orders/{orderID}/shipping-groups/{shippingGroupID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/orders/{orderID}/shipping-groups/{shippingGroupID}", }) -} /** * Get Cart Settings + * * Retrieves cart settings. */ export const getV2SettingsCart = ( options?: Options, -) => { - return (options?.client ?? client).get< - GetV2SettingsCartResponse, - GetV2SettingsCartError, +): RequestResult< + GetV2SettingsCartResponses, + GetV2SettingsCartErrors, + ThrowOnError +> => + (options?.client ?? client).get< + GetV2SettingsCartResponses, + GetV2SettingsCartErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/settings/cart", + ...options, }) -} /** * Update Cart Settings + * * You can modify the cart expiry settings to set it to any number of days up to 365. Any existing carts default to the expiry of 7 days. To update cart settings in Commerce Manager, see [Updating Cart setting](/docs/commerce-manager/settings/general-settings#updating-cart-settings). * * With update cart settings endpoint, you can: @@ -2717,52 +2575,50 @@ export const getV2SettingsCart = ( */ export const putV2SettingsCart = ( options?: Options, -) => { - return (options?.client ?? client).put< - PutV2SettingsCartResponse, - PutV2SettingsCartError, +): RequestResult< + PutV2SettingsCartResponses, + PutV2SettingsCartErrors, + ThrowOnError +> => + (options?.client ?? client).put< + PutV2SettingsCartResponses, + PutV2SettingsCartErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/settings/cart", ...options, headers: { "Content-Type": "application/json", ...options?.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/settings/cart", }) -} /** * Get Cart Settings by Store ID + * * Retrieves cart settings for the specified store. */ export const getV2SettingsCartStoreId = ( options: Options, -) => { - return (options?.client ?? client).get< - GetV2SettingsCartStoreIdResponse, - GetV2SettingsCartStoreIdError, +): RequestResult< + GetV2SettingsCartStoreIdResponses, + GetV2SettingsCartStoreIdErrors, + ThrowOnError +> => + (options.client ?? client).get< + GetV2SettingsCartStoreIdResponses, + GetV2SettingsCartStoreIdErrors, ThrowOnError >({ - ...options, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], + security: [{ scheme: "bearer", type: "http" }], url: "/v2/settings/cart/{storeID}", + ...options, }) -} /** * Update Cart Settings by Store ID + * * You can modify the cart expiry settings to set it to any number of days up to 365. Any existing carts default to the expiry of 7 days. To update cart settings in Commerce Manager, see [Updating Cart setting](/docs/commerce-manager/settings/general-settings#updating-cart-settings). * * With update cart settings endpoint, you can: @@ -2781,23 +2637,21 @@ export const getV2SettingsCartStoreId = ( */ export const putV2SettingsCartStoreId = ( options: Options, -) => { - return (options?.client ?? client).put< - PutV2SettingsCartStoreIdResponse, - PutV2SettingsCartStoreIdError, +): RequestResult< + PutV2SettingsCartStoreIdResponses, + PutV2SettingsCartStoreIdErrors, + ThrowOnError +> => + (options.client ?? client).put< + PutV2SettingsCartStoreIdResponses, + PutV2SettingsCartStoreIdErrors, ThrowOnError >({ + security: [{ scheme: "bearer", type: "http" }], + url: "/v2/settings/cart/{storeID}", ...options, headers: { "Content-Type": "application/json", - ...options?.headers, + ...options.headers, }, - security: [ - { - scheme: "bearer", - type: "http", - }, - ], - url: "/v2/settings/cart/{storeID}", }) -} diff --git a/packages/sdks/cart-checkout-order/src/client/transformers.gen.ts b/packages/sdks/cart-checkout-order/src/client/transformers.gen.ts deleted file mode 100644 index d5dc23d6d..000000000 --- a/packages/sdks/cart-checkout-order/src/client/transformers.gen.ts +++ /dev/null @@ -1,286 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { - GetCartsResponse, - CreateACartResponse, - GetACartResponse, - UpdateACartResponse, - BulkUpdateItemsInCartResponse, - GetShippingGroupsResponse, - CreateShippingGroupResponse, - GetShippingGroupByIdResponse, - UpdateShippingGroupResponse, - CreateCartPaymentIntentResponse, - UpdateCartPaymentIntentResponse, - CheckoutApiResponse, - GetAnOrderResponse, - UpdateAnOrderResponse, - GetOrderItemsResponse, - GetOrderShippingGroupsResponse, - CreateOrderShippingGroupResponse, - GetShippingGroupsByIdResponse, - PutShippingGroupByIdResponse, -} from "./types.gen" - -const baseCartResponseSchemaResponseTransformer = (data: any) => { - if (data.snapshot_date) { - data.snapshot_date = new Date(data.snapshot_date) - } - return data -} - -const cartResponseSchemaResponseTransformer = (data: any) => { - data = baseCartResponseSchemaResponseTransformer(data) - return data -} - -const cartCollectionResponseSchemaResponseTransformer = (data: any) => { - data.data = data.data.map((item: any) => { - return cartResponseSchemaResponseTransformer(item) - }) - return data -} - -export const getCartsResponseTransformer = async ( - data: any, -): Promise => { - data = cartCollectionResponseSchemaResponseTransformer(data) - return data -} - -const condensedPromotionResponseSchemaResponseTransformer = (data: any) => { - if (data.start) { - data.start = new Date(data.start) - } - if (data.end) { - data.end = new Date(data.end) - } - return data -} - -const cartEntityResponseSchemaResponseTransformer = (data: any) => { - if (data.data) { - data.data = cartResponseSchemaResponseTransformer(data.data) - } - if (data.included) { - if (data.included.promotions) { - data.included.promotions = data.included.promotions.map((item: any) => { - return condensedPromotionResponseSchemaResponseTransformer(item) - }) - } - return data.included - } - return data -} - -export const createACartResponseTransformer = async ( - data: any, -): Promise => { - data = cartEntityResponseSchemaResponseTransformer(data) - return data -} - -export const getACartResponseTransformer = async ( - data: any, -): Promise => { - data = cartEntityResponseSchemaResponseTransformer(data) - return data -} - -export const updateACartResponseTransformer = async ( - data: any, -): Promise => { - data = cartEntityResponseSchemaResponseTransformer(data) - return data -} - -const cartItemCollectionResponseSchemaResponseTransformer = (data: any) => { - if (data.included) { - if (data.included.promotions) { - data.included.promotions = data.included.promotions.map((item: any) => { - if (item.end) { - item.end = new Date(item.end) - } - if (item.start) { - item.start = new Date(item.start) - } - return item - }) - } - return data.included - } - return data -} - -export const bulkUpdateItemsInCartResponseTransformer = async ( - data: any, -): Promise => { - data = cartItemCollectionResponseSchemaResponseTransformer(data) - return data -} - -const deliveryEstimateSchemaResponseTransformer = (data: any) => { - if (data.start) { - data.start = new Date(data.start) - } - if (data.end) { - data.end = new Date(data.end) - } - return data -} - -const shippingGroupResponseSchemaResponseTransformer = (data: any) => { - if (data.delivery_estimate) { - data.delivery_estimate = deliveryEstimateSchemaResponseTransformer( - data.delivery_estimate, - ) - } - if (data.created_at) { - data.created_at = new Date(data.created_at) - } - if (data.updated_at) { - data.updated_at = new Date(data.updated_at) - } - return data -} - -export const getShippingGroupsResponseTransformer = async ( - data: any, -): Promise => { - if (data.data) { - data.data = data.data.map((item: any) => { - return shippingGroupResponseSchemaResponseTransformer(item) - }) - } - return data -} - -const shippingGroupEntityResponseSchemaResponseTransformer = (data: any) => { - if (data.data) { - data.data = shippingGroupResponseSchemaResponseTransformer(data.data) - } - return data -} - -export const createShippingGroupResponseTransformer = async ( - data: any, -): Promise => { - data = shippingGroupEntityResponseSchemaResponseTransformer(data) - return data -} - -export const getShippingGroupByIdResponseTransformer = async ( - data: any, -): Promise => { - if (data.data) { - data.data = shippingGroupResponseSchemaResponseTransformer(data.data) - } - return data -} - -export const updateShippingGroupResponseTransformer = async ( - data: any, -): Promise => { - data = shippingGroupEntityResponseSchemaResponseTransformer(data) - return data -} - -export const createCartPaymentIntentResponseTransformer = async ( - data: any, -): Promise => { - data = cartEntityResponseSchemaResponseTransformer(data) - return data -} - -export const updateCartPaymentIntentResponseTransformer = async ( - data: any, -): Promise => { - data = cartEntityResponseSchemaResponseTransformer(data) - return data -} - -const orderEntityResponseSchemaResponseTransformer = (data: any) => { - if (data.included) { - if (data.included.promotions) { - data.included.promotions = data.included.promotions.map((item: any) => { - return condensedPromotionResponseSchemaResponseTransformer(item) - }) - } - return data.included - } - return data -} - -export const checkoutApiResponseTransformer = async ( - data: any, -): Promise => { - data = orderEntityResponseSchemaResponseTransformer(data) - return data -} - -export const getAnOrderResponseTransformer = async ( - data: any, -): Promise => { - data = orderEntityResponseSchemaResponseTransformer(data) - return data -} - -export const updateAnOrderResponseTransformer = async ( - data: any, -): Promise => { - data = orderEntityResponseSchemaResponseTransformer(data) - return data -} - -const orderItemCollectionResponseSchemaResponseTransformer = (data: any) => { - if (data.included) { - if (data.included.promotions) { - data.included.promotions = data.included.promotions.map((item: any) => { - return condensedPromotionResponseSchemaResponseTransformer(item) - }) - } - return data.included - } - return data -} - -export const getOrderItemsResponseTransformer = async ( - data: any, -): Promise => { - data = orderItemCollectionResponseSchemaResponseTransformer(data) - return data -} - -export const getOrderShippingGroupsResponseTransformer = async ( - data: any, -): Promise => { - if (data.data) { - data.data = data.data.map((item: any) => { - return shippingGroupResponseSchemaResponseTransformer(item) - }) - } - return data -} - -export const createOrderShippingGroupResponseTransformer = async ( - data: any, -): Promise => { - if (data.data) { - data.data = shippingGroupResponseSchemaResponseTransformer(data.data) - } - return data -} - -export const getShippingGroupsByIdResponseTransformer = async ( - data: any, -): Promise => { - data = shippingGroupEntityResponseSchemaResponseTransformer(data) - return data -} - -export const putShippingGroupByIdResponseTransformer = async ( - data: any, -): Promise => { - data = shippingGroupEntityResponseSchemaResponseTransformer(data) - return data -} diff --git a/packages/sdks/cart-checkout-order/src/client/types.gen.ts b/packages/sdks/cart-checkout-order/src/client/types.gen.ts index e003da1e7..26859d1b0 100644 --- a/packages/sdks/cart-checkout-order/src/client/types.gen.ts +++ b/packages/sdks/cart-checkout-order/src/client/types.gen.ts @@ -1,5 +1,15 @@ // This file is auto-generated by @hey-api/openapi-ts +export type ClientOptions = { + baseUrl: + | "https://useast.api.elasticpath.com" + | "https://euwest.api.elasticpath.com" + | (string & {}) +} + +/** + * CartContact + */ export type CartContact = { /** * The email address attached to a cart. @@ -7,6 +17,9 @@ export type CartContact = { email?: string } +/** + * DiscountSettings + */ export type DiscountSettings = { /** * This parameter enables custom discounts for a cart. When set to true and `use_rule_promotions` is not enabled, Elastic Path promotions will not be applied to the new carts. Default is set from cart discount settings for the store. See [Cart Settings](/docs/api/carts/put-v-2-settings-cart). @@ -18,6 +31,9 @@ export type DiscountSettings = { use_rule_promotions?: boolean } +/** + * InventorySettings + */ export type InventorySettings = { /** * This parameter enables deferring inventory checks on the cart. This allows items to be added to or updating in the cart without checking stock levels. Inventory checks are still performed as normal on checkout @@ -25,6 +41,9 @@ export type InventorySettings = { defer_inventory_check?: boolean } +/** + * ItemSettings + */ export type ItemSettings = { /** * When set to true, cart items with the same SKU but different locations are kept as separate line items instead of being merged. When false (default), items with the same SKU are merged and the location is updated to the most recent value. @@ -33,11 +52,8 @@ export type ItemSettings = { } /** - * The type of the custom attribute value. - */ -export type Type = "string" | "integer" | "boolean" | "float" - -/** + * CustomAttributes + * * Specifies custom attributes for cart or order objects. Each attribute includes a top-level key, as well as corresponding type and value entries. Attribute values must correspond to the assigned types. * * Example: @@ -64,10 +80,13 @@ export type CustomAttributes = { /** * The value of the custom attribute. */ - value: number + value: string | boolean | number } } +/** + * FormattedPriceData + */ export type FormattedPriceData = { /** * The raw total. @@ -99,6 +118,8 @@ export type CartTimestamps = { } /** + * RelationshipItem + * * Relationship data entry */ export type RelationshipItem = { @@ -113,6 +134,8 @@ export type RelationshipItem = { } /** + * RelationshipArray + * * Array of relationships */ export type RelationshipArray = { @@ -122,6 +145,9 @@ export type RelationshipArray = { data?: Array } +/** + * BaseCartResponse + */ export type BaseCartResponse = { /** * The unique identifier for the cart. Use SDK or create it yourself. @@ -147,7 +173,7 @@ export type BaseCartResponse = { /** * The snapshot date for the cart. */ - snapshot_date?: Date + snapshot_date?: string links?: { /** * A link to that specific resource. @@ -189,13 +215,7 @@ export type BaseCartResponse = { * Array of target SKUs */ targets?: Array - [key: string]: - | unknown - | boolean - | string - | number - | Array - | undefined + [key: string]: unknown }> code?: string info?: string @@ -227,6 +247,9 @@ export type BaseCartResponse = { } } +/** + * CartResponse + */ export type CartResponse = BaseCartResponse & { /** * The type of object being returned. @@ -302,7 +325,7 @@ export type ResponseErrorItem = { /** * The HTTP response code of the error. */ - status: number + status: string | number /** * Optional additional detail about the error. */ @@ -372,6 +395,9 @@ export type ResponseErrorResponse = { errors: Array } +/** + * CartsRequest + */ export type CartsRequest = { data?: { /** @@ -426,6 +452,9 @@ export type CartsRequest = { } } +/** + * CustomDiscountResponse + */ export type CustomDiscountResponse = { /** * Specifies the type of the resource. Always `custom_discount`. @@ -472,6 +501,9 @@ export type CustomDiscountResponse = { } } +/** + * CondensedPromotionResponse + */ export type CondensedPromotionResponse = { /** * Specifies the type of the resource. Always `promotion`. @@ -504,11 +536,11 @@ export type CondensedPromotionResponse = { /** * The start date and time of the promotion. */ - start?: Date + start?: string /** * The end date and time of the promotion. */ - end?: Date + end?: string } export type CartEntityResponse = { @@ -537,6 +569,9 @@ export type CartEntityResponse = { errors?: Array } +/** + * Order Price Data + */ export type ItemPriceData = { /** * The amount for this item as an integer. @@ -595,6 +630,9 @@ export type Discount = { promotion_action_id?: string } +/** + * CartItemFormattedPriceData + */ export type CartItemFormattedPriceData = { /** * The amount per each single unit. @@ -618,10 +656,8 @@ export type Timestamps = { } /** - * The source of the promotion (for promotion items). + * Cart Item Response */ -export type PromotionSource = "rule-promotion" - export type CartItemResponse = { /** * The unique identifier for the cart item. @@ -630,7 +666,11 @@ export type CartItemResponse = { /** * The type of cart item. */ - type?: "cart_item" | "custom_item" | "subscription_item" | "promotion_item" + readonly type?: + | "cart_item" + | "custom_item" + | "subscription_item" + | "promotion_item" /** * The unique ID of the product (for cart_item type). */ @@ -756,11 +796,11 @@ export type CartItemResponse = { /** * The unit price of the item. */ - unit_price?: ItemPriceData + readonly unit_price?: ItemPriceData /** * The total price of the item (i.e., unit * quantity). */ - value?: ItemPriceData + readonly value?: ItemPriceData /** * Array of discounts applied to the cart item. */ @@ -875,7 +915,7 @@ export type CartItemResponse = { /** * The source of the promotion (for promotion items). */ - promotion_source?: "rule-promotion" + readonly promotion_source?: "rule-promotion" /** * The action ID within the rule promotion that produced this promotion item. */ @@ -887,9 +927,12 @@ export type CartItemResponse = { /** * Custom attributes attached to the cart item. */ - custom_attributes?: CustomAttributes + readonly custom_attributes?: CustomAttributes } +/** + * TaxItemResponse + */ export type TaxItemResponse = { /** * Specifies the type of the resource. Always `tax_item`. @@ -931,7 +974,7 @@ export type CartItemCollectionResponse = { promotions?: Array<{ automatic?: boolean description?: string - end?: Date + end?: string id?: string name?: string promotion_type?: string @@ -939,7 +982,7 @@ export type CartItemCollectionResponse = { * The source of the promotion */ promotion_source?: string - start?: Date + start?: string type?: "promotion" }> /** @@ -1019,13 +1062,7 @@ export type CartItemCollectionResponse = { * Array of target SKUs */ targets?: Array - [key: string]: - | unknown - | boolean - | string - | number - | Array - | undefined + [key: string]: unknown }> code?: string info?: string @@ -1060,6 +1097,9 @@ export type CartItemCollectionResponse = { errors?: Array } +/** + * Bulk Update Carts Items (Common Properties) + */ export type BulkUpdateCartsItemsCommon = { /** * Specifies the ID of the cart item that you want to update in cart. @@ -1089,23 +1129,35 @@ export type BulkUpdateCartsItemsCommon = { shipping_group_id?: string } +/** + * Update Cart Item Quantity + */ export type BulkUpdateCartsItemsWithQuantity = BulkUpdateCartsItemsCommon & { quantity: unknown id: unknown } +/** + * Update Cart Item Shipping Group + */ export type BulkUpdateCartsItemsWithShippingGroup = BulkUpdateCartsItemsCommon & { shipping_group_id: unknown id: unknown } +/** + * Update Cart Item Custom Inputs + */ export type BulkUpdateCartsItemsWithCustomInputs = BulkUpdateCartsItemsCommon & { custom_inputs: unknown id: unknown } +/** + * Update All Or Nothing Options Object + */ export type UpdateAllOrNothingOptionsObject = { /** * When set to`true`, if an error occurs for any item, no items are updated in the cart. When set to `false`, valid items are updated in the cart and the items with errors are reported in the response. Default is `true`. @@ -1113,6 +1165,9 @@ export type UpdateAllOrNothingOptionsObject = { update_all_or_nothing?: boolean } +/** + * Bulk Update Carts Items + */ export type BulkUpdateCartsItems = { data?: Array< | BulkUpdateCartsItemsWithQuantity @@ -1122,6 +1177,9 @@ export type BulkUpdateCartsItems = { options?: UpdateAllOrNothingOptionsObject } +/** + * Base Item Object Data + */ export type BaseItemObjectData = { /** * The number of items to add. @@ -1171,6 +1229,9 @@ export type BaseItemObjectData = { custom_attributes?: CustomAttributes } +/** + * Cart Item Object Data + */ export type CartItemObjectData = { /** * The type of object being returned. Must be `cart_item` for cart items. @@ -1178,10 +1239,16 @@ export type CartItemObjectData = { type: "cart_item" } & BaseItemObjectData +/** + * Cart Item Object Request + */ export type CartItemObjectRequest = { data?: CartItemObjectData } +/** + * Subscription Item Object Data + */ export type SubscriptionItemObjectData = { /** * The type of object being returned. @@ -1205,16 +1272,23 @@ export type SubscriptionItemObjectData = { pricing_option: string /** * The ID of the plan within the offering to use for the subscription. + * * @deprecated */ plan: string } } +/** + * Subscription Item Object + */ export type SubscriptionItemObject = { data?: SubscriptionItemObjectData & CartItemResponse } +/** + * Cart Merge Object + */ export type CartMergeObject = { /** * The type of object being returned. Must be `cart_items`. @@ -1226,6 +1300,9 @@ export type CartMergeObject = { cart_id: string } +/** + * Add All Or Nothing Options Object + */ export type AddAllOrNothingOptionsObject = { /** * When `true`, if an error occurs for any item, no items are added to the cart. When `false`, valid items are added to the cart and the items with errors are reported in the response. Default is `false`. @@ -1233,11 +1310,17 @@ export type AddAllOrNothingOptionsObject = { add_all_or_nothing?: boolean } +/** + * Cart Merge Object Request + */ export type CartMergeObjectRequest = { data?: CartMergeObject options?: AddAllOrNothingOptionsObject } +/** + * Custom Item Object Data + */ export type CustomItemObjectData = { /** * The type of object being returned. Must be `custom_item`. @@ -1282,10 +1365,16 @@ export type CustomItemObjectData = { custom_attributes?: CustomAttributes } +/** + * Custom Item Object + */ export type CustomItemObject = { data?: CustomItemObjectData } +/** + * Re Order Object + */ export type ReOrderObject = { /** * The type of resource being returned. Use `order_items`. @@ -1297,11 +1386,17 @@ export type ReOrderObject = { order_id: string } +/** + * Re-Order Object Request + */ export type ReOrderObjectRequest = { data?: ReOrderObject options?: AddAllOrNothingOptionsObject } +/** + * Promotion Item Object Data + */ export type PromotionItemObjectData = { /** * Specifies the type of resource, which is `promotion_item`. @@ -1313,10 +1408,16 @@ export type PromotionItemObjectData = { code: string } +/** + * Promotion Item Object + */ export type PromotionItemObject = { data?: PromotionItemObjectData } +/** + * Bulk Add Items Request + */ export type BulkAddItemsRequest = { data?: Array< | CartItemObjectData @@ -1328,6 +1429,9 @@ export type BulkAddItemsRequest = { options?: AddAllOrNothingOptionsObject } +/** + * Update Carts Items + */ export type UpdateCartsItems = { data?: { /** @@ -1359,6 +1463,9 @@ export type UpdateCartsItems = { } } +/** + * Carts Relationships Accounts Data + */ export type CartsRelationshipsAccountsData = { data?: Array<{ /** @@ -1372,6 +1479,9 @@ export type CartsRelationshipsAccountsData = { }> } +/** + * Carts Relationships Customers Data + */ export type CartsRelationshipsCustomersData = { data?: Array<{ /** @@ -1418,6 +1528,9 @@ export type CartsItemsTaxesCommon = { readonly id?: string } +/** + * Tax Object (With Rate) + */ export type CartsItemsTaxesWithRate = CartsItemsTaxesCommon & { /** * The tax rate as a decimal (12.5% -> 0.125). Required when using rate-based taxation. @@ -1431,6 +1544,9 @@ export type CartsItemsTaxesWithRate = CartsItemsTaxesCommon & { amount?: number } +/** + * Tax Object (With Amount) + */ export type CartsItemsTaxesWithAmount = CartsItemsTaxesCommon & { /** * The tax as an absolute amount in the smallest currency unit (e.g., $10 -> 1000). Required when using amount-based taxation. @@ -1445,6 +1561,8 @@ export type CartsItemsTaxesWithAmount = CartsItemsTaxesCommon & { } /** + * Carts Items Taxes Object + * * A tax item that can be applied to cart items or bundle components. You must specify either a rate (percentage) or an amount (fixed value), but not both. * */ @@ -1456,6 +1574,9 @@ export type CartItemTaxesEntityResponse = { data: CartsItemsTaxesObject } +/** + * CartItemRelationship + */ export type CartItemRelationship = { relationships?: { item: { @@ -1473,12 +1594,31 @@ export type CartItemRelationship = { } } +/** + * CartsBulkTaxes + */ export type CartsBulkTaxes = { - data?: Array + data?: Array< + CartsItemsTaxesObject & + CartItemRelationship & { + /** + * Targets the tax item at a component product of the bundle the cart item holds, instead of at the cart item itself. + */ + meta?: { + /** + * The product ID of the bundle component the tax item applies to. + */ + component_product_id?: string + } + } + > errors?: Array options?: AddAllOrNothingOptionsObject } +/** + * CartsCustomDiscountsObject + */ export type CartsCustomDiscountsObject = { amount: | number @@ -1527,6 +1667,9 @@ export type CartsCustomDiscountsObject = { } } +/** + * CustomDiscountRelationshipsCartItemRequest + */ export type CustomDiscountRelationshipsCartItemRequest = { relationships?: { item?: { @@ -1544,14 +1687,23 @@ export type CustomDiscountRelationshipsCartItemRequest = { } } +/** + * CartItemBulkCustomDiscountObject + */ export type CartItemBulkCustomDiscountObject = CartsCustomDiscountsObject & CustomDiscountRelationshipsCartItemRequest +/** + * CartsBulkCustomDiscounts + */ export type CartsBulkCustomDiscounts = { data?: Array options?: AddAllOrNothingOptionsObject } +/** + * CartsBulkCustomDiscountsResponse + */ export type CartsBulkCustomDiscountsResponse = { data?: CartsCustomDiscountsObject /** @@ -1560,6 +1712,9 @@ export type CartsBulkCustomDiscountsResponse = { errors?: Array } +/** + * CartsBulkCustomDiscountsCollectionResponse + */ export type CartsBulkCustomDiscountsCollectionResponse = { data?: Array /** @@ -1568,6 +1723,9 @@ export type CartsBulkCustomDiscountsCollectionResponse = { errors?: Array } +/** + * CartsCustomDiscountsResponse + */ export type CartsCustomDiscountsResponseObject = { amount?: { /** @@ -1624,7 +1782,7 @@ export type CartsCustomDiscountsResponseObject = { } export type CartsCustomDiscountsEntityRequest = { - data?: CartsCustomDiscountsResponseObject + data?: CartsCustomDiscountsUpdateObject } export type CartsCustomDiscountsEntityResponse = { @@ -1682,6 +1840,9 @@ export type AddressCommon = { region?: string } +/** + * Address with Region + */ export type AddressWithRegion = AddressCommon & { /** * State, province, or region of the address. @@ -1689,6 +1850,9 @@ export type AddressWithRegion = AddressCommon & { region: string } +/** + * Address with County + */ export type AddressWithCounty = AddressCommon & { /** * County of the address. @@ -1697,6 +1861,8 @@ export type AddressWithCounty = AddressCommon & { } /** + * ShippingAddress + * * Shipping address information. You must specify at least one of region (state/province) or county. * */ @@ -1712,11 +1878,13 @@ export type ShippingAddress = (AddressWithRegion | AddressWithCounty) & { } export type DeliveryEstimate = { - start?: Date - end?: Date + start?: string + end?: string } /** + * SingleRelationship + * * Single relationship */ export type SingleRelationship = { @@ -1733,6 +1901,9 @@ export type ShippingPriceResponse = { discount?: FormattedPriceData } +/** + * NonNegativeFormattedPriceData + */ export type NonNegativeFormattedPriceData = { /** * The raw total. Must be non-negative. @@ -1748,6 +1919,9 @@ export type NonNegativeFormattedPriceData = { formatted?: string } +/** + * DiscountFormattedPriceData + */ export type DiscountFormattedPriceData = { /** * The discount amount. Must be non-positive (zero or negative). @@ -1784,6 +1958,9 @@ export type ShippingGroupMeta = { total_display_price?: OrderPriceWrapperMeta } +/** + * Shipping Group Response + */ export type ShippingGroupResponse = { type?: "shipping_group" id?: string @@ -1798,8 +1975,8 @@ export type ShippingGroupResponse = { external_ref?: string address?: ShippingAddress delivery_estimate?: DeliveryEstimate - created_at?: Date - updated_at?: Date + created_at?: string + updated_at?: string relationships?: { cart?: SingleRelationship order?: SingleRelationship @@ -1836,6 +2013,9 @@ export type CreateShippingGroupRequest = { } } +/** + * OrderPriceData + */ export type OrderPriceData = { /** * The amount for this item. @@ -1851,6 +2031,9 @@ export type OrderPriceData = { includes_tax?: boolean } +/** + * DiscountData + */ export type DiscountData = { amount?: OrderPriceData code?: string @@ -1873,11 +2056,17 @@ export type DiscountData = { promotion_action_id?: string } +/** + * OrderItemFormattedUnitPriceData + */ export type OrderItemFormattedUnitPriceData = { unit?: FormattedPriceData value?: FormattedPriceData } +/** + * OrderItemResponse + */ export type OrderItemResponse = { /** * The type represents the object being returned. @@ -2060,7 +2249,7 @@ export type OrderItemResponse = { /** * Custom attributes attached to the order item. */ - custom_attributes?: CustomAttributes + readonly custom_attributes?: CustomAttributes /** * The shipping group ID for the order item */ @@ -2121,27 +2310,9 @@ export type UpdateCartShippingGroupRequest = { } } -export type Gateway = - | "adyen" - | "authorize_net" - | "braintree" - | "card_connect" - | "cyber_source" - | "elastic_path_payments_stripe" - | "manual" - | "paypal_express_checkout" - | "stripe" - | "stripe_payment_intents" - /** - * Specifies the transaction method, such as `purchase` or `authorize`. + * Data.BasePayments */ -export type Method = - | "authorize" - | "purchase" - | "purchase_setup" - | "authorize_setup" - export type DataBasePayments = { gateway: | "adyen" @@ -2164,6 +2335,9 @@ export type DataBasePayments = { amount?: number } +/** + * Elastic Path Payments Powered By Stripe + */ export type ElasticPathPaymentsPoweredByStripePayment = { data?: DataBasePayments & { /** @@ -2196,6 +2370,9 @@ export type ElasticPathPaymentsPoweredByStripePayment = { } } +/** + * Cart Payment Update + */ export type CartPaymentUpdate = { data: { gateway: string @@ -2209,11 +2386,16 @@ export type CartPaymentUpdate = { } /** + * BillingAddress + * * Billing address information. You must specify at least one of region (state/province) or county. * */ export type BillingAddress = AddressWithRegion | AddressWithCounty +/** + * Customer Checkout + */ export type CustomerCheckout = { data?: { /** @@ -2243,6 +2425,9 @@ export type CustomerCheckout = { } } +/** + * Account Checkout + */ export type AccountCheckout = { data?: { /** @@ -2293,6 +2478,9 @@ export type OrderTimestamps = { fully_paid_at?: string } +/** + * OrderMeta + */ export type OrderMeta = { timestamps?: OrderTimestamps /** @@ -2316,6 +2504,9 @@ export type OrderMeta = { is_manual?: boolean } +/** + * Contact + */ export type Contact = { /** * The email address of the contact. @@ -2327,6 +2518,9 @@ export type Contact = { name?: string } +/** + * Customer + */ export type Customer = { /** * The name of the customer. @@ -2343,26 +2537,8 @@ export type Customer = { } /** - * Specifies the status of the order, such as `incomplete`, `complete`, `processing`, or `cancelled`. - */ -export type Status = "complete" | "incomplete" | "cancelled" | "processing" - -/** - * Specifies the status of the payment, such as `unpaid`, `authorized`, `paid`, or `refunded`. - */ -export type Payment = - | "authorized" - | "paid" - | "unpaid" - | "refunded" - | "partially_paid" - | "partially_authorized" - -/** - * Specifies the status of the shipment, such as `fulfilled` or `unfulfilled`. + * OrderResponse */ -export type Shipping = "unfulfilled" | "fulfilled" - export type OrderResponse = { /** * Specifies the type of object being returned. You must use `order`. @@ -2426,6 +2602,9 @@ export type OrderResponse = { } } +/** + * OrderEntityResponse + */ export type OrderEntityResponse = { data?: OrderResponse /** @@ -2467,6 +2646,9 @@ export type OrderCollectionResponse = { meta?: ResponseMetaOrders } +/** + * OrdersAddressData + */ export type OrdersAddressData = { /** * The type of the resource. You must use "order". @@ -2536,6 +2718,9 @@ export type OrdersAddressData = { } } +/** + * OrdersCancelData + */ export type OrdersCancelData = { /** * The status of the order. You can only update the status to `cancelled`. @@ -2551,6 +2736,9 @@ export type OrdersCancelData = { external_ref?: string } +/** + * OrdersFulfilledData + */ export type OrdersFulfilledData = { /** * The shipping status of the order. You can only update the shipping status to `fulfilled`. @@ -2566,6 +2754,9 @@ export type OrdersFulfilledData = { external_ref?: string } +/** + * OrdersUpdateRequest + */ export type OrdersUpdateRequest = { data?: OrdersAddressData | OrdersCancelData | OrdersFulfilledData } @@ -2592,6 +2783,9 @@ export type OrderItemCollectionResponse = { } } +/** + * OrdersAnonymizeData + */ export type OrdersAnonymizeData = { /** * The unique identifiers of the orders to be anonymized. You can anonymize multiple orders at the same time. @@ -2599,6 +2793,9 @@ export type OrdersAnonymizeData = { order_ids?: Array } +/** + * OrdersAnonymizeRequest + */ export type OrdersAnonymizeRequest = { data?: OrdersAnonymizeData } @@ -2608,6 +2805,8 @@ export type OrdersListResponse = { } /** + * FailureDetails + * * Non-PII payment failure information from the payment gateway. Only present on failed transactions where the gateway provided structured failure details. */ export type FailureDetails = { @@ -2622,20 +2821,8 @@ export type FailureDetails = { } /** - * The type of transaction, such as `purchase`, `capture`, `authorize` or `refund`. - */ -export type TransactionType = "purchase" | "authorize" | "capture" | "refund" - -/** - * The mechanism used for capturing the transaction. + * TransactionResponse */ -export type CaptureMechanism = "automatic" | "manual" - -/** - * The mechanism used for refunding the transaction. - */ -export type RefundMechanism = "automatic" | "manual" - export type TransactionResponse = { /** * The ID of the transaction. @@ -2767,6 +2954,9 @@ export type TransactionEntityResponse = { data: TransactionResponse } +/** + * Data.AdyenPayment + */ export type DataAdyenPayment = DataBasePayments & { /** * Specifies the gateway. You must use `adyen`. @@ -2788,6 +2978,9 @@ export type DataAdyenPayment = DataBasePayments & { payment: string } +/** + * Data.AuthorizeNetPayment + */ export type DataAuthorizeNetPayment = DataBasePayments & { /** * Specifies the gateway. You must use `authorize_net`. @@ -2805,6 +2998,9 @@ export type DataAuthorizeNetPayment = DataBasePayments & { payment: string } +/** + * Data.BraintreePayment + */ export type DataBraintreePayment = DataBasePayments & { /** * Specifies the gateway. You must use `braintree`. @@ -2816,6 +3012,9 @@ export type DataBraintreePayment = DataBasePayments & { payment: string } +/** + * Data.CardConnectPayment + */ export type DataCardConnectPayment = DataBasePayments & { /** * Specifies the gateway. You must use `card_connect`. @@ -2827,6 +3026,9 @@ export type DataCardConnectPayment = DataBasePayments & { payment: string } +/** + * Data.CyberSourcePayment + */ export type DataCyberSourcePayment = DataBasePayments & { /** * Specifies the gateway. You must use `cyber_source`. @@ -2838,6 +3040,9 @@ export type DataCyberSourcePayment = DataBasePayments & { payment: string } +/** + * Data.ManualPayment + */ export type DataManualPayment = DataBasePayments & { /** * Specifies the type of payment gateway. You must use `manual`. @@ -2855,6 +3060,9 @@ export type DataManualPayment = DataBasePayments & { } } +/** + * Data.PayPalExpressCheckoutPayment + */ export type DataPayPalExpressCheckoutPayment = DataBasePayments & { /** * Specifies the type of payment gateway. You must use `paypal_express_checkout`. @@ -2902,6 +3110,9 @@ export type DataPayPalExpressCheckoutPayment = DataBasePayments & { } } +/** + * Data.StripePayment + */ export type DataStripePayment = DataBasePayments & { /** * Specifies the type of payment gateway. You must use `stripe`. @@ -2919,6 +3130,9 @@ export type DataStripePayment = DataBasePayments & { payment?: string } +/** + * Data.StripePaymentIntentsPayment + */ export type DataStripePaymentIntentsPayment = DataBasePayments & { /** * Specifies the type of payment gateway. You must use `stripe_payment_intents`. @@ -2948,16 +3162,25 @@ export type DataPaymentObject = | DataStripePayment | DataStripePaymentIntentsPayment +/** + * PaymentsRequest + */ export type PaymentsRequest = { data?: DataPaymentObject } +/** + * OrdersTransactionsConfirmRequest + */ export type OrdersTransactionsConfirmRequest = { data?: { [key: string]: unknown } } +/** + * OrdersTransactionsCaptureRequest + */ export type OrdersTransactionsCaptureRequest = { data?: { options?: { @@ -2967,6 +3190,9 @@ export type OrdersTransactionsCaptureRequest = { } } +/** + * OrdersTransactionsRefundRequest + */ export type OrdersTransactionsRefundRequest = { data?: { /** @@ -2990,6 +3216,9 @@ export type ResponseData = { data?: unknown } +/** + * OrdersTransactionsCancelRequest + */ export type OrdersTransactionsCancelRequest = { data?: { options?: { @@ -3062,6 +3291,9 @@ export type SettingsCart = { } } +/** + * Carts Response + */ export type CartsResponse = { data?: Array< | CartItemObject @@ -3088,6 +3320,9 @@ export type CartsResponse = { } } +/** + * Cart Items Response + */ export type CartItemsResponse = { data?: Array< | CartItemObject @@ -3097,8 +3332,14 @@ export type CartItemsResponse = { > } +/** + * Cart Item Object + */ export type CartItemObject = CartItemObjectData & CartItemResponse +/** + * Data.StripeConnectPayment + */ export type DataStripeConnectPayment = DataBasePayments & { /** * Specifies the type of payment gateway. You must use `stripe_connect`. @@ -3116,6 +3357,43 @@ export type DataStripeConnectPayment = DataBasePayments & { payment?: string } +/** + * CartsCustomDiscountsUpdateObject + */ +export type CartsCustomDiscountsUpdateObject = { + /** + * Specifies an amount to be applied for the custom discount, in the currency's smallest unit. It must be less than zero. + */ + amount?: number + /** + * Specifies a description for the custom discount. + */ + description?: string + /** + * Specifies the discount code used for the custom discount. + */ + discount_code?: string + /** + * Specifies from where the custom discount is applied. For example, Talon.one. + */ + discount_engine?: string + /** + * Specifies an external id for the custom discount. + */ + external_id?: string + /** + * Specifies the type of the resource. Always `custom_discount`. + */ + type: "custom_discount" +} + +/** + * CartsCustomDiscountsCreateRequest + */ +export type CartsCustomDiscountsCreateRequest = { + data: CartsCustomDiscountsObject +} + export type GetCartsData = { body?: never headers?: { @@ -4152,7 +4430,7 @@ export type UpdateCustomDiscountForCartResponse = UpdateCustomDiscountForCartResponses[keyof UpdateCustomDiscountForCartResponses] export type AddCustomDiscountToCartItemData = { - body?: CartsCustomDiscountsObject + body?: CartsCustomDiscountsCreateRequest path: { /** * Specifies the ID for the cart. @@ -5017,8 +5295,8 @@ export type CreateOrderShippingGroupData = { instructions?: string } delivery_estimate?: { - start?: Date - end?: Date + start?: string + end?: string } } } diff --git a/packages/sdks/cart-checkout-order/src/client/zod.gen.ts b/packages/sdks/cart-checkout-order/src/client/zod.gen.ts new file mode 100644 index 000000000..86c787659 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/client/zod.gen.ts @@ -0,0 +1,2859 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { z } from "zod" + +/** + * CartContact + */ +export const zCartContact = z.object({ + email: z.string().email().optional(), +}) + +/** + * DiscountSettings + */ +export const zDiscountSettings = z.object({ + custom_discounts_enabled: z.boolean().optional(), + use_rule_promotions: z.boolean().optional(), +}) + +/** + * InventorySettings + */ +export const zInventorySettings = z.object({ + defer_inventory_check: z.boolean().optional(), +}) + +/** + * ItemSettings + */ +export const zItemSettings = z.object({ + separate_items_by_location: z.boolean().optional(), +}) + +/** + * CustomAttributes + * + * Specifies custom attributes for cart or order objects. Each attribute includes a top-level key, as well as corresponding type and value entries. Attribute values must correspond to the assigned types. + * + * Example: + * ``` + * "custom_attributes": { + * "is_member": { + * "type": "boolean", + * "value": true + * }, + * "membership_level": { + * "type": "string", + * "value": "premium" + * } + * } + * ``` + * + */ +export const zCustomAttributes = z.record( + z.object({ + type: z.enum(["string", "integer", "boolean", "float"]), + value: z.union([z.string(), z.boolean(), z.number()]), + }), +) + +/** + * FormattedPriceData + */ +export const zFormattedPriceData = z.object({ + amount: z.number().optional(), + currency: z.string().optional(), + formatted: z.string().optional(), +}) + +export const zCartTimestamps = z.object({ + created_at: z.string().optional(), + updated_at: z.string().optional(), + expires_at: z.string().optional(), +}) + +/** + * RelationshipItem + * + * Relationship data entry + */ +export const zRelationshipItem = z.object({ + type: z.string(), + id: z.string().uuid(), +}) + +/** + * RelationshipArray + * + * Array of relationships + */ +export const zRelationshipArray = z.object({ + data: z.array(zRelationshipItem).optional(), +}) + +/** + * BaseCartResponse + */ +export const zBaseCartResponse = z.object({ + id: z.string().optional(), + name: z.string().optional(), + description: z.string().optional(), + contact: zCartContact.optional(), + discount_settings: zDiscountSettings.optional(), + inventory_settings: zInventorySettings.optional(), + item_settings: zItemSettings.optional(), + payment_intent_id: z.string().optional(), + custom_attributes: zCustomAttributes.optional(), + snapshot_date: z.string().datetime().optional(), + links: z + .object({ + self: z.string().optional(), + }) + .optional(), + meta: z + .object({ + display_price: z + .object({ + with_tax: zFormattedPriceData.optional(), + without_tax: zFormattedPriceData.optional(), + tax: zFormattedPriceData.optional(), + discount: zFormattedPriceData.optional(), + without_discount: zFormattedPriceData.optional(), + shipping: zFormattedPriceData.optional(), + shipping_discount: zFormattedPriceData.optional(), + }) + .optional(), + timestamps: zCartTimestamps.optional(), + promotion_suggestions: z + .array( + z.object({ + bundle: z + .array( + z.object({ + auto_add_free_gift: z.boolean().optional(), + cart_item_id: z.string().optional(), + quantity: z.number().int().optional(), + targets: z.array(z.string()).optional(), + }), + ) + .optional(), + code: z.string().optional(), + info: z.string().optional(), + message: z.string().optional(), + promotion_id: z.string().optional(), + }), + ) + .optional(), + }) + .optional(), + relationships: z + .object({ + customers: z + .union([zRelationshipArray, z.record(z.unknown())]) + .optional(), + items: z + .union([ + zRelationshipArray, + z.object({ + data: z + .array( + z.object({ + id: z.string().optional(), + type: z.string().optional(), + }), + ) + .nullable(), + }), + ]) + .optional(), + accounts: z.union([zRelationshipArray, z.record(z.unknown())]).optional(), + custom_discounts: zRelationshipArray.optional(), + promotions: zRelationshipArray.optional(), + }) + .optional(), +}) + +/** + * CartResponse + */ +export const zCartResponse = zBaseCartResponse.and( + z.object({ + type: z.literal("cart").optional(), + }), +) + +export const zResponsePageLinks = z.object({ + current: z.string().optional(), + first: z.string().optional(), + last: z.string().optional(), + next: z.string().optional(), + prev: z.string().optional(), +}) + +export const zResponsePaginationPage = z.object({ + current: z.number().int().optional(), + limit: z.number().int().optional(), + offset: z.number().int().optional(), + total: z.number().int().optional(), +}) + +export const zResponsePaginationResults = z.object({ + total: z.number().int().optional(), +}) + +export const zResponseMetaCarts = z.object({ + page: zResponsePaginationPage.optional(), + results: zResponsePaginationResults.optional(), +}) + +export const zCartCollectionResponse = z.object({ + data: z.array(zCartResponse), + links: zResponsePageLinks.optional(), + meta: zResponseMetaCarts.optional(), +}) + +export const zResponseErrorItem = z.object({ + title: z.string(), + status: z.union([z.string(), z.number().int()]), + detail: z.string().optional(), + source: z.string().optional(), + meta: z + .object({ + id: z.string().optional(), + ids: z.array(z.string()).optional(), + item_ids: z.array(z.string()).optional(), + shipping_group_id: z.string().optional(), + shipping_group_ids: z.array(z.string()).optional(), + cart_id: z.string().optional(), + code: z.string().optional(), + order_id: z.string().optional(), + sku: z.string().optional(), + email: z.string().email().optional(), + component_product_id: z.string().uuid().optional(), + "error-meta-key": z.string().optional(), + value: z + .union([ + z.string(), + z.number().int(), + z.boolean(), + z.record(z.unknown()), + z.array(z.unknown()), + ]) + .optional(), + }) + .optional(), +}) + +export const zResponseErrorResponse = z.object({ + errors: z.array(zResponseErrorItem), +}) + +/** + * CartsRequest + */ +export const zCartsRequest = z.object({ + data: z + .object({ + description: z.string().optional(), + discount_settings: zDiscountSettings.optional(), + inventory_settings: zInventorySettings.optional(), + item_settings: zItemSettings.optional(), + name: z.string().optional(), + contact: zCartContact.optional(), + snapshot_date: z.string().optional(), + custom_attributes: zCustomAttributes.optional(), + payment_intent_id: z.string().optional(), + }) + .optional(), +}) + +/** + * CustomDiscountResponse + */ +export const zCustomDiscountResponse = z.object({ + type: z.literal("custom_discount").optional(), + id: z.string().uuid().optional(), + external_id: z.string().optional(), + discount_engine: z.string().optional(), + amount: zFormattedPriceData.optional(), + description: z.string().optional(), + discount_code: z.string().optional(), + relationships: z + .object({ + item: z + .object({ + data: z + .object({ + id: z.string().uuid().optional(), + type: z.enum(["cart_item", "custom_item"]).optional(), + }) + .optional(), + }) + .optional(), + }) + .optional(), +}) + +/** + * CondensedPromotionResponse + */ +export const zCondensedPromotionResponse = z.object({ + type: z.literal("promotion").optional(), + id: z.string().uuid().readonly().optional(), + name: z.string().optional(), + description: z.string().optional(), + automatic: z.boolean().optional(), + promotion_type: z.string().optional(), + promotion_source: z.string().optional(), + start: z.string().datetime().optional(), + end: z.string().datetime().optional(), +}) + +export const zCartEntityResponse = z.object({ + data: zCartResponse.optional(), + included: z + .object({ + custom_discounts: z.array(zCustomDiscountResponse).optional(), + promotions: z.array(zCondensedPromotionResponse).optional(), + }) + .optional(), + meta: z + .object({ + payment_intent: z.record(z.unknown()).optional(), + }) + .optional(), + errors: z.array(zResponseErrorItem).optional(), +}) + +/** + * Order Price Data + */ +export const zItemPriceData = z.object({ + amount: z.number().readonly().optional(), + currency: z.string().readonly().optional(), + includes_tax: z.boolean().readonly().optional(), +}) + +export const zMoney = z.object({ + amount: z.number().int(), + currency: z.string(), + includes_tax: z.boolean(), +}) + +export const zDiscount = z.object({ + amount: zMoney, + code: z.string().optional(), + id: z.string(), + promotion_source: z.string().optional(), + is_cart_discount: z.boolean().optional(), + ordinal: z.number().int().optional(), + promotion_action_id: z.string().optional(), +}) + +/** + * CartItemFormattedPriceData + */ +export const zCartItemFormattedPriceData = z.object({ + unit: zFormattedPriceData.optional(), + value: zFormattedPriceData.optional(), +}) + +export const zTimestamps = z.object({ + created_at: z.string().optional(), + updated_at: z.string().optional(), +}) + +/** + * Cart Item Response + */ +export const zCartItemResponse = z.object({ + id: z.string().uuid().readonly().optional(), + type: z + .enum(["cart_item", "custom_item", "subscription_item", "promotion_item"]) + .readonly() + .optional(), + product_id: z.string().uuid().readonly().optional(), + promotion_id: z.string().uuid().readonly().optional(), + subscription_offering_id: z.string().uuid().readonly().optional(), + name: z.string().readonly().optional(), + description: z.string().readonly().optional(), + sku: z.string().readonly().optional(), + slug: z.string().readonly().optional(), + catalog_id: z.string().uuid().readonly().optional(), + catalog_source: z.string().readonly().optional(), + bundle_configuration: z + .object({ + selected_options: z.record(z.record(z.number())).optional(), + component_products: z + .array( + z.object({ + id: z.string().optional(), + type: z.string().optional(), + attributes: z.record(z.unknown()).optional(), + meta: z.record(z.unknown()).optional(), + price: z.record(z.unknown()).optional(), + relationships: z.record(z.unknown()).optional(), + }), + ) + .optional(), + }) + .readonly() + .optional(), + components: z + .record( + z.object({ + name: z.string().optional(), + options: z + .array( + z.object({ + id: z.string().optional(), + quantity: z.number().optional(), + type: z.string().optional(), + }), + ) + .optional(), + }), + ) + .readonly() + .optional(), + image: z + .object({ + mime_type: z.string().readonly().optional(), + file_name: z.string().readonly().optional(), + href: z.string().readonly().optional(), + }) + .readonly() + .optional(), + quantity: z.number().int().readonly().optional(), + auto_add_quantity: z.number().int().readonly().optional(), + manage_stock: z.boolean().readonly().optional(), + unit_price: zItemPriceData.readonly().optional(), + value: zItemPriceData.readonly().optional(), + discounts: z.array(zDiscount).readonly().optional(), + custom_inputs: z.record(z.unknown()).readonly().optional(), + subscription_configuration: z + .object({ + plan: z.string().optional(), + pricing_option: z.string().optional(), + }) + .readonly() + .optional(), + links: z + .object({ + product: z.string().optional(), + subscription_offering: z.string().optional(), + }) + .readonly() + .optional(), + meta: z + .object({ + display_price: z + .object({ + with_tax: zCartItemFormattedPriceData.optional(), + without_tax: zCartItemFormattedPriceData.optional(), + tax: zCartItemFormattedPriceData.optional(), + discount: zCartItemFormattedPriceData.optional(), + without_discount: zCartItemFormattedPriceData.optional(), + original_price: zCartItemFormattedPriceData.optional(), + discounts: z + .record( + z.object({ + amount: z.number().int(), + currency: z.string(), + formatted: z.string(), + constituents: z.record(zFormattedPriceData).optional(), + }), + ) + .optional(), + }) + .optional(), + timestamps: zTimestamps.optional(), + }) + .readonly() + .optional(), + relationships: z + .object({ + taxes: z + .object({ + data: z.array(zRelationshipItem).nullish(), + }) + .optional(), + custom_discounts: z + .object({ + data: z.array(zRelationshipItem).nullish(), + }) + .optional(), + promotions: z + .object({ + data: z.array(zRelationshipItem).nullish(), + }) + .optional(), + }) + .readonly() + .optional(), + shipping_group_id: z.string().readonly().optional(), + promotion_source: z.enum(["rule-promotion"]).readonly().optional(), + promotion_action_id: z.string().readonly().optional(), + location: z.string().readonly().optional(), + custom_attributes: zCustomAttributes.readonly().optional(), +}) + +/** + * TaxItemResponse + */ +export const zTaxItemResponse = z.object({ + type: z.literal("tax_item").optional(), + id: z.string().uuid().readonly().optional(), + jurisdiction: z.string().optional(), + code: z.string().optional(), + name: z.string().optional(), + rate: z.number().optional(), + amount: z.number().int().optional(), +}) + +export const zCartItemCollectionResponse = z.object({ + data: z.array(zCartItemResponse), + included: z + .object({ + custom_discounts: z.array(zCustomDiscountResponse).optional(), + promotions: z + .array( + z.object({ + automatic: z.boolean().optional(), + description: z.string().optional(), + end: z.string().datetime().optional(), + id: z.string().uuid().optional(), + name: z.string().optional(), + promotion_type: z.string().optional(), + promotion_source: z.string().optional(), + start: z.string().datetime().optional(), + type: z.literal("promotion").optional(), + }), + ) + .optional(), + tax_items: z.array(zTaxItemResponse).optional(), + }) + .optional(), + meta: z + .object({ + display_price: z + .object({ + with_tax: zFormattedPriceData.optional(), + without_tax: zFormattedPriceData.optional(), + tax: zFormattedPriceData.optional(), + discount: zFormattedPriceData.optional(), + without_discount: zFormattedPriceData.optional(), + shipping: zFormattedPriceData.optional(), + shipping_discount: zFormattedPriceData.optional(), + authorized: zFormattedPriceData.optional(), + balance_owing: zFormattedPriceData.optional(), + paid: zFormattedPriceData.optional(), + }) + .optional(), + timestamps: zCartTimestamps.optional(), + messages: z + .array( + z.object({ + source: z + .object({ + type: z.string(), + id: z.string(), + code: z.string().optional(), + }) + .optional(), + title: z.string(), + description: z.string(), + }), + ) + .optional(), + promotion_suggestions: z + .array( + z.object({ + bundle: z + .array( + z.object({ + auto_add_free_gift: z.boolean().optional(), + cart_item_id: z.string().optional(), + quantity: z.number().int().optional(), + targets: z.array(z.string()).optional(), + }), + ) + .optional(), + code: z.string().optional(), + info: z.string().optional(), + message: z.string().optional(), + promotion_id: z.string().optional(), + auto_add: z.boolean().optional(), + targets: z + .array( + z.object({ + cart_item_id: z.string().optional(), + quantity: z.number().int().optional(), + skus: z.array(z.string()).optional(), + }), + ) + .optional(), + }), + ) + .optional(), + }) + .optional(), + errors: z.array(zResponseErrorItem).optional(), +}) + +/** + * Bulk Update Carts Items (Common Properties) + */ +export const zBulkUpdateCartsItemsCommon = z.object({ + id: z.string().uuid().optional(), + quantity: z.number().int().gte(0).optional(), + type: z.enum(["cart_item", "custom_item"]).optional(), + custom_inputs: z.record(z.unknown()).optional(), + custom_attributes: zCustomAttributes.optional(), + shipping_group_id: z.string().uuid().optional(), +}) + +/** + * Update Cart Item Quantity + */ +export const zBulkUpdateCartsItemsWithQuantity = + zBulkUpdateCartsItemsCommon.and( + z.object({ + quantity: z.unknown(), + id: z.unknown(), + }), + ) + +/** + * Update Cart Item Shipping Group + */ +export const zBulkUpdateCartsItemsWithShippingGroup = + zBulkUpdateCartsItemsCommon.and( + z.object({ + shipping_group_id: z.unknown(), + id: z.unknown(), + }), + ) + +/** + * Update Cart Item Custom Inputs + */ +export const zBulkUpdateCartsItemsWithCustomInputs = + zBulkUpdateCartsItemsCommon.and( + z.object({ + custom_inputs: z.unknown(), + id: z.unknown(), + }), + ) + +/** + * Update All Or Nothing Options Object + */ +export const zUpdateAllOrNothingOptionsObject = z.object({ + update_all_or_nothing: z.boolean().optional(), +}) + +/** + * Bulk Update Carts Items + */ +export const zBulkUpdateCartsItems = z.object({ + data: z + .array( + z.union([ + zBulkUpdateCartsItemsWithQuantity, + zBulkUpdateCartsItemsWithShippingGroup, + zBulkUpdateCartsItemsWithCustomInputs, + ]), + ) + .optional(), + options: zUpdateAllOrNothingOptionsObject.optional(), +}) + +/** + * Base Item Object Data + */ +export const zBaseItemObjectData = z.object({ + quantity: z.number(), + id: z.string().uuid().optional(), + sku: z.string().optional(), + name: z.string().optional(), + custom_inputs: z.record(z.unknown()).optional(), + bundle_configuration: z + .object({ + selected_options: z.record(z.unknown()).optional(), + component_products: z.array(z.unknown()).optional(), + }) + .optional(), + shipping_group_id: z.string().optional(), + location: z.string().optional(), + custom_attributes: zCustomAttributes.optional(), +}) + +/** + * Cart Item Object Data + */ +export const zCartItemObjectData = z + .object({ + type: z.literal("cart_item"), + }) + .and(zBaseItemObjectData) + +/** + * Cart Item Object Request + */ +export const zCartItemObjectRequest = z.object({ + data: zCartItemObjectData.optional(), +}) + +/** + * Subscription Item Object Data + */ +export const zSubscriptionItemObjectData = z.object({ + type: z.literal("subscription_item"), + quantity: z.number(), + id: z.string().uuid(), + subscription_configuration: z.object({ + pricing_option: z.string().uuid(), + plan: z.string().uuid(), + }), +}) + +/** + * Subscription Item Object + */ +export const zSubscriptionItemObject = z.object({ + data: zSubscriptionItemObjectData.and(zCartItemResponse).optional(), +}) + +/** + * Cart Merge Object + */ +export const zCartMergeObject = z.object({ + type: z.literal("cart_items"), + cart_id: z.string().uuid(), +}) + +/** + * Add All Or Nothing Options Object + */ +export const zAddAllOrNothingOptionsObject = z.object({ + add_all_or_nothing: z.boolean().optional(), +}) + +/** + * Cart Merge Object Request + */ +export const zCartMergeObjectRequest = z.object({ + data: zCartMergeObject.optional(), + options: zAddAllOrNothingOptionsObject.optional(), +}) + +/** + * Custom Item Object Data + */ +export const zCustomItemObjectData = z.object({ + type: z.literal("custom_item"), + quantity: z.number(), + price: z.object({ + amount: z.number(), + includes_tax: z.boolean().optional(), + }), + description: z.string().optional(), + sku: z.string().optional(), + name: z.string(), + custom_inputs: z.record(z.unknown()).optional(), + shipping_group_id: z.string().optional(), + custom_attributes: zCustomAttributes.optional(), +}) + +/** + * Custom Item Object + */ +export const zCustomItemObject = z.object({ + data: zCustomItemObjectData.optional(), +}) + +/** + * Re Order Object + */ +export const zReOrderObject = z.object({ + type: z.literal("order_items"), + order_id: z.string().uuid(), +}) + +/** + * Re-Order Object Request + */ +export const zReOrderObjectRequest = z.object({ + data: zReOrderObject.optional(), + options: zAddAllOrNothingOptionsObject.optional(), +}) + +/** + * Promotion Item Object Data + */ +export const zPromotionItemObjectData = z.object({ + type: z.literal("promotion_item"), + code: z.string(), +}) + +/** + * Promotion Item Object + */ +export const zPromotionItemObject = z.object({ + data: zPromotionItemObjectData.optional(), +}) + +/** + * Bulk Add Items Request + */ +export const zBulkAddItemsRequest = z.object({ + data: z + .array( + z.union([ + zCartItemObjectData, + zCartMergeObject, + zCustomItemObjectData, + zReOrderObject, + zPromotionItemObjectData, + ]), + ) + .optional(), + options: zAddAllOrNothingOptionsObject.optional(), +}) + +/** + * Update Carts Items + */ +export const zUpdateCartsItems = z.object({ + data: z + .object({ + type: z.literal("cart_item").optional(), + id: z.string().uuid().optional(), + quantity: z.number().optional(), + custom_inputs: z.record(z.unknown()).optional(), + custom_attributes: zCustomAttributes.optional(), + shipping_group_id: z.string().uuid().optional(), + }) + .optional(), +}) + +/** + * Carts Relationships Accounts Data + */ +export const zCartsRelationshipsAccountsData = z.object({ + data: z + .array( + z.object({ + id: z.string().optional(), + type: z.string().optional(), + }), + ) + .optional(), +}) + +/** + * Carts Relationships Customers Data + */ +export const zCartsRelationshipsCustomersData = z.object({ + data: z + .array( + z.object({ + id: z.string().optional(), + type: z.string().optional(), + }), + ) + .optional(), +}) + +export const zCartsItemsTaxesCommon = z.object({ + code: z.string().optional(), + jurisdiction: z.string().optional(), + name: z.string().optional(), + rate: z.number().optional(), + amount: z.number().optional(), + type: z.literal("tax_item"), + id: z.string().uuid().readonly().optional(), +}) + +/** + * Tax Object (With Rate) + */ +export const zCartsItemsTaxesWithRate = zCartsItemsTaxesCommon.and( + z.object({ + rate: z.number(), + amount: z.number().optional(), + }), +) + +/** + * Tax Object (With Amount) + */ +export const zCartsItemsTaxesWithAmount = zCartsItemsTaxesCommon.and( + z.object({ + amount: z.number(), + rate: z.number().optional(), + }), +) + +/** + * Carts Items Taxes Object + * + * A tax item that can be applied to cart items or bundle components. You must specify either a rate (percentage) or an amount (fixed value), but not both. + * + */ +export const zCartsItemsTaxesObject = z.union([ + zCartsItemsTaxesWithRate, + zCartsItemsTaxesWithAmount, +]) + +export const zCartItemTaxesEntityResponse = z.object({ + data: zCartsItemsTaxesObject, +}) + +/** + * CartItemRelationship + */ +export const zCartItemRelationship = z.object({ + relationships: z + .object({ + item: z.object({ + data: z.object({ + type: z.string(), + id: z.string().uuid(), + }), + }), + }) + .optional(), +}) + +/** + * CartsBulkTaxes + */ +export const zCartsBulkTaxes = z.object({ + data: z + .array( + zCartsItemsTaxesObject.and(zCartItemRelationship).and( + z.object({ + meta: z + .object({ + component_product_id: z.string().uuid().min(1).optional(), + }) + .optional(), + }), + ), + ) + .optional(), + errors: z.array(zResponseErrorItem).optional(), + options: zAddAllOrNothingOptionsObject.optional(), +}) + +/** + * CartsCustomDiscountsObject + */ +export const zCartsCustomDiscountsObject = z.object({ + amount: z.union([ + z.number(), + z.object({ + amount: z.number().optional(), + currency: z.string().optional(), + formatted: z.string().optional(), + }), + ]), + description: z.string(), + discount_code: z.string(), + discount_engine: z.string(), + external_id: z.string(), + type: z.literal("custom_discount"), + id: z.string().uuid().optional(), + relationships: z + .object({ + item: z + .object({ + data: z + .object({ + id: z.string().uuid().optional(), + type: z.enum(["cart_item", "custom_item"]).optional(), + }) + .optional(), + }) + .optional(), + }) + .optional(), +}) + +/** + * CustomDiscountRelationshipsCartItemRequest + */ +export const zCustomDiscountRelationshipsCartItemRequest = z.object({ + relationships: z + .object({ + item: z + .object({ + data: z + .object({ + type: z.string(), + id: z.string().uuid(), + }) + .optional(), + }) + .optional(), + }) + .optional(), +}) + +/** + * CartItemBulkCustomDiscountObject + */ +export const zCartItemBulkCustomDiscountObject = + zCartsCustomDiscountsObject.and(zCustomDiscountRelationshipsCartItemRequest) + +/** + * CartsBulkCustomDiscounts + */ +export const zCartsBulkCustomDiscounts = z.object({ + data: z + .array(zCartsCustomDiscountsObject.and(zCartItemBulkCustomDiscountObject)) + .optional(), + options: zAddAllOrNothingOptionsObject.optional(), +}) + +/** + * CartsBulkCustomDiscountsResponse + */ +export const zCartsBulkCustomDiscountsResponse = z.object({ + data: zCartsCustomDiscountsObject.optional(), + errors: z.array(zResponseErrorItem).optional(), +}) + +/** + * CartsBulkCustomDiscountsCollectionResponse + */ +export const zCartsBulkCustomDiscountsCollectionResponse = z.object({ + data: z.array(zCartsCustomDiscountsObject).optional(), + errors: z.array(zResponseErrorItem).optional(), +}) + +/** + * CartsCustomDiscountsResponse + */ +export const zCartsCustomDiscountsResponseObject = z.object({ + amount: z + .object({ + amount: z.number().optional(), + currency: z.string().optional(), + formatted: z.string().optional(), + }) + .optional(), + description: z.string().optional(), + discount_code: z.string().optional(), + discount_engine: z.string().optional(), + external_id: z.string().optional(), + type: z.literal("custom_discount").optional(), + id: z.string().uuid().readonly().optional(), + relationships: z + .object({ + item: z + .object({ + data: z + .object({ + id: z.string().uuid().optional(), + type: z.enum(["cart_item", "custom_item"]).optional(), + }) + .optional(), + }) + .optional(), + }) + .optional(), +}) + +export const zCartsCustomDiscountsEntityResponse = z.object({ + data: zCartsCustomDiscountsObject.optional(), +}) + +export const zCartsCustomDiscountsCollectionResponse = z.object({ + data: z.array(zCartsCustomDiscountsObject).optional(), +}) + +export const zAddressCommon = z.object({ + first_name: z.string(), + last_name: z.string(), + company_name: z.string().optional(), + line_1: z.string(), + line_2: z.string().optional(), + line_3: z.string().max(255).optional(), + city: z.string().optional(), + postcode: z.string(), + county: z.string().optional(), + country: z.string(), + region: z.string().optional(), +}) + +/** + * Address with Region + */ +export const zAddressWithRegion = zAddressCommon.and( + z.object({ + region: z.string(), + }), +) + +/** + * Address with County + */ +export const zAddressWithCounty = zAddressCommon.and( + z.object({ + county: z.string(), + }), +) + +/** + * ShippingAddress + * + * Shipping address information. You must specify at least one of region (state/province) or county. + * + */ +export const zShippingAddress = z.intersection( + z.union([zAddressWithRegion, zAddressWithCounty]), + z.object({ + phone_number: z.string().optional(), + instructions: z.string().optional(), + }), +) + +export const zDeliveryEstimate = z.object({ + start: z.string().datetime().optional(), + end: z.string().datetime().optional(), +}) + +/** + * SingleRelationship + * + * Single relationship + */ +export const zSingleRelationship = z.object({ + data: zRelationshipItem.optional(), +}) + +export const zDiscounts = z.array(zDiscount) + +export const zShippingPriceResponse = z.object({ + total: zFormattedPriceData, + base: zFormattedPriceData, + tax: zFormattedPriceData.optional(), + fees: zFormattedPriceData.optional(), + discount: zFormattedPriceData.optional(), +}) + +/** + * NonNegativeFormattedPriceData + */ +export const zNonNegativeFormattedPriceData = z.object({ + amount: z.number().gte(0).optional(), + currency: z.string().optional(), + formatted: z.string().optional(), +}) + +/** + * DiscountFormattedPriceData + */ +export const zDiscountFormattedPriceData = z.object({ + amount: z.number().lte(0).optional(), + currency: z.string().optional(), + formatted: z.string().optional(), +}) + +/** + * Order pricing information. + */ +export const zOrderPriceWrapperMeta = z.object({ + with_tax: zNonNegativeFormattedPriceData, + without_tax: zNonNegativeFormattedPriceData, + tax: zNonNegativeFormattedPriceData, + discount: zDiscountFormattedPriceData, + balance_owing: zNonNegativeFormattedPriceData, + paid: zNonNegativeFormattedPriceData, + authorized: zNonNegativeFormattedPriceData, + without_discount: zNonNegativeFormattedPriceData, + shipping: zNonNegativeFormattedPriceData, + shipping_discount: zDiscountFormattedPriceData, +}) + +export const zShippingGroupMeta = z.object({ + shipping_display_price: zShippingPriceResponse.optional(), + total_display_price: zOrderPriceWrapperMeta.optional(), +}) + +/** + * Shipping Group Response + */ +export const zShippingGroupResponse = z.object({ + type: z.literal("shipping_group").optional(), + id: z.string().optional(), + relation: z.string().optional(), + cart_id: z.string().optional(), + order_id: z.string().optional(), + shipping_type: z.string().optional(), + tracking_reference: z.string().optional(), + external_ref: z.string().max(64).optional(), + address: zShippingAddress.optional(), + delivery_estimate: zDeliveryEstimate.optional(), + created_at: z.string().datetime().optional(), + updated_at: z.string().datetime().optional(), + relationships: z + .object({ + cart: zSingleRelationship.optional(), + order: zSingleRelationship.optional(), + items: zRelationshipArray.optional(), + }) + .optional(), + discounts: zDiscounts.optional(), + meta: zShippingGroupMeta.optional(), +}) + +export const zShippingPriceRequest = z.object({ + total: z.number().optional(), + base: z.number().optional(), + tax: z.number().optional(), + fees: z.number().optional(), + discount: z.number().optional(), +}) + +export const zCreateShippingGroupRequest = z.object({ + data: z + .object({ + type: z.literal("shipping_group").optional(), + shipping_type: z.string().optional(), + tracking_reference: z.string().optional(), + external_ref: z.string().max(64).optional(), + shipping_price: zShippingPriceRequest.optional(), + address: zShippingAddress.optional(), + includes_tax: z.boolean().optional(), + delivery_estimate: zDeliveryEstimate.optional(), + }) + .optional(), +}) + +/** + * OrderPriceData + */ +export const zOrderPriceData = z.object({ + amount: z.number().optional(), + currency: z.string().optional(), + includes_tax: z.boolean().optional(), +}) + +/** + * DiscountData + */ +export const zDiscountData = z.object({ + amount: zOrderPriceData.optional(), + code: z.string().optional(), + id: z.string().uuid().readonly().optional(), + promotion_source: z.string().optional(), + is_cart_discount: z.boolean().optional(), + ordinal: z.number().int().optional(), + promotion_action_id: z.string().optional(), +}) + +/** + * OrderItemFormattedUnitPriceData + */ +export const zOrderItemFormattedUnitPriceData = z.object({ + unit: zFormattedPriceData.optional(), + value: zFormattedPriceData.optional(), +}) + +/** + * OrderItemResponse + */ +export const zOrderItemResponse = z.object({ + type: z.string().optional(), + id: z.string().uuid().readonly().optional(), + quantity: z.number().optional(), + product_id: z.string().uuid().readonly().optional(), + subscription_offering_id: z.string().uuid().readonly().optional(), + name: z.string().optional(), + sku: z.string().optional(), + location: z.string().readonly().optional(), + unit_price: zOrderPriceData.optional(), + value: zOrderPriceData.optional(), + discounts: z.array(zDiscountData).optional(), + links: z.record(z.unknown()).optional(), + meta: z + .object({ + display_price: z + .object({ + with_tax: zOrderItemFormattedUnitPriceData.optional(), + without_tax: zOrderItemFormattedUnitPriceData.optional(), + tax: zOrderItemFormattedUnitPriceData.optional(), + discount: zOrderItemFormattedUnitPriceData.optional(), + without_discount: zOrderItemFormattedUnitPriceData.optional(), + discounts: z + .record( + z.object({ + amount: z.number().optional(), + currency: z.string().optional(), + formatted: z.string().optional(), + constituents: z + .record( + z.object({ + amount: z.number().optional(), + currency: z.string().optional(), + formatted: z.string().optional(), + }), + ) + .optional(), + }), + ) + .optional(), + original_price: zOrderItemFormattedUnitPriceData.optional(), + }) + .optional(), + timestamps: zTimestamps.optional(), + }) + .optional(), + relationships: z + .object({ + cart_item: z + .object({ + data: z + .object({ + type: z.string().optional(), + id: z.string().uuid().readonly().optional(), + }) + .optional(), + }) + .optional(), + taxes: z + .object({ + data: z.array(zRelationshipItem).nullish(), + }) + .optional(), + promotions: z + .object({ + data: z.array(zRelationshipItem).nullish(), + }) + .optional(), + }) + .optional(), + catalog_id: z.string().optional(), + catalog_source: z.string().optional(), + bundle_configuration: z + .object({ + selected_options: z.record(z.record(z.number())).optional(), + component_products: z + .array( + z.object({ + id: z.string().optional(), + type: z.string().optional(), + attributes: z.record(z.unknown()).optional(), + meta: z.record(z.unknown()).optional(), + price: z.record(z.unknown()).optional(), + relationships: z.record(z.unknown()).optional(), + }), + ) + .optional(), + }) + .optional(), + components: z + .record( + z.object({ + name: z.string().optional(), + options: z + .array( + z.object({ + id: z.string().optional(), + quantity: z.number().optional(), + type: z.string().optional(), + }), + ) + .optional(), + }), + ) + .optional(), + custom_inputs: z.record(z.unknown()).optional(), + custom_attributes: zCustomAttributes.readonly().optional(), + shipping_group_id: z.string().optional(), + promotion_source: z.string().optional(), + promotion_action_id: z.string().readonly().optional(), + subscription_configuration: z + .object({ + plan: z.string().optional(), + pricing_option: z.string().optional(), + }) + .optional(), +}) + +export const zShippingGroupEntityResponse = z.object({ + data: zShippingGroupResponse.optional(), + included: z + .object({ + items: z.array(zOrderItemResponse).optional(), + }) + .optional(), + errors: z.array(zResponseErrorItem).optional(), +}) + +export const zUpdateCartShippingGroupRequest = z.object({ + data: z + .object({ + type: z.literal("shipping_group").optional(), + shipping_type: z.string().optional(), + tracking_reference: z.string().optional(), + external_ref: z.string().max(64).optional(), + shipping_price: zShippingPriceRequest.optional(), + address: zShippingAddress.optional(), + includes_tax: z.boolean().optional(), + delivery_estimate: zDeliveryEstimate.optional(), + }) + .optional(), +}) + +/** + * Data.BasePayments + */ +export const zDataBasePayments = z.object({ + gateway: z.enum([ + "adyen", + "authorize_net", + "braintree", + "card_connect", + "cyber_source", + "elastic_path_payments_stripe", + "manual", + "paypal_express_checkout", + "stripe", + "stripe_payment_intents", + ]), + method: z.enum([ + "authorize", + "purchase", + "purchase_setup", + "authorize_setup", + ]), + amount: z.number().optional(), +}) + +/** + * Elastic Path Payments Powered By Stripe + */ +export const zElasticPathPaymentsPoweredByStripePayment = z.object({ + data: zDataBasePayments + .and( + z.object({ + gateway: z.literal("elastic_path_payments_stripe").optional(), + options: z + .object({ + receipt_email: z.string().optional(), + automatic_payment_methods: z + .object({ + enabled: z.boolean().optional(), + }) + .optional(), + }) + .optional(), + payment_method_types: z.array(z.string()).optional(), + payment: z.string().optional(), + }), + ) + .optional(), +}) + +/** + * Cart Payment Update + */ +export const zCartPaymentUpdate = z.object({ + data: z.object({ + gateway: z.string(), + method: z.string(), + payment_method_types: z.array(z.string()), + amount: z.number().int(), + options: z.record(z.unknown()).optional(), + }), +}) + +/** + * BillingAddress + * + * Billing address information. You must specify at least one of region (state/province) or county. + * + */ +export const zBillingAddress = z.union([zAddressWithRegion, zAddressWithCounty]) + +/** + * Customer Checkout + */ +export const zCustomerCheckout = z.object({ + data: z + .object({ + order_number: z.string().optional(), + external_ref: z.string().optional(), + customer: z + .object({ + id: z.string().optional(), + email: z.string().optional(), + name: z.string().optional(), + }) + .optional(), + billing_address: zBillingAddress.optional(), + shipping_address: zShippingAddress.optional(), + }) + .optional(), +}) + +/** + * Account Checkout + */ +export const zAccountCheckout = z.object({ + data: z + .object({ + order_number: z.string().optional(), + external_ref: z.string().optional(), + account: z + .object({ + id: z.string().optional(), + member_id: z.string().optional(), + }) + .optional(), + contact: z + .object({ + name: z.string().optional(), + email: z.string().email().optional(), + }) + .optional(), + billing_address: zBillingAddress.optional(), + shipping_address: zShippingAddress.optional(), + }) + .optional(), +}) + +export const zOrderTimestamps = z.object({ + created_at: z.string().optional(), + updated_at: z.string().optional(), + fully_paid_at: z.string().optional(), +}) + +/** + * OrderMeta + */ +export const zOrderMeta = z.object({ + timestamps: zOrderTimestamps.optional(), + display_price: z + .object({ + with_tax: zNonNegativeFormattedPriceData.optional(), + without_tax: zNonNegativeFormattedPriceData.optional(), + tax: zNonNegativeFormattedPriceData.optional(), + discount: zDiscountFormattedPriceData.optional(), + balance_owing: zNonNegativeFormattedPriceData.optional(), + paid: zNonNegativeFormattedPriceData.optional(), + authorized: zNonNegativeFormattedPriceData.optional(), + without_discount: zNonNegativeFormattedPriceData.optional(), + shipping: zNonNegativeFormattedPriceData.optional(), + shipping_discount: zDiscountFormattedPriceData.optional(), + }) + .optional(), + is_manual: z.boolean().optional(), +}) + +/** + * Contact + */ +export const zContact = z.object({ + email: z.string().optional(), + name: z.string().optional(), +}) + +/** + * Customer + */ +export const zCustomer = z.object({ + name: z.string().optional(), + email: z.string().email().optional(), + id: z.string().uuid().optional(), +}) + +/** + * OrderResponse + */ +export const zOrderResponse = z.object({ + type: z.literal("order").optional(), + order_number: z.string().optional(), + external_ref: z.string().optional(), + id: z.string().uuid().readonly().optional(), + status: z + .enum(["complete", "incomplete", "cancelled", "processing"]) + .optional(), + payment: z + .enum([ + "authorized", + "paid", + "unpaid", + "refunded", + "partially_paid", + "partially_authorized", + ]) + .optional(), + shipping: z.enum(["unfulfilled", "fulfilled"]).optional(), + anonymized: z.boolean().optional(), + payment_intent_id: z.string().optional(), + custom_attributes: zCustomAttributes.optional(), + links: z.record(z.unknown()).optional(), + meta: zOrderMeta.optional(), + billing_address: zBillingAddress.optional(), + contact: zContact.optional(), + customer: zCustomer.optional(), + shipping_address: zShippingAddress.optional(), + relationships: z + .object({ + items: zRelationshipArray.optional(), + custom_discounts: zRelationshipArray.optional(), + promotions: zRelationshipArray.optional(), + customer: zSingleRelationship.optional(), + account: zSingleRelationship.optional(), + account_member: zSingleRelationship.optional(), + store: zSingleRelationship.optional(), + }) + .optional(), +}) + +/** + * OrderEntityResponse + */ +export const zOrderEntityResponse = z.object({ + data: zOrderResponse.optional(), + included: z + .object({ + items: z.array(zOrderItemResponse).optional(), + tax_items: z.array(zTaxItemResponse).optional(), + custom_discounts: z.array(zCustomDiscountResponse).optional(), + promotions: z.array(zCondensedPromotionResponse).optional(), + }) + .optional(), + errors: z.array(zResponseErrorItem).optional(), +}) + +export const zResponseMetaOrders = z.object({ + page: zResponsePaginationPage.optional(), + results: zResponsePaginationResults.optional(), +}) + +export const zOrderCollectionResponse = z.object({ + data: z.array(zOrderResponse).optional(), + links: zResponsePageLinks.optional(), + meta: zResponseMetaOrders.optional(), +}) + +/** + * OrdersAddressData + */ +export const zOrdersAddressData = z.object({ + type: z.string(), + order_number: z.string().optional(), + external_ref: z.string().optional(), + shipping_address: z.object({ + first_name: z.string().optional(), + last_name: z.string().optional(), + phone_number: z.string().optional(), + company_name: z.string().optional(), + line_1: z.string().optional(), + line_2: z.string().optional(), + line_3: z.string().max(255).optional(), + city: z.string().optional(), + county: z.string().optional(), + region: z.string().optional(), + postcode: z.string().optional(), + country: z.string().optional(), + instructions: z.string().optional(), + }), +}) + +/** + * OrdersCancelData + */ +export const zOrdersCancelData = z.object({ + status: z.string(), + type: z.string(), + external_ref: z.string().optional(), +}) + +/** + * OrdersFulfilledData + */ +export const zOrdersFulfilledData = z.object({ + shipping: z.string(), + type: z.string(), + external_ref: z.string().optional(), +}) + +/** + * OrdersUpdateRequest + */ +export const zOrdersUpdateRequest = z.object({ + data: z + .union([zOrdersAddressData, zOrdersCancelData, zOrdersFulfilledData]) + .optional(), +}) + +export const zOrderItemCollectionResponse = z.object({ + data: z.array(zOrderItemResponse).optional(), + included: z + .object({ + tax_items: z.array(zTaxItemResponse).optional(), + custom_discounts: z.array(zCustomDiscountResponse).optional(), + promotions: z.array(zCondensedPromotionResponse).optional(), + }) + .optional(), +}) + +/** + * OrdersAnonymizeData + */ +export const zOrdersAnonymizeData = z.object({ + order_ids: z.array(z.string()).optional(), +}) + +/** + * OrdersAnonymizeRequest + */ +export const zOrdersAnonymizeRequest = z.object({ + data: zOrdersAnonymizeData.optional(), +}) + +export const zOrdersListResponse = z.object({ + data: z.array(zOrderResponse), +}) + +/** + * FailureDetails + * + * Non-PII payment failure information from the payment gateway. Only present on failed transactions where the gateway provided structured failure details. + */ +export const zFailureDetails = z.object({ + code: z.string().optional(), + reason: z.string().optional(), +}) + +/** + * TransactionResponse + */ +export const zTransactionResponse = z.object({ + id: z.string().uuid().readonly().optional(), + reference: z.string().optional(), + name: z.string().optional(), + custom_reference: z.string().optional(), + gateway: z + .enum([ + "adyen", + "authorize_net", + "braintree", + "card_connect", + "cyber_source", + "elastic_path_payments_stripe", + "manual", + "paypal_express_checkout", + "stripe", + "stripe_payment_intents", + "stripe_platform_account", + ]) + .optional(), + amount: z.number().optional(), + refunded_amount: z.number().optional(), + currency: z.string().optional(), + transaction_type: z + .enum(["purchase", "authorize", "capture", "refund"]) + .optional(), + type: z.string().optional(), + status: z.string().optional(), + payment_details: z + .object({ + detailed_status: z.string().optional(), + }) + .optional(), + failure_details: zFailureDetails.optional(), + payment_intent: z.record(z.unknown()).optional(), + capture_mechanism: z.enum(["automatic", "manual"]).optional(), + refund_mechanism: z.enum(["automatic", "manual"]).optional(), + client_parameters: z + .object({ + redirect_url: z.string().optional(), + secret: z.string().optional(), + token: z.string().optional(), + }) + .optional(), + next_actions: z.array(z.string()).optional(), + relationships: z + .object({ + order: z + .object({ + data: z + .object({ + type: z.string().optional(), + id: z.string().uuid().optional(), + }) + .optional(), + }) + .optional(), + }) + .optional(), + meta: z + .object({ + display_price: zFormattedPriceData.optional(), + display_refunded_amount: z + .object({ + total: zFormattedPriceData.optional(), + }) + .optional(), + timestamps: zTimestamps.optional(), + }) + .optional(), +}) + +export const zTransactionEntityResponse = z.object({ + data: zTransactionResponse, +}) + +/** + * Data.AdyenPayment + */ +export const zDataAdyenPayment = zDataBasePayments.and( + z.object({ + gateway: z.literal("adyen"), + options: z + .object({ + shopper_reference: z.string().optional(), + recurring_processing_model: z.string().optional(), + }) + .optional(), + payment: z.string(), + }), +) + +/** + * Data.AuthorizeNetPayment + */ +export const zDataAuthorizeNetPayment = zDataBasePayments.and( + z.object({ + gateway: z.literal("authorize_net"), + options: z + .object({ + customer_payment_profile_id: z.string().optional(), + }) + .optional(), + payment: z.string(), + }), +) + +/** + * Data.BraintreePayment + */ +export const zDataBraintreePayment = zDataBasePayments.and( + z.object({ + gateway: z.literal("braintree"), + payment: z.string(), + }), +) + +/** + * Data.CardConnectPayment + */ +export const zDataCardConnectPayment = zDataBasePayments.and( + z.object({ + gateway: z.literal("card_connect"), + payment: z.string(), + }), +) + +/** + * Data.CyberSourcePayment + */ +export const zDataCyberSourcePayment = zDataBasePayments.and( + z.object({ + gateway: z.literal("cyber_source"), + payment: z.string(), + }), +) + +/** + * Data.ManualPayment + */ +export const zDataManualPayment = zDataBasePayments.and( + z.object({ + gateway: z.literal("manual"), + paymentmethod_meta: z + .object({ + custom_reference: z.string().optional(), + name: z.string().optional(), + }) + .optional(), + }), +) + +/** + * Data.PayPalExpressCheckoutPayment + */ +export const zDataPayPalExpressCheckoutPayment = zDataBasePayments.and( + z.object({ + gateway: z.literal("paypal_express_checkout"), + options: z + .object({ + description: z.string().optional(), + soft_descriptor: z.string().optional(), + application_context: z + .object({ + brand_name: z.string().optional(), + locale: z.string().optional(), + landing_page: z.string().optional(), + shipping_preference: z.string().optional(), + user_action: z.string().optional(), + return_url: z.string().optional(), + cancel_url: z.string().optional(), + }) + .optional(), + }) + .optional(), + }), +) + +/** + * Data.StripePayment + */ +export const zDataStripePayment = zDataBasePayments.and( + z.object({ + gateway: z.literal("stripe"), + options: z + .object({ + receipt_email: z.string().optional(), + }) + .optional(), + payment: z.string().optional(), + }), +) + +/** + * Data.StripePaymentIntentsPayment + */ +export const zDataStripePaymentIntentsPayment = zDataBasePayments.and( + z.object({ + gateway: z.literal("stripe_payment_intents"), + options: z + .object({ + receipt_email: z.string().optional(), + }) + .optional(), + payment: z.string().optional(), + }), +) + +export const zDataPaymentObject = z.union([ + zDataAdyenPayment, + zDataAuthorizeNetPayment, + zDataBraintreePayment, + zDataCardConnectPayment, + zDataCyberSourcePayment, + zElasticPathPaymentsPoweredByStripePayment, + zDataManualPayment, + zDataPayPalExpressCheckoutPayment, + zDataStripePayment, + zDataStripePaymentIntentsPayment, +]) + +/** + * PaymentsRequest + */ +export const zPaymentsRequest = z.object({ + data: zDataPaymentObject.optional(), +}) + +/** + * OrdersTransactionsConfirmRequest + */ +export const zOrdersTransactionsConfirmRequest = z.object({ + data: z.record(z.unknown()).optional(), +}) + +/** + * OrdersTransactionsCaptureRequest + */ +export const zOrdersTransactionsCaptureRequest = z.object({ + data: z + .object({ + options: z + .object({ + soft_descriptor: z.string().optional(), + note_to_payer: z.string().optional(), + }) + .optional(), + }) + .optional(), +}) + +/** + * OrdersTransactionsRefundRequest + */ +export const zOrdersTransactionsRefundRequest = z.object({ + data: z + .object({ + amount: z.number().optional(), + options: z + .object({ + note: z.string().optional(), + }) + .optional(), + }) + .optional(), +}) + +export const zTransactionListResponse = z.object({ + data: z.array(zTransactionResponse), +}) + +export const zResponseData = z.object({ + data: z.unknown().optional(), +}) + +/** + * OrdersTransactionsCancelRequest + */ +export const zOrdersTransactionsCancelRequest = z.object({ + data: z + .object({ + options: z.record(z.unknown()).optional(), + reason: z.string().optional(), + }) + .optional(), +}) + +export const zUpdateOrderShippingGroupRequest = z.object({ + data: z + .object({ + type: z.literal("shipping_group").optional(), + shipping_type: z.string().optional(), + tracking_reference: z.string().optional(), + external_ref: z.string().max(64).optional(), + address: zShippingAddress.optional(), + delivery_estimate: zDeliveryEstimate.optional(), + }) + .optional(), +}) + +export const zSettingsCart = z.object({ + data: z + .object({ + type: z.string(), + id: z.string().readonly().optional(), + cart_expiry_days: z.number().int().optional(), + discounts: z + .object({ + custom_discounts_enabled: z.boolean().optional(), + use_rule_promotions: z.boolean().optional(), + }) + .optional(), + inventories: z + .object({ + defer_inventory_check: z.boolean().optional(), + }) + .optional(), + items: z + .object({ + separate_items_by_location: z.boolean().optional(), + }) + .optional(), + show_all_carts: z.boolean().optional(), + }) + .optional(), +}) + +/** + * Cart Item Object + */ +export const zCartItemObject = zCartItemObjectData.and(zCartItemResponse) + +/** + * Carts Response + */ +export const zCartsResponse = z.object({ + data: z + .array( + z.union([ + zCartItemObject, + zCustomItemObject, + zSubscriptionItemObject, + zPromotionItemObject, + ]), + ) + .optional(), + meta: z + .object({ + display_price: z + .object({ + with_tax: zFormattedPriceData.optional(), + without_tax: zFormattedPriceData.optional(), + tax: zFormattedPriceData.optional(), + discount: zFormattedPriceData.optional(), + without_discount: zFormattedPriceData.optional(), + discounts: z + .record( + z.object({ + amount: z.number().optional(), + currency: z.string().optional(), + formatted: z.string().optional(), + }), + ) + .optional(), + }) + .optional(), + timestamps: zCartTimestamps.optional(), + }) + .optional(), +}) + +/** + * Cart Items Response + */ +export const zCartItemsResponse = z.object({ + data: z + .array( + z.union([ + zCartItemObject, + zCustomItemObject, + zSubscriptionItemObject, + zPromotionItemObject, + ]), + ) + .optional(), +}) + +/** + * Data.StripeConnectPayment + */ +export const zDataStripeConnectPayment = zDataBasePayments.and( + z.object({ + gateway: z.enum(["stripe_connect"]), + options: z + .object({ + receipt_email: z.string().optional(), + }) + .optional(), + payment: z.string().optional(), + }), +) + +/** + * CartsCustomDiscountsUpdateObject + */ +export const zCartsCustomDiscountsUpdateObject = z.object({ + amount: z.number().int().lt(0).optional(), + description: z.string().optional(), + discount_code: z.string().optional(), + discount_engine: z.string().optional(), + external_id: z.string().optional(), + type: z.literal("custom_discount"), +}) + +export const zCartsCustomDiscountsEntityRequest = z.object({ + data: zCartsCustomDiscountsUpdateObject.optional(), +}) + +/** + * CartsCustomDiscountsCreateRequest + */ +export const zCartsCustomDiscountsCreateRequest = z.object({ + data: zCartsCustomDiscountsObject, +}) + +export const zGetCartsHeaders = z.object({ + "EP-Account-Management-Authentication-Token": z.string().optional(), + "X-Moltin-Customer-Token": z.string().optional(), +}) + +export const zGetCartsQuery = z.object({ + include: z.array(z.literal("custom_discounts")).optional(), + "page[limit]": z.number().int().gte(1).lte(100).optional().default(20), + "page[offset]": z.number().int().gte(0).lte(10000).optional().default(0), + filter: z.string().optional(), +}) + +export const zGetCartsResponse = zCartCollectionResponse + +export const zCreateACartBody = zCartsRequest + +export const zCreateACartHeaders = z.object({ + "EP-Account-Management-Authentication-Token": z.string().optional(), + "X-Moltin-Customer-Token": z.string().optional(), +}) + +export const zCreateACartResponse = zCartEntityResponse + +export const zDeleteACartPath = z.object({ + cartID: z.string(), +}) + +/** + * No Content + */ +export const zDeleteACartResponse = z.void() + +export const zGetACartPath = z.object({ + cartID: z.string(), +}) + +export const zGetACartQuery = z.object({ + include: z.array(z.enum(["custom_discounts", "promotions"])).optional(), +}) + +/** + * OK + */ +export const zGetACartResponse = zCartEntityResponse + +export const zUpdateACartBody = zCartsRequest + +export const zUpdateACartPath = z.object({ + cartID: z.string(), +}) + +export const zUpdateACartResponse = zCartEntityResponse + +export const zDeleteAllCartItemsPath = z.object({ + cartID: z.string(), +}) + +/** + * No Content + */ +export const zDeleteAllCartItemsResponse = z.void() + +export const zGetCartItemsPath = z.object({ + cartID: z.string(), +}) + +export const zGetCartItemsQuery = z.object({ + include: z + .array(z.enum(["tax_items", "custom_discounts", "promotions"])) + .optional(), +}) + +export const zGetCartItemsResponse = zCartItemsResponse + +export const zManageCartsBody = z.union([ + zCartItemObjectRequest, + zSubscriptionItemObject, + zCartMergeObjectRequest, + zCustomItemObject, + zReOrderObjectRequest, + zPromotionItemObject, + zBulkAddItemsRequest, +]) + +export const zManageCartsPath = z.object({ + cartID: z.string(), +}) + +/** + * Successfully added item(s) to cart. When promotions are added, the response includes informational messages in the `meta.messages` field describing the promotion and discount effects. + */ +export const zManageCartsResponse = zCartsResponse + +export const zBulkUpdateItemsInCartBody = zBulkUpdateCartsItems + +export const zBulkUpdateItemsInCartPath = z.object({ + cartID: z.string(), +}) + +/** + * Successfully updated cart items + */ +export const zBulkUpdateItemsInCartResponse = zCartItemCollectionResponse + +export const zDeleteACartItemPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), +}) + +export const zDeleteACartItemResponse = zCartsResponse + +export const zUpdateACartItemBody = zUpdateCartsItems + +export const zUpdateACartItemPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), +}) + +export const zUpdateACartItemResponse = zCartsResponse + +export const zDeleteAccountCartAssociationBody = zCartsRelationshipsAccountsData + +export const zDeleteAccountCartAssociationHeaders = z.object({ + "EP-Account-Management-Authentication-Token": z.string().optional(), +}) + +export const zDeleteAccountCartAssociationPath = z.object({ + cartID: z.string(), +}) + +/** + * No Content + */ +export const zDeleteAccountCartAssociationResponse = z.void() + +export const zCreateAccountCartAssociationBody = zCartsRelationshipsAccountsData + +export const zCreateAccountCartAssociationHeaders = z.object({ + "EP-Account-Management-Authentication-Token": z.string().optional(), +}) + +export const zCreateAccountCartAssociationPath = z.object({ + cartID: z.string(), +}) + +export const zCreateAccountCartAssociationResponse = z.union([ + zCartsRelationshipsAccountsData, + z.void(), +]) + +export const zDeleteCustomerCartAssociationBody = + zCartsRelationshipsCustomersData + +export const zDeleteCustomerCartAssociationHeaders = z.object({ + "X-Moltin-Customer-Token": z.string().optional(), +}) + +export const zDeleteCustomerCartAssociationPath = z.object({ + cartID: z.string(), +}) + +/** + * No Content + */ +export const zDeleteCustomerCartAssociationResponse = z.void() + +export const zCreateCustomerCartAssociationBody = + zCartsRelationshipsCustomersData + +export const zCreateCustomerCartAssociationHeaders = z.object({ + "X-Moltin-Customer-Token": z.string().optional(), +}) + +export const zCreateCustomerCartAssociationPath = z.object({ + cartID: z.string(), +}) + +export const zCreateCustomerCartAssociationResponse = z.union([ + zCartsRelationshipsCustomersData, + z.void(), +]) + +export const zDeleteAPromotionViaPromotionCodePath = z.object({ + cartID: z.string(), + promoCode: z.string(), +}) + +/** + * No Content + */ +export const zDeleteAPromotionViaPromotionCodeResponse = z.void() + +export const zAddTaxItemToCartBody = zCartItemTaxesEntityResponse + +export const zAddTaxItemToCartPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), +}) + +export const zAddTaxItemToCartResponse = zCartItemTaxesEntityResponse + +export const zAddTaxItemToCartItemComponentBody = zCartItemTaxesEntityResponse + +export const zAddTaxItemToCartItemComponentPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), + productID: z.string(), +}) + +/** + * Created + */ +export const zAddTaxItemToCartItemComponentResponse = + zCartItemTaxesEntityResponse + +export const zDeleteTaxItemFromCartItemComponentPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), + productID: z.string(), + taxitemID: z.string(), +}) + +/** + * No Content + */ +export const zDeleteTaxItemFromCartItemComponentResponse = z.void() + +export const zUpdateTaxItemFromCartItemComponentBody = + zCartItemTaxesEntityResponse + +export const zUpdateTaxItemFromCartItemComponentPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), + productID: z.string(), + taxitemID: z.string(), +}) + +export const zUpdateTaxItemFromCartItemComponentResponse = + zCartItemTaxesEntityResponse + +export const zBulkDeleteTaxItemsFromCartPath = z.object({ + cartID: z.string(), +}) + +/** + * No Content + */ +export const zBulkDeleteTaxItemsFromCartResponse = z.void() + +export const zBulkAddTaxItemsToCartBody = zCartsBulkTaxes + +export const zBulkAddTaxItemsToCartPath = z.object({ + cartID: z.string(), +}) + +export const zBulkAddTaxItemsToCartResponse = zCartsBulkTaxes + +export const zDeleteATaxItemPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), + taxitemID: z.string(), +}) + +/** + * No Content + */ +export const zDeleteATaxItemResponse = z.void() + +export const zUpdateATaxItemBody = zCartItemTaxesEntityResponse + +export const zUpdateATaxItemPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), + taxitemID: z.string(), +}) + +export const zUpdateATaxItemResponse = zCartItemTaxesEntityResponse + +export const zBulkDeleteCustomDiscountsFromCartPath = z.object({ + cartID: z.string(), +}) + +/** + * No Content + */ +export const zBulkDeleteCustomDiscountsFromCartResponse = z.void() + +export const zBulkAddCustomDiscountsToCartBody = zCartsBulkCustomDiscounts + +export const zBulkAddCustomDiscountsToCartPath = z.object({ + cartID: z.string(), +}) + +export const zBulkAddCustomDiscountsToCartResponse = z.union([ + zCartsBulkCustomDiscountsResponse, + zCartsBulkCustomDiscountsCollectionResponse, +]) + +export const zDeleteCustomDiscountFromCartPath = z.object({ + cartID: z.string(), + customdiscountID: z.string(), +}) + +/** + * No Content + */ +export const zDeleteCustomDiscountFromCartResponse = z.void() + +export const zUpdateCustomDiscountForCartBody = + zCartsCustomDiscountsEntityRequest + +export const zUpdateCustomDiscountForCartPath = z.object({ + cartID: z.string(), + customdiscountID: z.string(), +}) + +export const zUpdateCustomDiscountForCartResponse = + zCartsCustomDiscountsEntityResponse + +export const zAddCustomDiscountToCartItemBody = + zCartsCustomDiscountsCreateRequest + +export const zAddCustomDiscountToCartItemPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), +}) + +/** + * Successful request + */ +export const zAddCustomDiscountToCartItemResponse = z.union([ + zCartsCustomDiscountsCollectionResponse, + zCartsCustomDiscountsEntityResponse, +]) + +export const zDeleteCustomDiscountFromCartItemPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), + customdiscountID: z.string(), +}) + +/** + * No Content + */ +export const zDeleteCustomDiscountFromCartItemResponse = z.void() + +export const zUpdateCustomDiscountForCartItemBody = + zCartsCustomDiscountsEntityRequest + +export const zUpdateCustomDiscountForCartItemPath = z.object({ + cartID: z.string(), + cartitemID: z.string(), + customdiscountID: z.string(), +}) + +export const zUpdateCustomDiscountForCartItemResponse = + zCartsCustomDiscountsEntityResponse + +export const zGetShippingGroupsPath = z.object({ + cartID: z.string(), +}) + +/** + * A list of shipping groups + */ +export const zGetShippingGroupsResponse = z.object({ + data: z.array(zShippingGroupResponse).optional(), +}) + +export const zCreateShippingGroupBody = zCreateShippingGroupRequest + +export const zCreateShippingGroupPath = z.object({ + cartID: z.string(), +}) + +/** + * Shipping group created successfully + */ +export const zCreateShippingGroupResponse = zShippingGroupEntityResponse + +export const zDeleteCartShippingGroupPath = z.object({ + cartId: z.string(), + shippingGroupId: z.string(), +}) + +/** + * Successfully deleted the shipping group + */ +export const zDeleteCartShippingGroupResponse = z.void() + +export const zGetShippingGroupByIdPath = z.object({ + cartId: z.string(), + shippingGroupId: z.string(), +}) + +/** + * Shipping group details + */ +export const zGetShippingGroupByIdResponse = z.object({ + data: zShippingGroupResponse.optional(), +}) + +export const zUpdateShippingGroupBody = zUpdateCartShippingGroupRequest + +export const zUpdateShippingGroupPath = z.object({ + cartId: z.string(), + shippingGroupId: z.string(), +}) + +/** + * Shipping group updated successfully + */ +export const zUpdateShippingGroupResponse = zShippingGroupEntityResponse + +export const zCreateCartPaymentIntentBody = + zElasticPathPaymentsPoweredByStripePayment + +export const zCreateCartPaymentIntentPath = z.object({ + cartID: z.string(), +}) + +/** + * Payment Intent created successfully. + */ +export const zCreateCartPaymentIntentResponse = zCartEntityResponse + +export const zUpdateCartPaymentIntentBody = zCartPaymentUpdate + +export const zUpdateCartPaymentIntentPath = z.object({ + cartID: z.string(), + paymentIntentID: z.string(), +}) + +/** + * Payment updated successfully + */ +export const zUpdateCartPaymentIntentResponse = zCartEntityResponse + +export const zCheckoutApiBody = z.union([zCustomerCheckout, zAccountCheckout]) + +export const zCheckoutApiHeaders = z.object({ + "EP-Account-Management-Authentication-Token": z.string().optional(), +}) + +export const zCheckoutApiPath = z.object({ + cartID: z.string(), +}) + +/** + * OK + */ +export const zCheckoutApiResponse = zOrderEntityResponse + +export const zGetCustomerOrdersHeaders = z.object({ + "x-moltin-customer-token": z.string().optional(), +}) + +export const zGetCustomerOrdersQuery = z.object({ + include: z.string().optional(), + "page[limit]": z.number().int().gte(1).lte(100).optional().default(20), + "page[offset]": z.number().int().gte(0).lte(10000).optional().default(0), + filter: z.string().optional(), +}) + +export const zGetCustomerOrdersResponse = zOrderCollectionResponse + +export const zGetAnOrderPath = z.object({ + orderID: z.string(), +}) + +export const zGetAnOrderQuery = z.object({ + include: z.string().optional(), +}) + +/** + * OK + */ +export const zGetAnOrderResponse = zOrderEntityResponse + +export const zUpdateAnOrderBody = zOrdersUpdateRequest + +export const zUpdateAnOrderPath = z.object({ + orderID: z.string(), +}) + +/** + * OK + */ +export const zUpdateAnOrderResponse = zOrderEntityResponse + +export const zGetOrderItemsPath = z.object({ + orderID: z.string(), +}) + +export const zGetOrderItemsQuery = z.object({ + include: z.string().optional(), +}) + +export const zGetOrderItemsResponse = zOrderItemCollectionResponse + +export const zAnonymizeOrdersBody = zOrdersAnonymizeRequest.and(z.unknown()) + +/** + * OK + */ +export const zAnonymizeOrdersResponse = zOrdersListResponse + +export const zConfirmOrderPath = z.object({ + orderID: z.string(), +}) + +/** + * Order confirmed successfully + */ +export const zConfirmOrderResponse = zTransactionEntityResponse + +export const zPaymentSetupBody = zPaymentsRequest + +export const zPaymentSetupPath = z.object({ + orderID: z.string(), +}) + +/** + * OK + */ +export const zPaymentSetupResponse = zTransactionEntityResponse + +export const zConfirmPaymentBody = zOrdersTransactionsConfirmRequest + +export const zConfirmPaymentPath = z.object({ + orderID: z.string(), + transactionID: z.string(), +}) + +export const zConfirmPaymentResponse = zTransactionEntityResponse + +export const zCaptureATransactionBody = zOrdersTransactionsCaptureRequest + +export const zCaptureATransactionPath = z.object({ + orderID: z.string(), + transactionID: z.string(), +}) + +export const zCaptureATransactionResponse = zTransactionEntityResponse + +export const zRefundATransactionBody = zOrdersTransactionsRefundRequest + +export const zRefundATransactionPath = z.object({ + orderID: z.string(), + transactionID: z.string(), +}) + +export const zRefundATransactionResponse = zTransactionEntityResponse + +export const zGetOrderTransactionsPath = z.object({ + orderID: z.string(), +}) + +export const zGetOrderTransactionsResponse = zTransactionListResponse + +export const zGetATransactionPath = z.object({ + orderID: z.string(), + transactionID: z.string(), +}) + +export const zGetATransactionResponse = zResponseData.and( + z.object({ + data: zTransactionResponse.optional(), + }), +) + +export const zCancelATransactionBody = zOrdersTransactionsCancelRequest + +export const zCancelATransactionPath = z.object({ + orderID: z.string(), + transactionID: z.string(), +}) + +export const zCancelATransactionResponse = zTransactionEntityResponse + +export const zGetOrderShippingGroupsPath = z.object({ + orderID: z.string(), +}) + +/** + * A list of shipping groups + */ +export const zGetOrderShippingGroupsResponse = z.object({ + data: z.array(zShippingGroupResponse).optional(), +}) + +/** + * Shipping group details + */ +export const zCreateOrderShippingGroupBody = z.object({ + data: z + .object({ + type: z.literal("shipping_group"), + shipping_type: z.string().optional(), + tracking_reference: z.string().optional(), + address: z + .object({ + first_name: z.string().optional(), + last_name: z.string().optional(), + phone_number: z.string().optional(), + company_name: z.string().optional(), + line_1: z.string().optional(), + line_2: z.string().optional(), + city: z.string().optional(), + postcode: z.string().optional(), + county: z.string().optional(), + country: z.string().optional(), + region: z.string().optional(), + instructions: z.string().optional(), + }) + .optional(), + delivery_estimate: z + .object({ + start: z.string().datetime().optional(), + end: z.string().datetime().optional(), + }) + .optional(), + }) + .optional(), +}) + +export const zCreateOrderShippingGroupPath = z.object({ + orderID: z.string(), +}) + +/** + * Shipping group created + */ +export const zCreateOrderShippingGroupResponse = z.object({ + data: zShippingGroupResponse.optional(), +}) + +export const zGetShippingGroupsByIdPath = z.object({ + orderID: z.string(), + shippingGroupID: z.string(), +}) + +export const zGetShippingGroupsByIdQuery = z.object({ + include: z.literal("items").optional(), +}) + +/** + * Shipping group details + */ +export const zGetShippingGroupsByIdResponse = zShippingGroupEntityResponse + +export const zPutShippingGroupByIdBody = zUpdateOrderShippingGroupRequest + +export const zPutShippingGroupByIdPath = z.object({ + orderID: z.string(), + shippingGroupID: z.string(), +}) + +/** + * Shipping group updated successfully + */ +export const zPutShippingGroupByIdResponse = zShippingGroupEntityResponse + +/** + * OK + */ +export const zGetV2SettingsCartResponse = zSettingsCart + +export const zPutV2SettingsCartBody = zSettingsCart + +/** + * OK + */ +export const zPutV2SettingsCartResponse = zSettingsCart + +export const zGetV2SettingsCartStoreIdPath = z.object({ + storeID: z.string(), +}) + +/** + * OK + */ +export const zGetV2SettingsCartStoreIdResponse = zSettingsCart + +export const zPutV2SettingsCartStoreIdBody = zSettingsCart + +export const zPutV2SettingsCartStoreIdPath = z.object({ + storeID: z.string(), +}) + +/** + * OK + */ +export const zPutV2SettingsCartStoreIdResponse = zSettingsCart diff --git a/packages/sdks/cart-checkout-order/src/index.ts b/packages/sdks/cart-checkout-order/src/index.ts index 0a3088675..c8a5cc25f 100644 --- a/packages/sdks/cart-checkout-order/src/index.ts +++ b/packages/sdks/cart-checkout-order/src/index.ts @@ -1,6 +1,44 @@ export * from "./client" -import { createClient } from "@hey-api/client-fetch" -import type { Client } from "@hey-api/client-fetch" -export { createClient } -export type { Client } -export { client } from "./client/sdk.gen" + +export { createClient, createConfig } from "./client/client" +export type { + Client, + Config, + RequestOptions, + RequestResult, +} from "./client/client" + +export type { CreateClientConfig } from "./client/client.gen" + +export { client } from "./client/client.gen" + +export { createCartCheckoutOrderClient } from "./runtime" +export type { CartCheckoutOrderClientOptions } from "./runtime" + +export { + TokenRequestError, + clientCredentialsProvider, + createAuthCallback, + createAuthenticatedFetch, + createConfiguredClient, + createRetryFetch, + createTokenSource, + implicitProvider, + localStorageAdapter, + memoryStorage, + staticTokenProvider, +} from "@epcc-sdk/sdks-runtime" +export type { + AuthenticatedFetchOptions, + ClientCredentialsOptions, + GrantOptions, + ImplicitOptions, + RetryFetchOptions, + StorageAdapter, + TokenProvider, + TokenRequestFailure, + TokenRequestReason, + TokenResponse, + TokenSource, + TokenSourceOptions, +} from "@epcc-sdk/sdks-runtime" diff --git a/packages/sdks/cart-checkout-order/src/runtime.test.ts b/packages/sdks/cart-checkout-order/src/runtime.test.ts new file mode 100644 index 000000000..a502fd18b --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/runtime.test.ts @@ -0,0 +1,238 @@ +import { describe, expect, it, vi } from "vitest" +import { createCartCheckoutOrderClient, getShippingGroupById } from "./index" +import type { + AddCustomDiscountToCartItemData, + BulkAddTaxItemsToCartData, + UpdateCustomDiscountForCartData, +} from "./index" +import { + zAddCustomDiscountToCartItemBody, + zAddTaxItemToCartItemComponentResponse, + zBulkAddTaxItemsToCartBody, + zGetShippingGroupByIdResponse, + zUpdateCustomDiscountForCartBody, +} from "./zod" + +const shippingGroupFromTheSpecExample = { + data: { + id: "7cfa5b07-092e-4dbe-bbad-55a771a34117", + type: "shipping_group", + relation: "cart", + cart_id: "96b1d104-0d2e-41fd-9543-6c3c5a698959", + shipping_type: "standard", + tracking_reference: "TRACK123", + address: { + first_name: "John", + last_name: "Doe", + phone_number: "(555) 555-1234", + company_name: "ACME Corp", + line_1: "123 Main St", + line_2: "Suite 100", + city: "Portland", + postcode: "97201", + county: "Multnomah", + country: "US", + region: "Oregon", + instructions: "Leave at front door", + }, + delivery_estimate: { + start: "2024-01-15T00:00:00Z", + end: "2024-01-20T00:00:00Z", + }, + meta: { + shipping_display_price: { + total: { amount: 1000, currency: "USD", formatted: "$10.00" }, + base: { amount: 800, currency: "USD", formatted: "$8.00" }, + tax: { amount: 200, currency: "USD", formatted: "$2.00" }, + fees: { amount: 0, currency: "USD", formatted: "$0.00" }, + }, + }, + }, +} + +const baseUrl = "https://useast.api.elasticpath.com" +const cartId = "96b1d104-0d2e-41fd-9543-6c3c5a698959" +const shippingGroupId = "7cfa5b07-092e-4dbe-bbad-55a771a34117" +const shippingGroupPath = { cartId, shippingGroupId } + +function stubFetch(...statuses: number[]) { + const requests: Request[] = [] + const transport = vi.fn( + async (input: RequestInfo | URL, init?: RequestInit) => { + const request = + input instanceof Request && init === undefined + ? input + : new Request(input, init) + requests.push(request) + const status = + statuses[Math.min(requests.length - 1, statuses.length - 1)]! + return new Response( + status === 200 ? JSON.stringify(shippingGroupFromTheSpecExample) : "{}", + { status, headers: { "Content-Type": "application/json" } }, + ) + }, + ) as unknown as typeof fetch + return { requests, transport } +} + +describe("createCartCheckoutOrderClient", () => { + it("sends getShippingGroupById to the configured base URL with the bearer token", async () => { + const { requests, transport } = stubFetch(200) + const client = createCartCheckoutOrderClient({ + baseUrl, + token: "pre-issued", + fetch: transport, + }) + + const { data } = await getShippingGroupById({ + client, + path: shippingGroupPath, + }) + + expect(requests).toHaveLength(1) + expect(requests[0]!.method).toBe("GET") + expect(requests[0]!.url).toBe( + `${baseUrl}/v2/carts/${cartId}/shipping-groups/${shippingGroupId}`, + ) + expect(requests[0]!.headers.get("Authorization")).toBe("Bearer pre-issued") + expect(data).toEqual(shippingGroupFromTheSpecExample) + }) + + it("obtains a new token on a 401 and replays the request once", async () => { + const { requests, transport } = stubFetch(401, 200) + let minted = 0 + const client = createCartCheckoutOrderClient({ + baseUrl, + provider: async () => { + minted += 1 + return { access_token: `token-${minted}` } + }, + fetch: transport, + }) + + const { data, response } = await getShippingGroupById({ + client, + path: shippingGroupPath, + }) + + expect(requests.map((r) => r.headers.get("Authorization"))).toEqual([ + "Bearer token-1", + "Bearer token-2", + ]) + expect(response?.status).toBe(200) + expect(data).toEqual(shippingGroupFromTheSpecExample) + }) +}) + +describe("the shared client", () => { + it("sends an operation called without a client to EU West", async () => { + const { requests, transport } = stubFetch(200) + + await getShippingGroupById({ path: shippingGroupPath, fetch: transport }) + + expect(requests[0]!.url).toBe( + `https://euwest.api.elasticpath.com/v2/carts/${cartId}/shipping-groups/${shippingGroupId}`, + ) + }) +}) + +describe("the /zod entry", () => { + it("parses the getShippingGroupById response and rejects a delivery estimate start that is not a date-time string", () => { + expect( + zGetShippingGroupByIdResponse.parse(shippingGroupFromTheSpecExample), + ).toEqual(shippingGroupFromTheSpecExample) + + const { data } = shippingGroupFromTheSpecExample + const tampered = { + data: { + ...data, + delivery_estimate: { ...data.delivery_estimate, start: 1705276800000 }, + }, + } + expect(zGetShippingGroupByIdResponse.safeParse(tampered).success).toBe( + false, + ) + }) + + it("keeps the tax item response typed with the read/write split off", () => { + const taxItem = { + data: { + id: "4f4e6d37-8c8c-4a1a-b8a3-6cd2efab12de", + type: "tax_item", + code: "VAT", + jurisdiction: "UK", + name: "Value Added Tax", + rate: 0.2, + }, + } + + expect(zAddTaxItemToCartItemComponentResponse.parse(taxItem)).toEqual( + taxItem, + ) + const tampered = { data: { ...taxItem.data, rate: "0.2" } } + expect( + zAddTaxItemToCartItemComponentResponse.safeParse(tampered).success, + ).toBe(false) + }) + + it("keeps meta.component_product_id on a bulk tax item, which targets a bundle component", () => { + const body: BulkAddTaxItemsToCartData["body"] = { + data: [ + { + type: "tax_item", + code: "GST", + name: "Goods and Services Tax", + jurisdiction: "AU", + rate: 0.1, + meta: { + component_product_id: "12345678-1234-5678-9012-123456789012", + }, + relationships: { + item: { + data: { + type: "cart_item", + id: "22223333-4444-5555-6666-777788889999", + }, + }, + }, + }, + ], + options: { add_all_or_nothing: false }, + } + + expect(zBulkAddTaxItemsToCartBody.parse(body)).toEqual(body) + }) + + it("takes a custom discount update amount as a negative whole number, the only form the service accepts", () => { + const body: UpdateCustomDiscountForCartData["body"] = { + data: { type: "custom_discount", amount: -150 }, + } + + expect(zUpdateCustomDiscountForCartBody.parse(body)).toEqual(body) + expect( + zUpdateCustomDiscountForCartBody.safeParse({ + data: { + type: "custom_discount", + amount: { amount: -150, currency: "USD", formatted: "-$1.50" }, + }, + }).success, + ).toBe(false) + }) + + it("wraps a cart item custom discount in data, which the service requires", () => { + const discount = { + type: "custom_discount" as const, + amount: -150, + description: "Loyalty discount", + discount_code: "loyalty", + discount_engine: "Custom Discount Engine", + external_id: "loyalty-discount", + } + const body: AddCustomDiscountToCartItemData["body"] = { data: discount } + + expect(zAddCustomDiscountToCartItemBody.parse(body)).toEqual(body) + expect(zAddCustomDiscountToCartItemBody.safeParse(discount).success).toBe( + false, + ) + }) +}) diff --git a/packages/sdks/cart-checkout-order/src/runtime.ts b/packages/sdks/cart-checkout-order/src/runtime.ts new file mode 100644 index 000000000..5bd4d43b3 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/runtime.ts @@ -0,0 +1,12 @@ +import { createConfiguredClient } from "@epcc-sdk/sdks-runtime" +import type { ConfiguredClientOptions } from "@epcc-sdk/sdks-runtime" +import { createClient, createConfig } from "./client/client" +import type { Client, Config } from "./client/client" + +export type CartCheckoutOrderClientOptions = ConfiguredClientOptions + +export function createCartCheckoutOrderClient( + options: CartCheckoutOrderClientOptions, +): Client { + return createConfiguredClient({ createClient, createConfig }, options) +} diff --git a/packages/sdks/cart-checkout-order/src/zod.ts b/packages/sdks/cart-checkout-order/src/zod.ts new file mode 100644 index 000000000..584e3f347 --- /dev/null +++ b/packages/sdks/cart-checkout-order/src/zod.ts @@ -0,0 +1 @@ +export * from "./client/zod.gen" diff --git a/packages/sdks/cart-checkout-order/tsup.config.ts b/packages/sdks/cart-checkout-order/tsup.config.ts index 23233fd30..91c898b67 100644 --- a/packages/sdks/cart-checkout-order/tsup.config.ts +++ b/packages/sdks/cart-checkout-order/tsup.config.ts @@ -6,7 +6,7 @@ import { } from "esbuild-fix-imports-plugin" export default defineConfig({ - entry: ["src/**/*.ts"], + entry: ["src/**/*.ts", "!src/**/*.test.ts"], format: ["esm", "cjs"], dts: true, splitting: false, @@ -19,7 +19,7 @@ export default defineConfig({ fixFolderImportsPlugin(), fixExtensionsPlugin(), ], - external: ["@hey-api/client-fetch"], + external: ["zod", "zod/v3"], outDir: "dist", outExtension(ctx) { return { diff --git a/packages/sdks/cart-checkout-order/vitest.config.ts b/packages/sdks/cart-checkout-order/vitest.config.ts new file mode 100644 index 000000000..b7b707f74 --- /dev/null +++ b/packages/sdks/cart-checkout-order/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config" + +export default defineConfig({ + test: { + include: ["**/*.{test,spec}.{js,ts}"], + }, +}) diff --git a/packages/sdks/catalog-search/README.md b/packages/sdks/catalog-search/README.md index 0ebabb484..3555a9111 100644 --- a/packages/sdks/catalog-search/README.md +++ b/packages/sdks/catalog-search/README.md @@ -139,17 +139,53 @@ client.interceptors.response.eject((response) => { ## Authentication -We are working to provide helpers to handle auth easier for you but for now using an interceptor is the easiest method. +`createCatalogSearchClient` is the short way. It returns a client that holds a caching token +source, sets the `auth` hook, refreshes and replays once on a 401, and backs off on a 429. ```ts -import { client } from "@epcc-sdk/sdks-catalog-search"; - -client.interceptors.request.use((request, options) => { - request.headers.set('Authorization', 'Bearer MY_TOKEN'); - return request; +import { + createCatalogSearchClient, + listStopwordSets, +} from "@epcc-sdk/sdks-catalog-search"; + +const client = createCatalogSearchClient({ + baseUrl: "https://euwest.api.elasticpath.com", + clientId: process.env.EPCC_CLIENT_ID!, + clientSecret: process.env.EPCC_CLIENT_SECRET!, }); + +const { data } = await listStopwordSets({ client }); +``` + +Pass the host as `baseUrl`, without `/v2`: operations go to `/pcm/...`. + +Credentials come from `source`, `provider`, `token`, `clientId` plus `clientSecret`, or +`clientId` alone for the implicit grant. `retry`, `storage`, `leewaySeconds`, `fetch` and +`config` tune the rest. `config` is merged last, so anything the factory chose can be +overridden. + +Pass the client to every operation. The module-level `client` exported by this package +carries no credentials, so an operation called without `{ client }` gets a 401. + +To assemble the stack by hand, `createTokenSource`, `createAuthenticatedFetch`, +`createRetryFetch` and `createConfiguredClient` are re-exported from this package, so you +still install only `@epcc-sdk/sdks-catalog-search`. Do not authenticate with a request +interceptor: an interceptor cannot see the response, so it can never retry a 401. + +## Validation schemas + +Zod schemas for every request body, path and response are published under the `/zod` +subpath. `zod` is an optional peer dependency (3.x), so the root entry never imports it. + +```ts +import { zStopwordSet } from "@epcc-sdk/sdks-catalog-search/zod"; + +const stopwordSet = zStopwordSet.parse(data?.data?.[0]); ``` +`num_tokens_dropped` on a search hit's `text_match_info` is `int64` in the specification. Its +schema coerces it to `bigint`, while the TypeScript types carry it as `number`. + ## Build URL If you need to access the compiled URL, you can use the buildUrl() method. It's loosely typed by default to accept almost any value; in practice, you will want to pass a type hint. diff --git a/packages/sdks/catalog-search/openapi-ts.config.ts b/packages/sdks/catalog-search/openapi-ts.config.ts index 2fd388793..c24dfc176 100644 --- a/packages/sdks/catalog-search/openapi-ts.config.ts +++ b/packages/sdks/catalog-search/openapi-ts.config.ts @@ -1,24 +1,15 @@ -import { defaultPlugins, defineConfig } from "@hey-api/openapi-ts" -import { defineConfig as defineReadmeConfig } from "../specs/heyapi/plugins" +import { defineConfig } from "@hey-api/openapi-ts" export default defineConfig({ - client: "@hey-api/client-fetch", - experimentalParser: true, input: "../specs/bundled/catalog_search_standalone.yaml", - output: { path: "src/client", format: "prettier" }, + output: { path: "src/client", postProcess: ["prettier"] }, plugins: [ - ...defaultPlugins, { - exportInlineEnums: true, - name: "@hey-api/typescript", + baseUrl: "https://euwest.api.elasticpath.com", + name: "@hey-api/client-fetch", }, - { - dates: true, - name: "@hey-api/transformers", - }, - defineReadmeConfig({ - name: "generate-readme", - targetOperation: "postMultiSearch", - }), + { name: "@hey-api/typescript" }, + { name: "@hey-api/sdk" }, + { compatibilityVersion: 3, name: "zod" }, ], }) diff --git a/packages/sdks/catalog-search/package.json b/packages/sdks/catalog-search/package.json index 28e118de7..7cb560c87 100644 --- a/packages/sdks/catalog-search/package.json +++ b/packages/sdks/catalog-search/package.json @@ -10,7 +10,9 @@ "build": "pnpm oas:build && pnpm openapi-ts && pnpm build:tsup", "oas:build": "redocly bundle catalog_search-standalone@v1 --config ../specs/config/redocly.yaml", "build:tsup": "tsup", - "openapi-ts": "openapi-ts" + "openapi-ts": "openapi-ts", + "test": "vitest run", + "test:watch": "vitest" }, "exports": { ".": { @@ -23,8 +25,25 @@ "default": "./dist/index.cjs" } }, + "./zod": { + "import": { + "types": "./dist/zod.d.ts", + "default": "./dist/zod.mjs" + }, + "require": { + "types": "./dist/zod.d.cts", + "default": "./dist/zod.cjs" + } + }, "./package.json": "./package.json" }, + "typesVersions": { + "*": { + "zod": [ + "./dist/zod.d.ts" + ] + } + }, "files": [ "dist/**" ], @@ -32,19 +51,28 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "@epcc-sdk/sdks-runtime": "workspace:*" + }, "devDependencies": { - "@hey-api/openapi-ts": "0.61.2", + "@hey-api/openapi-ts": "0.99.0", "@redocly/cli": "^1.21.0", "@redocly/openapi-core": "^1.21.0", - "lodash": "^4.17.21", - "typescript": "^5.5.3", "@types/ejs": "^3.1.5", "ejs": "^3.1.10", "esbuild-fix-imports-plugin": "^1.0.19", "esbuild-plugin-file-path-extensions": "^1.0.0", - "tsup": "^8.4.0" + "tsup": "^8.4.0", + "typescript": "^5.5.3", + "vitest": "^3.0.7", + "zod": "3.25.76" }, - "dependencies": { - "@hey-api/client-fetch": "0.6.0" + "peerDependencies": { + "zod": "^3.22.0" + }, + "peerDependenciesMeta": { + "zod": { + "optional": true + } } } diff --git a/packages/sdks/catalog-search/pnpm-lock.yaml b/packages/sdks/catalog-search/pnpm-lock.yaml index 3b8e1e10f..987aaca8b 100644 --- a/packages/sdks/catalog-search/pnpm-lock.yaml +++ b/packages/sdks/catalog-search/pnpm-lock.yaml @@ -8,13 +8,13 @@ importers: .: dependencies: - '@hey-api/client-fetch': - specifier: 0.6.0 - version: 0.6.0 + '@epcc-sdk/sdks-runtime': + specifier: workspace:* + version: link:../runtime devDependencies: '@hey-api/openapi-ts': - specifier: 0.61.2 - version: 0.61.2(typescript@5.9.3) + specifier: 0.99.0 + version: 0.99.0(typescript@5.8.2) '@redocly/cli': specifier: ^1.21.0 version: 1.34.20(ajv@8.20.0) @@ -29,19 +29,22 @@ importers: version: 3.1.10 esbuild-fix-imports-plugin: specifier: ^1.0.19 - version: 1.0.23 + version: 1.0.19 esbuild-plugin-file-path-extensions: specifier: ^1.0.0 version: 1.0.0 - lodash: - specifier: ^4.17.21 - version: 4.18.1 tsup: specifier: ^8.4.0 - version: 8.5.1(jiti@2.6.1)(typescript@5.9.3) + version: 8.4.0(jiti@2.7.0)(postcss@8.5.28)(typescript@5.8.2) typescript: specifier: ^5.5.3 - version: 5.9.3 + version: 5.8.2 + vitest: + specifier: ^3.0.7 + version: 3.2.7(jiti@2.7.0) + zod: + specifier: 3.25.76 + version: 3.25.76 packages: @@ -63,158 +66,308 @@ packages: '@emotion/memoize@0.9.0': resolution: {integrity: sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==} - '@esbuild/aix-ppc64@0.27.2': - resolution: {integrity: sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==} + '@esbuild/aix-ppc64@0.25.2': + resolution: {integrity: sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.27.2': - resolution: {integrity: sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==} + '@esbuild/aix-ppc64@0.28.2': + resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.25.2': + resolution: {integrity: sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm64@0.28.2': + resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.27.2': - resolution: {integrity: sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==} + '@esbuild/android-arm@0.25.2': + resolution: {integrity: sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.27.2': - resolution: {integrity: sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==} + '@esbuild/android-arm@0.28.2': + resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.25.2': + resolution: {integrity: sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.27.2': - resolution: {integrity: sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==} + '@esbuild/android-x64@0.28.2': + resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.25.2': + resolution: {integrity: sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.27.2': - resolution: {integrity: sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==} + '@esbuild/darwin-arm64@0.28.2': + resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.25.2': + resolution: {integrity: sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.27.2': - resolution: {integrity: sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==} + '@esbuild/darwin-x64@0.28.2': + resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.25.2': + resolution: {integrity: sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.2': - resolution: {integrity: sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==} + '@esbuild/freebsd-arm64@0.28.2': + resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.25.2': + resolution: {integrity: sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.27.2': - resolution: {integrity: sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==} + '@esbuild/freebsd-x64@0.28.2': + resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.25.2': + resolution: {integrity: sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.27.2': - resolution: {integrity: sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==} + '@esbuild/linux-arm64@0.28.2': + resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.25.2': + resolution: {integrity: sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-arm@0.28.2': + resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.27.2': - resolution: {integrity: sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==} + '@esbuild/linux-ia32@0.25.2': + resolution: {integrity: sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.27.2': - resolution: {integrity: sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==} + '@esbuild/linux-ia32@0.28.2': + resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.25.2': + resolution: {integrity: sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.27.2': - resolution: {integrity: sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==} + '@esbuild/linux-loong64@0.28.2': + resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.25.2': + resolution: {integrity: sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.28.2': + resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.27.2': - resolution: {integrity: sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==} + '@esbuild/linux-ppc64@0.25.2': + resolution: {integrity: sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.27.2': - resolution: {integrity: sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==} + '@esbuild/linux-ppc64@0.28.2': + resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.25.2': + resolution: {integrity: sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.2': + resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.27.2': - resolution: {integrity: sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==} + '@esbuild/linux-s390x@0.25.2': + resolution: {integrity: sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.27.2': - resolution: {integrity: sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==} + '@esbuild/linux-s390x@0.28.2': + resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.25.2': + resolution: {integrity: sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.28.2': + resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.27.2': - resolution: {integrity: sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==} + '@esbuild/netbsd-arm64@0.25.2': + resolution: {integrity: sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.2': - resolution: {integrity: sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==} + '@esbuild/netbsd-arm64@0.28.2': + resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.25.2': + resolution: {integrity: sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.27.2': - resolution: {integrity: sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==} + '@esbuild/netbsd-x64@0.28.2': + resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.25.2': + resolution: {integrity: sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-arm64@0.28.2': + resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.2': - resolution: {integrity: sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==} + '@esbuild/openbsd-x64@0.25.2': + resolution: {integrity: sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.27.2': - resolution: {integrity: sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==} + '@esbuild/openbsd-x64@0.28.2': + resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.2': + resolution: {integrity: sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.27.2': - resolution: {integrity: sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==} + '@esbuild/sunos-x64@0.25.2': + resolution: {integrity: sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.27.2': - resolution: {integrity: sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==} + '@esbuild/sunos-x64@0.28.2': + resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.25.2': + resolution: {integrity: sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-arm64@0.28.2': + resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.27.2': - resolution: {integrity: sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==} + '@esbuild/win32-ia32@0.25.2': + resolution: {integrity: sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.27.2': - resolution: {integrity: sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==} + '@esbuild/win32-ia32@0.28.2': + resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.25.2': + resolution: {integrity: sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@esbuild/win32-x64@0.28.2': + resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -226,41 +379,63 @@ packages: resolution: {integrity: sha512-XK6BTq1NDMo9Xqw/YkYyGjSsg44fbNwYRx7QK2CuoQgyy+f1rrTDHoExVM5PsyXCtfl2vs2vVJ0MN0yN6LppRw==} engines: {node: '>=14.0.0', npm: '>=6.0.0'} - '@hey-api/client-fetch@0.6.0': - resolution: {integrity: sha512-FlhFsVeH8RxJe/nq8xUzxNbiOpe+GadxlD2pfvDyOyLdCTU4o/LRv46ZVWstaW7DgF4nxhI328chy3+AulwVXw==} - deprecated: Starting with v0.73.0, this package is bundled directly inside @hey-api/openapi-ts. + '@hey-api/codegen-core@0.9.1': + resolution: {integrity: sha512-s97jL1dgTMuiMHv2BZ1X4Tgd99Mf9GOvGdNqNcGwIMmnR+PgYNoraj4Zvp134MKsNCap/m7k0r0vKKnl56pj4w==} + engines: {node: '>=22.18.0'} - '@hey-api/json-schema-ref-parser@1.0.1': - resolution: {integrity: sha512-dBt0A7op9kf4BcK++x6HBYDmvCvnJUZEGe5QytghPFHnMXPyKwDKomwL/v5e9ERk6E0e1GzL/e/y6pWUso9zrQ==} - engines: {node: '>= 16'} + '@hey-api/json-schema-ref-parser@1.4.4': + resolution: {integrity: sha512-otmd+zCxbYVBIp/mlMTnGkvlNYLkVKgs3VOIq0kSnenhB1+fRwLPQIeSwyWM6E51oXhUedkYjVsVpkVexeuJOA==} + engines: {node: '>=22.18.0'} - '@hey-api/openapi-ts@0.61.2': - resolution: {integrity: sha512-E0b8PibVqmZd/E/MB0h8Q2VXObZc+nhHHx3quLwNM08QgEtkC29vMcayzmuG+rR4nGvZGvREP1a4rZc0v6Xjgg==} - engines: {node: ^18.0.0 || >=20.0.0} + '@hey-api/openapi-ts@0.99.0': + resolution: {integrity: sha512-SePU/5oEWWkvUBYmvzdYRctseoLuskyhs4ET0RvLIcmzc8yLQoA2R+KtBIQ8bPsoSUB0m4E5SmBnl6aGSA0szQ==} + engines: {node: '>=22.18.0'} hasBin: true peerDependencies: - typescript: ^5.x + typescript: '>=5.5.3 || >=6.0.0 || 6.0.1-rc' + + '@hey-api/shared@0.5.0': + resolution: {integrity: sha512-JN/j4Ebh4cJGYIQ5cwWuqe7GeSUyQoz7oC51WqyhKOcrejK6DKZMDkshc5d1eKTRuRL+rjozuRcoUaZZn2DGPw==} + engines: {node: '>=22.18.0'} + + '@hey-api/spec-types@0.2.0': + resolution: {integrity: sha512-ibQ8Is7evMavzr8GNyJCcTg975d8DpaMUyLmOrQ85UBdy1l6t1KuRAwgChAbesJsIlNV6gjmlXruWyegDX18Fg==} + + '@hey-api/types@0.1.4': + resolution: {integrity: sha512-thWfawrDIP7wSI9ioT13I5soaaqB5vAPIiZmgD8PbeEVKNrkonc0N/Sjj97ezl7oQgusZmaNphGdMKipPO6IBg==} '@humanwhocodes/momoa@2.0.4': resolution: {integrity: sha512-RE815I4arJFtt+FVeU1Tgp9/Xvecacji8w/V6XtXsWWH/wz/eNkNbhb+ny/+PlVZjV0rxQpRSQKNKE3lcktHEA==} engines: {node: '>=10.10.0'} + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + '@jest/schemas@29.6.3': resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - '@jridgewell/gen-mapping@0.3.13': - resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} + engines: {node: '>=6.0.0'} '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} - '@jridgewell/sourcemap-codec@1.5.5': - resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} - '@jridgewell/trace-mapping@0.3.31': - resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} '@jsdevtools/ono@7.1.3': resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} @@ -277,8 +452,18 @@ packages: peerDependencies: jsep: ^0.4.0||^1.0.0 - '@nodable/entities@3.0.0': - resolution: {integrity: sha512-8L9xFeTYKhm49xfIypoe2W5wV1m/3Z58kT+7kR9A8OyFxcPduI4VmxaUMQyKYrRjUoLLSXv6EKKID5Tvj9cUVw==} + '@lukeed/ms@2.0.2': + resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==} + engines: {node: '>=8'} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} + engines: {node: ^22.20 || ^24.12 || >=25} + cpu: [x64] + os: [linux] + + '@nodable/entities@3.1.0': + resolution: {integrity: sha512-LsS/DjHr+uDM647Gru/cA8+J3a3HfhttwCKLyuoyN7yXTFCxKBtSgMQBvrW9yNPa2/zDRUNuGPaH5QUFoa4arQ==} '@opentelemetry/api-logs@0.222.0': resolution: {integrity: sha512-9mb1If+IF6u0ZVXkHQ6ogEae5HwA6ajIVUgpSDQyRASxft6BSXHvBvPooRle3yFN/fKnCdSOnuu0OC3PLcF6+g==} @@ -362,6 +547,10 @@ packages: resolution: {integrity: sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg==} engines: {node: '>=14'} + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + '@redocly/ajv@8.11.2': resolution: {integrity: sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==} @@ -381,139 +570,248 @@ packages: resolution: {integrity: sha512-sbZe+3mAGSHu9N+vxXs7NYQoyfj5C0E2c/Ik/1A5S1mInsPauL7bfeR7/nzY3uR8RSY/lkci5HtDT+dNTbknug==} engines: {node: '>=18.17.0', npm: '>=9.5.0'} - '@rollup/rollup-android-arm-eabi@4.57.1': - resolution: {integrity: sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg==} + '@rollup/rollup-android-arm-eabi@4.40.0': + resolution: {integrity: sha512-+Fbls/diZ0RDerhE8kyC6hjADCXA1K4yVNlH0EYfd2XjyH0UGgzaQ8MlT0pCXAThfxv3QUAczHaL+qSv1E4/Cg==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.57.1': - resolution: {integrity: sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w==} + '@rollup/rollup-android-arm-eabi@4.63.5': + resolution: {integrity: sha512-J25QJU+B78T4FhhBsNpLJyVWOi31mwtpcMwywHmOKH65Q9IWGA81gPj+dnwlhU8wktVriYE+tFAaQgrnJRzAZg==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.40.0': + resolution: {integrity: sha512-PPA6aEEsTPRz+/4xxAmaoWDqh67N7wFbgFUJGMnanCFs0TV99M0M8QhhaSCks+n6EbQoFvLQgYOGXxlMGQe/6w==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.57.1': - resolution: {integrity: sha512-crNPrwJOrRxagUYeMn/DZwqN88SDmwaJ8Cvi/TN1HnWBU7GwknckyosC2gd0IqYRsHDEnXf328o9/HC6OkPgOg==} + '@rollup/rollup-android-arm64@4.63.5': + resolution: {integrity: sha512-LDopB3zuZM5Ux9TT2luNEBJW/tYbGU2g1d+VpKk6I+gSKDb+/7sYE6M225gRQt4RbMX6MSwMsVR/phdjVUgRLg==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.40.0': + resolution: {integrity: sha512-GwYOcOakYHdfnjjKwqpTGgn5a6cUX7+Ra2HeNj/GdXvO2VJOOXCiYYlRFU4CubFM67EhbmzLOmACKEfvp3J1kQ==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.57.1': - resolution: {integrity: sha512-Ji8g8ChVbKrhFtig5QBV7iMaJrGtpHelkB3lsaKzadFBe58gmjfGXAOfI5FV0lYMH8wiqsxKQ1C9B0YTRXVy4w==} + '@rollup/rollup-darwin-arm64@4.63.5': + resolution: {integrity: sha512-wlJEERGfeuHeBavCL2qVnNacOK43NDoZM4sjkeRPymd04OAE9T1zBqDJgmZ+CIsPTYKwdzpUC8vmOw84dwY4Tg==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.40.0': + resolution: {integrity: sha512-CoLEGJ+2eheqD9KBSxmma6ld01czS52Iw0e2qMZNpPDlf7Z9mj8xmMemxEucinev4LgHalDPczMyxzbq+Q+EtA==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.63.5': + resolution: {integrity: sha512-4nJJGg5jbo2wwPP4JP+LfEBA3bvP8rU9CLuhp7jWvq9sxEyhjQFTFdrqi+/dHEin/pd8jpT0vcehIpnZtmEdcQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.57.1': - resolution: {integrity: sha512-R+/WwhsjmwodAcz65guCGFRkMb4gKWTcIeLy60JJQbXrJ97BOXHxnkPFrP+YwFlaS0m+uWJTstrUA9o+UchFug==} + '@rollup/rollup-freebsd-arm64@4.40.0': + resolution: {integrity: sha512-r7yGiS4HN/kibvESzmrOB/PxKMhPTlz+FcGvoUIKYoTyGd5toHp48g1uZy1o1xQvybwwpqpe010JrcGG2s5nkg==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-arm64@4.63.5': + resolution: {integrity: sha512-DrZbyCDF1hneuO6jRbvZ2D7+PIBM6yIwYnJpg2vIk58T+wuFpiaGZrfUr59lDWw45bg+IrpTGLPiNi/Fk4w3Cg==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.57.1': - resolution: {integrity: sha512-IEQTCHeiTOnAUC3IDQdzRAGj3jOAYNr9kBguI7MQAAZK3caezRrg0GxAb6Hchg4lxdZEI5Oq3iov/w/hnFWY9Q==} + '@rollup/rollup-freebsd-x64@4.40.0': + resolution: {integrity: sha512-mVDxzlf0oLzV3oZOr0SMJ0lSDd3xC4CmnWJ8Val8isp9jRGl5Dq//LLDSPFrasS7pSm6m5xAcKaw3sHXhBjoRw==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.57.1': - resolution: {integrity: sha512-F8sWbhZ7tyuEfsmOxwc2giKDQzN3+kuBLPwwZGyVkLlKGdV1nvnNwYD0fKQ8+XS6hp9nY7B+ZeK01EBUE7aHaw==} + '@rollup/rollup-freebsd-x64@4.63.5': + resolution: {integrity: sha512-gqfUVMJMB3mehqywxp6hTBFfgtMQykZY19+cfiaYP0toIJLb/1DZRJHVkQQGP13W4TAwfZDWeg1qBcheTRioXQ==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.40.0': + resolution: {integrity: sha512-y/qUMOpJxBMy8xCXD++jeu8t7kzjlOCkoxxajL58G62PJGBZVl/Gwpm7JK9+YvlB701rcQTzjUZ1JgUoPTnoQA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.57.1': - resolution: {integrity: sha512-rGfNUfn0GIeXtBP1wL5MnzSj98+PZe/AXaGBCRmT0ts80lU5CATYGxXukeTX39XBKsxzFpEeK+Mrp9faXOlmrw==} + '@rollup/rollup-linux-arm-gnueabihf@4.63.5': + resolution: {integrity: sha512-CFmhpvAwzSaWMlN3VN7UtmoTihlZNzoP0juQib5TQRnYUyDV8dXeWOp29sobWAT6gXl/hQgAClLlEiYozQG3OQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.57.1': - resolution: {integrity: sha512-MMtej3YHWeg/0klK2Qodf3yrNzz6CGjo2UntLvk2RSPlhzgLvYEB3frRvbEF2wRKh1Z2fDIg9KRPe1fawv7C+g==} + '@rollup/rollup-linux-arm-musleabihf@4.40.0': + resolution: {integrity: sha512-GoCsPibtVdJFPv/BOIvBKO/XmwZLwaNWdyD8TKlXuqp0veo2sHE+A/vpMQ5iSArRUz/uaoj4h5S6Pn0+PdhRjg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.63.5': + resolution: {integrity: sha512-Uc9H8eXCOayV6JLTH5bXKMId6qbhNHa818/BgYjm4jrlq3vZquC9cqyvHBw17xy5Mnj5f+I3gFK5JcEf3hSqrw==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.40.0': + resolution: {integrity: sha512-L5ZLphTjjAD9leJzSLI7rr8fNqJMlGDKlazW2tX4IUF9P7R5TMQPElpH82Q7eNIDQnQlAyiNVfRPfP2vM5Avvg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.63.5': + resolution: {integrity: sha512-VcPr/szv/1BFw112Kt//fxulXt/JPqzzidU84iW68L2DdjnOO8QFUv2zTSYBEPHD6movBD4z+bbr5y60GYM7Jw==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.40.0': + resolution: {integrity: sha512-ATZvCRGCDtv1Y4gpDIXsS+wfFeFuLwVxyUBSLawjgXK2tRE6fnsQEkE4csQQYWlBlsFztRzCnBvWVfcae/1qxQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.57.1': - resolution: {integrity: sha512-1a/qhaaOXhqXGpMFMET9VqwZakkljWHLmZOX48R0I/YLbhdxr1m4gtG1Hq7++VhVUmf+L3sTAf9op4JlhQ5u1Q==} + '@rollup/rollup-linux-arm64-musl@4.63.5': + resolution: {integrity: sha512-BnxtJ5/91BrIHYIkGrmjz/lbMhqEHt1dPFqIxIFR+jPn0xVc/oUSCtIT089zfp5ufwGDlYz2UC+Fe1SRBpYFbQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loong64-gnu@4.57.1': - resolution: {integrity: sha512-QWO6RQTZ/cqYtJMtxhkRkidoNGXc7ERPbZN7dVW5SdURuLeVU7lwKMpo18XdcmpWYd0qsP1bwKPf7DNSUinhvA==} + '@rollup/rollup-linux-loong64-gnu@4.63.5': + resolution: {integrity: sha512-LrYcHZwF+fAMNKHYTOQ5osWM4AZF7YF6D+XtsjDyEvljtt11twc+zHVXBLNEjxVSUnKYsOhvVz4Z213eW02COQ==} + cpu: [loong64] + os: [linux] + + '@rollup/rollup-linux-loong64-musl@4.63.5': + resolution: {integrity: sha512-nj7QKQePAAUpCpJHtg0pR0W/b92A9NO17JS3BAQmHDn/yhmkir2p8llrKY9TOhleKIaSzy1JhxS3T9FVld6coA==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-loong64-musl@4.57.1': - resolution: {integrity: sha512-xpObYIf+8gprgWaPP32xiN5RVTi/s5FCR+XMXSKmhfoJjrpRAjCuuqQXyxUa/eJTdAE6eJ+KDKaoEqjZQxh3Gw==} + '@rollup/rollup-linux-loongarch64-gnu@4.40.0': + resolution: {integrity: sha512-wG9e2XtIhd++QugU5MD9i7OnpaVb08ji3P1y/hNbxrQ3sYEelKJOq1UJ5dXczeo6Hj2rfDEL5GdtkMSVLa/AOg==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.57.1': - resolution: {integrity: sha512-4BrCgrpZo4hvzMDKRqEaW1zeecScDCR+2nZ86ATLhAoJ5FQ+lbHVD3ttKe74/c7tNT9c6F2viwB3ufwp01Oh2w==} + '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': + resolution: {integrity: sha512-vgXfWmj0f3jAUvC7TZSU/m/cOE558ILWDzS7jBhiCAFpY2WEBn5jqgbqvmzlMjtp8KlLcBlXVD2mkTSEQE6Ixw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-ppc64-musl@4.57.1': - resolution: {integrity: sha512-NOlUuzesGauESAyEYFSe3QTUguL+lvrN1HtwEEsU2rOwdUDeTMJdO5dUYl/2hKf9jWydJrO9OL/XSSf65R5+Xw==} + '@rollup/rollup-linux-ppc64-gnu@4.63.5': + resolution: {integrity: sha512-5ylkX6dWMeBKge9nTU+Rxfb+ZfaCIJ9lRqIFaK0eAMcWp7OJbYnLveLgXmm0VrvuLKb8qIK+mHyH0qu88RM+iA==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.57.1': - resolution: {integrity: sha512-ptA88htVp0AwUUqhVghwDIKlvJMD/fmL/wrQj99PRHFRAG6Z5nbWoWG4o81Nt9FT+IuqUQi+L31ZKAFeJ5Is+A==} + '@rollup/rollup-linux-ppc64-musl@4.63.5': + resolution: {integrity: sha512-oHK4ZHYFDKjZviK34I+NwgfbGxgI7ztrNxj2hPTSSNFgeq1a/lEd7dHV2fdGAuTH4Iym3RHJg+vAbWaWG4B7Zg==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.40.0': + resolution: {integrity: sha512-uJkYTugqtPZBS3Z136arevt/FsKTF/J9dEMTX/cwR7lsAW4bShzI2R0pJVw+hcBTWF4dxVckYh72Hk3/hWNKvA==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.63.5': + resolution: {integrity: sha512-UcetmHZ6XOXuUByiKZyQmb55ZPr0LABr3Ec/HB9wKZn6CEAFWZkE+hsJErJ9hbPBC7nI0dKuELx7CoV6IM7TMg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.57.1': - resolution: {integrity: sha512-S51t7aMMTNdmAMPpBg7OOsTdn4tySRQvklmL3RpDRyknk87+Sp3xaumlatU+ppQ+5raY7sSTcC2beGgvhENfuw==} + '@rollup/rollup-linux-riscv64-musl@4.40.0': + resolution: {integrity: sha512-rKmSj6EXQRnhSkE22+WvrqOqRtk733x3p5sWpZilhmjnkHkpeCgWsFFo0dGnUGeA+OZjRl3+VYq+HyCOEuwcxQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.57.1': - resolution: {integrity: sha512-Bl00OFnVFkL82FHbEqy3k5CUCKH6OEJL54KCyx2oqsmZnFTR8IoNqBF+mjQVcRCT5sB6yOvK8A37LNm/kPJiZg==} + '@rollup/rollup-linux-riscv64-musl@4.63.5': + resolution: {integrity: sha512-C5CmDPQBtvjVo8cgQsBs+w6WB0JLkiixhgi6hVLV11hERWdn/p0XcPU2OUcZzac9BPOFq7SbaHFa8r3SWEysCQ==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.40.0': + resolution: {integrity: sha512-SpnYlAfKPOoVsQqmTFJ0usx0z84bzGOS9anAC0AZ3rdSo3snecihbhFTlJZ8XMwzqAcodjFU4+/SM311dqE5Sw==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.57.1': - resolution: {integrity: sha512-ABca4ceT4N+Tv/GtotnWAeXZUZuM/9AQyCyKYyKnpk4yoA7QIAuBt6Hkgpw8kActYlew2mvckXkvx0FfoInnLg==} + '@rollup/rollup-linux-s390x-gnu@4.63.5': + resolution: {integrity: sha512-lHVQHJFKsuuxLMi3MQO9XVL8Tje3JR82CzB+QDKC5NWBcsIWuwsn9uIM5e3lBhI+fF1/s63qnyYqsg65+8rV/w==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.40.0': + resolution: {integrity: sha512-RcDGMtqF9EFN8i2RYN2W+64CdHruJ5rPqrlYw+cgM3uOVPSsnAQps7cpjXe9be/yDp8UC7VLoCoKC8J3Kn2FkQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.57.1': - resolution: {integrity: sha512-HFps0JeGtuOR2convgRRkHCekD7j+gdAuXM+/i6kGzQtFhlCtQkpwtNzkNj6QhCDp7DRJ7+qC/1Vg2jt5iSOFw==} + '@rollup/rollup-linux-x64-gnu@4.63.5': + resolution: {integrity: sha512-3W9bTFcQNJn71cSJVM9RKIiZOy8DO/XLDii8Uv/Pm6WKqDRj7JV3ZfuXIEfyuy5LXpIzAbB/1M4Ukp9GKNa7nA==} cpu: [x64] os: [linux] - '@rollup/rollup-openbsd-x64@4.57.1': - resolution: {integrity: sha512-H+hXEv9gdVQuDTgnqD+SQffoWoc0Of59AStSzTEj/feWTBAnSfSD3+Dql1ZruJQxmykT/JVY0dE8Ka7z0DH1hw==} + '@rollup/rollup-linux-x64-musl@4.40.0': + resolution: {integrity: sha512-HZvjpiUmSNx5zFgwtQAV1GaGazT2RWvqeDi0hV+AtC8unqqDSsaFjPxfsO6qPtKRRg25SisACWnJ37Yio8ttaw==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.63.5': + resolution: {integrity: sha512-VDC7rRJlee/scpki96GZ27Omf6yU87s1YXwVTpjE5841faVlDYYT565rgfmoR1U0sqL7z5ivQSDjcsF6VRXyBA==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-openbsd-x64@4.63.5': + resolution: {integrity: sha512-z86Ok2p4pTdv5xqCKZsTooO7yBEiaJR/HzU3Wx8RmWsPoLppnMKROhJusQob8B3IE1ghC343kUW9rC2r+Wf3ig==} cpu: [x64] os: [openbsd] - '@rollup/rollup-openharmony-arm64@4.57.1': - resolution: {integrity: sha512-4wYoDpNg6o/oPximyc/NG+mYUejZrCU2q+2w6YZqrAs2UcNUChIZXjtafAiiZSUc7On8v5NyNj34Kzj/Ltk6dQ==} + '@rollup/rollup-openharmony-arm64@4.63.5': + resolution: {integrity: sha512-IzQmj+xXwQFGhMAMKMQVXkMwMZN3TqkJgAE0nSsqvVwWWciP4AIPMmWRqOQ2GfX7TUDZr+xqGFcBS36CRPGw0g==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.57.1': - resolution: {integrity: sha512-O54mtsV/6LW3P8qdTcamQmuC990HDfR71lo44oZMZlXU4tzLrbvTii87Ni9opq60ds0YzuAlEr/GNwuNluZyMQ==} + '@rollup/rollup-win32-arm64-msvc@4.40.0': + resolution: {integrity: sha512-UtZQQI5k/b8d7d3i9AZmA/t+Q4tk3hOC0tMOMSq2GlMYOfxbesxG4mJSeDp0EHs30N9bsfwUvs3zF4v/RzOeTQ==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-arm64-msvc@4.63.5': + resolution: {integrity: sha512-F6qpTaPc9bwBH85kjy0/BLmLSW1uv7AoOXCoRIkg2arlgCYlWYcAbiMkvZuAcaWk9TpCRG//okznLAqLGshkMw==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.57.1': - resolution: {integrity: sha512-P3dLS+IerxCT/7D2q2FYcRdWRl22dNbrbBEtxdWhXrfIMPP9lQhb5h4Du04mdl5Woq05jVCDPCMF7Ub0NAjIew==} + '@rollup/rollup-win32-ia32-msvc@4.40.0': + resolution: {integrity: sha512-+m03kvI2f5syIqHXCZLPVYplP8pQch9JHyXKZ3AGMKlg8dCyr2PKHjwRLiW53LTrN/Nc3EqHOKxUxzoSPdKddA==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.57.1': - resolution: {integrity: sha512-VMBH2eOOaKGtIJYleXsi2B8CPVADrh+TyNxJ4mWPnKfLB/DBUmzW+5m1xUrcwWoMfSLagIRpjUFeW5CO5hyciQ==} + '@rollup/rollup-win32-ia32-msvc@4.63.5': + resolution: {integrity: sha512-igoDsTFhhwECBeGbUuLeIk7t8Y1apa+cs6mDWpx2EZ0ch7oEQgzHbFUXN9euoHekCAQzXdXApAGkV6jznS7tWw==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.63.5': + resolution: {integrity: sha512-U3teMeMbXFmaM5D+OTJpsOXd+wV/qftIeYF9kBKL4v73641qyJmoXFtA28DQLsnmlyayEsTe72xpLHrArq6vHw==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.57.1': - resolution: {integrity: sha512-mxRFDdHIWRxg3UfIIAwCm6NzvxG0jDX/wBN6KsQFTvKFqqg9vTrWUE68qEjHt19A5wwx5X5aUi2zuZT7YR0jrA==} + '@rollup/rollup-win32-x64-msvc@4.40.0': + resolution: {integrity: sha512-lpPE1cLfP5oPzVjKMx10pgBmKELQnFJXHgvtHCtuJWOv8MxqdEIMNtgHgBFf7Ea2/7EuVwa9fodWUfXAlXZLZQ==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.63.5': + resolution: {integrity: sha512-ypfC34F3RKXvCXBglGqGMsUSMKlgwd1HX9AOAlx9RoZZ6GaI42YHVeKpzg3JG+wpBUJYTG+NNZhqbDWL8tBZkw==} cpu: [x64] os: [win32] '@sinclair/typebox@0.27.12': resolution: {integrity: sha512-hhyNJ+nbR6ZR7pToHvllEFun9TL0sbL+tk/ON75lo+Xas054uez98qRbsuNt7MBCyZKK4+8Yli/OAGZhmfBZ/g==} + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/ejs@3.1.5': resolution: {integrity: sha512-nv+GSx77ZtXiJzwKdsASqi+YQ5Z7vwHsTP0JY2SiQgjGckkBRKZnk8nIM+7oUZ1VCtuTz0+By4qVR7fqzp/Dfg==} - '@types/estree@1.0.8': - resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + '@types/estree@1.0.7': + resolution: {integrity: sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -521,15 +819,39 @@ packages: '@types/trusted-types@2.0.7': resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==} + '@vitest/expect@3.2.7': + resolution: {integrity: sha512-E8eBXaKibuvH2pSZErOjdVb5vF4PbKYcrnluBTYxEk1l/VhhwZg1kZQsdtjq+CsF5CFydf2Rdkz7jDHKSisi3w==} + + '@vitest/mocker@3.2.7': + resolution: {integrity: sha512-Trr0hYO9CM3Wj6ksWHRhK9IZpIY6wTMO5u/MqXurMxT57sWBaOPEtP3Oq60ihZuh5JsiagKfz95OcxdEP6dBrA==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@3.2.7': + resolution: {integrity: sha512-KUHlwqVu0sRlhCdyPdQ/wBoTfRahjUky1MubOmYw9fWfIZy1gNoHpuaaQBPAaMaVYdQYHJLurzj8ECCj5OwTqA==} + + '@vitest/runner@3.2.7': + resolution: {integrity: sha512-sB9y4ovltoQP+WaUPwmSxO9WIg9Ig694Di5PalVPsYHklAdE027mehpWF2SQSVq+k6sFgaivbTjTJwZLSHbedA==} + + '@vitest/snapshot@3.2.7': + resolution: {integrity: sha512-7C+MwShwtBSI5Buwoyg3s/iY1eHL9PKAf+O1wVh/TdnjXUtkoL/9YQtre90i4MtNXM6edP1wJ2zOBpfCyhIS7g==} + + '@vitest/spy@3.2.7': + resolution: {integrity: sha512-Q2eQGI6d2L/hBtZ0qNuKcAGid68XK6cv1xsoaIma6PaJhHPoqcEJhYpXZ/5myCMqkNgtP6UKuBhbc0nHKnrkuQ==} + + '@vitest/utils@3.2.7': + resolution: {integrity: sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==} + abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} - acorn@8.15.0: - resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} - engines: {node: '>=0.4.0'} - hasBin: true - agent-base@7.1.4: resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==} engines: {node: '>= 14'} @@ -537,10 +859,18 @@ packages: ajv@8.20.0: resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + engines: {node: '>=12'} + ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} @@ -549,6 +879,10 @@ packages: resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} @@ -562,6 +896,10 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} @@ -581,11 +919,11 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} - brace-expansion@1.1.21: - resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} + brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - brace-expansion@2.0.2: - resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} @@ -594,8 +932,8 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - bundle-name@4.1.0: - resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} + bundle-name@4.1.1: + resolution: {integrity: sha512-DdH81/zPLVS11EUgWq3tEu/xn+EzljlMYooDNdzWEnFha3R3NBMpMV1UqYIpjYHV/SgpFKMIX1Oh7o06SjM/oA==} engines: {node: '>=18'} bundle-require@5.1.0: @@ -604,10 +942,10 @@ packages: peerDependencies: esbuild: '>=0.18' - c12@2.0.1: - resolution: {integrity: sha512-Z4JgsKXHG37C6PYUtIxCfLJZvo6FyhHJoClwwb9ftUkLpPSkuYqn6Tr+vnaN8hymm0kIbcg6Ey3kv/Q71k5w/A==} + c12@3.3.4: + resolution: {integrity: sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==} peerDependencies: - magicast: ^0.3.5 + magicast: '*' peerDependenciesMeta: magicast: optional: true @@ -623,10 +961,18 @@ packages: call-me-maybe@1.0.2: resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} + chai@5.3.3: + resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} + engines: {node: '>=18'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + check-error@2.1.3: + resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==} + engines: {node: '>= 16'} + chokidar@3.5.3: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} @@ -635,12 +981,9 @@ packages: resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} engines: {node: '>= 14.16.0'} - chownr@2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} - - citty@0.1.6: - resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} classnames@2.5.1: resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} @@ -659,6 +1002,10 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + color-support@1.1.3: + resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} + hasBin: true + colorette@1.4.0: resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} @@ -669,9 +1016,9 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} - commander@13.0.0: - resolution: {integrity: sha512-oPYleIY8wmTVzkvQq10AEok6YcTC4sRUBl8F9gVuwchGVUCTbl/vhLTaQqutuuySYOsu8YTgV+OxKc/8Yvx+mQ==} - engines: {node: '>=18'} + commander@15.0.0: + resolution: {integrity: sha512-z67u4ZhzCL/Tydu1lJARtEZYWbWaN7oYLHbsuzocr6y4N6WZAagG3RQ4FW61V1/0+jImpj293XfrcYnd1qxtPg==} + engines: {node: '>=22.12.0'} commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} @@ -684,8 +1031,11 @@ packages: resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} engines: {'0': node >= 6.0} - confbox@0.1.8: - resolution: {integrity: sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==} + confbox@0.2.4: + resolution: {integrity: sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==} + + confbox@0.3.1: + resolution: {integrity: sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA==} consola@3.4.2: resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} @@ -698,9 +1048,22 @@ packages: core-js@3.32.1: resolution: {integrity: sha512-lqufgNn9NLnESg5mQeYsxQP5w7wrViSj0jr/kv6ECQiByzQkrn1MKvV0L3acttpDqfQrHLwr2KCMgX5b8X+lyQ==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -713,6 +1076,10 @@ packages: decko@1.2.0: resolution: {integrity: sha512-m8FnyHXV1QX+S1cl+KPFDIl6NMkxtKsy6+U/aYyjrOqWMuwAwYWu7ePqrsUHtDR5Y8Yk2pi/KIDSgF+vT4cPOQ==} + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + default-browser-id@5.0.1: resolution: {integrity: sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==} engines: {node: '>=18'} @@ -725,8 +1092,8 @@ packages: resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} engines: {node: '>=12'} - defu@6.1.4: - resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} @@ -739,21 +1106,24 @@ packages: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - dompurify@3.4.15: - resolution: {integrity: sha512-EUBjM+B+lkDE41iE82DDSCfkoPGfXx8IxFxPMjNzm/Uk4xDet77rTN9wqlxlVg71kK7XGuUMv6wUxJUwwv+Xyw==} + dompurify@3.4.16: + resolution: {integrity: sha512-sqo+pNp3qRhCIpbgRi1y8Tgk27Bo2Ry7w0dC1NBeNTdZChWjz9Xb/KOoZbRP/R6pQZ80Qw8YhXw13hWWBbMRnQ==} dotenv@16.4.7: resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} - dotenv@16.6.1: - resolution: {integrity: sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==} + dotenv@17.4.2: + resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} engines: {node: '>=12'} dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + ejs@3.1.10: resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} engines: {node: '>=0.10.0'} @@ -762,6 +1132,9 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + es-define-property@1.0.1: resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} @@ -770,6 +1143,9 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + es-object-atoms@1.1.2: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} engines: {node: '>= 0.4'} @@ -781,15 +1157,20 @@ packages: es6-promise@3.3.1: resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} - esbuild-fix-imports-plugin@1.0.23: - resolution: {integrity: sha512-zDn2Mq3OnW9qNm9FrHDeE0FePgIRIaH9EWpHOGsJZFPfyPSNqzvCK/x9EZJ5eHEEyXe8ZGdb5CjDpzqkyAqcCg==} + esbuild-fix-imports-plugin@1.0.19: + resolution: {integrity: sha512-VsI6ozJaEOiRYRr/hWHbP8S+Pm7HNjHPbEctWVAUZ5NRUpES1PBLMSkMvB4WXKGniTKw0zupd01BlHog2bqsSg==} esbuild-plugin-file-path-extensions@1.0.0: resolution: {integrity: sha512-v5LpSkml+CbsC0+xAaETEGDECdvKp1wKkD4aXMdI4zLjXP0EYfK4GjGhphumt4N+kjR3A8Q+DIkpgxX1XTqO4Q==} engines: {node: '>=v14.0.0', npm: '>=7.0.0'} - esbuild@0.27.2: - resolution: {integrity: sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==} + esbuild@0.25.2: + resolution: {integrity: sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==} + engines: {node: '>=18'} + hasBin: true + + esbuild@0.28.2: + resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} engines: {node: '>=18'} hasBin: true @@ -797,6 +1178,9 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -804,6 +1188,13 @@ packages: eventemitter3@5.0.4: resolution: {integrity: sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + exsolve@1.1.1: + resolution: {integrity: sha512-9U/jZUgjnSGyntRr6y5Muu1MJcwFl6kPu7k8qLF0IMNfLqvw0NZ4nnVDq0RVoZ0RvCyumib4Ez3KYrVfilrw+g==} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -816,10 +1207,18 @@ packages: fast-xml-builder@1.3.1: resolution: {integrity: sha512-pIM/1n3ntFXKYrUZwW7QCK0gAW7XY+wzj1YMIV3tLDvPj/V+zTGJK5e3/4WJfwj0qWw2ElNXiTixda/R+3YSug==} - fast-xml-parser@5.11.1: - resolution: {integrity: sha512-TBw6K/fxoQGGjCmZDw9w/ZwP3uDcnTM4YH/g+PFRWr8sbe5idXtxNN6vITh4+1ruCZaho6uBFurElsA7F0zzgw==} + fast-xml-parser@5.11.2: + resolution: {integrity: sha512-R9iDuNrQYeQut46cn2r2wHKn4HYzVDvDm5J1wW+koZewykv0yuO2HChTYeZtrULyHIDM9cj9TUXloCsueCQUog==} hasBin: true + fdir@6.4.3: + resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -836,20 +1235,17 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - fix-dts-default-cjs-exports@1.0.1: - resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} - foreach@2.0.6: resolution: {integrity: sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==} + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + form-data@4.0.6: resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} engines: {node: '>= 6'} - fs-minipass@2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -876,14 +1272,21 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} - giget@1.2.5: - resolution: {integrity: sha512-r1ekGw/Bgpi3HLV3h1MRBIlSAdHoIMklpaQ3OQLFcRw9PwAj2rqigvIbg+dBUI51OxVI2jsEtDywDBjSiuf7Ug==} + get-tsconfig@4.14.0: + resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} + + giget@3.3.1: + resolution: {integrity: sha512-r+mvuDjrjMpsdw46Kmeydb8bdHm7wOKw8wNBtTndkjbPjgAp5oUJUxRE76wZFknxIPokfWvep2qSXK37aXE6zg==} hasBin: true glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Glob versions prior to v9 are no longer supported @@ -892,11 +1295,6 @@ packages: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} - handlebars@4.7.8: - resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} - engines: {node: '>=0.4.7'} - hasBin: true - handlebars@4.7.9: resolution: {integrity: sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==} engines: {node: '>=0.4.7'} @@ -953,6 +1351,10 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-in-ssh@1.0.0: + resolution: {integrity: sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==} + engines: {node: '>=20'} + is-inside-container@1.0.0: resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} engines: {node: '>=14.16'} @@ -969,8 +1371,14 @@ packages: resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==} engines: {node: '>=16'} - jake@10.9.4: - resolution: {integrity: sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==} + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + jake@10.9.2: + resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} engines: {node: '>=10'} hasBin: true @@ -986,8 +1394,8 @@ packages: resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - jiti@2.6.1: - resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} hasBin: true joycon@3.1.1: @@ -1001,8 +1409,11 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-yaml@4.1.1: - resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} + js-tokens@9.0.1: + resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + + js-yaml@4.2.0: + resolution: {integrity: sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==} hasBin: true js-yaml@4.3.2: @@ -1043,13 +1454,19 @@ packages: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - lodash@4.18.1: - resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} + lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true + loupe@3.2.1: + resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} + + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} @@ -1076,8 +1493,8 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} - minimatch@3.1.5: - resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} minimatch@5.1.6: resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} @@ -1087,28 +1504,16 @@ packages: resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==} engines: {node: '>=10'} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - minipass@3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - - minipass@5.0.0: - resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} - engines: {node: '>=8'} - - minizlib@2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} - - mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - - mlly@1.8.0: - resolution: {integrity: sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} mobx-react-lite@4.1.1: resolution: {integrity: sha512-iUxiMpsvNraCKXU+yPotsOncNNmyeS2B5DKL+TL6Tar/xm+wwNJAubJmtRSeAoYawdZqwv8Z/+5nPRHeQxTiXg==} @@ -1145,6 +1550,11 @@ packages: mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + nanoid@3.3.19: + resolution: {integrity: sha512-Y2tUNy4ouw6tq5oDSKeQYGOyhkUBhNOcGV/02KC+6kd9eDGqdZd++mjMiIDilrBYvjEnCYvVtsuHCuP+okSfug==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} @@ -1152,9 +1562,6 @@ packages: resolution: {integrity: sha512-ofRW94Ab0T4AOh5Fk8t0h8OBWrmjb0SSB20xh1H8YnPV9EJ+f5AMoYSUQ2zgJ4Iq2HAK0I2l5/Nequ8YzFS3Hg==} engines: {node: 4.x || >=6.0.0} - node-fetch-native@1.6.7: - resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} - node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -1171,11 +1578,6 @@ packages: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - nypm@0.5.4: - resolution: {integrity: sha512-X0SNNrZiGU8/e/zAB7sCTtdxWTMSIO73q+xuKgglm2Yvzwlo8UoC5FNySQFCvl84uPaeADkqHUZUkWy4aH4xOA==} - engines: {node: ^14.16.0 || >=16.10.0} - hasBin: true - oas-kit-common@1.0.8: resolution: {integrity: sha512-pJTS2+T0oGIwgjGpw7sIRU8RQMcUoKCDWFLdBqKB2BNmGpbBMH2sdqAaOXUg8OzonZHU0L7vfJu1mJFEiYDWOQ==} @@ -1196,8 +1598,8 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - ohash@1.1.6: - resolution: {integrity: sha512-TBu7PtV8YkAZn0tSxobKY2n2aAQva936lhRrj6957aDaCf9IEtqsKbgMzXE/F/sjqYOwmrukeORHNLe5glk7Cg==} + ohash@2.0.12: + resolution: {integrity: sha512-65S/5gk9YSsaRjcyf7Nfa6h/d3E8/1gslpXfI4W7Dxn/oap8IKRuNT5VXkLQ1YFKIEg4apRY4Pj6aiwFzrDdmw==} once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -1206,6 +1608,10 @@ packages: resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} engines: {node: '>=18'} + open@11.0.0: + resolution: {integrity: sha512-smsWv2LzFjP03xmvFoJ331ss6h+jixfA4UUV/Bsiyuu4YJPfN+FIQGOIiv4w9/+MoHkfkJ22UIaQWRVFRfH6Vw==} + engines: {node: '>=20'} + openapi-sampler@1.7.0: resolution: {integrity: sha512-fWq32F5vqGpgRJYIarC/9Y1wC9tKnRDcCOjsDJ7MIcSv2HsE7kNifcXIZ8FVtNStBUWxYrEk/MKqVF0SwZ5gog==} @@ -1215,6 +1621,9 @@ packages: outdent@0.8.0: resolution: {integrity: sha512-KiOAIsdpUTcAXuykya5fnVVT+/5uS0Q1mrkRHcF89tpieSmY33O/tmc54CqwA+bfhbtEfZUNLHaPUiB9X3jt1A==} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} @@ -1226,14 +1635,23 @@ packages: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - pathe@1.1.2: - resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - perfect-debounce@1.0.0: - resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + pathval@2.0.1: + resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} + engines: {node: '>= 14.16'} + + perfect-debounce@2.1.0: + resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==} perfect-scrollbar@1.5.6: resolution: {integrity: sha512-rixgxw3SxyJbCaSpo1n35A/fwI1r2rdwMKOTCg/AcG+xOEyZcE8UHVjpZMFCVImzsFoCZeJTT+M/rdEIQYO2nw==} @@ -1245,16 +1663,20 @@ packages: resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} engines: {node: '>=8.6'} - picomatch@4.0.3: - resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} engines: {node: '>=12'} pirates@4.0.7: resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} engines: {node: '>= 6'} - pkg-types@1.3.1: - resolution: {integrity: sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==} + pkg-types@2.3.3: + resolution: {integrity: sha512-j/lCFdcppV0JxWpCEITdbDltBxPP6cHT+yNJ6Go2OgoSA9518X847X9z0p6LtA4Nc16+eQzCZjRrWanTGvHJ5w==} pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} @@ -1282,6 +1704,14 @@ packages: yaml: optional: true + postcss@8.5.28: + resolution: {integrity: sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A==} + engines: {node: ^10 || ^12 || >=14} + + powershell-utils@0.1.0: + resolution: {integrity: sha512-dM0jVuXJPsDN6DvRpea484tCUaMiXWjuCn++HGTqUWzGDjv5tZkEZldAJ/UMlqRYGFrD/etByo4/xOuC/snX2A==} + engines: {node: '>=20'} + pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1293,14 +1723,18 @@ packages: prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} - rc9@2.1.2: - resolution: {integrity: sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==} + rc9@3.1.0: + resolution: {integrity: sha512-ufjkNVzbRHKcCOmTahZkmVsyc3W+MSk3jY03m+a7tGHkIsdVMG9l10/3HvFbWkkKzY5VFp3pkRsIo/UYgmFL7Q==} react-dom@19.3.0: resolution: {integrity: sha512-JDk8dgif51OjFoDE70+OT9ICyYr+69HlmihNwp1+Nsfbna3t5sIiCa9ZJktDmQ4/1b/rn26hIAR2uYXDMr5r0Q==} @@ -1334,6 +1768,10 @@ packages: resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} engines: {node: '>= 14.18.0'} + readdirp@5.1.1: + resolution: {integrity: sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==} + engines: {node: '>= 20.19.0'} + redoc@2.5.3: resolution: {integrity: sha512-bBbat+Sx6xKWdyoCGTtA0BWeTEW9Vs4VnEja7q7ZLOk4IM7cHQLrf+kDxWF6dKeKxT8kOBnoy/OsNXCeLttpyQ==} engines: {node: '>=6.9', npm: '>=3.0.0'} @@ -1359,8 +1797,16 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - rollup@4.57.1: - resolution: {integrity: sha512-oQL6lgK3e2QZeQ7gcgIkS2YZPg5slw37hYufJ3edKlfQSGGm8ICoxswK15ntSzF/a8+h7ekRy7k7oWc3BQ7y8A==} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + + rollup@4.40.0: + resolution: {integrity: sha512-Noe455xmA96nnqH5piFtLobsGbCij7Tu+tb3c1vYjNbTkfzGqXqQXG3wJaYXkRZuQ0vEYN4bhwg7QnIrqB5B+w==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + + rollup@4.63.5: + resolution: {integrity: sha512-KRWwmNLlPw5M7HcdYfm15oBv9n9LPtjzpzCIxS/phwqvPyxHSoKX6Y2YU3pxSPfy0CLquVgsx/j/hBi6OvH1Nw==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -1379,9 +1825,22 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.8.4: + resolution: {integrity: sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==} + engines: {node: '>=10'} + hasBin: true + set-cookie-parser@2.7.1: resolution: {integrity: sha512-IOc8uWeOZgnb3ptbCURJWNjWUPcO3ZnTTdzsurqERrP6nPyv+paC55vJM0LpOlT2ne+Ix+9+CRG1MNLlyZ4GjQ==} + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + should-equal@2.0.0: resolution: {integrity: sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==} @@ -1400,6 +1859,13 @@ packages: should@13.2.3: resolution: {integrity: sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + simple-websocket@9.1.0: resolution: {integrity: sha512-8MJPnjRN6A8UCp1I+H/dSFyjwJhp6wta4hsVRhjf8w9qBHRzxYt14RaOcjvQnhD1N4yKOddEjflwMnQM4VtXjQ==} @@ -1407,13 +1873,23 @@ packages: resolution: {integrity: sha512-tf+h5W1IrjNm/9rKKj0JU2MDMruiopx0jjVA5zCdBtcGjfp0+c5rHw/zADLC3IeKlGHtVbHtpfzvYA0OYT+HKg==} engines: {node: '>=8.0.0'} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + engines: {node: '>=0.10.0'} + source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - source-map@0.7.6: - resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} - engines: {node: '>= 12'} + source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} stickyfill@1.1.1: resolution: {integrity: sha512-GCp7vHAfpao+Qh/3Flh9DXEJ/qSi0KJwJw6zYlZOtRYXWUIpMM6mC2rIep/dK8RQqwW0KxGJIllmjPIBOGN8AA==} @@ -1422,6 +1898,10 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} @@ -1429,6 +1909,13 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + + strip-literal@3.1.0: + resolution: {integrity: sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==} + strnum@2.4.2: resolution: {integrity: sha512-rDG3Ah4TV0k1hWvLSzkZtMmLN9+eS+h3knq4MP6A42Y3Yh5qGNnOUs1jJkoSr8FG5dsL28c7KgkIBzSEykqtuw==} @@ -1451,8 +1938,8 @@ packages: stylis@4.3.6: resolution: {integrity: sha512-yQ3rwFWRfwNUY7H5vpU0wfdkNSnvnJinhF9830Swlaxl03zsOjCfmX0ugac+3LtK0lYSgwL/KXc8oYL3mG4YFQ==} - sucrase@3.35.1: - resolution: {integrity: sha512-DhuTmvZWux4H1UOnWMB3sk0sbaCVOoQZjv8u1rDoTV0HTdGem9hkAZtl4JZy8P2z4Bg0nT+YMeOFyVr4zcG5Tw==} + sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} engines: {node: '>=16 || 14 >=14.17'} hasBin: true @@ -1464,11 +1951,6 @@ packages: resolution: {integrity: sha512-upi/0ZGkYgEcLeGieoz8gT74oWHA0E7JivX7aN9mAf+Tc7BQoRBvnIGHoPDw+f9TXTW4s6kGYCZJtauP6OYp7g==} hasBin: true - tar@6.2.1: - resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} - engines: {node: '>=10'} - deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -1476,13 +1958,32 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyglobby@0.2.15: - resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + tinyglobby@0.2.12: + resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==} engines: {node: '>=12.0.0'} + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} + engines: {node: '>=14.0.0'} + + tinyspy@4.0.6: + resolution: {integrity: sha512-u8KszXvGfU68hVcZpRHKG28T0krMuv2G5nDhiHaMLen/gIuFEgIJhaJuO69qjnXg5paSrbPMFfx3brNuN8eVSg==} + engines: {node: '>=14.0.0'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -1490,6 +1991,9 @@ packages: tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + tree-kill@1.2.2: resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} hasBin: true @@ -1497,8 +2001,8 @@ packages: ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - tsup@8.5.1: - resolution: {integrity: sha512-xtgkqwdhpKWr3tKPmCkvYmS9xnQK3m3XgxZHwSUjvfTjp7YfXe5tT3GgWi0F2N+ZSMsOeWeZFh7ZZFg5iPhing==} + tsup@8.4.0: + resolution: {integrity: sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -1519,14 +2023,11 @@ packages: typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + typescript@5.8.2: + resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==} engines: {node: '>=14.17'} hasBin: true - ufo@1.6.3: - resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} - uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} @@ -1550,12 +2051,101 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + + vite@7.3.6: + resolution: {integrity: sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + jiti: '>=1.21.0' + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@3.2.7: + resolution: {integrity: sha512-KrxIJ62Fd89gfysR4WotlgZABiz2dqFPgqGzX7s+CwsqLFomRH7777ZcrOD6+WVAh7khPQP41A+BKbpcJFrdEg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.2.7 + '@vitest/ui': 3.2.7 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/debug': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} @@ -1563,6 +2153,10 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -1578,6 +2172,10 @@ packages: utf-8-validate: optional: true + wsl-utils@0.3.1: + resolution: {integrity: sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==} + engines: {node: '>=20'} + xml-naming@0.3.0: resolution: {integrity: sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==} engines: {node: '>=16.0.0'} @@ -1586,9 +2184,6 @@ packages: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml-ast-parser@0.0.43: resolution: {integrity: sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==} @@ -1604,6 +2199,9 @@ packages: resolution: {integrity: sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==} engines: {node: '>=12'} + zod@3.25.76: + resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + snapshots: '@babel/code-frame@7.29.7': @@ -1612,135 +2210,256 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/helper-validator-identifier@7.29.7': {} + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/runtime@7.29.7': {} + + '@emotion/is-prop-valid@1.4.0': + dependencies: + '@emotion/memoize': 0.9.0 + + '@emotion/memoize@0.9.0': {} + + '@esbuild/aix-ppc64@0.25.2': + optional: true + + '@esbuild/aix-ppc64@0.28.2': + optional: true + + '@esbuild/android-arm64@0.25.2': + optional: true + + '@esbuild/android-arm64@0.28.2': + optional: true + + '@esbuild/android-arm@0.25.2': + optional: true + + '@esbuild/android-arm@0.28.2': + optional: true + + '@esbuild/android-x64@0.25.2': + optional: true + + '@esbuild/android-x64@0.28.2': + optional: true + + '@esbuild/darwin-arm64@0.25.2': + optional: true + + '@esbuild/darwin-arm64@0.28.2': + optional: true + + '@esbuild/darwin-x64@0.25.2': + optional: true + + '@esbuild/darwin-x64@0.28.2': + optional: true + + '@esbuild/freebsd-arm64@0.25.2': + optional: true + + '@esbuild/freebsd-arm64@0.28.2': + optional: true + + '@esbuild/freebsd-x64@0.25.2': + optional: true + + '@esbuild/freebsd-x64@0.28.2': + optional: true + + '@esbuild/linux-arm64@0.25.2': + optional: true + + '@esbuild/linux-arm64@0.28.2': + optional: true + + '@esbuild/linux-arm@0.25.2': + optional: true + + '@esbuild/linux-arm@0.28.2': + optional: true - '@babel/runtime@7.29.7': {} + '@esbuild/linux-ia32@0.25.2': + optional: true - '@emotion/is-prop-valid@1.4.0': - dependencies: - '@emotion/memoize': 0.9.0 + '@esbuild/linux-ia32@0.28.2': + optional: true - '@emotion/memoize@0.9.0': {} + '@esbuild/linux-loong64@0.25.2': + optional: true + + '@esbuild/linux-loong64@0.28.2': + optional: true + + '@esbuild/linux-mips64el@0.25.2': + optional: true - '@esbuild/aix-ppc64@0.27.2': + '@esbuild/linux-mips64el@0.28.2': optional: true - '@esbuild/android-arm64@0.27.2': + '@esbuild/linux-ppc64@0.25.2': optional: true - '@esbuild/android-arm@0.27.2': + '@esbuild/linux-ppc64@0.28.2': optional: true - '@esbuild/android-x64@0.27.2': + '@esbuild/linux-riscv64@0.25.2': optional: true - '@esbuild/darwin-arm64@0.27.2': + '@esbuild/linux-riscv64@0.28.2': optional: true - '@esbuild/darwin-x64@0.27.2': + '@esbuild/linux-s390x@0.25.2': optional: true - '@esbuild/freebsd-arm64@0.27.2': + '@esbuild/linux-s390x@0.28.2': optional: true - '@esbuild/freebsd-x64@0.27.2': + '@esbuild/linux-x64@0.25.2': optional: true - '@esbuild/linux-arm64@0.27.2': + '@esbuild/linux-x64@0.28.2': optional: true - '@esbuild/linux-arm@0.27.2': + '@esbuild/netbsd-arm64@0.25.2': optional: true - '@esbuild/linux-ia32@0.27.2': + '@esbuild/netbsd-arm64@0.28.2': optional: true - '@esbuild/linux-loong64@0.27.2': + '@esbuild/netbsd-x64@0.25.2': optional: true - '@esbuild/linux-mips64el@0.27.2': + '@esbuild/netbsd-x64@0.28.2': optional: true - '@esbuild/linux-ppc64@0.27.2': + '@esbuild/openbsd-arm64@0.25.2': optional: true - '@esbuild/linux-riscv64@0.27.2': + '@esbuild/openbsd-arm64@0.28.2': optional: true - '@esbuild/linux-s390x@0.27.2': + '@esbuild/openbsd-x64@0.25.2': optional: true - '@esbuild/linux-x64@0.27.2': + '@esbuild/openbsd-x64@0.28.2': optional: true - '@esbuild/netbsd-arm64@0.27.2': + '@esbuild/openharmony-arm64@0.28.2': optional: true - '@esbuild/netbsd-x64@0.27.2': + '@esbuild/sunos-x64@0.25.2': optional: true - '@esbuild/openbsd-arm64@0.27.2': + '@esbuild/sunos-x64@0.28.2': optional: true - '@esbuild/openbsd-x64@0.27.2': + '@esbuild/win32-arm64@0.25.2': optional: true - '@esbuild/openharmony-arm64@0.27.2': + '@esbuild/win32-arm64@0.28.2': optional: true - '@esbuild/sunos-x64@0.27.2': + '@esbuild/win32-ia32@0.25.2': optional: true - '@esbuild/win32-arm64@0.27.2': + '@esbuild/win32-ia32@0.28.2': optional: true - '@esbuild/win32-ia32@0.27.2': + '@esbuild/win32-x64@0.25.2': optional: true - '@esbuild/win32-x64@0.27.2': + '@esbuild/win32-x64@0.28.2': optional: true '@exodus/schemasafe@1.3.0': {} '@faker-js/faker@7.6.0': {} - '@hey-api/client-fetch@0.6.0': {} + '@hey-api/codegen-core@0.9.1': + dependencies: + '@hey-api/types': 0.1.4 + ansi-colors: 4.1.3 + c12: 3.3.4 + color-support: 1.1.3 + transitivePeerDependencies: + - magicast - '@hey-api/json-schema-ref-parser@1.0.1': + '@hey-api/json-schema-ref-parser@1.4.4': dependencies: '@jsdevtools/ono': 7.1.3 '@types/json-schema': 7.0.15 - js-yaml: 4.1.1 + js-yaml: 4.2.0 + + '@hey-api/openapi-ts@0.99.0(typescript@5.8.2)': + dependencies: + '@hey-api/codegen-core': 0.9.1 + '@hey-api/json-schema-ref-parser': 1.4.4 + '@hey-api/shared': 0.5.0 + '@hey-api/spec-types': 0.2.0 + '@hey-api/types': 0.1.4 + '@lukeed/ms': 2.0.2 + ansi-colors: 4.1.3 + color-support: 1.1.3 + commander: 15.0.0 + get-tsconfig: 4.14.0 + typescript: 5.8.2 + transitivePeerDependencies: + - magicast - '@hey-api/openapi-ts@0.61.2(typescript@5.9.3)': + '@hey-api/shared@0.5.0': dependencies: - '@hey-api/json-schema-ref-parser': 1.0.1 - c12: 2.0.1 - commander: 13.0.0 - handlebars: 4.7.8 - typescript: 5.9.3 + '@hey-api/codegen-core': 0.9.1 + '@hey-api/json-schema-ref-parser': 1.4.4 + '@hey-api/spec-types': 0.2.0 + '@hey-api/types': 0.1.4 + ansi-colors: 4.1.3 + cross-spawn: 7.0.6 + open: 11.0.0 + semver: 7.8.4 transitivePeerDependencies: - magicast + '@hey-api/spec-types@0.2.0': + dependencies: + '@hey-api/types': 0.1.4 + + '@hey-api/types@0.1.4': {} + '@humanwhocodes/momoa@2.0.4': {} + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + '@jest/schemas@29.6.3': dependencies: '@sinclair/typebox': 0.27.12 - '@jridgewell/gen-mapping@0.3.13': + '@jridgewell/gen-mapping@0.3.8': dependencies: - '@jridgewell/sourcemap-codec': 1.5.5 - '@jridgewell/trace-mapping': 0.3.31 + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/resolve-uri@3.1.2': {} - '@jridgewell/sourcemap-codec@1.5.5': {} + '@jridgewell/set-array@1.2.1': {} + + '@jridgewell/sourcemap-codec@1.5.0': {} - '@jridgewell/trace-mapping@0.3.31': + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/sourcemap-codec': 1.5.0 '@jsdevtools/ono@7.1.3': {} @@ -1752,7 +2471,12 @@ snapshots: dependencies: jsep: 1.4.0 - '@nodable/entities@3.0.0': {} + '@lukeed/ms@2.0.2': {} + + '@napi-rs/lzma-linux-x64-gnu@1.5.1': + optional: true + + '@nodable/entities@3.1.0': {} '@opentelemetry/api-logs@0.222.0': dependencies: @@ -1838,6 +2562,9 @@ snapshots: '@opentelemetry/semantic-conventions@1.43.0': {} + '@pkgjs/parseargs@0.11.0': + optional: true + '@redocly/ajv@8.11.2': dependencies: fast-deep-equal: 3.1.3 @@ -1924,98 +2651,207 @@ snapshots: - ajv - supports-color - '@rollup/rollup-android-arm-eabi@4.57.1': + '@rollup/rollup-android-arm-eabi@4.40.0': + optional: true + + '@rollup/rollup-android-arm-eabi@4.63.5': + optional: true + + '@rollup/rollup-android-arm64@4.40.0': + optional: true + + '@rollup/rollup-android-arm64@4.63.5': + optional: true + + '@rollup/rollup-darwin-arm64@4.40.0': + optional: true + + '@rollup/rollup-darwin-arm64@4.63.5': + optional: true + + '@rollup/rollup-darwin-x64@4.40.0': + optional: true + + '@rollup/rollup-darwin-x64@4.63.5': + optional: true + + '@rollup/rollup-freebsd-arm64@4.40.0': + optional: true + + '@rollup/rollup-freebsd-arm64@4.63.5': + optional: true + + '@rollup/rollup-freebsd-x64@4.40.0': + optional: true + + '@rollup/rollup-freebsd-x64@4.63.5': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.40.0': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.63.5': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.40.0': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.63.5': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.40.0': optional: true - '@rollup/rollup-android-arm64@4.57.1': + '@rollup/rollup-linux-arm64-gnu@4.63.5': optional: true - '@rollup/rollup-darwin-arm64@4.57.1': + '@rollup/rollup-linux-arm64-musl@4.40.0': optional: true - '@rollup/rollup-darwin-x64@4.57.1': + '@rollup/rollup-linux-arm64-musl@4.63.5': optional: true - '@rollup/rollup-freebsd-arm64@4.57.1': + '@rollup/rollup-linux-loong64-gnu@4.63.5': optional: true - '@rollup/rollup-freebsd-x64@4.57.1': + '@rollup/rollup-linux-loong64-musl@4.63.5': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.57.1': + '@rollup/rollup-linux-loongarch64-gnu@4.40.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.57.1': + '@rollup/rollup-linux-powerpc64le-gnu@4.40.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.57.1': + '@rollup/rollup-linux-ppc64-gnu@4.63.5': optional: true - '@rollup/rollup-linux-arm64-musl@4.57.1': + '@rollup/rollup-linux-ppc64-musl@4.63.5': optional: true - '@rollup/rollup-linux-loong64-gnu@4.57.1': + '@rollup/rollup-linux-riscv64-gnu@4.40.0': optional: true - '@rollup/rollup-linux-loong64-musl@4.57.1': + '@rollup/rollup-linux-riscv64-gnu@4.63.5': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.57.1': + '@rollup/rollup-linux-riscv64-musl@4.40.0': optional: true - '@rollup/rollup-linux-ppc64-musl@4.57.1': + '@rollup/rollup-linux-riscv64-musl@4.63.5': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.57.1': + '@rollup/rollup-linux-s390x-gnu@4.40.0': optional: true - '@rollup/rollup-linux-riscv64-musl@4.57.1': + '@rollup/rollup-linux-s390x-gnu@4.63.5': optional: true - '@rollup/rollup-linux-s390x-gnu@4.57.1': + '@rollup/rollup-linux-x64-gnu@4.40.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.57.1': + '@rollup/rollup-linux-x64-gnu@4.63.5': optional: true - '@rollup/rollup-linux-x64-musl@4.57.1': + '@rollup/rollup-linux-x64-musl@4.40.0': optional: true - '@rollup/rollup-openbsd-x64@4.57.1': + '@rollup/rollup-linux-x64-musl@4.63.5': optional: true - '@rollup/rollup-openharmony-arm64@4.57.1': + '@rollup/rollup-openbsd-x64@4.63.5': optional: true - '@rollup/rollup-win32-arm64-msvc@4.57.1': + '@rollup/rollup-openharmony-arm64@4.63.5': optional: true - '@rollup/rollup-win32-ia32-msvc@4.57.1': + '@rollup/rollup-win32-arm64-msvc@4.40.0': optional: true - '@rollup/rollup-win32-x64-gnu@4.57.1': + '@rollup/rollup-win32-arm64-msvc@4.63.5': optional: true - '@rollup/rollup-win32-x64-msvc@4.57.1': + '@rollup/rollup-win32-ia32-msvc@4.40.0': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.63.5': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.63.5': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.40.0': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.63.5': optional: true '@sinclair/typebox@0.27.12': {} + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + '@types/ejs@3.1.5': {} - '@types/estree@1.0.8': {} + '@types/estree@1.0.7': {} + + '@types/estree@1.0.9': {} '@types/json-schema@7.0.15': {} '@types/trusted-types@2.0.7': optional: true + '@vitest/expect@3.2.7': + dependencies: + '@types/chai': 5.2.3 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 + chai: 5.3.3 + tinyrainbow: 2.0.0 + + '@vitest/mocker@3.2.7(vite@7.3.6(jiti@2.7.0))': + dependencies: + '@vitest/spy': 3.2.7 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 7.3.6(jiti@2.7.0) + + '@vitest/pretty-format@3.2.7': + dependencies: + tinyrainbow: 2.0.0 + + '@vitest/runner@3.2.7': + dependencies: + '@vitest/utils': 3.2.7 + pathe: 2.0.3 + strip-literal: 3.1.0 + + '@vitest/snapshot@3.2.7': + dependencies: + '@vitest/pretty-format': 3.2.7 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@3.2.7': + dependencies: + tinyspy: 4.0.6 + + '@vitest/utils@3.2.7': + dependencies: + '@vitest/pretty-format': 3.2.7 + loupe: 3.2.1 + tinyrainbow: 2.0.0 + abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 - acorn@8.15.0: {} - agent-base@7.1.4: {} ajv@8.20.0: @@ -2025,14 +2861,20 @@ snapshots: json-schema-traverse: 1.0.0 require-from-string: 2.0.2 + ansi-colors@4.1.3: {} + ansi-regex@5.0.1: {} + ansi-regex@6.1.0: {} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 ansi-styles@5.2.0: {} + ansi-styles@6.2.1: {} + any-promise@1.3.0: {} anymatch@3.1.3: @@ -2044,6 +2886,8 @@ snapshots: argparse@2.0.1: {} + assertion-error@2.0.1: {} + async@3.2.6: {} asynckit@0.4.0: {} @@ -2061,12 +2905,12 @@ snapshots: binary-extensions@2.3.0: {} - brace-expansion@1.1.21: + brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 - brace-expansion@2.0.2: + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.2 @@ -2076,29 +2920,29 @@ snapshots: buffer-from@1.1.2: {} - bundle-name@4.1.0: + bundle-name@4.1.1: dependencies: run-applescript: 7.1.0 - bundle-require@5.1.0(esbuild@0.27.2): + bundle-require@5.1.0(esbuild@0.25.2): dependencies: - esbuild: 0.27.2 + esbuild: 0.25.2 load-tsconfig: 0.2.5 - c12@2.0.1: + c12@3.3.4: dependencies: - chokidar: 4.0.3 - confbox: 0.1.8 - defu: 6.1.4 - dotenv: 16.6.1 - giget: 1.2.5 - jiti: 2.6.1 - mlly: 1.8.0 - ohash: 1.1.6 - pathe: 1.1.2 - perfect-debounce: 1.0.0 - pkg-types: 1.3.1 - rc9: 2.1.2 + chokidar: 5.0.0 + confbox: 0.2.4 + defu: 6.1.7 + dotenv: 17.4.2 + exsolve: 1.1.1 + giget: 3.3.1 + jiti: 2.7.0 + ohash: 2.0.12 + pathe: 2.0.3 + perfect-debounce: 2.1.0 + pkg-types: 2.3.3 + rc9: 3.1.0 cac@6.7.14: {} @@ -2109,11 +2953,21 @@ snapshots: call-me-maybe@1.0.2: {} + chai@5.3.3: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.3 + deep-eql: 5.0.2 + loupe: 3.2.1 + pathval: 2.0.1 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + check-error@2.1.3: {} + chokidar@3.5.3: dependencies: anymatch: 3.1.3 @@ -2130,11 +2984,9 @@ snapshots: dependencies: readdirp: 4.1.2 - chownr@2.0.0: {} - - citty@0.1.6: + chokidar@5.0.0: dependencies: - consola: 3.4.2 + readdirp: 5.1.1 classnames@2.5.1: {} @@ -2152,6 +3004,8 @@ snapshots: color-name@1.1.4: {} + color-support@1.1.3: {} + colorette@1.4.0: {} colorette@2.0.20: {} @@ -2160,7 +3014,7 @@ snapshots: dependencies: delayed-stream: 1.0.0 - commander@13.0.0: {} + commander@15.0.0: {} commander@4.1.1: {} @@ -2173,7 +3027,9 @@ snapshots: readable-stream: 3.6.2 typedarray: 0.0.6 - confbox@0.1.8: {} + confbox@0.2.4: {} + + confbox@0.3.1: {} consola@3.4.2: {} @@ -2181,24 +3037,36 @@ snapshots: core-js@3.32.1: {} + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + csstype@3.2.3: {} + debug@4.4.0: + dependencies: + ms: 2.1.3 + debug@4.4.3: dependencies: ms: 2.1.3 decko@1.2.0: {} + deep-eql@5.0.2: {} + default-browser-id@5.0.1: {} default-browser@5.5.1: dependencies: - bundle-name: 4.1.0 + bundle-name: 4.1.1 default-browser-id: 5.0.1 define-lazy-prop@3.0.0: {} - defu@6.1.4: {} + defu@6.1.7: {} delayed-stream@1.0.0: {} @@ -2206,13 +3074,13 @@ snapshots: diff-sequences@29.6.3: {} - dompurify@3.4.15: + dompurify@3.4.16: optionalDependencies: '@types/trusted-types': 2.0.7 dotenv@16.4.7: {} - dotenv@16.6.1: {} + dotenv@17.4.2: {} dunder-proto@1.0.1: dependencies: @@ -2220,16 +3088,22 @@ snapshots: es-errors: 1.3.0 gopd: 1.2.0 + eastasianwidth@0.2.0: {} + ejs@3.1.10: dependencies: - jake: 10.9.4 + jake: 10.9.2 emoji-regex@8.0.0: {} + emoji-regex@9.2.2: {} + es-define-property@1.0.1: {} es-errors@1.3.0: {} + es-module-lexer@1.7.0: {} + es-object-atoms@1.1.2: dependencies: es-errors: 1.3.0 @@ -2243,45 +3117,81 @@ snapshots: es6-promise@3.3.1: {} - esbuild-fix-imports-plugin@1.0.23: {} + esbuild-fix-imports-plugin@1.0.19: {} esbuild-plugin-file-path-extensions@1.0.0: {} - esbuild@0.27.2: + esbuild@0.25.2: optionalDependencies: - '@esbuild/aix-ppc64': 0.27.2 - '@esbuild/android-arm': 0.27.2 - '@esbuild/android-arm64': 0.27.2 - '@esbuild/android-x64': 0.27.2 - '@esbuild/darwin-arm64': 0.27.2 - '@esbuild/darwin-x64': 0.27.2 - '@esbuild/freebsd-arm64': 0.27.2 - '@esbuild/freebsd-x64': 0.27.2 - '@esbuild/linux-arm': 0.27.2 - '@esbuild/linux-arm64': 0.27.2 - '@esbuild/linux-ia32': 0.27.2 - '@esbuild/linux-loong64': 0.27.2 - '@esbuild/linux-mips64el': 0.27.2 - '@esbuild/linux-ppc64': 0.27.2 - '@esbuild/linux-riscv64': 0.27.2 - '@esbuild/linux-s390x': 0.27.2 - '@esbuild/linux-x64': 0.27.2 - '@esbuild/netbsd-arm64': 0.27.2 - '@esbuild/netbsd-x64': 0.27.2 - '@esbuild/openbsd-arm64': 0.27.2 - '@esbuild/openbsd-x64': 0.27.2 - '@esbuild/openharmony-arm64': 0.27.2 - '@esbuild/sunos-x64': 0.27.2 - '@esbuild/win32-arm64': 0.27.2 - '@esbuild/win32-ia32': 0.27.2 - '@esbuild/win32-x64': 0.27.2 + '@esbuild/aix-ppc64': 0.25.2 + '@esbuild/android-arm': 0.25.2 + '@esbuild/android-arm64': 0.25.2 + '@esbuild/android-x64': 0.25.2 + '@esbuild/darwin-arm64': 0.25.2 + '@esbuild/darwin-x64': 0.25.2 + '@esbuild/freebsd-arm64': 0.25.2 + '@esbuild/freebsd-x64': 0.25.2 + '@esbuild/linux-arm': 0.25.2 + '@esbuild/linux-arm64': 0.25.2 + '@esbuild/linux-ia32': 0.25.2 + '@esbuild/linux-loong64': 0.25.2 + '@esbuild/linux-mips64el': 0.25.2 + '@esbuild/linux-ppc64': 0.25.2 + '@esbuild/linux-riscv64': 0.25.2 + '@esbuild/linux-s390x': 0.25.2 + '@esbuild/linux-x64': 0.25.2 + '@esbuild/netbsd-arm64': 0.25.2 + '@esbuild/netbsd-x64': 0.25.2 + '@esbuild/openbsd-arm64': 0.25.2 + '@esbuild/openbsd-x64': 0.25.2 + '@esbuild/sunos-x64': 0.25.2 + '@esbuild/win32-arm64': 0.25.2 + '@esbuild/win32-ia32': 0.25.2 + '@esbuild/win32-x64': 0.25.2 + + esbuild@0.28.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.2 + '@esbuild/android-arm': 0.28.2 + '@esbuild/android-arm64': 0.28.2 + '@esbuild/android-x64': 0.28.2 + '@esbuild/darwin-arm64': 0.28.2 + '@esbuild/darwin-x64': 0.28.2 + '@esbuild/freebsd-arm64': 0.28.2 + '@esbuild/freebsd-x64': 0.28.2 + '@esbuild/linux-arm': 0.28.2 + '@esbuild/linux-arm64': 0.28.2 + '@esbuild/linux-ia32': 0.28.2 + '@esbuild/linux-loong64': 0.28.2 + '@esbuild/linux-mips64el': 0.28.2 + '@esbuild/linux-ppc64': 0.28.2 + '@esbuild/linux-riscv64': 0.28.2 + '@esbuild/linux-s390x': 0.28.2 + '@esbuild/linux-x64': 0.28.2 + '@esbuild/netbsd-arm64': 0.28.2 + '@esbuild/netbsd-x64': 0.28.2 + '@esbuild/openbsd-arm64': 0.28.2 + '@esbuild/openbsd-x64': 0.28.2 + '@esbuild/openharmony-arm64': 0.28.2 + '@esbuild/sunos-x64': 0.28.2 + '@esbuild/win32-arm64': 0.28.2 + '@esbuild/win32-ia32': 0.28.2 + '@esbuild/win32-x64': 0.28.2 escalade@3.2.0: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.7 + event-target-shim@5.0.1: {} eventemitter3@5.0.4: {} + expect-type@1.4.0: {} + + exsolve@1.1.1: {} + fast-deep-equal@3.1.3: {} fast-safe-stringify@2.1.1: {} @@ -2293,18 +3203,22 @@ snapshots: path-expression-matcher: 1.6.2 xml-naming: 0.3.0 - fast-xml-parser@5.11.1: + fast-xml-parser@5.11.2: dependencies: - '@nodable/entities': 3.0.0 + '@nodable/entities': 3.1.0 fast-xml-builder: 1.3.1 is-unsafe: 2.0.2 path-expression-matcher: 1.6.2 strnum: 2.4.2 xml-naming: 0.3.0 - fdir@6.5.0(picomatch@4.0.3): + fdir@6.4.3(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + + fdir@6.5.0(picomatch@4.0.7): optionalDependencies: - picomatch: 4.0.3 + picomatch: 4.0.7 filelist@1.0.4: dependencies: @@ -2314,14 +3228,13 @@ snapshots: dependencies: to-regex-range: 5.0.1 - fix-dts-default-cjs-exports@1.0.1: - dependencies: - magic-string: 0.30.21 - mlly: 1.8.0 - rollup: 4.57.1 - foreach@2.0.6: {} + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + form-data@4.0.6: dependencies: asynckit: 0.4.0 @@ -2330,10 +3243,6 @@ snapshots: hasown: 2.0.4 mime-types: 2.1.35 - fs-minipass@2.1.0: - dependencies: - minipass: 3.3.6 - fs.realpath@1.0.0: {} fsevents@2.3.3: @@ -2363,40 +3272,36 @@ snapshots: dunder-proto: 1.0.1 es-object-atoms: 1.1.2 - giget@1.2.5: + get-tsconfig@4.14.0: dependencies: - citty: 0.1.6 - consola: 3.4.2 - defu: 6.1.4 - node-fetch-native: 1.6.7 - nypm: 0.5.4 - pathe: 2.0.3 - tar: 6.2.1 + resolve-pkg-maps: 1.0.0 + + giget@3.3.1: {} glob-parent@5.1.2: dependencies: is-glob: 4.0.3 + glob@10.4.5: + dependencies: + foreground-child: 3.3.1 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + glob@7.2.3: dependencies: fs.realpath: 1.0.0 inflight: 1.0.6 inherits: 2.0.4 - minimatch: 3.1.5 + minimatch: 3.1.2 once: 1.4.0 path-is-absolute: 1.0.1 gopd@1.2.0: {} - handlebars@4.7.8: - dependencies: - minimist: 1.2.8 - neo-async: 2.6.2 - source-map: 0.6.1 - wordwrap: 1.0.0 - optionalDependencies: - uglify-js: 3.19.3 - handlebars@4.7.9: dependencies: minimist: 1.2.8 @@ -2448,6 +3353,8 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-in-ssh@1.0.0: {} + is-inside-container@1.0.0: dependencies: is-docker: 3.0.0 @@ -2460,11 +3367,20 @@ snapshots: dependencies: is-inside-container: 1.0.0 - jake@10.9.4: + isexe@2.0.0: {} + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + jake@10.9.2: dependencies: async: 3.2.6 + chalk: 4.1.2 filelist: 1.0.4 - picocolors: 1.1.1 + minimatch: 3.1.2 jest-diff@29.7.0: dependencies: @@ -2482,7 +3398,7 @@ snapshots: jest-get-type: 29.6.3 pretty-format: 29.7.0 - jiti@2.6.1: {} + jiti@2.7.0: {} joycon@3.1.1: {} @@ -2490,7 +3406,9 @@ snapshots: js-tokens@4.0.0: {} - js-yaml@4.1.1: + js-tokens@9.0.1: {} + + js-yaml@4.2.0: dependencies: argparse: 2.0.1 @@ -2522,17 +3440,21 @@ snapshots: load-tsconfig@0.2.5: {} - lodash@4.18.1: {} + lodash.sortby@4.7.0: {} loose-envify@1.4.0: dependencies: js-tokens: 4.0.0 + loupe@3.2.1: {} + + lru-cache@10.4.3: {} + lunr@2.3.9: {} magic-string@0.30.21: dependencies: - '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/sourcemap-codec': 1.6.0 mark.js@8.11.1: {} @@ -2546,39 +3468,25 @@ snapshots: dependencies: mime-db: 1.52.0 - minimatch@3.1.5: + minimatch@3.1.2: dependencies: - brace-expansion: 1.1.21 + brace-expansion: 1.1.11 minimatch@5.1.6: dependencies: - brace-expansion: 2.0.2 + brace-expansion: 2.0.1 minimatch@5.1.9: dependencies: - brace-expansion: 2.0.2 - - minimist@1.2.8: {} - - minipass@3.3.6: - dependencies: - yallist: 4.0.0 - - minipass@5.0.0: {} + brace-expansion: 2.0.1 - minizlib@2.1.2: + minimatch@9.0.5: dependencies: - minipass: 3.3.6 - yallist: 4.0.0 + brace-expansion: 2.0.1 - mkdirp@1.0.4: {} + minimist@1.2.8: {} - mlly@1.8.0: - dependencies: - acorn: 8.15.0 - pathe: 2.0.3 - pkg-types: 1.3.1 - ufo: 1.6.3 + minipass@7.1.2: {} mobx-react-lite@4.1.1(mobx@6.12.3)(react-dom@19.3.0(react@19.3.0))(react@19.3.0): dependencies: @@ -2606,14 +3514,14 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 + nanoid@3.3.19: {} + neo-async@2.6.2: {} node-fetch-h2@2.3.0: dependencies: http2-client: 1.3.5 - node-fetch-native@1.6.7: {} - node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 @@ -2624,15 +3532,6 @@ snapshots: normalize-path@3.0.0: {} - nypm@0.5.4: - dependencies: - citty: 0.1.6 - consola: 3.4.2 - pathe: 2.0.3 - pkg-types: 1.3.1 - tinyexec: 0.3.2 - ufo: 1.6.3 - oas-kit-common@1.0.8: dependencies: fast-safe-stringify: 2.1.1 @@ -2666,7 +3565,7 @@ snapshots: object-assign@4.1.1: {} - ohash@1.1.6: {} + ohash@2.0.12: {} once@1.4.0: dependencies: @@ -2679,31 +3578,49 @@ snapshots: is-inside-container: 1.0.0 is-wsl: 3.1.1 + open@11.0.0: + dependencies: + default-browser: 5.5.1 + define-lazy-prop: 3.0.0 + is-in-ssh: 1.0.0 + is-inside-container: 1.0.0 + powershell-utils: 0.1.0 + wsl-utils: 0.3.1 + openapi-sampler@1.7.0: dependencies: '@types/json-schema': 7.0.15 - fast-xml-parser: 5.11.1 + fast-xml-parser: 5.11.2 json-pointer: 0.6.2 openapi-sampler@1.7.6: dependencies: '@types/json-schema': 7.0.15 - fast-xml-parser: 5.11.1 + fast-xml-parser: 5.11.2 json-pointer: 0.6.2 outdent@0.8.0: {} + package-json-from-dist@1.0.1: {} + path-browserify@1.0.1: {} path-expression-matcher@1.6.2: {} path-is-absolute@1.0.1: {} - pathe@1.1.2: {} + path-key@3.1.1: {} + + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.2 pathe@2.0.3: {} - perfect-debounce@1.0.0: {} + pathval@2.0.1: {} + + perfect-debounce@2.1.0: {} perfect-scrollbar@1.5.6: {} @@ -2711,14 +3628,16 @@ snapshots: picomatch@2.3.2: {} - picomatch@4.0.3: {} + picomatch@4.0.2: {} + + picomatch@4.0.7: {} pirates@4.0.7: {} - pkg-types@1.3.1: + pkg-types@2.3.3: dependencies: - confbox: 0.1.8 - mlly: 1.8.0 + confbox: 0.3.1 + exsolve: 1.1.1 pathe: 2.0.3 pluralize@8.0.0: {} @@ -2727,11 +3646,20 @@ snapshots: dependencies: '@babel/runtime': 7.29.7 - postcss-load-config@6.0.1(jiti@2.6.1): + postcss-load-config@6.0.1(jiti@2.7.0)(postcss@8.5.28): dependencies: lilconfig: 3.1.3 optionalDependencies: - jiti: 2.6.1 + jiti: 2.7.0 + postcss: 8.5.28 + + postcss@8.5.28: + dependencies: + nanoid: 3.3.19 + picocolors: 1.1.1 + source-map-js: 1.2.1 + + powershell-utils@0.1.0: {} pretty-format@29.7.0: dependencies: @@ -2747,15 +3675,17 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 + punycode@2.3.1: {} + queue-microtask@1.2.3: {} randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 - rc9@2.1.2: + rc9@3.1.0: dependencies: - defu: 6.1.4 + defu: 6.1.7 destr: 2.0.5 react-dom@19.3.0(react@19.3.0): @@ -2787,13 +3717,15 @@ snapshots: readdirp@4.1.2: {} + readdirp@5.1.1: {} + redoc@2.5.3(core-js@3.32.1)(mobx@6.12.3)(react-dom@19.3.0(react@19.3.0))(react@19.3.0)(styled-components@6.5.3(react-dom@19.3.0(react@19.3.0))(react@19.3.0)): dependencies: '@redocly/openapi-core': 1.34.20 classnames: 2.5.1 core-js: 3.32.1 decko: 1.2.0 - dompurify: 3.4.15 + dompurify: 3.4.16 eventemitter3: 5.0.4 json-pointer: 0.6.2 lunr: 2.3.9 @@ -2828,35 +3760,64 @@ snapshots: resolve-from@5.0.0: {} - rollup@4.57.1: + resolve-pkg-maps@1.0.0: {} + + rollup@4.40.0: + dependencies: + '@types/estree': 1.0.7 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.40.0 + '@rollup/rollup-android-arm64': 4.40.0 + '@rollup/rollup-darwin-arm64': 4.40.0 + '@rollup/rollup-darwin-x64': 4.40.0 + '@rollup/rollup-freebsd-arm64': 4.40.0 + '@rollup/rollup-freebsd-x64': 4.40.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.40.0 + '@rollup/rollup-linux-arm-musleabihf': 4.40.0 + '@rollup/rollup-linux-arm64-gnu': 4.40.0 + '@rollup/rollup-linux-arm64-musl': 4.40.0 + '@rollup/rollup-linux-loongarch64-gnu': 4.40.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.40.0 + '@rollup/rollup-linux-riscv64-gnu': 4.40.0 + '@rollup/rollup-linux-riscv64-musl': 4.40.0 + '@rollup/rollup-linux-s390x-gnu': 4.40.0 + '@rollup/rollup-linux-x64-gnu': 4.40.0 + '@rollup/rollup-linux-x64-musl': 4.40.0 + '@rollup/rollup-win32-arm64-msvc': 4.40.0 + '@rollup/rollup-win32-ia32-msvc': 4.40.0 + '@rollup/rollup-win32-x64-msvc': 4.40.0 + fsevents: 2.3.3 + + rollup@4.63.5: dependencies: - '@types/estree': 1.0.8 + '@types/estree': 1.0.9 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.57.1 - '@rollup/rollup-android-arm64': 4.57.1 - '@rollup/rollup-darwin-arm64': 4.57.1 - '@rollup/rollup-darwin-x64': 4.57.1 - '@rollup/rollup-freebsd-arm64': 4.57.1 - '@rollup/rollup-freebsd-x64': 4.57.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.57.1 - '@rollup/rollup-linux-arm-musleabihf': 4.57.1 - '@rollup/rollup-linux-arm64-gnu': 4.57.1 - '@rollup/rollup-linux-arm64-musl': 4.57.1 - '@rollup/rollup-linux-loong64-gnu': 4.57.1 - '@rollup/rollup-linux-loong64-musl': 4.57.1 - '@rollup/rollup-linux-ppc64-gnu': 4.57.1 - '@rollup/rollup-linux-ppc64-musl': 4.57.1 - '@rollup/rollup-linux-riscv64-gnu': 4.57.1 - '@rollup/rollup-linux-riscv64-musl': 4.57.1 - '@rollup/rollup-linux-s390x-gnu': 4.57.1 - '@rollup/rollup-linux-x64-gnu': 4.57.1 - '@rollup/rollup-linux-x64-musl': 4.57.1 - '@rollup/rollup-openbsd-x64': 4.57.1 - '@rollup/rollup-openharmony-arm64': 4.57.1 - '@rollup/rollup-win32-arm64-msvc': 4.57.1 - '@rollup/rollup-win32-ia32-msvc': 4.57.1 - '@rollup/rollup-win32-x64-gnu': 4.57.1 - '@rollup/rollup-win32-x64-msvc': 4.57.1 + '@napi-rs/lzma-linux-x64-gnu': 1.5.1 + '@rollup/rollup-android-arm-eabi': 4.63.5 + '@rollup/rollup-android-arm64': 4.63.5 + '@rollup/rollup-darwin-arm64': 4.63.5 + '@rollup/rollup-darwin-x64': 4.63.5 + '@rollup/rollup-freebsd-arm64': 4.63.5 + '@rollup/rollup-freebsd-x64': 4.63.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.63.5 + '@rollup/rollup-linux-arm-musleabihf': 4.63.5 + '@rollup/rollup-linux-arm64-gnu': 4.63.5 + '@rollup/rollup-linux-arm64-musl': 4.63.5 + '@rollup/rollup-linux-loong64-gnu': 4.63.5 + '@rollup/rollup-linux-loong64-musl': 4.63.5 + '@rollup/rollup-linux-ppc64-gnu': 4.63.5 + '@rollup/rollup-linux-ppc64-musl': 4.63.5 + '@rollup/rollup-linux-riscv64-gnu': 4.63.5 + '@rollup/rollup-linux-riscv64-musl': 4.63.5 + '@rollup/rollup-linux-s390x-gnu': 4.63.5 + '@rollup/rollup-linux-x64-gnu': 4.63.5 + '@rollup/rollup-linux-x64-musl': 4.63.5 + '@rollup/rollup-openbsd-x64': 4.63.5 + '@rollup/rollup-openharmony-arm64': 4.63.5 + '@rollup/rollup-win32-arm64-msvc': 4.63.5 + '@rollup/rollup-win32-ia32-msvc': 4.63.5 + '@rollup/rollup-win32-x64-gnu': 4.63.5 + '@rollup/rollup-win32-x64-msvc': 4.63.5 fsevents: 2.3.3 run-applescript@7.1.0: {} @@ -2867,8 +3828,16 @@ snapshots: semver@7.7.4: {} + semver@7.8.4: {} + set-cookie-parser@2.7.1: {} + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + should-equal@2.0.0: dependencies: should-type: 1.4.0 @@ -2895,6 +3864,10 @@ snapshots: should-type-adaptors: 1.1.0 should-util: 1.0.1 + siginfo@2.0.0: {} + + signal-exit@4.1.0: {} + simple-websocket@9.1.0: dependencies: debug: 4.4.3 @@ -2909,9 +3882,17 @@ snapshots: slugify@1.4.7: {} + source-map-js@1.2.1: {} + source-map@0.6.1: {} - source-map@0.7.6: {} + source-map@0.8.0-beta.0: + dependencies: + whatwg-url: 7.1.0 + + stackback@0.0.2: {} + + std-env@3.10.0: {} stickyfill@1.1.1: {} @@ -2921,6 +3902,12 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 @@ -2929,6 +3916,14 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-ansi@7.1.0: + dependencies: + ansi-regex: 6.1.0 + + strip-literal@3.1.0: + dependencies: + js-tokens: 9.0.1 + strnum@2.4.2: dependencies: anynum: 1.0.1 @@ -2944,14 +3939,14 @@ snapshots: stylis@4.3.6: {} - sucrase@3.35.1: + sucrase@3.35.0: dependencies: - '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/gen-mapping': 0.3.8 commander: 4.1.1 + glob: 10.4.5 lines-and-columns: 1.2.4 mz: 2.7.0 pirates: 4.0.7 - tinyglobby: 0.2.15 ts-interface-checker: 0.1.13 supports-color@7.2.0: @@ -2974,15 +3969,6 @@ snapshots: transitivePeerDependencies: - encoding - tar@6.2.1: - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 5.0.0 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -2991,12 +3977,25 @@ snapshots: dependencies: any-promise: 1.3.0 + tinybench@2.9.0: {} + tinyexec@0.3.2: {} - tinyglobby@0.2.15: + tinyglobby@0.2.12: + dependencies: + fdir: 6.4.3(picomatch@4.0.2) + picomatch: 4.0.2 + + tinyglobby@0.2.17: dependencies: - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + + tinypool@1.1.1: {} + + tinyrainbow@2.0.0: {} + + tinyspy@4.0.6: {} to-regex-range@5.0.1: dependencies: @@ -3004,31 +4003,35 @@ snapshots: tr46@0.0.3: {} + tr46@1.0.1: + dependencies: + punycode: 2.3.1 + tree-kill@1.2.2: {} ts-interface-checker@0.1.13: {} - tsup@8.5.1(jiti@2.6.1)(typescript@5.9.3): + tsup@8.4.0(jiti@2.7.0)(postcss@8.5.28)(typescript@5.8.2): dependencies: - bundle-require: 5.1.0(esbuild@0.27.2) + bundle-require: 5.1.0(esbuild@0.25.2) cac: 6.7.14 chokidar: 4.0.3 consola: 3.4.2 - debug: 4.4.3 - esbuild: 0.27.2 - fix-dts-default-cjs-exports: 1.0.1 + debug: 4.4.0 + esbuild: 0.25.2 joycon: 3.1.1 picocolors: 1.1.1 - postcss-load-config: 6.0.1(jiti@2.6.1) + postcss-load-config: 6.0.1(jiti@2.7.0)(postcss@8.5.28) resolve-from: 5.0.0 - rollup: 4.57.1 - source-map: 0.7.6 - sucrase: 3.35.1 + rollup: 4.40.0 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 tinyexec: 0.3.2 - tinyglobby: 0.2.15 + tinyglobby: 0.2.12 tree-kill: 1.2.2 optionalDependencies: - typescript: 5.9.3 + postcss: 8.5.28 + typescript: 5.8.2 transitivePeerDependencies: - jiti - supports-color @@ -3037,9 +4040,7 @@ snapshots: typedarray@0.0.6: {} - typescript@5.9.3: {} - - ufo@1.6.3: {} + typescript@5.8.2: {} uglify-js@3.19.3: optional: true @@ -3056,13 +4057,102 @@ snapshots: util-deprecate@1.0.2: {} + vite-node@3.2.4(jiti@2.7.0): + dependencies: + cac: 6.7.14 + debug: 4.4.3 + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 7.3.6(jiti@2.7.0) + transitivePeerDependencies: + - '@types/node' + - jiti + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + + vite@7.3.6(jiti@2.7.0): + dependencies: + esbuild: 0.28.2 + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + postcss: 8.5.28 + rollup: 4.63.5 + tinyglobby: 0.2.17 + optionalDependencies: + fsevents: 2.3.3 + jiti: 2.7.0 + + vitest@3.2.7(jiti@2.7.0): + dependencies: + '@types/chai': 5.2.3 + '@vitest/expect': 3.2.7 + '@vitest/mocker': 3.2.7(vite@7.3.6(jiti@2.7.0)) + '@vitest/pretty-format': 3.2.7 + '@vitest/runner': 3.2.7 + '@vitest/snapshot': 3.2.7 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 + chai: 5.3.3 + debug: 4.4.3 + expect-type: 1.4.0 + magic-string: 0.30.21 + pathe: 2.0.3 + picomatch: 4.0.2 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.17 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 + vite: 7.3.6(jiti@2.7.0) + vite-node: 3.2.4(jiti@2.7.0) + why-is-node-running: 2.3.0 + transitivePeerDependencies: + - jiti + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - yaml + webidl-conversions@3.0.1: {} + webidl-conversions@4.0.2: {} + whatwg-url@5.0.0: dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 + whatwg-url@7.1.0: + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + wordwrap@1.0.0: {} wrap-ansi@7.0.0: @@ -3071,16 +4161,25 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + wrappy@1.0.2: {} ws@7.5.13: {} + wsl-utils@0.3.1: + dependencies: + is-wsl: 3.1.1 + powershell-utils: 0.1.0 + xml-naming@0.3.0: {} y18n@5.0.8: {} - yallist@4.0.0: {} - yaml-ast-parser@0.0.43: {} yaml@1.10.3: {} @@ -3096,3 +4195,5 @@ snapshots: string-width: 4.2.3 y18n: 5.0.8 yargs-parser: 20.2.9 + + zod@3.25.76: {} diff --git a/packages/sdks/catalog-search/src/client/client.gen.ts b/packages/sdks/catalog-search/src/client/client.gen.ts new file mode 100644 index 000000000..cde984e4f --- /dev/null +++ b/packages/sdks/catalog-search/src/client/client.gen.ts @@ -0,0 +1,28 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { + type Client, + type ClientOptions, + type Config, + createClient, + createConfig, +} from "./client" +import type { ClientOptions as ClientOptions2 } from "./types.gen" + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = ( + override?: Config, +) => Config & T> + +export const client: Client = createClient( + createConfig({ + baseUrl: "https://euwest.api.elasticpath.com", + }), +) diff --git a/packages/sdks/catalog-search/src/client/client/client.gen.ts b/packages/sdks/catalog-search/src/client/client/client.gen.ts new file mode 100644 index 000000000..92fec3f6e --- /dev/null +++ b/packages/sdks/catalog-search/src/client/client/client.gen.ts @@ -0,0 +1,301 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { createSseClient } from "../core/serverSentEvents.gen" +import type { HttpMethod } from "../core/types.gen" +import { getValidRequestBody } from "../core/utils.gen" +import type { + Client, + Config, + RequestOptions, + ResolvedRequestOptions, +} from "./types.gen" +import { + buildUrl, + createConfig, + createInterceptors, + getParseAs, + mergeConfigs, + mergeHeaders, + setAuthParams, +} from "./utils.gen" + +type ReqInit = Omit & { + body?: any + headers: ReturnType +} + +export const createClient = (config: Config = {}): Client => { + let _config = mergeConfigs(createConfig(), config) + + const getConfig = (): Config => ({ ..._config }) + + const setConfig = (config: Config): Config => { + _config = mergeConfigs(_config, config) + return getConfig() + } + + const interceptors = createInterceptors< + Request, + Response, + unknown, + ResolvedRequestOptions + >() + + const beforeRequest = async < + TData = unknown, + TResponseStyle extends "data" | "fields" = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, + >( + options: RequestOptions, + ) => { + const opts = { + ..._config, + ...options, + fetch: options.fetch ?? _config.fetch ?? globalThis.fetch, + headers: mergeHeaders(_config.headers, options.headers), + serializedBody: undefined as string | undefined, + } + + if (opts.security) { + await setAuthParams(opts) + } + + if (opts.requestValidator) { + await opts.requestValidator(opts) + } + + if (opts.body !== undefined && opts.bodySerializer) { + opts.serializedBody = opts.bodySerializer(opts.body) as string | undefined + } + + // remove Content-Type header if body is empty to avoid sending invalid requests + if (opts.body === undefined || opts.serializedBody === "") { + opts.headers.delete("Content-Type") + } + + const resolvedOpts = opts as typeof opts & + ResolvedRequestOptions + const url = buildUrl(resolvedOpts) + + return { opts: resolvedOpts, url } + } + + const request: Client["request"] = async (options) => { + const throwOnError = options.throwOnError ?? _config.throwOnError + const responseStyle = options.responseStyle ?? _config.responseStyle + + let request: Request | undefined + let response: Response | undefined + + try { + const { opts, url } = await beforeRequest(options) + const requestInit: ReqInit = { + redirect: "follow", + ...opts, + body: getValidRequestBody(opts), + } + + request = new Request(url, requestInit) + + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts) + } + } + + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = opts.fetch! + + response = await _fetch(request) + + for (const fn of interceptors.response.fns) { + if (fn) { + response = await fn(response, request, opts) + } + } + + const result = { + request, + response, + } + + if (response.ok) { + const parseAs = + (opts.parseAs === "auto" + ? getParseAs(response.headers.get("Content-Type")) + : opts.parseAs) ?? "json" + + if ( + response.status === 204 || + response.headers.get("Content-Length") === "0" + ) { + let emptyData: any + switch (parseAs) { + case "arrayBuffer": + case "blob": + case "text": + emptyData = await response[parseAs]() + break + case "formData": + emptyData = new FormData() + break + case "stream": + emptyData = response.body + break + case "json": + default: + emptyData = {} + break + } + return opts.responseStyle === "data" + ? emptyData + : { + data: emptyData, + ...result, + } + } + + let data: any + switch (parseAs) { + case "arrayBuffer": + case "blob": + case "formData": + case "text": + data = await response[parseAs]() + break + case "json": { + // Some servers return 200 with no Content-Length and empty body. + // response.json() would throw; read as text and parse if non-empty. + const text = await response.text() + data = text ? JSON.parse(text) : {} + break + } + case "stream": + return opts.responseStyle === "data" + ? response.body + : { + data: response.body, + ...result, + } + } + + if (parseAs === "json") { + if (opts.responseValidator) { + await opts.responseValidator(data) + } + + if (opts.responseTransformer) { + data = await opts.responseTransformer(data) + } + } + + return opts.responseStyle === "data" + ? data + : { + data, + ...result, + } + } + + const textError = await response.text() + let jsonError: unknown + + try { + jsonError = JSON.parse(textError) + } catch { + // noop + } + + throw jsonError ?? textError + } catch (error) { + let finalError = error + + for (const fn of interceptors.error.fns) { + if (fn) { + finalError = await fn( + finalError, + response, + request, + options as ResolvedRequestOptions, + ) + } + } + + finalError = finalError || {} + + if (throwOnError) { + throw finalError + } + + // TODO: we probably want to return error and improve types + return responseStyle === "data" + ? undefined + : { + error: finalError, + request, + response, + } + } + } + + const makeMethodFn = + (method: Uppercase) => (options: RequestOptions) => + request({ ...options, method }) + + const makeSseFn = + (method: Uppercase) => async (options: RequestOptions) => { + const { opts, url } = await beforeRequest(options) + return createSseClient({ + ...opts, + body: opts.body as BodyInit | null | undefined, + method, + onRequest: async (url, init) => { + let request = new Request(url, init) + for (const fn of interceptors.request.fns) { + if (fn) { + request = await fn(request, opts) + } + } + return request + }, + serializedBody: getValidRequestBody(opts) as + | BodyInit + | null + | undefined, + url, + }) + } + + const _buildUrl: Client["buildUrl"] = (options) => + buildUrl({ ..._config, ...options }) + + return { + buildUrl: _buildUrl, + connect: makeMethodFn("CONNECT"), + delete: makeMethodFn("DELETE"), + get: makeMethodFn("GET"), + getConfig, + head: makeMethodFn("HEAD"), + interceptors, + options: makeMethodFn("OPTIONS"), + patch: makeMethodFn("PATCH"), + post: makeMethodFn("POST"), + put: makeMethodFn("PUT"), + request, + setConfig, + sse: { + connect: makeSseFn("CONNECT"), + delete: makeSseFn("DELETE"), + get: makeSseFn("GET"), + head: makeSseFn("HEAD"), + options: makeSseFn("OPTIONS"), + patch: makeSseFn("PATCH"), + post: makeSseFn("POST"), + put: makeSseFn("PUT"), + trace: makeSseFn("TRACE"), + }, + trace: makeMethodFn("TRACE"), + } as Client +} diff --git a/packages/sdks/catalog-search/src/client/client/index.ts b/packages/sdks/catalog-search/src/client/client/index.ts new file mode 100644 index 000000000..4ea77791a --- /dev/null +++ b/packages/sdks/catalog-search/src/client/client/index.ts @@ -0,0 +1,27 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type { Auth } from "../core/auth.gen" +export type { QuerySerializerOptions } from "../core/bodySerializer.gen" +export { + formDataBodySerializer, + jsonBodySerializer, + urlSearchParamsBodySerializer, +} from "../core/bodySerializer.gen" +export { buildClientParams } from "../core/params.gen" +export { serializeQueryKeyValue } from "../core/queryKeySerializer.gen" +export type { ServerSentEventsResult } from "../core/serverSentEvents.gen" +export type { ClientMeta } from "../core/types.gen" +export { createClient } from "./client.gen" +export type { + Client, + ClientOptions, + Config, + CreateClientConfig, + Options, + RequestOptions, + RequestResult, + ResolvedRequestOptions, + ResponseStyle, + TDataShape, +} from "./types.gen" +export { createConfig, mergeHeaders } from "./utils.gen" diff --git a/packages/sdks/catalog-search/src/client/client/types.gen.ts b/packages/sdks/catalog-search/src/client/client/types.gen.ts new file mode 100644 index 000000000..ac04362b5 --- /dev/null +++ b/packages/sdks/catalog-search/src/client/client/types.gen.ts @@ -0,0 +1,246 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth } from "../core/auth.gen" +import type { + ServerSentEventsOptions, + ServerSentEventsResult, +} from "../core/serverSentEvents.gen" +import type { + Client as CoreClient, + Config as CoreConfig, +} from "../core/types.gen" +import type { Middleware } from "./utils.gen" + +export type ResponseStyle = "data" | "fields" + +export interface Config + extends Omit, + CoreConfig { + /** + * Base URL for all requests made by this client. + */ + baseUrl?: T["baseUrl"] + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch + /** + * Please don't use the Fetch client for Next.js applications. The `next` + * options won't have any effect. + * + * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead. + */ + next?: never + /** + * Return the response data parsed in a specified format. By default, `auto` + * will infer the appropriate method from the `Content-Type` response header. + * You can override this behavior with any of the {@link Body} methods. + * Select `stream` if you don't want to parse response data at all. + * + * @default 'auto' + */ + parseAs?: + | "arrayBuffer" + | "auto" + | "blob" + | "formData" + | "json" + | "stream" + | "text" + /** + * Should we return only data or multiple fields (data, error, response, etc.)? + * + * @default 'fields' + */ + responseStyle?: ResponseStyle + /** + * Throw an error instead of returning it in the response? + * + * @default false + */ + throwOnError?: T["throwOnError"] +} + +export interface RequestOptions< + TData = unknown, + TResponseStyle extends ResponseStyle = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, +> extends Config<{ + responseStyle: TResponseStyle + throwOnError: ThrowOnError + }>, + Pick< + ServerSentEventsOptions, + | "onRequest" + | "onSseError" + | "onSseEvent" + | "sseDefaultRetryDelay" + | "sseMaxRetryAttempts" + | "sseMaxRetryDelay" + > { + /** + * Any body that you want to add to your request. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#body} + */ + body?: unknown + path?: Record + query?: Record + /** + * Security mechanism(s) to use for the request. + */ + security?: ReadonlyArray + url: Url +} + +export interface ResolvedRequestOptions< + TResponseStyle extends ResponseStyle = "fields", + ThrowOnError extends boolean = boolean, + Url extends string = string, +> extends RequestOptions { + headers: Headers + serializedBody?: string +} + +export type RequestResult< + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = boolean, + TResponseStyle extends ResponseStyle = "fields", +> = ThrowOnError extends true + ? Promise< + TResponseStyle extends "data" + ? TData extends Record + ? TData[keyof TData] + : TData + : { + data: TData extends Record + ? TData[keyof TData] + : TData + request: Request + response: Response + } + > + : Promise< + TResponseStyle extends "data" + ? + | (TData extends Record + ? TData[keyof TData] + : TData) + | undefined + : ( + | { + data: TData extends Record + ? TData[keyof TData] + : TData + error: undefined + } + | { + data: undefined + error: TError extends Record + ? TError[keyof TError] + : TError + } + ) & { + /** request may be undefined, because error may be from building the request object itself */ + request?: Request + /** response may be undefined, because error may be from building the request object itself or from a network error */ + response?: Response + } + > + +export interface ClientOptions { + baseUrl?: string + responseStyle?: ResponseStyle + throwOnError?: boolean +} + +type MethodFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = "fields", +>( + options: Omit, "method">, +) => RequestResult + +type SseFn = < + TData = unknown, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + _TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = "fields", +>( + options: Omit, "method">, +) => Promise> + +type RequestFn = < + TData = unknown, + TError = unknown, + ThrowOnError extends boolean = false, + TResponseStyle extends ResponseStyle = "fields", +>( + options: Omit, "method"> & + Pick< + Required>, + "method" + >, +) => RequestResult + +type BuildUrlFn = < + TData extends { + body?: unknown + path?: Record + query?: Record + url: string + }, +>( + options: TData & Options, +) => string + +export type Client = CoreClient< + RequestFn, + Config, + MethodFn, + BuildUrlFn, + SseFn +> & { + interceptors: Middleware +} + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = ( + override?: Config, +) => Config & T> + +export interface TDataShape { + body?: unknown + headers?: unknown + path?: unknown + query?: unknown + url: string +} + +type OmitKeys = Pick> + +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, + TResponse = unknown, + TResponseStyle extends ResponseStyle = "fields", +> = OmitKeys< + RequestOptions, + "body" | "path" | "query" | "url" +> & + ([TData] extends [never] ? unknown : Omit) diff --git a/packages/sdks/catalog-search/src/client/client/utils.gen.ts b/packages/sdks/catalog-search/src/client/client/utils.gen.ts new file mode 100644 index 000000000..b0164e73e --- /dev/null +++ b/packages/sdks/catalog-search/src/client/client/utils.gen.ts @@ -0,0 +1,332 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { getAuthToken } from "../core/auth.gen" +import type { QuerySerializerOptions } from "../core/bodySerializer.gen" +import { jsonBodySerializer } from "../core/bodySerializer.gen" +import { + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from "../core/pathSerializer.gen" +import { getUrl } from "../core/utils.gen" +import type { Client, ClientOptions, Config, RequestOptions } from "./types.gen" + +export const createQuerySerializer = ({ + parameters = {}, + ...args +}: QuerySerializerOptions = {}): ((queryParams: T) => string) => { + const querySerializer = (queryParams: T): string => { + const search: string[] = [] + if (queryParams && typeof queryParams === "object") { + for (const name in queryParams) { + const value = queryParams[name] + + if (value === undefined || value === null) { + continue + } + + const options = parameters[name] || args + + if (Array.isArray(value)) { + const serializedArray = serializeArrayParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: "form", + value, + ...options.array, + }) + if (serializedArray) search.push(serializedArray) + } else if (typeof value === "object") { + const serializedObject = serializeObjectParam({ + allowReserved: options.allowReserved, + explode: true, + name, + style: "deepObject", + value: value as Record, + ...options.object, + }) + if (serializedObject) search.push(serializedObject) + } else { + const serializedPrimitive = serializePrimitiveParam({ + allowReserved: options.allowReserved, + name, + value: value as string, + }) + if (serializedPrimitive) search.push(serializedPrimitive) + } + } + } + return search.join("&") + } + return querySerializer +} + +/** + * Infers parseAs value from provided Content-Type header. + */ +export const getParseAs = ( + contentType: string | null, +): Exclude => { + if (!contentType) { + // If no Content-Type header is provided, the best we can do is return the raw response body, + // which is effectively the same as the 'stream' option. + return "stream" + } + + const cleanContent = contentType.split(";")[0]?.trim() + + if (!cleanContent) { + return + } + + if ( + cleanContent.startsWith("application/json") || + cleanContent.endsWith("+json") + ) { + return "json" + } + + if (cleanContent === "multipart/form-data") { + return "formData" + } + + if ( + ["application/", "audio/", "image/", "video/"].some((type) => + cleanContent.startsWith(type), + ) + ) { + return "blob" + } + + if (cleanContent.startsWith("text/")) { + return "text" + } + + return +} + +const checkForExistence = ( + options: Pick & { + headers: Headers + }, + name?: string, +): boolean => { + if (!name) { + return false + } + if ( + options.headers.has(name) || + options.query?.[name] || + options.headers.get("Cookie")?.includes(`${name}=`) + ) { + return true + } + return false +} + +export async function setAuthParams( + options: Pick & { + headers: Headers + }, +): Promise { + for (const auth of options.security ?? []) { + if (checkForExistence(options, auth.name)) { + continue + } + + const token = await getAuthToken(auth, options.auth) + + if (!token) { + continue + } + + const name = auth.name ?? "Authorization" + + switch (auth.in) { + case "query": + if (!options.query) { + options.query = {} + } + options.query[name] = token + break + case "cookie": + options.headers.append("Cookie", `${name}=${token}`) + break + case "header": + default: + options.headers.set(name, token) + break + } + } +} + +export const buildUrl: Client["buildUrl"] = (options) => + getUrl({ + baseUrl: options.baseUrl as string, + path: options.path, + query: options.query, + querySerializer: + typeof options.querySerializer === "function" + ? options.querySerializer + : createQuerySerializer(options.querySerializer), + url: options.url, + }) + +export const mergeConfigs = (a: Config, b: Config): Config => { + const config = { ...a, ...b } + if (config.baseUrl?.endsWith("/")) { + config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1) + } + config.headers = mergeHeaders(a.headers, b.headers) + return config +} + +const headersEntries = (headers: Headers): Array<[string, string]> => { + const entries: Array<[string, string]> = [] + headers.forEach((value, key) => { + entries.push([key, value]) + }) + return entries +} + +export const mergeHeaders = ( + ...headers: Array["headers"] | undefined> +): Headers => { + const mergedHeaders = new Headers() + for (const header of headers) { + if (!header) { + continue + } + + const iterator = + header instanceof Headers + ? headersEntries(header) + : Object.entries(header) + + for (const [key, value] of iterator) { + if (value === null) { + mergedHeaders.delete(key) + } else if (Array.isArray(value)) { + for (const v of value) { + mergedHeaders.append(key, v as string) + } + } else if (value !== undefined) { + // assume object headers are meant to be JSON stringified, i.e., their + // content value in OpenAPI specification is 'application/json' + mergedHeaders.set( + key, + typeof value === "object" ? JSON.stringify(value) : (value as string), + ) + } + } + } + return mergedHeaders +} + +type ErrInterceptor = ( + error: Err, + /** response may be undefined due to a network error where no response object is produced */ + response: Res | undefined, + /** request may be undefined, because error may be from building the request object itself */ + request: Req | undefined, + options: Options, +) => Err | Promise + +type ReqInterceptor = ( + request: Req, + options: Options, +) => Req | Promise + +type ResInterceptor = ( + response: Res, + request: Req, + options: Options, +) => Res | Promise + +class Interceptors { + fns: Array = [] + + clear(): void { + this.fns = [] + } + + eject(id: number | Interceptor): void { + const index = this.getInterceptorIndex(id) + if (this.fns[index]) { + this.fns[index] = null + } + } + + exists(id: number | Interceptor): boolean { + const index = this.getInterceptorIndex(id) + return Boolean(this.fns[index]) + } + + getInterceptorIndex(id: number | Interceptor): number { + if (typeof id === "number") { + return this.fns[id] ? id : -1 + } + return this.fns.indexOf(id) + } + + update( + id: number | Interceptor, + fn: Interceptor, + ): number | Interceptor | false { + const index = this.getInterceptorIndex(id) + if (this.fns[index]) { + this.fns[index] = fn + return id + } + return false + } + + use(fn: Interceptor): number { + this.fns.push(fn) + return this.fns.length - 1 + } +} + +export interface Middleware { + error: Interceptors> + request: Interceptors> + response: Interceptors> +} + +export const createInterceptors = (): Middleware< + Req, + Res, + Err, + Options +> => ({ + error: new Interceptors>(), + request: new Interceptors>(), + response: new Interceptors>(), +}) + +const defaultQuerySerializer = createQuerySerializer({ + allowReserved: false, + array: { + explode: true, + style: "form", + }, + object: { + explode: true, + style: "deepObject", + }, +}) + +const defaultHeaders = { + "Content-Type": "application/json", +} + +export const createConfig = ( + override: Config & T> = {}, +): Config & T> => ({ + ...jsonBodySerializer, + headers: defaultHeaders, + parseAs: "auto", + querySerializer: defaultQuerySerializer, + ...override, +}) diff --git a/packages/sdks/catalog-search/src/client/core/auth.gen.ts b/packages/sdks/catalog-search/src/client/core/auth.gen.ts new file mode 100644 index 000000000..9ea469ea0 --- /dev/null +++ b/packages/sdks/catalog-search/src/client/core/auth.gen.ts @@ -0,0 +1,48 @@ +// This file is auto-generated by @hey-api/openapi-ts + +export type AuthToken = string | undefined + +export interface Auth { + /** + * Which part of the request do we use to send the auth? + * + * @default 'header' + */ + in?: "header" | "query" | "cookie" + /** + * A unique identifier for the security scheme. + * + * Defined only when there are multiple security schemes whose `Auth` + * shape would otherwise be identical. + */ + key?: string + /** + * Header or query parameter name. + * + * @default 'Authorization' + */ + name?: string + scheme?: "basic" | "bearer" + type: "apiKey" | "http" +} + +export const getAuthToken = async ( + auth: Auth, + callback: ((auth: Auth) => Promise | AuthToken) | AuthToken, +): Promise => { + const token = typeof callback === "function" ? await callback(auth) : callback + + if (!token) { + return + } + + if (auth.scheme === "bearer") { + return `Bearer ${token}` + } + + if (auth.scheme === "basic") { + return `Basic ${btoa(token)}` + } + + return token +} diff --git a/packages/sdks/catalog-search/src/client/core/bodySerializer.gen.ts b/packages/sdks/catalog-search/src/client/core/bodySerializer.gen.ts new file mode 100644 index 000000000..8f1ea241d --- /dev/null +++ b/packages/sdks/catalog-search/src/client/core/bodySerializer.gen.ts @@ -0,0 +1,96 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { + ArrayStyle, + ObjectStyle, + SerializerOptions, +} from "./pathSerializer.gen" + +export type QuerySerializer = (query: Record) => string + +export type BodySerializer = (body: unknown) => unknown + +type QuerySerializerOptionsObject = { + allowReserved?: boolean + array?: Partial> + object?: Partial> +} + +export type QuerySerializerOptions = QuerySerializerOptionsObject & { + /** + * Per-parameter serialization overrides. When provided, these settings + * override the global array/object settings for specific parameter names. + */ + parameters?: Record +} + +const serializeFormDataPair = ( + data: FormData, + key: string, + value: unknown, +): void => { + if (typeof value === "string" || value instanceof Blob) { + data.append(key, value) + } else if (value instanceof Date) { + data.append(key, value.toISOString()) + } else { + data.append(key, JSON.stringify(value)) + } +} + +const serializeUrlSearchParamsPair = ( + data: URLSearchParams, + key: string, + value: unknown, +): void => { + if (typeof value === "string") { + data.append(key, value) + } else { + data.append(key, JSON.stringify(value)) + } +} + +export const formDataBodySerializer = { + bodySerializer: (body: unknown): FormData => { + const data = new FormData() + + Object.entries(body as Record).forEach(([key, value]) => { + if (value === undefined || value === null) { + return + } + if (Array.isArray(value)) { + value.forEach((v) => serializeFormDataPair(data, key, v)) + } else { + serializeFormDataPair(data, key, value) + } + }) + + return data + }, +} + +export const jsonBodySerializer = { + bodySerializer: (body: unknown): string => + JSON.stringify(body, (_key, value) => + typeof value === "bigint" ? value.toString() : value, + ), +} + +export const urlSearchParamsBodySerializer = { + bodySerializer: (body: unknown): string => { + const data = new URLSearchParams() + + Object.entries(body as Record).forEach(([key, value]) => { + if (value === undefined || value === null) { + return + } + if (Array.isArray(value)) { + value.forEach((v) => serializeUrlSearchParamsPair(data, key, v)) + } else { + serializeUrlSearchParamsPair(data, key, value) + } + }) + + return data.toString() + }, +} diff --git a/packages/sdks/catalog-search/src/client/core/params.gen.ts b/packages/sdks/catalog-search/src/client/core/params.gen.ts new file mode 100644 index 000000000..8aa1d8b66 --- /dev/null +++ b/packages/sdks/catalog-search/src/client/core/params.gen.ts @@ -0,0 +1,186 @@ +// This file is auto-generated by @hey-api/openapi-ts + +type Slot = "body" | "headers" | "path" | "query" + +export type Field = + | { + in: Exclude + /** + * Field name. This is the name we want the user to see and use. + */ + key: string + /** + * Field mapped name. This is the name we want to use in the request. + * If omitted, we use the same value as `key`. + */ + map?: string + } + | { + in: Extract + /** + * Key isn't required for bodies. + */ + key?: string + map?: string + } + | { + /** + * Field name. This is the name we want the user to see and use. + */ + key: string + /** + * Field mapped name. This is the name we want to use in the request. + * If `in` is omitted, `map` aliases `key` to the transport layer. + */ + map: Slot + } + +export interface Fields { + allowExtra?: Partial> + args?: ReadonlyArray +} + +export type FieldsConfig = ReadonlyArray + +const extraPrefixesMap: Record = { + $body_: "body", + $headers_: "headers", + $path_: "path", + $query_: "query", +} +const extraPrefixes = Object.entries(extraPrefixesMap) + +type KeyMap = Map< + string, + | { + in: Slot + map?: string + } + | { + in?: never + map: Slot + } +> + +function buildKeyMap(fields: FieldsConfig, map?: KeyMap): KeyMap { + if (!map) { + map = new Map() + } + + for (const config of fields) { + if ("in" in config) { + if (config.key) { + map.set(config.key, { + in: config.in, + map: config.map, + }) + } + } else if ("key" in config) { + map.set(config.key, { + map: config.map, + }) + } else if (config.args) { + buildKeyMap(config.args, map) + } + } + + return map +} + +interface Params { + body?: unknown + headers: Record + path: Record + query: Record +} + +function stripEmptySlots(params: Params): void { + for (const [slot, value] of Object.entries(params)) { + if (slot === "body") continue + if ( + value && + typeof value === "object" && + !Array.isArray(value) && + !Object.keys(value).length + ) { + delete params[slot as Slot] + } + } +} + +export function buildClientParams( + args: ReadonlyArray, + fields: FieldsConfig, +): Params { + const params: Params = { + headers: Object.create(null), + path: Object.create(null), + query: Object.create(null), + } + + const map = buildKeyMap(fields) + + function writeSlot(slot: Slot, key: string, value: unknown): void { + let record = params[slot] as Record | undefined + if (record === undefined) { + record = Object.create(null) as Record + params[slot] = record + } + record[key] = value + } + + let config: FieldsConfig[number] | undefined + + for (const [index, arg] of args.entries()) { + if (fields[index]) { + config = fields[index] + } + + if (!config) { + continue + } + + if ("in" in config) { + if (config.key) { + const field = map.get(config.key)! + const name = field.map || config.key + if (field.in) { + writeSlot(field.in, name, arg) + } + } else { + params.body = arg + } + } else { + for (const [key, value] of Object.entries(arg ?? {})) { + const field = map.get(key) + + if (field) { + if (field.in) { + const name = field.map || key + writeSlot(field.in, name, value) + } else { + params[field.map] = value + } + } else { + const extra = extraPrefixes.find(([prefix]) => key.startsWith(prefix)) + + if (extra) { + const [prefix, slot] = extra + writeSlot(slot, key.slice(prefix.length), value) + } else if ("allowExtra" in config && config.allowExtra) { + for (const [slot, allowed] of Object.entries(config.allowExtra)) { + if (allowed) { + writeSlot(slot as Slot, key, value) + break + } + } + } + } + } + } + } + + stripEmptySlots(params) + + return params +} diff --git a/packages/sdks/catalog-search/src/client/core/pathSerializer.gen.ts b/packages/sdks/catalog-search/src/client/core/pathSerializer.gen.ts new file mode 100644 index 000000000..f297a0634 --- /dev/null +++ b/packages/sdks/catalog-search/src/client/core/pathSerializer.gen.ts @@ -0,0 +1,187 @@ +// This file is auto-generated by @hey-api/openapi-ts + +interface SerializeOptions + extends SerializePrimitiveOptions, + SerializerOptions {} + +interface SerializePrimitiveOptions { + allowReserved?: boolean + name: string +} + +export interface SerializerOptions { + /** + * @default true + */ + explode: boolean + style: T +} + +export type ArrayStyle = "form" | "spaceDelimited" | "pipeDelimited" +export type ArraySeparatorStyle = ArrayStyle | MatrixStyle +type MatrixStyle = "label" | "matrix" | "simple" +export type ObjectStyle = "form" | "deepObject" +type ObjectSeparatorStyle = ObjectStyle | MatrixStyle + +interface SerializePrimitiveParam extends SerializePrimitiveOptions { + value: string +} + +export const separatorArrayExplode = ( + style: ArraySeparatorStyle, +): "." | ";" | "," | "&" => { + switch (style) { + case "label": + return "." + case "matrix": + return ";" + case "simple": + return "," + default: + return "&" + } +} + +export const separatorArrayNoExplode = ( + style: ArraySeparatorStyle, +): "," | "|" | "%20" => { + switch (style) { + case "form": + return "," + case "pipeDelimited": + return "|" + case "spaceDelimited": + return "%20" + default: + return "," + } +} + +export const separatorObjectExplode = ( + style: ObjectSeparatorStyle, +): "." | ";" | "," | "&" => { + switch (style) { + case "label": + return "." + case "matrix": + return ";" + case "simple": + return "," + default: + return "&" + } +} + +export const serializeArrayParam = ({ + allowReserved, + explode, + name, + style, + value, +}: SerializeOptions & { + value: unknown[] +}): string => { + if (!explode) { + const joinedValues = ( + allowReserved ? value : value.map((v) => encodeURIComponent(v as string)) + ).join(separatorArrayNoExplode(style)) + switch (style) { + case "label": + return `.${joinedValues}` + case "matrix": + return `;${name}=${joinedValues}` + case "simple": + return joinedValues + default: + return `${name}=${joinedValues}` + } + } + + const separator = separatorArrayExplode(style) + const joinedValues = value + .map((v) => { + if (style === "label" || style === "simple") { + return allowReserved ? v : encodeURIComponent(v as string) + } + + return serializePrimitiveParam({ + allowReserved, + name, + value: v as string, + }) + }) + .join(separator) + return style === "label" || style === "matrix" + ? separator + joinedValues + : joinedValues +} + +export const serializePrimitiveParam = ({ + allowReserved, + name, + value, +}: SerializePrimitiveParam): string => { + if (value === undefined || value === null) { + return "" + } + + if (typeof value === "object") { + throw new Error( + "Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.", + ) + } + + return `${name}=${allowReserved ? value : encodeURIComponent(value)}` +} + +export const serializeObjectParam = ({ + allowReserved, + explode, + name, + style, + value, + valueOnly, +}: SerializeOptions & { + value: Record | Date + valueOnly?: boolean +}): string => { + if (value instanceof Date) { + return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}` + } + + if (style !== "deepObject" && !explode) { + let values: string[] = [] + Object.entries(value).forEach(([key, v]) => { + values = [ + ...values, + key, + allowReserved ? (v as string) : encodeURIComponent(v as string), + ] + }) + const joinedValues = values.join(",") + switch (style) { + case "form": + return `${name}=${joinedValues}` + case "label": + return `.${joinedValues}` + case "matrix": + return `;${name}=${joinedValues}` + default: + return joinedValues + } + } + + const separator = separatorObjectExplode(style) + const joinedValues = Object.entries(value) + .map(([key, v]) => + serializePrimitiveParam({ + allowReserved, + name: style === "deepObject" ? `${name}[${key}]` : key, + value: v as string, + }), + ) + .join(separator) + return style === "label" || style === "matrix" + ? separator + joinedValues + : joinedValues +} diff --git a/packages/sdks/catalog-search/src/client/core/queryKeySerializer.gen.ts b/packages/sdks/catalog-search/src/client/core/queryKeySerializer.gen.ts new file mode 100644 index 000000000..4fb8b9b08 --- /dev/null +++ b/packages/sdks/catalog-search/src/client/core/queryKeySerializer.gen.ts @@ -0,0 +1,139 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * JSON-friendly union that mirrors what Pinia Colada can hash. + */ +export type JsonValue = + | null + | string + | number + | boolean + | JsonValue[] + | { [key: string]: JsonValue } + +/** + * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes. + */ +export const queryKeyJsonReplacer = ( + _key: string, + value: unknown, +): unknown | undefined => { + if ( + value === undefined || + typeof value === "function" || + typeof value === "symbol" + ) { + return undefined + } + if (typeof value === "bigint") { + return value.toString() + } + if (value instanceof Date) { + return value.toISOString() + } + return value +} + +/** + * Safely stringifies a value and parses it back into a JsonValue. + */ +export const stringifyToJsonValue = (input: unknown): JsonValue | undefined => { + try { + const json = JSON.stringify(input, queryKeyJsonReplacer) + if (json === undefined) { + return undefined + } + return JSON.parse(json) as JsonValue + } catch { + return undefined + } +} + +/** + * Detects plain objects (including objects with a null prototype). + */ +const isPlainObject = (value: unknown): value is Record => { + if (value === null || typeof value !== "object") { + return false + } + const prototype = Object.getPrototypeOf(value as object) + return prototype === Object.prototype || prototype === null +} + +/** + * Turns URLSearchParams into a sorted JSON object for deterministic keys. + */ +const serializeSearchParams = (params: URLSearchParams): JsonValue => { + const entries = Array.from(params.entries()).sort(([a], [b]) => + a.localeCompare(b), + ) + const result: Record = {} + + for (const [key, value] of entries) { + const existing = result[key] + if (existing === undefined) { + result[key] = value + continue + } + + if (Array.isArray(existing)) { + ;(existing as string[]).push(value) + } else { + result[key] = [existing, value] + } + } + + return result +} + +/** + * Normalizes any accepted value into a JSON-friendly shape for query keys. + */ +export const serializeQueryKeyValue = ( + value: unknown, +): JsonValue | undefined => { + if (value === null) { + return null + } + + if ( + typeof value === "string" || + typeof value === "number" || + typeof value === "boolean" + ) { + return value + } + + if ( + value === undefined || + typeof value === "function" || + typeof value === "symbol" + ) { + return undefined + } + + if (typeof value === "bigint") { + return value.toString() + } + + if (value instanceof Date) { + return value.toISOString() + } + + if (Array.isArray(value)) { + return stringifyToJsonValue(value) + } + + if ( + typeof URLSearchParams !== "undefined" && + value instanceof URLSearchParams + ) { + return serializeSearchParams(value) + } + + if (isPlainObject(value)) { + return stringifyToJsonValue(value) + } + + return undefined +} diff --git a/packages/sdks/catalog-search/src/client/core/serverSentEvents.gen.ts b/packages/sdks/catalog-search/src/client/core/serverSentEvents.gen.ts new file mode 100644 index 000000000..5595f73e8 --- /dev/null +++ b/packages/sdks/catalog-search/src/client/core/serverSentEvents.gen.ts @@ -0,0 +1,265 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Config } from "./types.gen" + +export type ServerSentEventsOptions = Omit< + RequestInit, + "method" +> & + Pick & { + /** + * Fetch API implementation. You can use this option to provide a custom + * fetch instance. + * + * @default globalThis.fetch + */ + fetch?: typeof fetch + /** + * Implementing clients can call request interceptors inside this hook. + */ + onRequest?: (url: string, init: RequestInit) => Promise + /** + * Callback invoked when a network or parsing error occurs during streaming. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param error The error that occurred. + */ + onSseError?: (error: unknown) => void + /** + * Callback invoked when an event is streamed from the server. + * + * This option applies only if the endpoint returns a stream of events. + * + * @param event Event streamed from the server. + * @returns Nothing (void). + */ + onSseEvent?: (event: StreamEvent) => void + serializedBody?: RequestInit["body"] + /** + * Default retry delay in milliseconds. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 3000 + */ + sseDefaultRetryDelay?: number + /** + * Maximum number of retry attempts before giving up. + */ + sseMaxRetryAttempts?: number + /** + * Maximum retry delay in milliseconds. + * + * Applies only when exponential backoff is used. + * + * This option applies only if the endpoint returns a stream of events. + * + * @default 30000 + */ + sseMaxRetryDelay?: number + /** + * Optional sleep function for retry backoff. + * + * Defaults to using `setTimeout`. + */ + sseSleepFn?: (ms: number) => Promise + url: string + } + +export interface StreamEvent { + data: TData + event?: string + id?: string + retry?: number +} + +export type ServerSentEventsResult< + TData = unknown, + TReturn = void, + TNext = unknown, +> = { + stream: AsyncGenerator< + TData extends Record ? TData[keyof TData] : TData, + TReturn, + TNext + > +} + +export function createSseClient({ + onRequest, + onSseError, + onSseEvent, + responseTransformer, + responseValidator, + sseDefaultRetryDelay, + sseMaxRetryAttempts, + sseMaxRetryDelay, + sseSleepFn, + url, + ...options +}: ServerSentEventsOptions): ServerSentEventsResult { + let lastEventId: string | undefined + + const sleep = + sseSleepFn ?? + ((ms: number) => new Promise((resolve) => setTimeout(resolve, ms))) + + const createStream = async function* () { + let retryDelay: number = sseDefaultRetryDelay ?? 3000 + let attempt = 0 + const signal = options.signal ?? new AbortController().signal + + while (true) { + if (signal.aborted) break + + attempt++ + + const headers = + options.headers instanceof Headers + ? options.headers + : new Headers(options.headers as Record | undefined) + + if (lastEventId !== undefined) { + headers.set("Last-Event-ID", lastEventId) + } + + try { + const requestInit: RequestInit = { + redirect: "follow", + ...options, + body: options.serializedBody, + headers, + signal, + } + let request = new Request(url, requestInit) + if (onRequest) { + request = await onRequest(url, requestInit) + } + // fetch must be assigned here, otherwise it would throw the error: + // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation + const _fetch = options.fetch ?? globalThis.fetch + const response = await _fetch(request) + + if (!response.ok) + throw new Error( + `SSE failed: ${response.status} ${response.statusText}`, + ) + + if (!response.body) throw new Error("No body in SSE response") + + const reader = response.body + .pipeThrough(new TextDecoderStream()) + .getReader() + + let buffer = "" + + const abortHandler = () => { + try { + reader.cancel() + } catch { + // noop + } + } + + signal.addEventListener("abort", abortHandler) + + try { + while (true) { + const { done, value } = await reader.read() + if (done) break + buffer += value + buffer = buffer.replace(/\r\n?/g, "\n") // normalize line endings + + const chunks = buffer.split("\n\n") + buffer = chunks.pop() ?? "" + + for (const chunk of chunks) { + const lines = chunk.split("\n") + const dataLines: Array = [] + let eventName: string | undefined + + for (const line of lines) { + if (line.startsWith("data:")) { + dataLines.push(line.replace(/^data:\s*/, "")) + } else if (line.startsWith("event:")) { + eventName = line.replace(/^event:\s*/, "") + } else if (line.startsWith("id:")) { + lastEventId = line.replace(/^id:\s*/, "") + } else if (line.startsWith("retry:")) { + const parsed = Number.parseInt( + line.replace(/^retry:\s*/, ""), + 10, + ) + if (!Number.isNaN(parsed)) { + retryDelay = parsed + } + } + } + + let data: unknown + let parsedJson = false + + if (dataLines.length) { + const rawData = dataLines.join("\n") + try { + data = JSON.parse(rawData) + parsedJson = true + } catch { + data = rawData + } + } + + if (parsedJson) { + if (responseValidator) { + await responseValidator(data) + } + + if (responseTransformer) { + data = await responseTransformer(data) + } + } + + onSseEvent?.({ + data, + event: eventName, + id: lastEventId, + retry: retryDelay, + }) + + if (dataLines.length) { + yield data as any + } + } + } + } finally { + signal.removeEventListener("abort", abortHandler) + reader.releaseLock() + } + + break // exit loop on normal completion + } catch (error) { + // connection failed or aborted; retry after delay + onSseError?.(error) + + if ( + sseMaxRetryAttempts !== undefined && + attempt >= sseMaxRetryAttempts + ) { + break // stop after firing error + } + + // exponential backoff: double retry each attempt, cap at 30s + const backoff = Math.min( + retryDelay * 2 ** (attempt - 1), + sseMaxRetryDelay ?? 30000, + ) + await sleep(backoff) + } + } + } + + const stream = createStream() + + return { stream } +} diff --git a/packages/sdks/catalog-search/src/client/core/types.gen.ts b/packages/sdks/catalog-search/src/client/core/types.gen.ts new file mode 100644 index 000000000..221ae41e7 --- /dev/null +++ b/packages/sdks/catalog-search/src/client/core/types.gen.ts @@ -0,0 +1,124 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Auth, AuthToken } from "./auth.gen" +import type { + BodySerializer, + QuerySerializer, + QuerySerializerOptions, +} from "./bodySerializer.gen" + +export type HttpMethod = + | "connect" + | "delete" + | "get" + | "head" + | "options" + | "patch" + | "post" + | "put" + | "trace" + +export type Client< + RequestFn = never, + Config = unknown, + MethodFn = never, + BuildUrlFn = never, + SseFn = never, +> = { + /** + * Returns the final request URL. + */ + buildUrl: BuildUrlFn + getConfig: () => Config + request: RequestFn + setConfig: (config: Config) => Config +} & { + [K in HttpMethod]: MethodFn +} & ([SseFn] extends [never] + ? { sse?: never } + : { sse: { [K in HttpMethod]: SseFn } }) + +export interface Config { + /** + * Auth token or a function returning auth token. The resolved value will be + * added to the request payload as defined by its `security` array. + */ + auth?: ((auth: Auth) => Promise | AuthToken) | AuthToken + /** + * A function for serializing request body parameter. By default, + * {@link JSON.stringify()} will be used. + */ + bodySerializer?: BodySerializer | null + /** + * An object containing any HTTP headers that you want to pre-populate your + * `Headers` object with. + * + * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more} + */ + headers?: + | RequestInit["headers"] + | Record< + string, + | string + | number + | boolean + | (string | number | boolean)[] + | null + | undefined + | unknown + > + /** + * The request method. + * + * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more} + */ + method?: Uppercase + /** + * A function for serializing request query parameters. By default, arrays + * will be exploded in form style, objects will be exploded in deepObject + * style, and reserved characters are percent-encoded. + * + * This method will have no effect if the native `paramsSerializer()` Axios + * API function is used. + * + * {@link https://swagger.io/docs/specification/serialization/#query View examples} + */ + querySerializer?: QuerySerializer | QuerySerializerOptions + /** + * A function validating request data. This is useful if you want to ensure + * the request conforms to the desired shape, so it can be safely sent to + * the server. + */ + requestValidator?: (data: unknown) => Promise + /** + * A function transforming response data before it's returned. This is useful + * for post-processing data, e.g., converting ISO strings into Date objects. + */ + responseTransformer?: (data: unknown) => Promise + /** + * A function validating response data. This is useful if you want to ensure + * the response conforms to the desired shape, so it can be safely passed to + * the transformers and returned to the user. + */ + responseValidator?: (data: unknown) => Promise +} + +/** + * Arbitrary metadata passed through the `meta` request option. + */ +// eslint-disable-next-line @typescript-eslint/no-empty-object-type +export interface ClientMeta {} + +type IsExactlyNeverOrNeverUndefined = [T] extends [never] + ? true + : [T] extends [never | undefined] + ? [undefined] extends [T] + ? false + : true + : false + +export type OmitNever> = { + [K in keyof T as IsExactlyNeverOrNeverUndefined extends true + ? never + : K]: T[K] +} diff --git a/packages/sdks/catalog-search/src/client/core/utils.gen.ts b/packages/sdks/catalog-search/src/client/core/utils.gen.ts new file mode 100644 index 000000000..0d46c8d44 --- /dev/null +++ b/packages/sdks/catalog-search/src/client/core/utils.gen.ts @@ -0,0 +1,146 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { BodySerializer, QuerySerializer } from "./bodySerializer.gen" +import { + type ArraySeparatorStyle, + serializeArrayParam, + serializeObjectParam, + serializePrimitiveParam, +} from "./pathSerializer.gen" + +export interface PathSerializer { + path: Record + url: string +} + +export const PATH_PARAM_RE: RegExp = /\{[^{}]+\}/g + +export const defaultPathSerializer = ({ + path, + url: _url, +}: PathSerializer): string => { + let url = _url + const matches = _url.match(PATH_PARAM_RE) + if (matches) { + for (const match of matches) { + let explode = false + let name = match.substring(1, match.length - 1) + let style: ArraySeparatorStyle = "simple" + + if (name.endsWith("*")) { + explode = true + name = name.substring(0, name.length - 1) + } + + if (name.startsWith(".")) { + name = name.substring(1) + style = "label" + } else if (name.startsWith(";")) { + name = name.substring(1) + style = "matrix" + } + + const value = path[name] + + if (value === undefined || value === null) { + continue + } + + if (Array.isArray(value)) { + url = url.replace( + match, + serializeArrayParam({ explode, name, style, value }), + ) + continue + } + + if (typeof value === "object") { + url = url.replace( + match, + serializeObjectParam({ + explode, + name, + style, + value: value as Record, + valueOnly: true, + }), + ) + continue + } + + if (style === "matrix") { + url = url.replace( + match, + `;${serializePrimitiveParam({ + name, + value: value as string, + })}`, + ) + continue + } + + const replaceValue = encodeURIComponent( + style === "label" ? `.${value as string}` : (value as string), + ) + url = url.replace(match, replaceValue) + } + } + return url +} + +export const getUrl = ({ + baseUrl, + path, + query, + querySerializer, + url: _url, +}: { + baseUrl?: string + path?: Record + query?: Record + querySerializer: QuerySerializer + url: string +}): string => { + const pathUrl = _url.startsWith("/") ? _url : `/${_url}` + let url = (baseUrl ?? "") + pathUrl + if (path) { + url = defaultPathSerializer({ path, url }) + } + let search = query ? querySerializer(query) : "" + if (search.startsWith("?")) { + search = search.substring(1) + } + if (search) { + url += `?${search}` + } + return url +} + +export function getValidRequestBody(options: { + body?: unknown + bodySerializer?: BodySerializer | null + serializedBody?: unknown +}): unknown { + const hasBody = options.body !== undefined + const isSerializedBody = hasBody && options.bodySerializer + + if (isSerializedBody) { + if ("serializedBody" in options) { + const hasSerializedBody = + options.serializedBody !== undefined && options.serializedBody !== "" + + return hasSerializedBody ? options.serializedBody : null + } + + // not all clients implement a serializedBody property (i.e., client-axios) + return options.body !== "" ? options.body : null + } + + // plain/text body + if (hasBody) { + return options.body + } + + // no body was provided + return undefined +} diff --git a/packages/sdks/catalog-search/src/client/index.ts b/packages/sdks/catalog-search/src/client/index.ts index 44d2c904f..e64d71d65 100644 --- a/packages/sdks/catalog-search/src/client/index.ts +++ b/packages/sdks/catalog-search/src/client/index.ts @@ -1,3 +1,379 @@ // This file is auto-generated by @hey-api/openapi-ts -export * from "./types.gen" -export * from "./sdk.gen" + +export { + createIndexableFields, + createSearchProfile, + createSearchRule, + createSearchRuleGroup, + createStopwordSet, + createSynonymSet, + deleteIndexableFields, + deleteSearchProfile, + deleteSearchRule, + deleteSearchRuleGroup, + deleteStopwordSet, + deleteSynonymSet, + getIndexableFields, + getSearchProfile, + getSearchRule, + getSearchRuleGroup, + getStopwordSet, + getSynonymSet, + listIndexableFields, + listIndexedFields, + listSearchableFields, + listSearchIndexes, + listSearchProfiles, + listSearchRuleGroups, + listSearchRules, + listStopwordSets, + listSynonymSets, + moveSearchRule, + multiSearchByCatalogRelease, + type Options, + postMultiSearch, + reindexTenantReleases, + searchByCatalogRelease, + searchByContext, + setDefaultSearchProfile, + updateIndexableFields, + updateSearchProfile, + updateSearchRule, + updateSearchRuleGroup, + updateStopwordSet, + updateSynonymSet, +} from "./sdk.gen" +export type { + AutocompleteResponse, + CatalogSearchacceptLanguage, + CatalogSearchError, + CatalogSearchErrorResponse, + CatalogSearchJob, + CatalogSearchJobAttributes, + CatalogSearchJobMeta, + CatalogSearchpricebookIdsForPriceSegmentationPreview, + CatalogSearchpricebookIdsOfAvailablePricesToShow, + CatalogSearchProduct, + Channel, + ClientOptions, + CoreFieldOverride, + CreateIndexableFieldsData, + CreateIndexableFieldsError, + CreateIndexableFieldsErrors, + CreateIndexableFieldsResponse, + CreateIndexableFieldsResponses, + CreateSearchProfileData, + CreateSearchProfileError, + CreateSearchProfileErrors, + CreateSearchProfileResponse, + CreateSearchProfileResponses, + CreateSearchRuleData, + CreateSearchRuleError, + CreateSearchRuleErrors, + CreateSearchRuleGroupData, + CreateSearchRuleGroupError, + CreateSearchRuleGroupErrors, + CreateSearchRuleGroupRequest, + CreateSearchRuleGroupResponse, + CreateSearchRuleGroupResponses, + CreateSearchRuleRequest, + CreateSearchRuleResponse, + CreateSearchRuleResponses, + CreateStopwordSetData, + CreateStopwordSetError, + CreateStopwordSetErrors, + CreateStopwordSetRequest, + CreateStopwordSetResponse, + CreateStopwordSetResponses, + CreateSynonymSetData, + CreateSynonymSetError, + CreateSynonymSetErrors, + CreateSynonymSetRequest, + CreateSynonymSetResponse, + CreateSynonymSetResponses, + Currency, + DeleteIndexableFieldsData, + DeleteIndexableFieldsError, + DeleteIndexableFieldsErrors, + DeleteIndexableFieldsResponse, + DeleteIndexableFieldsResponses, + DeleteSearchProfileData, + DeleteSearchProfileError, + DeleteSearchProfileErrors, + DeleteSearchProfileResponse, + DeleteSearchProfileResponses, + DeleteSearchRuleData, + DeleteSearchRuleError, + DeleteSearchRuleErrors, + DeleteSearchRuleGroupData, + DeleteSearchRuleGroupError, + DeleteSearchRuleGroupErrors, + DeleteSearchRuleGroupResponse, + DeleteSearchRuleGroupResponses, + DeleteSearchRuleResponse, + DeleteSearchRuleResponses, + DeleteStopwordSetData, + DeleteStopwordSetError, + DeleteStopwordSetErrors, + DeleteStopwordSetResponse, + DeleteStopwordSetResponses, + DeleteSynonymSetData, + DeleteSynonymSetError, + DeleteSynonymSetErrors, + DeleteSynonymSetResponse, + DeleteSynonymSetResponses, + FacetByField, + FacetCount, + FacetValue, + FieldType, + FilterByField, + GetIndexableFieldsData, + GetIndexableFieldsError, + GetIndexableFieldsErrors, + GetIndexableFieldsResponse, + GetIndexableFieldsResponses, + GetSearchProfileData, + GetSearchProfileError, + GetSearchProfileErrors, + GetSearchProfileResponse, + GetSearchProfileResponses, + GetSearchRuleData, + GetSearchRuleError, + GetSearchRuleErrors, + GetSearchRuleGroupData, + GetSearchRuleGroupError, + GetSearchRuleGroupErrors, + GetSearchRuleGroupResponse, + GetSearchRuleGroupResponses, + GetSearchRuleResponse, + GetSearchRuleResponses, + GetStopwordSetData, + GetStopwordSetError, + GetStopwordSetErrors, + GetStopwordSetResponse, + GetStopwordSetResponses, + GetSynonymSetData, + GetSynonymSetError, + GetSynonymSetErrors, + GetSynonymSetResponse, + GetSynonymSetResponses, + Hit, + IncludedResponse, + IndexableField, + IndexableFieldRequest, + IndexableFields, + IndexableFieldsAttributes, + IndexableFieldsCreateRequest, + IndexableFieldsMeta, + IndexableFieldsRequestAttributes, + IndexableFieldsResponse, + IndexableFieldsType, + IndexableFieldsUpdateRequest, + IndexableFieldsUpdateRequestData, + IndexedField, + IndexedFieldAttributes, + IndexedFieldMeta, + IndexedFieldsResponse, + IndexedFieldType, + JobMetaError, + JobMetaResult, + ListIndexableFieldsData, + ListIndexableFieldsError, + ListIndexableFieldsErrors, + ListIndexableFieldsResponse, + ListIndexableFieldsResponse2, + ListIndexableFieldsResponses, + ListIndexedFieldsData, + ListIndexedFieldsError, + ListIndexedFieldsErrors, + ListIndexedFieldsResponse, + ListIndexedFieldsResponses, + ListResponseMeta, + ListResponseMetaResults, + ListSearchableFieldsData, + ListSearchableFieldsError, + ListSearchableFieldsErrors, + ListSearchableFieldsResponse, + ListSearchableFieldsResponses, + ListSearchIndexesData, + ListSearchIndexesError, + ListSearchIndexesErrors, + ListSearchIndexesResponse, + ListSearchIndexesResponse2, + ListSearchIndexesResponses, + ListSearchProfilesData, + ListSearchProfilesError, + ListSearchProfilesErrors, + ListSearchProfilesResponse, + ListSearchProfilesResponse2, + ListSearchProfilesResponses, + ListSearchRuleGroupsData, + ListSearchRuleGroupsError, + ListSearchRuleGroupsErrors, + ListSearchRuleGroupsResponse, + ListSearchRuleGroupsResponse2, + ListSearchRuleGroupsResponses, + ListSearchRulesData, + ListSearchRulesError, + ListSearchRulesErrors, + ListSearchRulesResponse, + ListSearchRulesResponse2, + ListSearchRulesResponses, + ListStopwordSetsData, + ListStopwordSetsError, + ListStopwordSetsErrors, + ListStopwordSetsResponse, + ListStopwordSetsResponse2, + ListStopwordSetsResponses, + ListSynonymSetsData, + ListSynonymSetsError, + ListSynonymSetsErrors, + ListSynonymSetsResponse, + ListSynonymSetsResponse2, + ListSynonymSetsResponses, + MatchedRuleReference, + MoveSearchRuleData, + MoveSearchRuleError, + MoveSearchRuleErrors, + MoveSearchRuleRequest, + MoveSearchRuleResponse, + MoveSearchRuleResponses, + MultiSearchByCatalogReleaseData, + MultiSearchByCatalogReleaseError, + MultiSearchByCatalogReleaseErrors, + MultiSearchByCatalogReleaseResponse, + MultiSearchByCatalogReleaseResponses, + MultiSearchRequest, + MultiSearchResponse, + PostMultiSearchData, + PostMultiSearchError, + PostMultiSearchErrors, + PostMultiSearchResponse, + PostMultiSearchResponses, + ProductsInclude, + ReindexTenantReleasesData, + ReindexTenantReleasesError, + ReindexTenantReleasesErrors, + ReindexTenantReleasesJobRequest, + ReindexTenantReleasesResponse, + ReindexTenantReleasesResponses, + ResourceOwner, + SearchableField, + SearchableFieldAttributes, + SearchableFieldMeta, + SearchableFieldsResponse, + SearchableFieldType, + SearchBoostRule, + SearchByCatalogReleaseData, + SearchByCatalogReleaseError, + SearchByCatalogReleaseErrors, + SearchByCatalogReleaseResponse, + SearchByCatalogReleaseResponses, + SearchByContextData, + SearchByContextError, + SearchByContextErrors, + SearchByContextResponse, + SearchByContextResponses, + SearchField, + SearchHideRule, + SearchIndex, + SearchIndexMeta, + SearchIndexType, + SearchPinRule, + SearchProfile, + SearchProfile2, + SearchProfileAttributes, + SearchProfileCreateRequest, + SearchProfileCreateRequestData, + SearchProfileMeta, + SearchProfileResponse, + SearchProfileType, + SearchProfileUpdateAttributes, + SearchProfileUpdateRequest, + SearchProfileUpdateRequestData, + SearchQuery, + SearchQueryParamFacetBy, + SearchQueryParamFilterBy, + SearchQueryParamHighlightFullFields, + SearchQueryParamMaxFacetValues, + SearchQueryParamQ, + SearchQueryParamSortBy, + SearchQueryParamType, + SearchResponse, + SearchResult, + SearchResultType, + SearchRule, + SearchRuleActions, + SearchRuleAttributes, + SearchRuleGroup, + SearchRuleGroupAttributes, + SearchRuleGroupMeta, + SearchRuleGroupPatchAttributes, + SearchRuleGroupResponse, + SearchRuleGroupType, + SearchRuleMeta, + SearchRulePatchAttributes, + SearchRuleResponse, + SearchRuleTrigger, + SearchRuleType, + SetDefaultSearchProfileData, + SetDefaultSearchProfileError, + SetDefaultSearchProfileErrors, + SetDefaultSearchProfileResponse, + SetDefaultSearchProfileResponses, + SimulatedShopperDate, + SortByField, + Stem, + StopwordSet, + StopwordSetAttributes, + StopwordSetMeta, + StopwordSetResponse, + StopwordSetType, + SynonymSet, + SynonymSetAttributes, + SynonymSetItem, + SynonymSetMeta, + SynonymSetResponse, + SynonymSettings, + SynonymSetType, + Tag, + TextMatchInfo, + TextMatchType, + TypoTolerance, + UpdateIndexableFieldsData, + UpdateIndexableFieldsError, + UpdateIndexableFieldsErrors, + UpdateIndexableFieldsResponse, + UpdateIndexableFieldsResponses, + UpdateSearchProfileData, + UpdateSearchProfileError, + UpdateSearchProfileErrors, + UpdateSearchProfileResponse, + UpdateSearchProfileResponses, + UpdateSearchRuleData, + UpdateSearchRuleError, + UpdateSearchRuleErrors, + UpdateSearchRuleGroupData, + UpdateSearchRuleGroupError, + UpdateSearchRuleGroupErrors, + UpdateSearchRuleGroupRequest, + UpdateSearchRuleGroupResponse, + UpdateSearchRuleGroupResponses, + UpdateSearchRuleRequest, + UpdateSearchRuleResponse, + UpdateSearchRuleResponses, + UpdateStopwordSetAttributes, + UpdateStopwordSetData, + UpdateStopwordSetError, + UpdateStopwordSetErrors, + UpdateStopwordSetRequest, + UpdateStopwordSetResponse, + UpdateStopwordSetResponses, + UpdateSynonymSetAttributes, + UpdateSynonymSetData, + UpdateSynonymSetError, + UpdateSynonymSetErrors, + UpdateSynonymSetRequest, + UpdateSynonymSetResponse, + UpdateSynonymSetResponses, +} from "./types.gen" diff --git a/packages/sdks/catalog-search/src/client/sdk.gen.ts b/packages/sdks/catalog-search/src/client/sdk.gen.ts index 22068f793..5d2f09e72 100644 --- a/packages/sdks/catalog-search/src/client/sdk.gen.ts +++ b/packages/sdks/catalog-search/src/client/sdk.gen.ts @@ -1,874 +1,1016 @@ // This file is auto-generated by @hey-api/openapi-ts -import { createClient, createConfig, type Options } from "@hey-api/client-fetch" import type { - PostMultiSearchData, - PostMultiSearchResponse, - PostMultiSearchError, - MultiSearchByCatalogReleaseData, - MultiSearchByCatalogReleaseResponse, - MultiSearchByCatalogReleaseError, - SearchByContextData, - SearchByContextResponse, - SearchByContextError, - SearchByCatalogReleaseData, - SearchByCatalogReleaseResponse, - SearchByCatalogReleaseError, - ReindexTenantReleasesData, - ReindexTenantReleasesResponse, - ReindexTenantReleasesError, - ListIndexableFieldsData, - ListIndexableFieldsResponse2, - ListIndexableFieldsError, + Client, + ClientMeta, + Options as Options2, + RequestResult, + TDataShape, +} from "./client" +import { client } from "./client.gen" +import type { CreateIndexableFieldsData, - CreateIndexableFieldsResponse, - CreateIndexableFieldsError, - DeleteIndexableFieldsData, - DeleteIndexableFieldsResponse, - DeleteIndexableFieldsError, - GetIndexableFieldsData, - GetIndexableFieldsResponse, - GetIndexableFieldsError, - UpdateIndexableFieldsData, - UpdateIndexableFieldsResponse, - UpdateIndexableFieldsError, - ListSearchableFieldsData, - ListSearchableFieldsResponse, - ListSearchableFieldsError, - ListIndexedFieldsData, - ListIndexedFieldsResponse, - ListIndexedFieldsError, - ListSearchProfilesData, - ListSearchProfilesResponse2, - ListSearchProfilesError, + CreateIndexableFieldsErrors, + CreateIndexableFieldsResponses, CreateSearchProfileData, - CreateSearchProfileResponse, - CreateSearchProfileError, - DeleteSearchProfileData, - DeleteSearchProfileResponse, - DeleteSearchProfileError, - GetSearchProfileData, - GetSearchProfileResponse, - GetSearchProfileError, - UpdateSearchProfileData, - UpdateSearchProfileResponse, - UpdateSearchProfileError, - SetDefaultSearchProfileData, - SetDefaultSearchProfileResponse, - SetDefaultSearchProfileError, - ListStopwordSetsData, - ListStopwordSetsResponse2, - ListStopwordSetsError, + CreateSearchProfileErrors, + CreateSearchProfileResponses, + CreateSearchRuleData, + CreateSearchRuleErrors, + CreateSearchRuleGroupData, + CreateSearchRuleGroupErrors, + CreateSearchRuleGroupResponses, + CreateSearchRuleResponses, CreateStopwordSetData, - CreateStopwordSetResponse, - CreateStopwordSetError, - DeleteStopwordSetData, - DeleteStopwordSetResponse, - DeleteStopwordSetError, - GetStopwordSetData, - GetStopwordSetResponse, - GetStopwordSetError, - UpdateStopwordSetData, - UpdateStopwordSetResponse, - UpdateStopwordSetError, - ListSynonymSetsData, - ListSynonymSetsResponse2, - ListSynonymSetsError, + CreateStopwordSetErrors, + CreateStopwordSetResponses, CreateSynonymSetData, - CreateSynonymSetResponse, - CreateSynonymSetError, + CreateSynonymSetErrors, + CreateSynonymSetResponses, + DeleteIndexableFieldsData, + DeleteIndexableFieldsErrors, + DeleteIndexableFieldsResponses, + DeleteSearchProfileData, + DeleteSearchProfileErrors, + DeleteSearchProfileResponses, + DeleteSearchRuleData, + DeleteSearchRuleErrors, + DeleteSearchRuleGroupData, + DeleteSearchRuleGroupErrors, + DeleteSearchRuleGroupResponses, + DeleteSearchRuleResponses, + DeleteStopwordSetData, + DeleteStopwordSetErrors, + DeleteStopwordSetResponses, DeleteSynonymSetData, - DeleteSynonymSetResponse, - DeleteSynonymSetError, + DeleteSynonymSetErrors, + DeleteSynonymSetResponses, + GetIndexableFieldsData, + GetIndexableFieldsErrors, + GetIndexableFieldsResponses, + GetSearchProfileData, + GetSearchProfileErrors, + GetSearchProfileResponses, + GetSearchRuleData, + GetSearchRuleErrors, + GetSearchRuleGroupData, + GetSearchRuleGroupErrors, + GetSearchRuleGroupResponses, + GetSearchRuleResponses, + GetStopwordSetData, + GetStopwordSetErrors, + GetStopwordSetResponses, GetSynonymSetData, - GetSynonymSetResponse, - GetSynonymSetError, - UpdateSynonymSetData, - UpdateSynonymSetResponse, - UpdateSynonymSetError, + GetSynonymSetErrors, + GetSynonymSetResponses, + ListIndexableFieldsData, + ListIndexableFieldsErrors, + ListIndexableFieldsResponses, + ListIndexedFieldsData, + ListIndexedFieldsErrors, + ListIndexedFieldsResponses, + ListSearchableFieldsData, + ListSearchableFieldsErrors, + ListSearchableFieldsResponses, + ListSearchIndexesData, + ListSearchIndexesErrors, + ListSearchIndexesResponses, + ListSearchProfilesData, + ListSearchProfilesErrors, + ListSearchProfilesResponses, ListSearchRuleGroupsData, - ListSearchRuleGroupsResponse2, - ListSearchRuleGroupsError, - CreateSearchRuleGroupData, - CreateSearchRuleGroupResponse, - CreateSearchRuleGroupError, - DeleteSearchRuleGroupData, - DeleteSearchRuleGroupResponse, - DeleteSearchRuleGroupError, - GetSearchRuleGroupData, - GetSearchRuleGroupResponse, - GetSearchRuleGroupError, - UpdateSearchRuleGroupData, - UpdateSearchRuleGroupResponse, - UpdateSearchRuleGroupError, + ListSearchRuleGroupsErrors, + ListSearchRuleGroupsResponses, ListSearchRulesData, - ListSearchRulesResponse2, - ListSearchRulesError, - CreateSearchRuleData, - CreateSearchRuleResponse, - CreateSearchRuleError, - DeleteSearchRuleData, - DeleteSearchRuleResponse, - DeleteSearchRuleError, - GetSearchRuleData, - GetSearchRuleResponse, - GetSearchRuleError, - UpdateSearchRuleData, - UpdateSearchRuleResponse, - UpdateSearchRuleError, + ListSearchRulesErrors, + ListSearchRulesResponses, + ListStopwordSetsData, + ListStopwordSetsErrors, + ListStopwordSetsResponses, + ListSynonymSetsData, + ListSynonymSetsErrors, + ListSynonymSetsResponses, MoveSearchRuleData, - MoveSearchRuleResponse, - MoveSearchRuleError, - ListSearchIndexesData, - ListSearchIndexesResponse2, - ListSearchIndexesError, + MoveSearchRuleErrors, + MoveSearchRuleResponses, + MultiSearchByCatalogReleaseData, + MultiSearchByCatalogReleaseErrors, + MultiSearchByCatalogReleaseResponses, + PostMultiSearchData, + PostMultiSearchErrors, + PostMultiSearchResponses, + ReindexTenantReleasesData, + ReindexTenantReleasesErrors, + ReindexTenantReleasesResponses, + SearchByCatalogReleaseData, + SearchByCatalogReleaseErrors, + SearchByCatalogReleaseResponses, + SearchByContextData, + SearchByContextErrors, + SearchByContextResponses, + SetDefaultSearchProfileData, + SetDefaultSearchProfileErrors, + SetDefaultSearchProfileResponses, + UpdateIndexableFieldsData, + UpdateIndexableFieldsErrors, + UpdateIndexableFieldsResponses, + UpdateSearchProfileData, + UpdateSearchProfileErrors, + UpdateSearchProfileResponses, + UpdateSearchRuleData, + UpdateSearchRuleErrors, + UpdateSearchRuleGroupData, + UpdateSearchRuleGroupErrors, + UpdateSearchRuleGroupResponses, + UpdateSearchRuleResponses, + UpdateStopwordSetData, + UpdateStopwordSetErrors, + UpdateStopwordSetResponses, + UpdateSynonymSetData, + UpdateSynonymSetErrors, + UpdateSynonymSetResponses, } from "./types.gen" -export const client = createClient(createConfig()) +export type Options< + TData extends TDataShape = TDataShape, + ThrowOnError extends boolean = boolean, + TResponse = unknown, +> = Options2 & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: keyof ClientMeta extends never ? Record : ClientMeta +} /** * Multi-search + * * Execute one or more searches in a single request. */ export const postMultiSearch = ( options: Options, -) => { - return (options?.client ?? client).post< - PostMultiSearchResponse, - PostMultiSearchError, +): RequestResult< + PostMultiSearchResponses, + PostMultiSearchErrors, + ThrowOnError +> => + (options.client ?? client).post< + PostMultiSearchResponses, + PostMultiSearchErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, + querySerializer: { parameters: { include: { array: { explode: false } } } }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], - querySerializer: { - array: { - explode: false, - style: "form", - }, - }, url: "/pcm/catalog/multi-search", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Admin Multi-search + * * Execute one or more searches in a single request. */ export const multiSearchByCatalogRelease = < ThrowOnError extends boolean = false, >( options: Options, -) => { - return (options?.client ?? client).post< - MultiSearchByCatalogReleaseResponse, - MultiSearchByCatalogReleaseError, +): RequestResult< + MultiSearchByCatalogReleaseResponses, + MultiSearchByCatalogReleaseErrors, + ThrowOnError +> => + (options.client ?? client).post< + MultiSearchByCatalogReleaseResponses, + MultiSearchByCatalogReleaseErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, + querySerializer: { parameters: { include: { array: { explode: false } } } }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], - querySerializer: { - array: { - explode: false, - style: "form", - }, - }, url: "/pcm/catalogs/{catalog_id}/releases/{release_id}/multi-search", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Search + * * Execute search. */ export const searchByContext = ( options: Options, -) => { - return (options?.client ?? client).get< - SearchByContextResponse, - SearchByContextError, +): RequestResult< + SearchByContextResponses, + SearchByContextErrors, + ThrowOnError +> => + (options.client ?? client).get< + SearchByContextResponses, + SearchByContextErrors, ThrowOnError >({ - ...options, + querySerializer: { parameters: { include: { array: { explode: false } } } }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], - querySerializer: { - array: { - explode: false, - style: "form", - }, - }, url: "/pcm/catalog/search", + ...options, }) -} /** * Admin Search + * * Execute search. */ export const searchByCatalogRelease = ( options: Options, -) => { - return (options?.client ?? client).get< - SearchByCatalogReleaseResponse, - SearchByCatalogReleaseError, +): RequestResult< + SearchByCatalogReleaseResponses, + SearchByCatalogReleaseErrors, + ThrowOnError +> => + (options.client ?? client).get< + SearchByCatalogReleaseResponses, + SearchByCatalogReleaseErrors, ThrowOnError >({ - ...options, + querySerializer: { parameters: { include: { array: { explode: false } } } }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], - querySerializer: { - array: { - explode: false, - style: "form", - }, - }, url: "/pcm/catalogs/{catalog_id}/releases/{release_id}/search", + ...options, }) -} /** * Reindex all releases for tenant + * * Create a new job to reindex all releases for the tenant. */ export const reindexTenantReleases = ( options: Options, -) => { - return (options?.client ?? client).post< - ReindexTenantReleasesResponse, - ReindexTenantReleasesError, +): RequestResult< + ReindexTenantReleasesResponses, + ReindexTenantReleasesErrors, + ThrowOnError +> => + (options.client ?? client).post< + ReindexTenantReleasesResponses, + ReindexTenantReleasesErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/reindex-releases", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * List indexable fields + * * List indexable fields. */ export const listIndexableFields = ( options?: Options, -) => { - return (options?.client ?? client).get< - ListIndexableFieldsResponse2, - ListIndexableFieldsError, +): RequestResult< + ListIndexableFieldsResponses, + ListIndexableFieldsErrors, + ThrowOnError +> => + (options?.client ?? client).get< + ListIndexableFieldsResponses, + ListIndexableFieldsErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/indexable-fields", + ...options, }) -} /** * Create indexable fields + * * Specify additional fields to be indexed. */ export const createIndexableFields = ( options: Options, -) => { - return (options?.client ?? client).post< - CreateIndexableFieldsResponse, - CreateIndexableFieldsError, +): RequestResult< + CreateIndexableFieldsResponses, + CreateIndexableFieldsErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateIndexableFieldsResponses, + CreateIndexableFieldsErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/indexable-fields", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Delete indexable fields + * * Delete additional fields to be indexed. */ export const deleteIndexableFields = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteIndexableFieldsResponse, - DeleteIndexableFieldsError, +): RequestResult< + DeleteIndexableFieldsResponses, + DeleteIndexableFieldsErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteIndexableFieldsResponses, + DeleteIndexableFieldsErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/indexable-fields/{indexable_fields_id}", + ...options, }) -} /** * Get indexable fields + * * Get additional fields to be indexed. */ export const getIndexableFields = ( options: Options, -) => { - return (options?.client ?? client).get< - GetIndexableFieldsResponse, - GetIndexableFieldsError, +): RequestResult< + GetIndexableFieldsResponses, + GetIndexableFieldsErrors, + ThrowOnError +> => + (options.client ?? client).get< + GetIndexableFieldsResponses, + GetIndexableFieldsErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/indexable-fields/{indexable_fields_id}", + ...options, }) -} /** * Update indexable fields + * * Update additional fields to be indexed. */ export const updateIndexableFields = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateIndexableFieldsResponse, - UpdateIndexableFieldsError, +): RequestResult< + UpdateIndexableFieldsResponses, + UpdateIndexableFieldsErrors, + ThrowOnError +> => + (options.client ?? client).put< + UpdateIndexableFieldsResponses, + UpdateIndexableFieldsErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/indexable-fields/{indexable_fields_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** - * @deprecated * List searchable fields + * * Lists the text fields available for use as search query fields. * * Deprecated: use `GET /pcm/catalogs/search/indexed-fields`, which lists all indexed fields and indicates whether each is searchable and filterable. * + * + * @deprecated */ export const listSearchableFields = ( options?: Options, -) => { - return (options?.client ?? client).get< - ListSearchableFieldsResponse, - ListSearchableFieldsError, +): RequestResult< + ListSearchableFieldsResponses, + ListSearchableFieldsErrors, + ThrowOnError +> => + (options?.client ?? client).get< + ListSearchableFieldsResponses, + ListSearchableFieldsErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/searchable-fields", + ...options, }) -} /** * List indexed fields + * * Lists all indexed fields available for configuring search. */ export const listIndexedFields = ( options?: Options, -) => { - return (options?.client ?? client).get< - ListIndexedFieldsResponse, - ListIndexedFieldsError, +): RequestResult< + ListIndexedFieldsResponses, + ListIndexedFieldsErrors, + ThrowOnError +> => + (options?.client ?? client).get< + ListIndexedFieldsResponses, + ListIndexedFieldsErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/indexed-fields", + ...options, }) -} /** * List search profiles + * * List search profiles. */ export const listSearchProfiles = ( options?: Options, -) => { - return (options?.client ?? client).get< - ListSearchProfilesResponse2, - ListSearchProfilesError, +): RequestResult< + ListSearchProfilesResponses, + ListSearchProfilesErrors, + ThrowOnError +> => + (options?.client ?? client).get< + ListSearchProfilesResponses, + ListSearchProfilesErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search-profiles", + ...options, }) -} /** * Create search profile + * * Create a new search profile. */ export const createSearchProfile = ( options: Options, -) => { - return (options?.client ?? client).post< - CreateSearchProfileResponse, - CreateSearchProfileError, +): RequestResult< + CreateSearchProfileResponses, + CreateSearchProfileErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateSearchProfileResponses, + CreateSearchProfileErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search-profiles", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Delete search profile + * * Delete a search profile. */ export const deleteSearchProfile = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteSearchProfileResponse, - DeleteSearchProfileError, +): RequestResult< + DeleteSearchProfileResponses, + DeleteSearchProfileErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteSearchProfileResponses, + DeleteSearchProfileErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search-profiles/{search_profile_id}", + ...options, }) -} /** * Get search profile + * * Get a search profile. */ export const getSearchProfile = ( options: Options, -) => { - return (options?.client ?? client).get< - GetSearchProfileResponse, - GetSearchProfileError, +): RequestResult< + GetSearchProfileResponses, + GetSearchProfileErrors, + ThrowOnError +> => + (options.client ?? client).get< + GetSearchProfileResponses, + GetSearchProfileErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search-profiles/{search_profile_id}", + ...options, }) -} /** * Update search profile + * * Update a search profile. */ export const updateSearchProfile = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateSearchProfileResponse, - UpdateSearchProfileError, +): RequestResult< + UpdateSearchProfileResponses, + UpdateSearchProfileErrors, + ThrowOnError +> => + (options.client ?? client).put< + UpdateSearchProfileResponses, + UpdateSearchProfileErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search-profiles/{search_profile_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Set search profile as default + * * Set a search profile as the default. */ export const setDefaultSearchProfile = ( options: Options, -) => { - return (options?.client ?? client).post< - SetDefaultSearchProfileResponse, - SetDefaultSearchProfileError, +): RequestResult< + SetDefaultSearchProfileResponses, + SetDefaultSearchProfileErrors, + ThrowOnError +> => + (options.client ?? client).post< + SetDefaultSearchProfileResponses, + SetDefaultSearchProfileErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search-profiles/{search_profile_id}/default", + ...options, }) -} /** * List stopword sets + * * List all stopwords sets. */ export const listStopwordSets = ( options?: Options, -) => { - return (options?.client ?? client).get< - ListStopwordSetsResponse2, - ListStopwordSetsError, +): RequestResult< + ListStopwordSetsResponses, + ListStopwordSetsErrors, + ThrowOnError +> => + (options?.client ?? client).get< + ListStopwordSetsResponses, + ListStopwordSetsErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/stopword-sets", + ...options, }) -} /** * Create stopword set + * * Create a new stopwords set. */ export const createStopwordSet = ( options: Options, -) => { - return (options?.client ?? client).post< - CreateStopwordSetResponse, - CreateStopwordSetError, +): RequestResult< + CreateStopwordSetResponses, + CreateStopwordSetErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateStopwordSetResponses, + CreateStopwordSetErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/stopword-sets", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Delete stopword set + * * Delete a stopword set by ID. */ export const deleteStopwordSet = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteStopwordSetResponse, - DeleteStopwordSetError, +): RequestResult< + DeleteStopwordSetResponses, + DeleteStopwordSetErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteStopwordSetResponses, + DeleteStopwordSetErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/stopword-sets/{stopword_set_id}", + ...options, }) -} /** * Get stopword set + * * Get a stopwords set by ID. */ export const getStopwordSet = ( options: Options, -) => { - return (options?.client ?? client).get< - GetStopwordSetResponse, - GetStopwordSetError, +): RequestResult => + (options.client ?? client).get< + GetStopwordSetResponses, + GetStopwordSetErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/stopword-sets/{stopword_set_id}", + ...options, }) -} /** * Update stopword set + * * Update the stopwords in an existing stopwords set. The locale cannot be changed. */ export const updateStopwordSet = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateStopwordSetResponse, - UpdateStopwordSetError, +): RequestResult< + UpdateStopwordSetResponses, + UpdateStopwordSetErrors, + ThrowOnError +> => + (options.client ?? client).put< + UpdateStopwordSetResponses, + UpdateStopwordSetErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/stopword-sets/{stopword_set_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * List synonym sets + * * List all synonym sets. */ export const listSynonymSets = ( options?: Options, -) => { - return (options?.client ?? client).get< - ListSynonymSetsResponse2, - ListSynonymSetsError, +): RequestResult< + ListSynonymSetsResponses, + ListSynonymSetsErrors, + ThrowOnError +> => + (options?.client ?? client).get< + ListSynonymSetsResponses, + ListSynonymSetsErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/synonym-sets", + ...options, }) -} /** * Create synonym set + * * Create a new synonym set. */ export const createSynonymSet = ( options: Options, -) => { - return (options?.client ?? client).post< - CreateSynonymSetResponse, - CreateSynonymSetError, +): RequestResult< + CreateSynonymSetResponses, + CreateSynonymSetErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateSynonymSetResponses, + CreateSynonymSetErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/synonym-sets", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Delete synonym set + * * Delete a synonym set by ID. A synonym set cannot be deleted while it is being used by any search profile. */ export const deleteSynonymSet = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteSynonymSetResponse, - DeleteSynonymSetError, +): RequestResult< + DeleteSynonymSetResponses, + DeleteSynonymSetErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteSynonymSetResponses, + DeleteSynonymSetErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/synonym-sets/{synonym_set_id}", + ...options, }) -} /** * Get synonym set + * * Get a synonym set by ID. */ export const getSynonymSet = ( options: Options, -) => { - return (options?.client ?? client).get< - GetSynonymSetResponse, - GetSynonymSetError, +): RequestResult => + (options.client ?? client).get< + GetSynonymSetResponses, + GetSynonymSetErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/synonym-sets/{synonym_set_id}", + ...options, }) -} /** * Update synonym set + * * Update a synonym set by ID. */ export const updateSynonymSet = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateSynonymSetResponse, - UpdateSynonymSetError, +): RequestResult< + UpdateSynonymSetResponses, + UpdateSynonymSetErrors, + ThrowOnError +> => + (options.client ?? client).put< + UpdateSynonymSetResponses, + UpdateSynonymSetErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/synonym-sets/{synonym_set_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * List search rule groups + * * List search rule groups for the current tenant with offset/limit pagination. */ export const listSearchRuleGroups = ( options?: Options, -) => { - return (options?.client ?? client).get< - ListSearchRuleGroupsResponse2, - ListSearchRuleGroupsError, +): RequestResult< + ListSearchRuleGroupsResponses, + ListSearchRuleGroupsErrors, + ThrowOnError +> => + (options?.client ?? client).get< + ListSearchRuleGroupsResponses, + ListSearchRuleGroupsErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups", + ...options, }) -} /** * Create search rule group + * * Create a new search rule group for the current tenant. The `slug` must be unique within the tenant. * * After creating a group, add rules with `POST /pcm/catalogs/search/rule-groups/{rule_group_id}/rules`, then attach the group UUID to a search profile's `rule_groups` attribute to activate merchandising at search time. @@ -876,29 +1018,34 @@ export const listSearchRuleGroups = ( */ export const createSearchRuleGroup = ( options: Options, -) => { - return (options?.client ?? client).post< - CreateSearchRuleGroupResponse, - CreateSearchRuleGroupError, +): RequestResult< + CreateSearchRuleGroupResponses, + CreateSearchRuleGroupErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateSearchRuleGroupResponses, + CreateSearchRuleGroupErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Delete search rule group + * * Delete a search rule group by ID. Rules in the group are cascade-deleted. * * A rule group cannot be deleted while it is referenced by any search profile. Remove the group from profile `rule_groups` first. @@ -908,98 +1055,118 @@ export const createSearchRuleGroup = ( */ export const deleteSearchRuleGroup = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteSearchRuleGroupResponse, - DeleteSearchRuleGroupError, +): RequestResult< + DeleteSearchRuleGroupResponses, + DeleteSearchRuleGroupErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteSearchRuleGroupResponses, + DeleteSearchRuleGroupErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups/{rule_group_id}", + ...options, }) -} /** * Get search rule group + * * Get a search rule group by ID. */ export const getSearchRuleGroup = ( options: Options, -) => { - return (options?.client ?? client).get< - GetSearchRuleGroupResponse, - GetSearchRuleGroupError, +): RequestResult< + GetSearchRuleGroupResponses, + GetSearchRuleGroupErrors, + ThrowOnError +> => + (options.client ?? client).get< + GetSearchRuleGroupResponses, + GetSearchRuleGroupErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups/{rule_group_id}", + ...options, }) -} /** * Update search rule group + * * Update the slug and/or description of a search rule group. This label-only change does not alter rule evaluation. */ export const updateSearchRuleGroup = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateSearchRuleGroupResponse, - UpdateSearchRuleGroupError, +): RequestResult< + UpdateSearchRuleGroupResponses, + UpdateSearchRuleGroupErrors, + ThrowOnError +> => + (options.client ?? client).put< + UpdateSearchRuleGroupResponses, + UpdateSearchRuleGroupErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups/{rule_group_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * List search rules + * * List rules in a search rule group, ordered by `execution_order`, with offset/limit pagination. */ export const listSearchRules = ( options: Options, -) => { - return (options?.client ?? client).get< - ListSearchRulesResponse2, - ListSearchRulesError, +): RequestResult< + ListSearchRulesResponses, + ListSearchRulesErrors, + ThrowOnError +> => + (options.client ?? client).get< + ListSearchRulesResponses, + ListSearchRulesErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups/{rule_group_id}/rules", + ...options, }) -} /** * Create search rule + * * Create a search rule in the given rule group. Each rule requires a unique `execution_order` within the group. * * Boost `condition` values use the same filter syntax as search profile boosts and must reference indexed fields. At least one supported action is required. @@ -1007,29 +1174,34 @@ export const listSearchRules = ( */ export const createSearchRule = ( options: Options, -) => { - return (options?.client ?? client).post< - CreateSearchRuleResponse, - CreateSearchRuleError, +): RequestResult< + CreateSearchRuleResponses, + CreateSearchRuleErrors, + ThrowOnError +> => + (options.client ?? client).post< + CreateSearchRuleResponses, + CreateSearchRuleErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups/{rule_group_id}/rules", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Delete search rule + * * Delete a search rule by ID within a rule group. Deleting a rule is allowed even when the parent group is attached to a search profile. * * Repeated delete requests succeed with **204 No Content** when the rule is already gone. @@ -1037,119 +1209,135 @@ export const createSearchRule = ( */ export const deleteSearchRule = ( options: Options, -) => { - return (options?.client ?? client).delete< - DeleteSearchRuleResponse, - DeleteSearchRuleError, +): RequestResult< + DeleteSearchRuleResponses, + DeleteSearchRuleErrors, + ThrowOnError +> => + (options.client ?? client).delete< + DeleteSearchRuleResponses, + DeleteSearchRuleErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups/{rule_group_id}/rules/{rule_id}", + ...options, }) -} /** * Get search rule + * * Get a search rule by ID within a rule group. */ export const getSearchRule = ( options: Options, -) => { - return (options?.client ?? client).get< - GetSearchRuleResponse, - GetSearchRuleError, +): RequestResult => + (options.client ?? client).get< + GetSearchRuleResponses, + GetSearchRuleErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups/{rule_group_id}/rules/{rule_id}", + ...options, }) -} /** * Update search rule + * * Update one or more attributes of a rule in its current group. A successful update takes effect for subsequent searches. */ export const updateSearchRule = ( options: Options, -) => { - return (options?.client ?? client).put< - UpdateSearchRuleResponse, - UpdateSearchRuleError, +): RequestResult< + UpdateSearchRuleResponses, + UpdateSearchRuleErrors, + ThrowOnError +> => + (options.client ?? client).put< + UpdateSearchRuleResponses, + UpdateSearchRuleErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups/{rule_group_id}/rules/{rule_id}", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * Move search rule + * * Move a rule within its current group before or after another rule, or to the first or last position. The service preserves sparse execution order values and resequences the group when no integer gap remains. */ export const moveSearchRule = ( options: Options, -) => { - return (options?.client ?? client).post< - MoveSearchRuleResponse, - MoveSearchRuleError, +): RequestResult => + (options.client ?? client).post< + MoveSearchRuleResponses, + MoveSearchRuleErrors, ThrowOnError >({ - ...options, - headers: { - "Content-Type": "application/json", - ...options?.headers, - }, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search/rule-groups/{rule_group_id}/rules/{rule_id}/move", + ...options, + headers: { + "Content-Type": "application/json", + ...options.headers, + }, }) -} /** * List search indexes + * * List search indexes. */ export const listSearchIndexes = ( options?: Options, -) => { - return (options?.client ?? client).get< - ListSearchIndexesResponse2, - ListSearchIndexesError, +): RequestResult< + ListSearchIndexesResponses, + ListSearchIndexesErrors, + ThrowOnError +> => + (options?.client ?? client).get< + ListSearchIndexesResponses, + ListSearchIndexesErrors, ThrowOnError >({ - ...options, security: [ { + key: "BearerToken", scheme: "bearer", type: "http", }, ], url: "/pcm/catalogs/search-indexes", + ...options, }) -} diff --git a/packages/sdks/catalog-search/src/client/transformers.gen.ts b/packages/sdks/catalog-search/src/client/transformers.gen.ts deleted file mode 100644 index 95cf63540..000000000 --- a/packages/sdks/catalog-search/src/client/transformers.gen.ts +++ /dev/null @@ -1,309 +0,0 @@ -// This file is auto-generated by @hey-api/openapi-ts - -import type { - PostMultiSearchResponse, - MultiSearchByCatalogReleaseResponse, - SearchByContextResponse, - SearchByCatalogReleaseResponse, - ListStopwordSetsResponse2, - CreateStopwordSetResponse, - GetStopwordSetResponse, - UpdateStopwordSetResponse, - ListSynonymSetsResponse2, - CreateSynonymSetResponse, - GetSynonymSetResponse, - UpdateSynonymSetResponse, - ListSearchRuleGroupsResponse2, - CreateSearchRuleGroupResponse, - GetSearchRuleGroupResponse, - UpdateSearchRuleGroupResponse, - ListSearchRulesResponse2, - CreateSearchRuleResponse, - GetSearchRuleResponse, - UpdateSearchRuleResponse, - MoveSearchRuleResponse, -} from "./types.gen" - -const textMatchInfoSchemaResponseTransformer = (data: any) => { - if (data.num_tokens_dropped) { - data.num_tokens_dropped = BigInt(data.num_tokens_dropped.toString()) - } - return data -} - -const hitSchemaResponseTransformer = (data: any) => { - if (data.text_match_info) { - data.text_match_info = textMatchInfoSchemaResponseTransformer( - data.text_match_info, - ) - } - return data -} - -const searchResultSchemaResponseTransformer = (data: any) => { - if (data.hits) { - data.hits = data.hits.map((item: any) => { - return hitSchemaResponseTransformer(item) - }) - } - return data -} - -const multiSearchResponseSchemaResponseTransformer = (data: any) => { - if (data.results) { - data.results = data.results.map((item: any) => { - return searchResultSchemaResponseTransformer(item) - }) - } - return data -} - -export const postMultiSearchResponseTransformer = async ( - data: any, -): Promise => { - data = multiSearchResponseSchemaResponseTransformer(data) - return data -} - -export const multiSearchByCatalogReleaseResponseTransformer = async ( - data: any, -): Promise => { - data = multiSearchResponseSchemaResponseTransformer(data) - return data -} - -const searchResponseSchemaResponseTransformer = (data: any) => { - data = searchResultSchemaResponseTransformer(data) - return data -} - -export const searchByContextResponseTransformer = async ( - data: any, -): Promise => { - data = searchResponseSchemaResponseTransformer(data) - return data -} - -export const searchByCatalogReleaseResponseTransformer = async ( - data: any, -): Promise => { - data = searchResponseSchemaResponseTransformer(data) - return data -} - -const stopwordSetMetaSchemaResponseTransformer = (data: any) => { - data.created_at = new Date(data.created_at) - data.updated_at = new Date(data.updated_at) - if (data.last_synced_at) { - data.last_synced_at = new Date(data.last_synced_at) - } - return data -} - -const stopwordSetSchemaResponseTransformer = (data: any) => { - data.meta = stopwordSetMetaSchemaResponseTransformer(data.meta) - return data -} - -const listStopwordSetsResponseSchemaResponseTransformer = (data: any) => { - data.data = data.data.map((item: any) => { - return stopwordSetSchemaResponseTransformer(item) - }) - return data -} - -export const listStopwordSetsResponseTransformer = async ( - data: any, -): Promise => { - data = listStopwordSetsResponseSchemaResponseTransformer(data) - return data -} - -const stopwordSetResponseSchemaResponseTransformer = (data: any) => { - data.data = stopwordSetSchemaResponseTransformer(data.data) - return data -} - -export const createStopwordSetResponseTransformer = async ( - data: any, -): Promise => { - data = stopwordSetResponseSchemaResponseTransformer(data) - return data -} - -export const getStopwordSetResponseTransformer = async ( - data: any, -): Promise => { - data = stopwordSetResponseSchemaResponseTransformer(data) - return data -} - -export const updateStopwordSetResponseTransformer = async ( - data: any, -): Promise => { - data = stopwordSetResponseSchemaResponseTransformer(data) - return data -} - -const synonymSetMetaSchemaResponseTransformer = (data: any) => { - data.created_at = new Date(data.created_at) - data.updated_at = new Date(data.updated_at) - if (data.last_synced_at) { - data.last_synced_at = new Date(data.last_synced_at) - } - return data -} - -const synonymSetSchemaResponseTransformer = (data: any) => { - data.meta = synonymSetMetaSchemaResponseTransformer(data.meta) - return data -} - -const listSynonymSetsResponseSchemaResponseTransformer = (data: any) => { - data.data = data.data.map((item: any) => { - return synonymSetSchemaResponseTransformer(item) - }) - return data -} - -export const listSynonymSetsResponseTransformer = async ( - data: any, -): Promise => { - data = listSynonymSetsResponseSchemaResponseTransformer(data) - return data -} - -const synonymSetResponseSchemaResponseTransformer = (data: any) => { - data.data = synonymSetSchemaResponseTransformer(data.data) - return data -} - -export const createSynonymSetResponseTransformer = async ( - data: any, -): Promise => { - data = synonymSetResponseSchemaResponseTransformer(data) - return data -} - -export const getSynonymSetResponseTransformer = async ( - data: any, -): Promise => { - data = synonymSetResponseSchemaResponseTransformer(data) - return data -} - -export const updateSynonymSetResponseTransformer = async ( - data: any, -): Promise => { - data = synonymSetResponseSchemaResponseTransformer(data) - return data -} - -const searchRuleGroupMetaSchemaResponseTransformer = (data: any) => { - data.created_at = new Date(data.created_at) - data.updated_at = new Date(data.updated_at) - return data -} - -const searchRuleGroupSchemaResponseTransformer = (data: any) => { - data.meta = searchRuleGroupMetaSchemaResponseTransformer(data.meta) - return data -} - -const listSearchRuleGroupsResponseSchemaResponseTransformer = (data: any) => { - data.data = data.data.map((item: any) => { - return searchRuleGroupSchemaResponseTransformer(item) - }) - return data -} - -export const listSearchRuleGroupsResponseTransformer = async ( - data: any, -): Promise => { - data = listSearchRuleGroupsResponseSchemaResponseTransformer(data) - return data -} - -const searchRuleGroupResponseSchemaResponseTransformer = (data: any) => { - data.data = searchRuleGroupSchemaResponseTransformer(data.data) - return data -} - -export const createSearchRuleGroupResponseTransformer = async ( - data: any, -): Promise => { - data = searchRuleGroupResponseSchemaResponseTransformer(data) - return data -} - -export const getSearchRuleGroupResponseTransformer = async ( - data: any, -): Promise => { - data = searchRuleGroupResponseSchemaResponseTransformer(data) - return data -} - -export const updateSearchRuleGroupResponseTransformer = async ( - data: any, -): Promise => { - data = searchRuleGroupResponseSchemaResponseTransformer(data) - return data -} - -const searchRuleMetaSchemaResponseTransformer = (data: any) => { - data.created_at = new Date(data.created_at) - data.updated_at = new Date(data.updated_at) - return data -} - -const searchRuleSchemaResponseTransformer = (data: any) => { - data.meta = searchRuleMetaSchemaResponseTransformer(data.meta) - return data -} - -const listSearchRulesResponseSchemaResponseTransformer = (data: any) => { - data.data = data.data.map((item: any) => { - return searchRuleSchemaResponseTransformer(item) - }) - return data -} - -export const listSearchRulesResponseTransformer = async ( - data: any, -): Promise => { - data = listSearchRulesResponseSchemaResponseTransformer(data) - return data -} - -const searchRuleResponseSchemaResponseTransformer = (data: any) => { - data.data = searchRuleSchemaResponseTransformer(data.data) - return data -} - -export const createSearchRuleResponseTransformer = async ( - data: any, -): Promise => { - data = searchRuleResponseSchemaResponseTransformer(data) - return data -} - -export const getSearchRuleResponseTransformer = async ( - data: any, -): Promise => { - data = searchRuleResponseSchemaResponseTransformer(data) - return data -} - -export const updateSearchRuleResponseTransformer = async ( - data: any, -): Promise => { - data = searchRuleResponseSchemaResponseTransformer(data) - return data -} - -export const moveSearchRuleResponseTransformer = async ( - data: any, -): Promise => { - data = searchRuleResponseSchemaResponseTransformer(data) - return data -} diff --git a/packages/sdks/catalog-search/src/client/types.gen.ts b/packages/sdks/catalog-search/src/client/types.gen.ts index bbfc769d4..7750377cc 100644 --- a/packages/sdks/catalog-search/src/client/types.gen.ts +++ b/packages/sdks/catalog-search/src/client/types.gen.ts @@ -1,8 +1,11 @@ // This file is auto-generated by @hey-api/openapi-ts -export type Type = "catalog_search_rule" - -export type Placement = "before" | "after" | "first" | "last" +export type ClientOptions = { + baseUrl: + | "https://euwest.api.elasticpath.com" + | "https://useast.api.elasticpath.com" + | (string & {}) +} export type MoveSearchRuleRequest = { data: { @@ -47,6 +50,8 @@ export type JobMetaError = { } /** + * AutocompleteResponse + * * An autocomplete suggestion with query frequency information. */ export type AutocompleteResponse = { @@ -176,7 +181,7 @@ export type TextMatchInfo = { * Reports token coverage for this specific hit, not the global `drop_tokens_threshold` query-relaxation behaviour. * */ - num_tokens_dropped?: BigInt + num_tokens_dropped?: number /** * String form of the packed 64-bit text relevance score used to rank this hit. Equivalent to the search engine's `text_match` integer — use this field for the overall relevance value. Higher means more relevant within the current result set. * @@ -267,6 +272,8 @@ export type IndexableFields = { export type IndexableFieldsRequestAttributes = { /** + * IndexableFields + * * A collection of indexable fields */ fields?: Array @@ -296,6 +303,8 @@ export type IndexableFieldsRequestAttributes = { export type IndexableFieldsAttributes = { /** + * IndexableFields + * * A collection of indexable fields */ fields?: Array @@ -351,12 +360,14 @@ export type IndexableFieldRequest = { * Deprecated. Prefer the index-wide `token_separators`. Per-field token separators for this field, overriding the index-wide value. An empty array defers to the index-wide setting. Each element must be a single character. Mixing tokenization settings across the query fields of one search profile changes how queries are matched — see the Indexable Fields guide. * For example, take text `non-tech`. By default, it will be tokenized to `nontech`. So, search for `non tech` will not match the product. Set `token_separators: ["-"]`. Then it will be tokenized to `non` and `tech`. Now, search for both `non-tech` and `non tech` will match this product. * + * * @deprecated */ token_separators?: Array /** * Deprecated. Prefer the index-wide `symbols_to_index`. Per-field special characters to index for this field, overriding the index-wide value. An empty array defers to the index-wide setting. Each element must be a single character. Mixing tokenization settings across the query fields of one search profile changes how queries are matched — see the Indexable Fields guide. * + * * @deprecated */ symbols_to_index?: Array @@ -384,12 +395,14 @@ export type IndexableField = { /** * Deprecated. Prefer the index-wide `token_separators`. Per-field token separators for this field, overriding the index-wide value. An empty array defers to the index-wide setting. * + * * @deprecated */ token_separators?: Array /** * Deprecated. Prefer the index-wide `symbols_to_index`. Per-field special characters to index for this field, overriding the index-wide value. An empty array defers to the index-wide setting. * + * * @deprecated */ symbols_to_index?: Array @@ -405,12 +418,14 @@ export type CoreFieldOverride = { /** * Deprecated. Prefer the index-wide `token_separators`. Per-field token separators for this core field, overriding the index-wide value. An empty array defers to the index-wide setting. Each element must be a single character. Mixing tokenization settings across the query fields of one search profile changes how queries are matched — see the Indexable Fields guide. * + * * @deprecated */ token_separators?: Array /** * Deprecated. Prefer the index-wide `symbols_to_index`. Per-field special characters to index for this core field, overriding the index-wide value. An empty array defers to the index-wide setting. Each element must be a single character. Mixing tokenization settings across the query fields of one search profile changes how queries are matched — see the Indexable Fields guide. * + * * @deprecated */ symbols_to_index?: Array @@ -431,6 +446,7 @@ export type CoreFieldOverride = { * When true, enables word stemming on this field using [Snowball stemmer](https://snowballstem.org/). Stemming reduces words to their root form at index and query time, so a search for "running" will also match products containing "run", "runs", or "runner". This improves search recall for descriptive text fields where shoppers may use different word forms than those used in product data. Only valid for string-typed fields. * Text fields stem by default. Set `false` to turn stemming off for this field, overriding the index-wide `stem` setting. * + * * @deprecated */ export type Stem = boolean @@ -638,8 +654,8 @@ export type SearchRuleGroupAttributes = { } export type SearchRuleGroupMeta = { - created_at: Date - updated_at: Date + created_at: string + updated_at: string owner: ResourceOwner } @@ -696,14 +712,6 @@ export type UpdateSearchRuleGroupRequest = { } } -/** - * `exact` — normalized query must equal `query`. - * `contains` — `query` must appear as a substring in the normalized query. - * `browse` — matches a non-autocomplete wildcard query (`q=*`); omit `query`. - * - */ -export type Match = "exact" | "contains" | "browse" - /** * Defines when a search rule matches a shopper query. */ @@ -772,8 +780,8 @@ export type SearchRuleAttributes = { } export type SearchRuleMeta = { - created_at: Date - updated_at: Date + created_at: string + updated_at: string owner: ResourceOwner } @@ -876,24 +884,15 @@ export type StopwordSetAttributes = { stopwords: Array } -/** - * The sync status of the stopword set. - */ -export type SyncStatus = - | "pending_sync" - | "synced" - | "sync_failed" - | "pending_delete" - export type StopwordSetMeta = { /** * The date and time the stopword set was created. */ - created_at: Date + created_at: string /** * The date and time the stopword set was last updated. */ - updated_at: Date + updated_at: string owner: ResourceOwner /** * The sync status of the stopword set. @@ -902,7 +901,7 @@ export type StopwordSetMeta = { /** * The date and time the stopword set was last successfully synced. */ - last_synced_at?: Date + last_synced_at?: string } export type CreateStopwordSetRequest = { @@ -990,11 +989,11 @@ export type SynonymSetMeta = { /** * The date and time the synonym set was created. */ - created_at: Date + created_at: string /** * The date and time the synonym set was last updated. */ - updated_at: Date + updated_at: string owner: ResourceOwner /** * The sync status of the synonym set. @@ -1003,7 +1002,7 @@ export type SynonymSetMeta = { /** * The date and time the synonym set was last successfully synced. */ - last_synced_at?: Date + last_synced_at?: string } export type CreateSynonymSetRequest = { @@ -1263,16 +1262,6 @@ export type SynonymSettings = { number_of_typos_allowed_when_resolving_synonyms?: number } | null -/** - * Controls whether compound words and multi-word phrases are treated as equivalent during search. - * For example, a query for "nonstick" may also match "non stick", and vice versa. - * - `fallback` (default): tries the original query form first; falls back to split/joined variants if results are insufficient. - * - `always`: always generates both split and joined token variants alongside the original query. - * - `off`: disables split/join token handling. - * - */ -export type SplitJoinTokens = "fallback" | "always" | "off" - /** * Optional typo tolerance configuration applied at search time. * All fields are optional; defaults are noted on each field. @@ -1459,11 +1448,6 @@ export type CatalogSearchJob = { meta?: CatalogSearchJobMeta } -/** - * The status of the job. - */ -export type Status = "pending" | "processing" | "complete" | "failed" - export type CatalogSearchJobAttributes = { /** * The status of the job. @@ -1498,6 +1482,8 @@ export type CatalogSearchJobMeta = { } /** + * Product + * * A product in a catalog with the following attributes. */ export type CatalogSearchProduct = { diff --git a/packages/sdks/catalog-search/src/client/zod.gen.ts b/packages/sdks/catalog-search/src/client/zod.gen.ts new file mode 100644 index 000000000..d01ed1108 --- /dev/null +++ b/packages/sdks/catalog-search/src/client/zod.gen.ts @@ -0,0 +1,1412 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { z } from "zod" + +export const zMoveSearchRuleRequest = z.object({ + data: z.object({ + type: z.enum(["catalog_search_rule"]), + attributes: z.object({ + placement: z.enum(["before", "after", "first", "last"]), + target_rule_id: z.string().uuid().optional(), + }), + }), +}) + +export const zReindexTenantReleasesJobRequest = z.object({ + data: z + .object({ + force_reindex: z.boolean().optional().default(false), + }) + .optional(), +}) + +/** + * Result of the job + */ +export const zJobMetaResult = z.record(z.unknown()) + +export const zJobMetaError = z.object({ + detail: z.string(), + context: z.record(z.unknown()).optional(), +}) + +/** + * AutocompleteResponse + * + * An autocomplete suggestion with query frequency information. + */ +export const zAutocompleteResponse = z.object({ + id: z.string().optional(), + q: z.string().optional(), + count: z.number().int().optional(), +}) + +export const zMatchedRuleReference = z.object({ + id: z.string().uuid(), + rule_group_id: z.string().uuid(), +}) + +export const zFacetValue = z.object({ + count: z.number().int().optional(), + highlighted: z.string().optional(), + value: z.string().optional(), +}) + +export const zFacetCount = z.object({ + counts: z.array(zFacetValue).optional(), + field_name: z.string().optional(), + sampled: z.boolean().optional(), + stats: z.record(z.unknown()).optional(), +}) + +/** + * Breakdown of how the text relevance score for this hit was derived. Values are copied unchanged from the underlying search engine response. + * + * These are **internal ranking signals** for debugging relevance and tuning Search Profiles — not user-facing match percentages. Scores are not normalized to a 0–100 scale. Higher `score` values indicate greater relevance **within the same search result set**; scores are not comparable across different queries. + * + * The overall relevance integer is available as `score` (string). Catalog Search does not expose the search engine's separate top-level `text_match` field. + * + * **Good uses:** debugging why one product ranks above another; building custom relative metrics (e.g. `tokens_matched` vs query length); merchandising and relevance tuning. + * + * **Poor uses:** displaying "match %" to shoppers; filtering by absolute thresholds without per-query calibration; comparing scores across unrelated searches. + * + * How the final `score` is aggregated depends on the active Search Profile's `text_match_type`: + * - `max_score` (default): best field score wins; weights break ties + * - `max_weight`: highest-weighted matching field drives the score + * - `sum_score`: weighted field scores are summed + * + */ +export const zTextMatchInfo = z.object({ + best_field_score: z.string().optional(), + best_field_weight: z.number().int().optional(), + fields_matched: z.number().int().optional(), + num_tokens_dropped: z.coerce + .bigint() + .min(BigInt("-9223372036854775808"), { + message: "Invalid value: Expected int64 to be >= -9223372036854775808", + }) + .max(BigInt("9223372036854775807"), { + message: "Invalid value: Expected int64 to be <= 9223372036854775807", + }) + .optional(), + score: z.string().optional(), + tokens_matched: z.number().int().optional(), + typo_prefix_score: z.number().int().optional(), +}) + +/** + * Type of search operation to performed + */ +export const zSearchResultType = z.enum(["search", "autocomplete"]) + +/** + * Included is an array of resources that are included in the response. + */ +export const zIncludedResponse = z.record(z.array(z.record(z.unknown()))) + +/** + * Deprecated. Prefer the index-wide `stem` on the indexable fields resource, which applies to every text field. A per-field value still overrides it, but mixing tokenization settings across the query fields of one search profile changes how queries are matched — see the Indexable Fields guide. + * When true, enables word stemming on this field using [Snowball stemmer](https://snowballstem.org/). Stemming reduces words to their root form at index and query time, so a search for "running" will also match products containing "run", "runs", or "runner". This improves search recall for descriptive text fields where shoppers may use different word forms than those used in product data. Only valid for string-typed fields. + * Text fields stem by default. Set `false` to turn stemming off for this field, overriding the index-wide `stem` setting. + * + * + * @deprecated + */ +export const zStem = z.boolean() + +export const zIndexableFieldRequest = z.object({ + name: z.string().min(1), + facetable: z.boolean().optional().default(false), + sortable: z.boolean().optional(), + locale: z.string().optional().default("en"), + stem: zStem.optional(), + token_separators: z.array(z.string().length(1)).optional(), + symbols_to_index: z.array(z.string().length(1)).optional(), +}) + +export const zCoreFieldOverride = z.object({ + name: z.string(), + stem: zStem.optional(), + token_separators: z.array(z.string().length(1)).optional(), + symbols_to_index: z.array(z.string().length(1)).optional(), + sortable: z.boolean().optional(), + facetable: z.boolean().optional(), +}) + +export const zIndexableFieldsRequestAttributes = z.object({ + fields: z.array(zIndexableFieldRequest).optional(), + core_field_overrides: z.array(zCoreFieldOverride).optional(), + token_separators: z.array(z.string().length(1)).optional(), + symbols_to_index: z.array(z.string().length(1)).optional(), + stem: z.boolean().optional(), +}) + +/** + * Represents the type of object being returned. Always `catalog_search_indexable_fields`. + */ +export const zIndexableFieldsType = z.enum(["catalog_search_indexable_fields"]) + +export const zIndexableFieldsCreateRequest = z.object({ + data: z.object({ + type: zIndexableFieldsType, + attributes: zIndexableFieldsRequestAttributes, + }), +}) + +export const zIndexableFieldsUpdateRequestData = z.object({ + id: z.string().uuid(), + type: zIndexableFieldsType, + attributes: zIndexableFieldsRequestAttributes, +}) + +export const zIndexableFieldsUpdateRequest = z.object({ + data: zIndexableFieldsUpdateRequestData, +}) + +/** + * Represents the type of object being returned. Always `catalog_searchable_field`. + */ +export const zSearchableFieldType = z.enum(["catalog_searchable_field"]) + +/** + * Represents the type of object being returned. Always `catalog_search_indexed_field`. + */ +export const zIndexedFieldType = z.enum(["catalog_search_indexed_field"]) + +/** + * The type of the field. + */ +export const zFieldType = z.enum([ + "string", + "int32", + "int64", + "bool", + "float", + "date", +]) + +export const zIndexableField = z.object({ + name: z.string().min(1), + type: zFieldType, + facetable: z.boolean().optional().default(false), + sortable: z.boolean().optional(), + locale: z.string().optional().default("en"), + stem: zStem.optional(), + token_separators: z.array(z.string().length(1)).optional(), + symbols_to_index: z.array(z.string().length(1)).optional(), +}) + +export const zIndexableFieldsAttributes = z.object({ + fields: z.array(zIndexableField).optional(), + core_field_overrides: z.array(zCoreFieldOverride).optional(), + token_separators: z.array(z.string().length(1)).optional(), + symbols_to_index: z.array(z.string().length(1)).optional(), + stem: z.boolean().optional(), +}) + +export const zSearchableFieldAttributes = z.object({ + name: z.string().min(1), + type: zFieldType, + facetable: z.boolean().optional().default(false), + sortable: z.boolean().optional(), + locale: z.string().optional().default("en"), +}) + +export const zIndexedFieldAttributes = z.object({ + name: z.string().min(1), + type: zFieldType, + searchable: z.boolean(), + filterable: z.boolean(), + facetable: z.boolean().optional().default(false), + sortable: z.boolean().optional(), + locale: z.string().optional().default("en"), +}) + +export const zSearchRuleGroupType = z.enum(["catalog_search_rule_group"]) + +export const zSearchRuleType = z.enum(["catalog_search_rule"]) + +/** + * Attributes of a search rule group. Groups are attached to search profiles via `rule_groups` to activate query-time merchandising. + */ +export const zSearchRuleGroupAttributes = z.object({ + slug: z + .string() + .min(1) + .regex(/^[a-zA-Z0-9_.-]+$/), + description: z.string().optional(), +}) + +/** + * Request body for creating a search rule group. + */ +export const zCreateSearchRuleGroupRequest = z.object({ + data: z.object({ + type: zSearchRuleGroupType, + attributes: zSearchRuleGroupAttributes, + }), +}) + +/** + * Sparse updatable labels for a search rule group. Runtime rule fields are not accepted. + */ +export const zSearchRuleGroupPatchAttributes = z.object({ + slug: z + .string() + .min(1) + .regex(/^[a-zA-Z0-9_.-]+$/) + .optional(), + description: z.string().optional(), +}) + +/** + * Request body for updating a search rule group. + */ +export const zUpdateSearchRuleGroupRequest = z.object({ + data: z.object({ + type: zSearchRuleGroupType, + attributes: zSearchRuleGroupPatchAttributes, + }), +}) + +/** + * Defines when a search rule matches a shopper query. + */ +export const zSearchRuleTrigger = z.object({ + query: z.string().min(1).optional(), + match: z.enum(["exact", "contains", "browse"]).optional().default("exact"), +}) + +/** + * Represents the type of object being returned. Always `catalog_search_stopword_set`. + */ +export const zStopwordSetType = z.enum(["catalog_search_stopword_set"]) + +export const zStopwordSetAttributes = z.object({ + locale: z.string().optional(), + stopwords: z.array(z.string()).min(1), +}) + +export const zCreateStopwordSetRequest = z.object({ + data: z.object({ + type: zStopwordSetType, + attributes: zStopwordSetAttributes, + }), +}) + +export const zUpdateStopwordSetAttributes = z.object({ + stopwords: z.array(z.string()).min(1), +}) + +export const zUpdateStopwordSetRequest = z.object({ + data: z.object({ + id: z.string().uuid(), + type: zStopwordSetType, + attributes: zUpdateStopwordSetAttributes, + }), +}) + +/** + * Represents the type of object being returned. Always `catalog_search_synonym_set`. + */ +export const zSynonymSetType = z.enum(["catalog_search_synonym_set"]) + +export const zSynonymSetItem = z.object({ + id: z.string().regex(/^[a-zA-Z0-9_-]+$/), + synonyms: z.array(z.string()).min(1), + root: z.string().optional(), + locale: z.string().optional(), + symbols_to_index: z.array(z.string().length(1)).optional(), +}) + +export const zSynonymSetAttributes = z.object({ + name: z.string(), + items: z.array(zSynonymSetItem).min(1), +}) + +export const zCreateSynonymSetRequest = z.object({ + data: z.object({ + type: zSynonymSetType, + attributes: zSynonymSetAttributes, + }), +}) + +export const zUpdateSynonymSetAttributes = z.object({ + name: z.string().optional(), + items: z.array(zSynonymSetItem).min(1).optional(), +}) + +export const zUpdateSynonymSetRequest = z.object({ + data: z.object({ + id: z.string().uuid(), + type: zSynonymSetType, + attributes: zUpdateSynonymSetAttributes, + }), +}) + +export const zSearchField = z.object({ + name: z.string().min(1), + weight: z.number().int().gte(0).lte(15).optional(), + num_typos: z.number().int().gte(0).lte(2).optional(), + prefix: z.boolean().optional(), +}) + +/** + * When a search profile has multiple fields defined, this parameter determines how the representative text match score of a product is calculated. + * + * - `max_score (Default)`: In this mode, the products's representative score is simply the highest score from any single matching field. The field weights are used only as a tie-breaker if two products have the exact same highest score. This mode prioritizes the quality of the match in the single best-matching field. + * - `max_weight`: This mode uses the score from the matching field that has the highest weight. This means a partial, lower-quality match on a heavily weighted field (e.g., name) can be prioritized over a perfect match on a lower-weighted field (e.g., description). This mode prioritizes matches in the most important fields, regardless of match quality. + * - `sum_score`: This mode calculates a holistic score by summing the weighted scores from all matching fields. Its advantage is that it rewards products that match a query across multiple attributes. However, it carries the risk that a product with many weak, partial matches across several low-weighted fields could outrank a product with a single strong, perfect match in a high-weighted field. + * + */ +export const zTextMatchType = z.enum(["max_score", "max_weight", "sum_score"]) + +/** + * Defines a boosting rule that assigns a score to products matching a specific field value. + */ +export const zSearchBoostRule = z.object({ + condition: z.string().min(1), + weight: z.number().int(), +}) + +/** + * Fixes a product at a one-based global search result position. + */ +export const zSearchPinRule = z.object({ + product_id: z.string().uuid(), + position: z.number().int().gte(1), +}) + +/** + * Excludes a product from matching search results. + */ +export const zSearchHideRule = z.object({ + product_id: z.string().uuid(), +}) + +/** + * Actions applied when a rule matches. Provide at least one boost/bury condition, product pin, product hide, query replacement, or result filter. + */ +export const zSearchRuleActions = z.object({ + boosts: z.array(zSearchBoostRule).optional(), + pins: z.array(zSearchPinRule).optional(), + hides: z.array(zSearchHideRule).optional(), + replace_query: z.string().min(1).optional(), + filter_by: z.string().min(1).optional(), +}) + +/** + * Attributes of a search rule within a group. + */ +export const zSearchRuleAttributes = z.object({ + slug: z.string().optional(), + description: z.string().optional(), + execution_order: z.number().int().gte(1), + trigger: zSearchRuleTrigger, + actions: zSearchRuleActions, + stop_after_match: z.boolean().optional().default(false), +}) + +/** + * Request body for creating a search rule in a rule group. + */ +export const zCreateSearchRuleRequest = z.object({ + data: z.object({ + type: zSearchRuleType, + attributes: zSearchRuleAttributes, + }), +}) + +/** + * Sparse updatable attributes of a search rule. A rule always remains in its current group. + */ +export const zSearchRulePatchAttributes = z.object({ + slug: z.string().optional(), + description: z.string().optional(), + execution_order: z.number().int().gte(1).optional(), + trigger: zSearchRuleTrigger.optional(), + actions: zSearchRuleActions.optional(), + stop_after_match: z.boolean().optional(), +}) + +/** + * Request body for updating a search rule. + */ +export const zUpdateSearchRuleRequest = z.object({ + data: z.object({ + type: zSearchRuleType, + attributes: zSearchRulePatchAttributes, + }), +}) + +/** + * Optional synonym tuning applied at search time. These settings control how synonym + * matches are ranked and how query tokens are resolved against the synonym sets attached + * to the search profile. All fields are optional; defaults are noted on each field. + * They only have an observable effect when synonym sets are attached to the resolved profile. + * + */ +export const zSynonymSettings = z + .object({ + demote_synonym_match: z.boolean().optional(), + synonym_resolution_allowed_on_prefix: z.boolean().optional(), + number_of_typos_allowed_when_resolving_synonyms: z + .number() + .int() + .gte(0) + .lte(2) + .optional(), + }) + .nullable() + +/** + * Optional typo tolerance configuration applied at search time. + * All fields are optional; defaults are noted on each field. + * + */ +export const zTypoTolerance = z + .object({ + num_typos: z.number().int().gte(0).lte(2).optional(), + min_len_to_allow_single_character_correction: z + .number() + .int() + .gte(1) + .optional(), + min_len_to_allow_two_character_correction: z + .number() + .int() + .gte(1) + .optional(), + typo_tokens_threshold: z.number().int().gte(0).optional(), + drop_tokens_threshold: z.number().int().gte(0).optional(), + drop_tokens_mode: z.string().optional(), + enable_typos_for_numerical_tokens: z.boolean().optional(), + enable_typos_for_special_char_tokens: z.boolean().optional(), + split_join_tokens: z.enum(["fallback", "always", "off"]).optional(), + }) + .nullable() + +export const zSearchProfileUpdateAttributes = z.object({ + slug: z + .string() + .min(1) + .regex(/^[a-zA-Z0-9_.-]+$/) + .optional(), + description: z.string().optional(), + fields: z.array(zSearchField).min(1).optional(), + text_match_type: zTextMatchType.optional(), + filters: z.array(z.string().min(1)).optional(), + exclusions: z.array(z.string().min(1)).optional(), + boosts: z.array(zSearchBoostRule).optional(), + prefix: z.boolean().nullish(), + typo_tolerance: zTypoTolerance.optional(), + synonym_settings: zSynonymSettings.optional(), + synonym_sets: z.array(z.string().uuid()).optional(), + rule_groups: z.array(z.string().uuid()).optional(), + force_use_default_price_for_faceting_and_sorting: z.boolean().optional(), +}) + +export const zSearchProfileAttributes = z.object({ + slug: z + .string() + .min(1) + .regex(/^[a-zA-Z0-9_.-]+$/), + description: z.string().default(""), + fields: z.array(zSearchField).min(1), + text_match_type: zTextMatchType.optional(), + filters: z.array(z.string().min(1)).optional(), + exclusions: z.array(z.string().min(1)).optional(), + boosts: z.array(zSearchBoostRule).optional(), + prefix: z.boolean().optional(), + typo_tolerance: zTypoTolerance.optional(), + synonym_settings: zSynonymSettings.optional(), + synonym_sets: z.array(z.string().uuid()).optional(), + rule_groups: z.array(z.string().uuid()).optional(), + force_use_default_price_for_faceting_and_sorting: z.boolean().default(false), +}) + +/** + * Represents the type of object being returned. Always `catalog_search_profile`. + */ +export const zSearchProfileType = z.enum(["catalog_search_profile"]) + +export const zSearchProfileCreateRequestData = z.object({ + type: zSearchProfileType, + attributes: zSearchProfileAttributes, +}) + +export const zSearchProfileCreateRequest = z.object({ + data: zSearchProfileCreateRequestData, +}) + +export const zSearchProfileUpdateRequestData = z.object({ + id: z.string().uuid(), + type: zSearchProfileType, + attributes: zSearchProfileUpdateAttributes, +}) + +export const zSearchProfileUpdateRequest = z.object({ + data: zSearchProfileUpdateRequestData, +}) + +/** + * Represents the type of object being returned. Always `catalog_search_index`. + */ +export const zSearchIndexType = z.enum(["catalog_search_index"]) + +/** + * Specifies which fields to use for generating facets in search results. See [faceting](/guides/How-To/Catalogs/Search/faceting) for more details. + */ +export const zFacetByField = z.string() + +/** + * Applies conditions to narrow down search results based on specific field values. See [filtering](/guides/How-To/Catalogs/Search/filtering) for more details. + */ +export const zFilterByField = z.string() + +/** + * Orders search results by specified fields. See [sorting](/guides/How-To/Catalogs/Search/sorting) for more details. + */ +export const zSortByField = z.string() + +export const zSearchQuery = z.object({ + type: z.enum(["search", "autocomplete"]).optional(), + highlight_full_fields: z.string().optional(), + q: z.string().optional(), + facet_by: zFacetByField.optional(), + filter_by: zFilterByField.optional(), + sort_by: zSortByField.optional(), + max_facet_values: z.number().int().optional(), + page: z.number().int().optional(), + per_page: z.number().int().optional(), +}) + +export const zMultiSearchRequest = z.object({ + searches: z.array(zSearchQuery).min(1), +}) + +/** + * The resource owner, either `organization` or `store`. + */ +export const zResourceOwner = z.enum(["organization", "store"]) + +export const zIndexableFieldsMeta = z.object({ + owner: zResourceOwner, +}) + +export const zIndexableFields = z.object({ + id: z.string().uuid(), + type: zIndexableFieldsType, + attributes: zIndexableFieldsAttributes, + meta: zIndexableFieldsMeta, +}) + +export const zListIndexableFieldsResponse = z.object({ + data: z.array(zIndexableFields), +}) + +export const zIndexableFieldsResponse = z.object({ + data: zIndexableFields, +}) + +export const zSearchableFieldMeta = z.object({ + owner: zResourceOwner, +}) + +export const zSearchableField = z.object({ + id: z.string(), + type: zSearchableFieldType, + attributes: zSearchableFieldAttributes, + meta: zSearchableFieldMeta, +}) + +export const zIndexedFieldMeta = z.object({ + owner: zResourceOwner, +}) + +export const zIndexedField = z.object({ + id: z.string(), + type: zIndexedFieldType, + attributes: zIndexedFieldAttributes, + meta: zIndexedFieldMeta, +}) + +export const zSearchRuleGroupMeta = z.object({ + created_at: z.string().datetime(), + updated_at: z.string().datetime(), + owner: zResourceOwner, +}) + +/** + * A named container for search merchandising rules evaluated at query time. + */ +export const zSearchRuleGroup = z.object({ + id: z.string().uuid(), + type: zSearchRuleGroupType, + attributes: zSearchRuleGroupAttributes, + meta: zSearchRuleGroupMeta, +}) + +export const zSearchRuleGroupResponse = z.object({ + data: zSearchRuleGroup, +}) + +export const zSearchRuleMeta = z.object({ + created_at: z.string().datetime(), + updated_at: z.string().datetime(), + owner: zResourceOwner, +}) + +/** + * A single merchandising rule with a query trigger and boost/bury actions. + */ +export const zSearchRule = z.object({ + id: z.string().uuid(), + type: zSearchRuleType, + attributes: zSearchRuleAttributes, + meta: zSearchRuleMeta, +}) + +export const zSearchRuleResponse = z.object({ + data: zSearchRule, +}) + +export const zStopwordSetMeta = z.object({ + created_at: z.string().datetime(), + updated_at: z.string().datetime(), + owner: zResourceOwner, + sync_status: z.enum([ + "pending_sync", + "synced", + "sync_failed", + "pending_delete", + ]), + last_synced_at: z.string().datetime().optional(), +}) + +export const zStopwordSet = z.object({ + id: z.string().uuid(), + type: zStopwordSetType, + attributes: zStopwordSetAttributes, + meta: zStopwordSetMeta, +}) + +export const zStopwordSetResponse = z.object({ + data: zStopwordSet, +}) + +export const zSynonymSetMeta = z.object({ + created_at: z.string().datetime(), + updated_at: z.string().datetime(), + owner: zResourceOwner, + sync_status: z.enum([ + "pending_sync", + "synced", + "sync_failed", + "pending_delete", + ]), + last_synced_at: z.string().datetime().optional(), +}) + +export const zSynonymSet = z.object({ + id: z.string().uuid(), + type: zSynonymSetType, + attributes: zSynonymSetAttributes, + meta: zSynonymSetMeta, +}) + +export const zSynonymSetResponse = z.object({ + data: zSynonymSet, +}) + +export const zSearchProfileMeta = z.object({ + default: z.boolean(), + owner: zResourceOwner, +}) + +export const zSearchProfile = z.object({ + id: z.string().uuid(), + type: zSearchProfileType, + attributes: zSearchProfileAttributes, + meta: zSearchProfileMeta, +}) + +export const zSearchProfileResponse = z.object({ + data: zSearchProfile, +}) + +export const zSearchIndexMeta = z.object({ + catalog_id: z.string(), + release_id: z.string(), + out_of_sync: z.boolean(), + owner: zResourceOwner, +}) + +export const zSearchIndex = z.object({ + id: z.string().uuid(), + type: zSearchIndexType, + meta: zSearchIndexMeta, +}) + +/** + * Contains the results for the entire collection. + */ +export const zListResponseMetaResults = z.object({ + total: z.number().int(), +}) + +export const zListResponseMeta = z.object({ + results: zListResponseMetaResults, +}) + +export const zSearchableFieldsResponse = z.object({ + data: z.array(zSearchableField), + meta: zListResponseMeta, +}) + +export const zIndexedFieldsResponse = z.object({ + data: z.array(zIndexedField), + meta: zListResponseMeta, +}) + +export const zListSearchRuleGroupsResponse = z.object({ + data: z.array(zSearchRuleGroup), + meta: zListResponseMeta, +}) + +export const zListSearchRulesResponse = z.object({ + data: z.array(zSearchRule), + meta: zListResponseMeta, +}) + +export const zListStopwordSetsResponse = z.object({ + data: z.array(zStopwordSet), + meta: zListResponseMeta, +}) + +export const zListSynonymSetsResponse = z.object({ + data: z.array(zSynonymSet), + meta: zListResponseMeta, +}) + +export const zListSearchProfilesResponse = z.object({ + data: z.array(zSearchProfile), + meta: zListResponseMeta, +}) + +export const zListSearchIndexesResponse = z.object({ + data: z.array(zSearchIndex), + meta: zListResponseMeta, +}) + +export const zCatalogSearchJobAttributes = z.object({ + status: z.enum(["pending", "processing", "complete", "failed"]), + catalog_id: z.string().uuid().optional(), + catalog_release_id: z.string().uuid().optional(), + type: z.enum(["index-release", "delete-release", "reindex-tenant-releases"]), +}) + +/** + * Meta information of the job + */ +export const zCatalogSearchJobMeta = z.object({ + results: z.array(zJobMetaResult).optional(), + errors: z.array(zJobMetaError).optional(), +}) + +export const zCatalogSearchJob = z.object({ + id: z.string().uuid(), + type: z.enum(["job"]), + attributes: zCatalogSearchJobAttributes, + meta: zCatalogSearchJobMeta.optional(), +}) + +/** + * Product + * + * A product in a catalog with the following attributes. + */ +export const zCatalogSearchProduct = z.object({ + attributes: z.record(z.unknown()).optional(), + id: z.string().optional(), + relationships: z.record(z.unknown()).optional(), + type: z.string().optional(), + meta: z.record(z.unknown()).optional(), +}) + +export const zHit = z.object({ + document: z.union([zCatalogSearchProduct, zAutocompleteResponse]).optional(), + highlight: z.record(z.unknown()).optional(), + highlights: z.array(z.record(z.unknown())).optional(), + text_match_info: zTextMatchInfo.optional(), +}) + +export const zSearchResult = z.object({ + type: zSearchResultType.optional(), + facet_counts: z.array(zFacetCount).optional(), + found: z.number().int().optional(), + hits: z.array(zHit).optional(), + out_of: z.number().int().optional(), + page: z.number().int().optional(), + request_params: z.record(z.unknown()).optional(), + search_cutoff: z.boolean().optional(), + search_time_ms: z.number().int().optional(), + matched_rules: z.array(zMatchedRuleReference).optional(), +}) + +export const zMultiSearchResponse = z.object({ + results: z.array(zSearchResult).optional(), + included: zIncludedResponse.optional(), +}) + +export const zSearchResponse = zSearchResult.and( + z.object({ + included: zIncludedResponse.optional(), + }), +) + +export const zCatalogSearchError = z.object({ + status: z.string(), + title: z.string(), + detail: z.string().optional(), + meta: z.record(z.unknown()).optional(), +}) + +export const zCatalogSearchErrorResponse = z.object({ + errors: z.array(zCatalogSearchError), +}) + +/** + * The list of channels in which this catalog can be displayed. A channel is the shopping experience, such as a mobile app or web storefront. If empty, the catalog rule matches all channels. The channel will eventually be included in the bearer token that is used for authorization, but currently, you must set the `EP-Channel` header in your requests. + */ +export const zChannel = z.string() + +/** + * Tags are used to refine the eligibility criteria for a rule. Requests populate the catalog rule tag using the `EP-Context-Tag` header. + */ +export const zTag = z.string() + +/** + * Using the include parameter, you can retrieve top-level resources. + * + * - Files or main image. For example, `include=files,main_image`. + * - Component product data. For example, `include=component_products`. + * - Key attribute data, such as SKU or slug. + * + */ +export const zProductsInclude = z.array( + z.enum(["files", "main_image", "component_products"]), +) + +/** + * The currency used to resolve product price. If not supplied, the organization/store default currency is used. + */ +export const zCurrency = z.string() + +/** + * The slug of the search profile to use for this search. + * + * On shopper search (`/pcm/catalog/search`, `/pcm/catalog/multi-search`): used only when the matched catalog rule has no valid `search_profile_slug`. When the catalog rule carries a non-blank slug that resolves to a profile, that rule profile is used and this query parameter is silently ignored. Blank or whitespace-only values are treated as omitted. An invalid non-blank slug returns 400 with detail `Search profile '{slug}' not found`. + * + * On admin search (`/pcm/catalogs/{catalog_id}/releases/{release_id}/…`): catalog rule profiles are not applied. Resolution is this query parameter, then the tenant default profile, then the built-in default. + * + * Omit this parameter to use the tenant default profile (or the built-in default when no tenant default exists). The applied slug is returned in the `EP-Search-Profile` response header. + * + */ +export const zSearchProfile2 = z.string().regex(/^[a-zA-Z0-9_.-]+$/) + +/** + * Type of search operation to perform + */ +export const zSearchQueryParamType = z.enum(["search", "autocomplete"]) + +/** + * Comma-separated list of fields to highlight + */ +export const zSearchQueryParamHighlightFullFields = z.string() + +/** + * Search query + */ +export const zSearchQueryParamQ = z.string() + +/** + * Specifies which fields to use for generating facets in search results. See [faceting](/guides/How-To/Catalogs/Search/faceting) for more details. + */ +export const zSearchQueryParamFacetBy = z.string() + +/** + * Applies conditions to narrow down search results based on specific field values. See [filtering](/guides/How-To/Catalogs/Search/filtering) for more details. + */ +export const zSearchQueryParamFilterBy = z.string() + +/** + * Orders search results by specified fields. See [sorting](/guides/How-To/Catalogs/Search/sorting) for more details. + */ +export const zSearchQueryParamSortBy = z.string() + +/** + * Maximum number of facet values to return + */ +export const zSearchQueryParamMaxFacetValues = z.number().int() + +export const zSimulatedShopperDate = z.string() + +/** + * The language and locale your storefront prefers. See [Accept-Language](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Language). + */ +export const zCatalogSearchacceptLanguage = z.string() + +/** + * Supply a comma delimited list of pricebook ids to be used to lookup product prices from when the catalog supports price segmentation. The first pricebook will be highest priority (if more than one is supplied) and the rest in descending priority order. Used only for admin endpoints that dont support shopper context lookup. + */ +export const zCatalogSearchpricebookIdsForPriceSegmentationPreview = z + .array(z.string()) + .max(5) + +/** + * Supply a comma delimited list of pricebook ids to be listed in meta sections available prices . 'all' is a permitted value and will ensure all available prices for a product are shown. 'all' is not recommended if there are lots(10+) of available prices due the large response size. + */ +export const zCatalogSearchpricebookIdsOfAvailablePricesToShow = z + .array(z.string()) + .max(5) + +export const zPostMultiSearchBody = zMultiSearchRequest + +export const zPostMultiSearchHeaders = z.object({ + "accept-language": z.string().optional(), + "EP-Channel": z.string().optional(), + "EP-Context-Tag": z.string().optional(), + "x-moltin-currency": z.string().optional(), + "EP-Simulated-Shopper-Date": z.string().optional(), +}) + +export const zPostMultiSearchQuery = z.object({ + include: z + .array(z.enum(["files", "main_image", "component_products"])) + .optional(), + search_profile: z + .string() + .regex(/^[a-zA-Z0-9_.-]+$/) + .optional(), +}) + +/** + * Multi-search results + */ +export const zPostMultiSearchResponse = zMultiSearchResponse + +export const zMultiSearchByCatalogReleaseBody = zMultiSearchRequest + +export const zMultiSearchByCatalogReleaseHeaders = z.object({ + "accept-language": z.string().optional(), + "x-moltin-currency": z.string().optional(), + "EP-Pricebook-IDs-For-Price-Segmentation-Preview": z + .array(z.string()) + .max(5) + .optional(), + "EP-Pricebook-IDs-Of-Available-Prices-To-Show": z + .array(z.string()) + .max(5) + .optional(), + "EP-Simulated-Shopper-Date": z.string().optional(), +}) + +export const zMultiSearchByCatalogReleasePath = z.object({ + catalog_id: z.string(), + release_id: z.string(), +}) + +export const zMultiSearchByCatalogReleaseQuery = z.object({ + include: z + .array(z.enum(["files", "main_image", "component_products"])) + .optional(), + search_profile: z + .string() + .regex(/^[a-zA-Z0-9_.-]+$/) + .optional(), +}) + +/** + * Multi-search results + */ +export const zMultiSearchByCatalogReleaseResponse = zMultiSearchResponse + +export const zSearchByContextHeaders = z.object({ + "accept-language": z.string().optional(), + "EP-Channel": z.string().optional(), + "EP-Context-Tag": z.string().optional(), + "x-moltin-currency": z.string().optional(), + "EP-Simulated-Shopper-Date": z.string().optional(), +}) + +export const zSearchByContextQuery = z.object({ + include: z + .array(z.enum(["files", "main_image", "component_products"])) + .optional(), + search_profile: z + .string() + .regex(/^[a-zA-Z0-9_.-]+$/) + .optional(), + type: z.enum(["search", "autocomplete"]).optional(), + highlight_full_fields: z.string().optional(), + q: z.string(), + facet_by: z.string().optional(), + filter_by: z.string().optional(), + sort_by: z.string().optional(), + max_facet_values: z.number().int().optional(), + page: z.number().int().optional(), + per_page: z.number().int().optional(), +}) + +/** + * Search results + */ +export const zSearchByContextResponse = zSearchResponse + +export const zSearchByCatalogReleaseHeaders = z.object({ + "accept-language": z.string().optional(), + "x-moltin-currency": z.string().optional(), + "EP-Pricebook-IDs-For-Price-Segmentation-Preview": z + .array(z.string()) + .max(5) + .optional(), + "EP-Pricebook-IDs-Of-Available-Prices-To-Show": z + .array(z.string()) + .max(5) + .optional(), + "EP-Simulated-Shopper-Date": z.string().optional(), +}) + +export const zSearchByCatalogReleasePath = z.object({ + catalog_id: z.string(), + release_id: z.string(), +}) + +export const zSearchByCatalogReleaseQuery = z.object({ + include: z + .array(z.enum(["files", "main_image", "component_products"])) + .optional(), + search_profile: z + .string() + .regex(/^[a-zA-Z0-9_.-]+$/) + .optional(), + type: z.enum(["search", "autocomplete"]).optional(), + highlight_full_fields: z.string().optional(), + q: z.string(), + facet_by: z.string().optional(), + filter_by: z.string().optional(), + sort_by: z.string().optional(), + max_facet_values: z.number().int().optional(), + page: z.number().int().optional(), + per_page: z.number().int().optional(), +}) + +/** + * Search results + */ +export const zSearchByCatalogReleaseResponse = zSearchResponse + +export const zReindexTenantReleasesBody = zReindexTenantReleasesJobRequest + +/** + * Reindex tenant releases request successful + */ +export const zReindexTenantReleasesResponse = zCatalogSearchJob + +/** + * List indexable fields + */ +export const zListIndexableFieldsResponse2 = zListIndexableFieldsResponse + +export const zCreateIndexableFieldsBody = zIndexableFieldsCreateRequest + +/** + * Successfully created indexable fields + */ +export const zCreateIndexableFieldsResponse = zIndexableFieldsResponse + +export const zDeleteIndexableFieldsPath = z.object({ + indexable_fields_id: z.string().uuid(), +}) + +/** + * Successfully deleted indexable fields + */ +export const zDeleteIndexableFieldsResponse = z.void() + +export const zGetIndexableFieldsPath = z.object({ + indexable_fields_id: z.string().uuid(), +}) + +/** + * Get indexable fields + */ +export const zGetIndexableFieldsResponse = zIndexableFieldsResponse + +export const zUpdateIndexableFieldsBody = zIndexableFieldsUpdateRequest + +export const zUpdateIndexableFieldsPath = z.object({ + indexable_fields_id: z.string().uuid(), +}) + +/** + * Successfully updated indexable fields + */ +export const zUpdateIndexableFieldsResponse = zIndexableFieldsResponse + +/** + * List searchable fields + */ +export const zListSearchableFieldsResponse = zSearchableFieldsResponse + +/** + * List indexed fields + */ +export const zListIndexedFieldsResponse = zIndexedFieldsResponse + +/** + * List search profiles + */ +export const zListSearchProfilesResponse2 = zListSearchProfilesResponse + +export const zCreateSearchProfileBody = zSearchProfileCreateRequest + +/** + * Successfully created search profile + */ +export const zCreateSearchProfileResponse = zSearchProfileResponse + +export const zDeleteSearchProfilePath = z.object({ + search_profile_id: z.string().uuid(), +}) + +/** + * Successfully deleted search profile + */ +export const zDeleteSearchProfileResponse = z.void() + +export const zGetSearchProfilePath = z.object({ + search_profile_id: z.string(), +}) + +/** + * Successfully retrieved search profile + */ +export const zGetSearchProfileResponse = zSearchProfileResponse + +export const zUpdateSearchProfileBody = zSearchProfileUpdateRequest + +export const zUpdateSearchProfilePath = z.object({ + search_profile_id: z.string().uuid(), +}) + +/** + * Successfully updated search profile + */ +export const zUpdateSearchProfileResponse = zSearchProfileResponse + +export const zSetDefaultSearchProfilePath = z.object({ + search_profile_id: z.string().uuid(), +}) + +/** + * Successfully updated the search profile + */ +export const zSetDefaultSearchProfileResponse = zSearchProfileResponse + +/** + * Successfully listed stopword sets + */ +export const zListStopwordSetsResponse2 = zListStopwordSetsResponse + +export const zCreateStopwordSetBody = zCreateStopwordSetRequest + +/** + * Successfully created stopword set + */ +export const zCreateStopwordSetResponse = zStopwordSetResponse + +export const zDeleteStopwordSetPath = z.object({ + stopword_set_id: z.string().uuid(), +}) + +/** + * Stopword set marked for deletion + */ +export const zDeleteStopwordSetResponse = z.void() + +export const zGetStopwordSetPath = z.object({ + stopword_set_id: z.string().uuid(), +}) + +/** + * Successfully retrieved stopword set + */ +export const zGetStopwordSetResponse = zStopwordSetResponse + +export const zUpdateStopwordSetBody = zUpdateStopwordSetRequest + +export const zUpdateStopwordSetPath = z.object({ + stopword_set_id: z.string().uuid(), +}) + +/** + * Successfully updated stopword set + */ +export const zUpdateStopwordSetResponse = zStopwordSetResponse + +/** + * Successfully listed synonym sets + */ +export const zListSynonymSetsResponse2 = zListSynonymSetsResponse + +export const zCreateSynonymSetBody = zCreateSynonymSetRequest + +/** + * Successfully created synonym set + */ +export const zCreateSynonymSetResponse = zSynonymSetResponse + +export const zDeleteSynonymSetPath = z.object({ + synonym_set_id: z.string().uuid(), +}) + +/** + * Synonym set marked for deletion + */ +export const zDeleteSynonymSetResponse = z.void() + +export const zGetSynonymSetPath = z.object({ + synonym_set_id: z.string().uuid(), +}) + +/** + * Successfully retrieved synonym set + */ +export const zGetSynonymSetResponse = zSynonymSetResponse + +export const zUpdateSynonymSetBody = zUpdateSynonymSetRequest + +export const zUpdateSynonymSetPath = z.object({ + synonym_set_id: z.string().uuid(), +}) + +/** + * Successfully updated synonym set + */ +export const zUpdateSynonymSetResponse = zSynonymSetResponse + +/** + * Successfully listed search rule groups + */ +export const zListSearchRuleGroupsResponse2 = zListSearchRuleGroupsResponse + +export const zCreateSearchRuleGroupBody = zCreateSearchRuleGroupRequest + +/** + * Successfully created search rule group + */ +export const zCreateSearchRuleGroupResponse = zSearchRuleGroupResponse + +export const zDeleteSearchRuleGroupPath = z.object({ + rule_group_id: z.string().uuid(), +}) + +/** + * Successfully deleted search rule group + */ +export const zDeleteSearchRuleGroupResponse = z.void() + +export const zGetSearchRuleGroupPath = z.object({ + rule_group_id: z.string().uuid(), +}) + +/** + * Successfully retrieved search rule group + */ +export const zGetSearchRuleGroupResponse = zSearchRuleGroupResponse + +export const zUpdateSearchRuleGroupBody = zUpdateSearchRuleGroupRequest + +export const zUpdateSearchRuleGroupPath = z.object({ + rule_group_id: z.string().uuid(), +}) + +/** + * Successfully updated search rule group + */ +export const zUpdateSearchRuleGroupResponse = zSearchRuleGroupResponse + +export const zListSearchRulesPath = z.object({ + rule_group_id: z.string().uuid(), +}) + +/** + * Successfully listed search rules + */ +export const zListSearchRulesResponse2 = zListSearchRulesResponse + +export const zCreateSearchRuleBody = zCreateSearchRuleRequest + +export const zCreateSearchRulePath = z.object({ + rule_group_id: z.string().uuid(), +}) + +/** + * Successfully created search rule + */ +export const zCreateSearchRuleResponse = zSearchRuleResponse + +export const zDeleteSearchRulePath = z.object({ + rule_group_id: z.string().uuid(), + rule_id: z.string().uuid(), +}) + +/** + * Successfully deleted search rule + */ +export const zDeleteSearchRuleResponse = z.void() + +export const zGetSearchRulePath = z.object({ + rule_group_id: z.string().uuid(), + rule_id: z.string().uuid(), +}) + +/** + * Successfully retrieved search rule + */ +export const zGetSearchRuleResponse = zSearchRuleResponse + +export const zUpdateSearchRuleBody = zUpdateSearchRuleRequest + +export const zUpdateSearchRulePath = z.object({ + rule_group_id: z.string().uuid(), + rule_id: z.string().uuid(), +}) + +/** + * Successfully updated search rule + */ +export const zUpdateSearchRuleResponse = zSearchRuleResponse + +export const zMoveSearchRuleBody = zMoveSearchRuleRequest + +export const zMoveSearchRulePath = z.object({ + rule_group_id: z.string().uuid(), + rule_id: z.string().uuid(), +}) + +/** + * Successfully moved search rule + */ +export const zMoveSearchRuleResponse = zSearchRuleResponse + +export const zListSearchIndexesQuery = z.object({ + out_of_sync: z.boolean().optional(), +}) + +/** + * List search indexes + */ +export const zListSearchIndexesResponse2 = zListSearchIndexesResponse diff --git a/packages/sdks/catalog-search/src/index.ts b/packages/sdks/catalog-search/src/index.ts index 0a3088675..ef111b853 100644 --- a/packages/sdks/catalog-search/src/index.ts +++ b/packages/sdks/catalog-search/src/index.ts @@ -1,6 +1,44 @@ export * from "./client" -import { createClient } from "@hey-api/client-fetch" -import type { Client } from "@hey-api/client-fetch" -export { createClient } -export type { Client } -export { client } from "./client/sdk.gen" + +export { createClient, createConfig } from "./client/client" +export type { + Client, + Config, + RequestOptions, + RequestResult, +} from "./client/client" + +export type { CreateClientConfig } from "./client/client.gen" + +export { client } from "./client/client.gen" + +export { createCatalogSearchClient } from "./runtime" +export type { CatalogSearchClientOptions } from "./runtime" + +export { + TokenRequestError, + clientCredentialsProvider, + createAuthCallback, + createAuthenticatedFetch, + createConfiguredClient, + createRetryFetch, + createTokenSource, + implicitProvider, + localStorageAdapter, + memoryStorage, + staticTokenProvider, +} from "@epcc-sdk/sdks-runtime" +export type { + AuthenticatedFetchOptions, + ClientCredentialsOptions, + GrantOptions, + ImplicitOptions, + RetryFetchOptions, + StorageAdapter, + TokenProvider, + TokenRequestFailure, + TokenRequestReason, + TokenResponse, + TokenSource, + TokenSourceOptions, +} from "@epcc-sdk/sdks-runtime" diff --git a/packages/sdks/catalog-search/src/runtime.test.ts b/packages/sdks/catalog-search/src/runtime.test.ts new file mode 100644 index 000000000..b18239b00 --- /dev/null +++ b/packages/sdks/catalog-search/src/runtime.test.ts @@ -0,0 +1,139 @@ +import { describe, expect, it, vi } from "vitest" +import { createCatalogSearchClient, listStopwordSets } from "./index" +import { + zListStopwordSetsResponse, + zReindexTenantReleasesResponse, +} from "./zod" + +const stopwordSetsFromPropertyExamples = { + data: [ + { + id: "550e8400-e29b-41d4-a716-446655440000", + type: "catalog_search_stopword_set", + attributes: { + locale: "en", + stopwords: ["the", "a", "an", "is"], + }, + meta: { + created_at: "2026-03-05T12:00:00Z", + updated_at: "2026-03-05T12:00:00Z", + owner: "organization", + sync_status: "pending_sync", + last_synced_at: "2026-03-05T12:01:00Z", + }, + }, + ], + meta: { results: { total: 1 } }, +} + +const baseUrl = "https://useast.api.elasticpath.com" + +function stubFetch(...statuses: number[]) { + const requests: Request[] = [] + const transport = vi.fn( + async (input: RequestInfo | URL, init?: RequestInit) => { + const request = + input instanceof Request && init === undefined + ? input + : new Request(input, init) + requests.push(request) + const status = + statuses[Math.min(requests.length - 1, statuses.length - 1)]! + return new Response( + status === 200 ? JSON.stringify(stopwordSetsFromPropertyExamples) : "{}", + { status, headers: { "Content-Type": "application/json" } }, + ) + }, + ) as unknown as typeof fetch + return { requests, transport } +} + +describe("createCatalogSearchClient", () => { + it("sends listStopwordSets under /pcm at the host root with the bearer token", async () => { + const { requests, transport } = stubFetch(200) + const client = createCatalogSearchClient({ + baseUrl, + token: "pre-issued", + fetch: transport, + }) + + const { data } = await listStopwordSets({ client }) + + expect(requests).toHaveLength(1) + expect(requests[0]!.method).toBe("GET") + expect(requests[0]!.url).toBe( + `${baseUrl}/pcm/catalogs/search/stopword-sets`, + ) + expect(requests[0]!.headers.get("Authorization")).toBe("Bearer pre-issued") + expect(data).toEqual(stopwordSetsFromPropertyExamples) + }) + + it("obtains a new token on a 401 and replays the request once", async () => { + const { requests, transport } = stubFetch(401, 200) + let minted = 0 + const client = createCatalogSearchClient({ + baseUrl, + provider: async () => { + minted += 1 + return { access_token: `token-${minted}` } + }, + fetch: transport, + }) + + const { data, response } = await listStopwordSets({ client }) + + expect(requests.map((r) => r.headers.get("Authorization"))).toEqual([ + "Bearer token-1", + "Bearer token-2", + ]) + expect(response?.status).toBe(200) + expect(data).toEqual(stopwordSetsFromPropertyExamples) + }) +}) + +describe("the shared client", () => { + it("sends an operation called without a client to EU West with no /v2", async () => { + const { requests, transport } = stubFetch(200) + + await listStopwordSets({ fetch: transport }) + + expect(requests[0]!.url).toBe( + "https://euwest.api.elasticpath.com/pcm/catalogs/search/stopword-sets", + ) + }) +}) + +describe("the /zod entry", () => { + it("parses the listStopwordSets response and rejects a created_at that is not a string", () => { + expect( + zListStopwordSetsResponse.parse(stopwordSetsFromPropertyExamples), + ).toEqual(stopwordSetsFromPropertyExamples) + + const [set] = stopwordSetsFromPropertyExamples.data + const tampered = { + ...stopwordSetsFromPropertyExamples, + data: [{ ...set, meta: { ...set!.meta, created_at: 1772712000000 } }], + } + expect(zListStopwordSetsResponse.safeParse(tampered).success).toBe(false) + }) + + it("reports a reindex job without a type as missing it, not as the spec's out-of-enum default", () => { + const job = { + id: "4c9efe34-57bb-4117-abed-184008d3ae0a", + type: "job", + attributes: { status: "pending", type: "reindex-tenant-releases" }, + } + expect(zReindexTenantReleasesResponse.parse(job)).toEqual(job) + + const withoutType = { ...job, attributes: { status: "pending" } } + const result = zReindexTenantReleasesResponse.safeParse(withoutType) + expect(result.success).toBe(false) + expect(result.error?.issues).toEqual([ + expect.objectContaining({ + code: "invalid_type", + received: "undefined", + path: ["attributes", "type"], + }), + ]) + }) +}) diff --git a/packages/sdks/catalog-search/src/runtime.ts b/packages/sdks/catalog-search/src/runtime.ts new file mode 100644 index 000000000..f5538a22c --- /dev/null +++ b/packages/sdks/catalog-search/src/runtime.ts @@ -0,0 +1,12 @@ +import { createConfiguredClient } from "@epcc-sdk/sdks-runtime" +import type { ConfiguredClientOptions } from "@epcc-sdk/sdks-runtime" +import { createClient, createConfig } from "./client/client" +import type { Client, Config } from "./client/client" + +export type CatalogSearchClientOptions = ConfiguredClientOptions + +export function createCatalogSearchClient( + options: CatalogSearchClientOptions, +): Client { + return createConfiguredClient({ createClient, createConfig }, options) +} diff --git a/packages/sdks/catalog-search/src/zod.ts b/packages/sdks/catalog-search/src/zod.ts new file mode 100644 index 000000000..584e3f347 --- /dev/null +++ b/packages/sdks/catalog-search/src/zod.ts @@ -0,0 +1 @@ +export * from "./client/zod.gen" diff --git a/packages/sdks/catalog-search/test-cjs-minimal.cjs b/packages/sdks/catalog-search/test-cjs-minimal.cjs new file mode 100644 index 000000000..226acd51b --- /dev/null +++ b/packages/sdks/catalog-search/test-cjs-minimal.cjs @@ -0,0 +1,5 @@ +// This file is used to test that CommonJS requires work correctly +const CatalogSearch = require("./dist/index.cjs") + +console.log("CatalogSearch:", Object.keys(CatalogSearch)) +console.log("Test successful!") diff --git a/packages/sdks/catalog-search/test-esm-minimal.mjs b/packages/sdks/catalog-search/test-esm-minimal.mjs new file mode 100644 index 000000000..9143d2594 --- /dev/null +++ b/packages/sdks/catalog-search/test-esm-minimal.mjs @@ -0,0 +1,5 @@ +// This file is used to test that ESM imports work correctly +import * as CatalogSearch from "./dist/index.mjs" + +console.log("CatalogSearch:", Object.keys(CatalogSearch)) +console.log("Test successful!") diff --git a/packages/sdks/catalog-search/tsup.config.ts b/packages/sdks/catalog-search/tsup.config.ts index 23233fd30..91c898b67 100644 --- a/packages/sdks/catalog-search/tsup.config.ts +++ b/packages/sdks/catalog-search/tsup.config.ts @@ -6,7 +6,7 @@ import { } from "esbuild-fix-imports-plugin" export default defineConfig({ - entry: ["src/**/*.ts"], + entry: ["src/**/*.ts", "!src/**/*.test.ts"], format: ["esm", "cjs"], dts: true, splitting: false, @@ -19,7 +19,7 @@ export default defineConfig({ fixFolderImportsPlugin(), fixExtensionsPlugin(), ], - external: ["@hey-api/client-fetch"], + external: ["zod", "zod/v3"], outDir: "dist", outExtension(ctx) { return { diff --git a/packages/sdks/catalog-search/vitest.config.ts b/packages/sdks/catalog-search/vitest.config.ts new file mode 100644 index 000000000..b7b707f74 --- /dev/null +++ b/packages/sdks/catalog-search/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config" + +export default defineConfig({ + test: { + include: ["**/*.{test,spec}.{js,ts}"], + }, +}) diff --git a/packages/sdks/specs/config/redocly.yaml b/packages/sdks/specs/config/redocly.yaml index 3fbab0c07..6c7522eb0 100644 --- a/packages/sdks/specs/config/redocly.yaml +++ b/packages/sdks/specs/config/redocly.yaml @@ -30,6 +30,7 @@ apis: override/component-merge: mergeRef: - ../overrides/cart_checkout_item_union.yaml + - ../overrides/cart_checkout_service_corrections.yaml authentication@v1: root: ../authentication.yaml output: ../bundled/authentication.yaml @@ -403,6 +404,8 @@ apis: output: ../bundled/catalog_search_standalone.yaml root: *catalog_search_root preprocessors: + ops-extras/remove-v2-server: true + ops-extras/remove-invalid-enum-defaults: true ops-extras/prefix-components: prefix: CatalogSearch targets: diff --git a/packages/sdks/specs/overrides/cart_checkout_service_corrections.yaml b/packages/sdks/specs/overrides/cart_checkout_service_corrections.yaml new file mode 100644 index 000000000..c460b1f7f --- /dev/null +++ b/packages/sdks/specs/overrides/cart_checkout_service_corrections.yaml @@ -0,0 +1,74 @@ +paths: + /v2/carts/{cartID}/items/{cartitemID}/custom-discounts: + post: + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/CartsCustomDiscountsCreateRequest' +components: + schemas: + CartsBulkTaxes: + properties: + data: + items: + properties: + meta: + description: Targets the tax item at a component product of the bundle the cart item holds, instead of at the cart item itself. + type: object + additionalProperties: false + properties: + component_product_id: + description: The product ID of the bundle component the tax item applies to. + type: string + format: uuid + minLength: 1 + CartsCustomDiscountsEntityRequest: + properties: + data: + $ref: '#/components/schemas/CartsCustomDiscountsUpdateObject' + CartsCustomDiscountsUpdateObject: + title: CartsCustomDiscountsUpdateObject + type: object + required: + - type + properties: + amount: + description: Specifies an amount to be applied for the custom discount, in the currency's smallest unit. It must be less than zero. + type: integer + exclusiveMaximum: 0 + examples: + - -1000 + description: + description: Specifies a description for the custom discount. + type: string + examples: + - Custom discount description + discount_code: + description: Specifies the discount code used for the custom discount. + type: string + examples: + - cart-custom-promo-code + discount_engine: + description: Specifies from where the custom discount is applied. For example, Talon.one. + type: string + examples: + - Custom Discount Engine + external_id: + description: Specifies an external id for the custom discount. + type: string + examples: + - custom-discount-external-id + type: + description: Specifies the type of the resource. Always `custom_discount`. + type: string + const: custom_discount + CartsCustomDiscountsCreateRequest: + title: CartsCustomDiscountsCreateRequest + type: object + required: + - data + properties: + data: + $ref: '#/components/schemas/CartsCustomDiscountsObject' diff --git a/packages/sdks/specs/patches/README.md b/packages/sdks/specs/patches/README.md index 0bbadeb44..abf654df6 100644 --- a/packages/sdks/specs/patches/README.md +++ b/packages/sdks/specs/patches/README.md @@ -73,6 +73,29 @@ the same file. `bulkUpdateItemsInCart` 200 had no schema at all before, so taking canonical's `CartItemCollectionResponse` there is purely additive — leave it on canonical. +`cart-checkout-standalone@v1` also merges `overrides/cart_checkout_service_corrections.yaml`, +after the union file, where canonical disagrees with the service (orders.svc). The join entry +does not, so `sdks-shopper` is unchanged. + +- Each bulk tax item (`CartsBulkTaxes.data[]`) takes an optional + `meta: { component_product_id }`, a uuid, which targets a component product of the bundle the + cart item holds. The service validates and routes it, and canonical's own description and + `bulkBundleComponentTaxItems` example send it, but its schema leaves `meta` out, so that example + did not compile and `/zod` stripped `meta`. `CartsBulkTaxes` is also the response schema, so the + response types gain the optional `meta` too, although the service does not return it. +- The custom discount update bodies (`CartsCustomDiscountsEntityRequest.data`, used by the cart + and cart item `PUT .../custom-discounts/{customdiscountID}`) point at a new + `CartsCustomDiscountsUpdateObject` whose `amount` is a negative integer. Canonical points them at + `CartsCustomDiscountsResponseObject`, whose `amount` is the response's + `{ amount, currency, formatted }` object, and the service rejects that with a 400 + ("Expected: integer, given: object"); it accepts only the integer, as its update schema says. +- The cart item custom discount create body (`POST .../items/{cartitemID}/custom-discounts`) is a + new `CartsCustomDiscountsCreateRequest`, `{ data: CartsCustomDiscountsObject }`. Canonical + declares the bare `CartsCustomDiscountsObject`, and the service rejects that with a 422 ("The + data field is required"); its create schema requires the `data` wrapper. + +Delete the entry once canonical agrees. + Everything else can be taken from canonical as-is. `CartItemResponse` itself is safe to take from canonical: it is a superset of the old narrow "Cart Item Relationship" schema, and the union members `allOf` onto it, so they only gain fields. @@ -465,6 +488,19 @@ one operation. Confirm against a live store, then merge. `searchByContext` is canonical's other shopper operation and is not on the allow-list. Adding it is a one-line change and a deliberate one; this triage kept the surface as published. +`catalog_search-standalone@v1`, which `@epcc-sdk/sdks-catalog-search` generates from, makes two +corrections the shopper join's `catalog_search@v1` does not, both as preprocessors, so the spec +stays a plain copy: + +- `remove-v2-server` drops the `/v2` from the spec's server URLs. The service answers at + `/pcm/...` and returns 404 at `/v2/pcm/...`. +- `remove-invalid-enum-defaults` deletes a `default` that is not one of its schema's `enum` + values. `JobAttributes.type` declares `default: index`, which is not a job type. As declared, + 0.99 emits `.default("index")` on a `z.enum` that cannot hold it, the zod declarations fail to + compile, and the package build fails. The service always sends `type`. + +Remove each once canonical agrees. + ## `permissions.yaml` Not a divergence — it is a plain copy of canonical and refreshable. It is listed here for the diff --git a/packages/sdks/specs/plugins/ops-extra.js b/packages/sdks/specs/plugins/ops-extra.js index 5e42674ca..9e65e84d9 100644 --- a/packages/sdks/specs/plugins/ops-extra.js +++ b/packages/sdks/specs/plugins/ops-extra.js @@ -1,5 +1,6 @@ const PrefixPaths = require("./preprocessors/prefix-paths.js") const RemoveV2Server = require("./preprocessors/remove-v2-server.js") +const RemoveInvalidEnumDefaults = require("./preprocessors/remove-invalid-enum-defaults.js") const ExcludeSchemasByExtension = require("./preprocessors/exclude-schema-by-extension.js") const RenameSchemas = require("./preprocessors/rename-schemas.js") const FilterOperationsByExtension = require("./preprocessors/filter-operations.js") @@ -13,6 +14,7 @@ function opsExtrasPlugin() { oas3: { "prefix-paths": PrefixPaths, "remove-v2-server": RemoveV2Server, + "remove-invalid-enum-defaults": RemoveInvalidEnumDefaults, "exclude-schema-by-extension": ExcludeSchemasByExtension, "rename-schemas": RenameSchemas, "filter-operations-by-extension": FilterOperationsByExtension, diff --git a/packages/sdks/specs/plugins/preprocessors/remove-invalid-enum-defaults.js b/packages/sdks/specs/plugins/preprocessors/remove-invalid-enum-defaults.js new file mode 100644 index 000000000..cf3b35ceb --- /dev/null +++ b/packages/sdks/specs/plugins/preprocessors/remove-invalid-enum-defaults.js @@ -0,0 +1,21 @@ +const RemoveInvalidEnumDefaults = (_props) => { + return { + Schema: { + leave(schema) { + if (hasDefaultOutsideEnum(schema)) { + delete schema.default + } + }, + }, + } +} + +function hasDefaultOutsideEnum(schema) { + return ( + Array.isArray(schema.enum) && + "default" in schema && + !schema.enum.includes(schema.default) + ) +} + +module.exports = RemoveInvalidEnumDefaults