From 9450ea469048b4d0a0dd858076e98b8f2ab638e5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 02:19:56 +0000 Subject: [PATCH 01/25] chore(internal): update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 2412bb7..c85fe68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .prism.log +.stdy.log node_modules yarn-error.log codegen.log From be93869d4fc6fdaa81a0f80d6f2a76dcb4634273 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 02:10:37 +0000 Subject: [PATCH 02/25] chore(ci): skip lint on metadata-only changes Note that we still want to run tests, as these depend on the metadata. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89792b5..7c2bdfb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/superwall-api-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 @@ -43,7 +43,7 @@ jobs: timeout-minutes: 5 name: build runs-on: ${{ github.repository == 'stainless-sdks/superwall-api-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') permissions: contents: read id-token: write From 4a22fbf0e305a352d50c703cb9ef0d63d05e62f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 12:14:06 +0000 Subject: [PATCH 03/25] feat(api): api update --- .stats.yml | 4 ++-- src/resources/entitlements/grants.ts | 6 ++++++ src/resources/grants.ts | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index adad44b..5a77a68 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-cf8b91e02da0ef29a715489a87e5aa43ebece4919bad09cc5cff2da1a9c91064.yml -openapi_spec_hash: 24fbfaf86db5cf138223595effa796e4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-01c1b871452e4dda594676e2ec9a4dc4c9a466f44d60c5942cf4dcdf4fcb32b2.yml +openapi_spec_hash: 20c2a063b52d02749067d2aa8459a82e config_hash: dfc8fae1943177a610a7d4985af30c54 diff --git a/src/resources/entitlements/grants.ts b/src/resources/entitlements/grants.ts index 8744a9c..88a27b2 100644 --- a/src/resources/entitlements/grants.ts +++ b/src/resources/entitlements/grants.ts @@ -220,6 +220,9 @@ export interface GrantCreateParams { } export interface GrantListParams { + /** + * a string to be decoded into a number + */ ending_before?: string; /** @@ -237,6 +240,9 @@ export interface GrantListParams { */ limit?: string; + /** + * a string to be decoded into a number + */ starting_after?: string; } diff --git a/src/resources/grants.ts b/src/resources/grants.ts index ab1af10..18c6cd6 100644 --- a/src/resources/grants.ts +++ b/src/resources/grants.ts @@ -107,6 +107,9 @@ export interface GrantListParams { device_id?: string; + /** + * a string to be decoded into a number + */ ending_before?: string; /** @@ -124,6 +127,9 @@ export interface GrantListParams { */ limit?: string; + /** + * a string to be decoded into a number + */ starting_after?: string; user_id?: string; From faefefe4cfc18701cdfc7c7658758a5ba5473fb1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 21:13:57 +0000 Subject: [PATCH 04/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5a77a68..13fa784 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-01c1b871452e4dda594676e2ec9a4dc4c9a466f44d60c5942cf4dcdf4fcb32b2.yml -openapi_spec_hash: 20c2a063b52d02749067d2aa8459a82e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-5697f594aff39e316e13430627ab4244922c15ef629e5e58825d9068dab98e6d.yml +openapi_spec_hash: b006f45060aade7235bde5f4448619f6 config_hash: dfc8fae1943177a610a7d4985af30c54 From 434bcc03f641a48d7b912314b3b16e2216ad624d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 00:14:09 +0000 Subject: [PATCH 05/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 13fa784..5b4e5fc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-5697f594aff39e316e13430627ab4244922c15ef629e5e58825d9068dab98e6d.yml -openapi_spec_hash: b006f45060aade7235bde5f4448619f6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-9607a049bdb6669f1524fbca775f0eebe3151d6296c7942c8e507426a542cae5.yml +openapi_spec_hash: 8d14e16fe67d6c27ca9e64f8e8c35485 config_hash: dfc8fae1943177a610a7d4985af30c54 From ee0eb17ab559f9292aa55db21a9b666d73f07fcf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:13:47 +0000 Subject: [PATCH 06/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5b4e5fc..28700df 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-9607a049bdb6669f1524fbca775f0eebe3151d6296c7942c8e507426a542cae5.yml -openapi_spec_hash: 8d14e16fe67d6c27ca9e64f8e8c35485 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-035cf33fb01cd872f53482615f298cb1dd29d81c8076954f1135ad2e5b795854.yml +openapi_spec_hash: 7445b5e8b2e9856d18e36d963025f03a config_hash: dfc8fae1943177a610a7d4985af30c54 From 7e1c4606938a6d959f86e371771744287e028619 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 5 Apr 2026 12:13:47 +0000 Subject: [PATCH 07/25] feat(api): api update --- .stats.yml | 4 ++-- src/resources/me/organizations.ts | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 28700df..c888f58 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-035cf33fb01cd872f53482615f298cb1dd29d81c8076954f1135ad2e5b795854.yml -openapi_spec_hash: 7445b5e8b2e9856d18e36d963025f03a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-c19325d5001a1d537fbe39337b16ce616cbcc7c52357ac1f6c5217f0a71d3eaf.yml +openapi_spec_hash: 665b755526edc55377c94be9aa85de69 config_hash: dfc8fae1943177a610a7d4985af30c54 diff --git a/src/resources/me/organizations.ts b/src/resources/me/organizations.ts index bc4c3f4..ac51d3a 100644 --- a/src/resources/me/organizations.ts +++ b/src/resources/me/organizations.ts @@ -25,7 +25,10 @@ export class Organizations extends APIResource { } export interface OrganizationCreateResponse { - id: string; + /** + * an integer + */ + id: number; created_at: string; @@ -44,7 +47,10 @@ export interface OrganizationListResponse { export namespace OrganizationListResponse { export interface Data { - id: string; + /** + * an integer + */ + id: number; name: string; From 526a6ac6196e7c1865496e89e7b8ad0c7ffe4445 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 22:13:56 +0000 Subject: [PATCH 08/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c888f58..857b1e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-c19325d5001a1d537fbe39337b16ce616cbcc7c52357ac1f6c5217f0a71d3eaf.yml -openapi_spec_hash: 665b755526edc55377c94be9aa85de69 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-e55d863ddc14be34103655c90218ad2e917cc5ecc557605bbb66e3bf7813b896.yml +openapi_spec_hash: c8f78adacac0ac6f3a682f8fd3b95f16 config_hash: dfc8fae1943177a610a7d4985af30c54 From 9b6de0b7e4f602a724c7e578c32f3238371e3dc4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 00:13:55 +0000 Subject: [PATCH 09/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 857b1e5..6f7e6c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-e55d863ddc14be34103655c90218ad2e917cc5ecc557605bbb66e3bf7813b896.yml -openapi_spec_hash: c8f78adacac0ac6f3a682f8fd3b95f16 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-f542c96d0fcc1fdd11394cc4f61e8ef4236c75b60f33aee02c84757549e7b40a.yml +openapi_spec_hash: aa917518f60478e3b0b7a865de32156d config_hash: dfc8fae1943177a610a7d4985af30c54 From 9f0ffa05a31e5ebf667efccc17f6cd6a6450a434 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 03:03:55 +0000 Subject: [PATCH 10/25] chore(internal): codegen related update --- src/internal/utils/env.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/utils/env.ts b/src/internal/utils/env.ts index 2d84800..cc5fa0f 100644 --- a/src/internal/utils/env.ts +++ b/src/internal/utils/env.ts @@ -9,10 +9,10 @@ */ export const readEnv = (env: string): string | undefined => { if (typeof (globalThis as any).process !== 'undefined') { - return (globalThis as any).process.env?.[env]?.trim() ?? undefined; + return (globalThis as any).process.env?.[env]?.trim() || undefined; } if (typeof (globalThis as any).Deno !== 'undefined') { - return (globalThis as any).Deno.env?.get?.(env)?.trim(); + return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined; } return undefined; }; From 91ff1a9855b55b414a1712bf41a77f371cf6a992 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 19:14:07 +0000 Subject: [PATCH 11/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6f7e6c9..3237723 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-f542c96d0fcc1fdd11394cc4f61e8ef4236c75b60f33aee02c84757549e7b40a.yml -openapi_spec_hash: aa917518f60478e3b0b7a865de32156d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-ef26a5ce213639f85e9ec691a7f7ab8b44bc85b14b872e88541eac2c83695693.yml +openapi_spec_hash: 4467e22bb0ec88f2c2fbb03c84f51d91 config_hash: dfc8fae1943177a610a7d4985af30c54 From d2194c57fad5d00a6ccdecc1a5382e0e3ccabbc5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Apr 2026 19:14:03 +0000 Subject: [PATCH 12/25] feat(api): api update --- .stats.yml | 4 ++-- src/resources/paywalls/paywalls.ts | 12 ++++++------ src/resources/products.ts | 10 +++++----- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3237723..44c9bf4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-ef26a5ce213639f85e9ec691a7f7ab8b44bc85b14b872e88541eac2c83695693.yml -openapi_spec_hash: 4467e22bb0ec88f2c2fbb03c84f51d91 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-50140d6dc2d029578bac93ec163d331dcf969369c495e8a161ef25db8fdaff28.yml +openapi_spec_hash: 1c1d65319fc3270a2c3ec97f507d4418 config_hash: dfc8fae1943177a610a7d4985af30c54 diff --git a/src/resources/paywalls/paywalls.ts b/src/resources/paywalls/paywalls.ts index 750d485..ca0c43a 100644 --- a/src/resources/paywalls/paywalls.ts +++ b/src/resources/paywalls/paywalls.ts @@ -177,7 +177,7 @@ export namespace PaywallCreateResponse { /** * Store this product belongs to */ - store: 'app-store' | 'play-store' | 'stripe' | 'paddle'; + store: 'app-store' | 'play-store' | 'stripe' | 'paddle' | 'custom'; } } @@ -288,7 +288,7 @@ export namespace PaywallRetrieveResponse { /** * Store this product belongs to */ - store: 'app-store' | 'play-store' | 'stripe' | 'paddle'; + store: 'app-store' | 'play-store' | 'stripe' | 'paddle' | 'custom'; } } @@ -399,7 +399,7 @@ export namespace PaywallUpdateResponse { /** * Store this product belongs to */ - store: 'app-store' | 'play-store' | 'stripe' | 'paddle'; + store: 'app-store' | 'play-store' | 'stripe' | 'paddle' | 'custom'; } } @@ -533,7 +533,7 @@ export namespace PaywallListResponse { /** * Store this product belongs to */ - store: 'app-store' | 'play-store' | 'stripe' | 'paddle'; + store: 'app-store' | 'play-store' | 'stripe' | 'paddle' | 'custom'; } } } @@ -660,7 +660,7 @@ export namespace PaywallCreateParams { /** * Store this product belongs to */ - store: 'app-store' | 'play-store' | 'stripe' | 'paddle'; + store: 'app-store' | 'play-store' | 'stripe' | 'paddle' | 'custom'; } } @@ -714,7 +714,7 @@ export namespace PaywallUpdateParams { /** * Store this product belongs to */ - store: 'app-store' | 'play-store' | 'stripe' | 'paddle'; + store: 'app-store' | 'play-store' | 'stripe' | 'paddle' | 'custom'; } } diff --git a/src/resources/products.ts b/src/resources/products.ts index 0307539..9f3a338 100644 --- a/src/resources/products.ts +++ b/src/resources/products.ts @@ -85,7 +85,7 @@ export interface ProductCreateResponse { /** * Platform the product belongs to */ - platform: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional'; + platform: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional' | 'custom'; /** * Price of the product, or null @@ -203,7 +203,7 @@ export interface ProductRetrieveResponse { /** * Platform the product belongs to */ - platform: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional'; + platform: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional' | 'custom'; /** * Price of the product, or null @@ -321,7 +321,7 @@ export interface ProductUpdateResponse { /** * Platform the product belongs to */ - platform: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional'; + platform: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional' | 'custom'; /** * Price of the product, or null @@ -462,7 +462,7 @@ export namespace ProductListResponse { /** * Platform the product belongs to */ - platform: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional'; + platform: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional' | 'custom'; /** * Price of the product, or null @@ -666,7 +666,7 @@ export interface ProductListParams { /** * Platform the product belongs to */ - platform?: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional'; + platform?: 'ios' | 'android' | 'stripe' | 'paddle' | 'promotional' | 'custom'; /** * a string to be decoded into a number From bd9d54fce9c6633090d42fcbee30b8589f4ad595 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Apr 2026 18:14:03 +0000 Subject: [PATCH 13/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 44c9bf4..5c9ceec 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-50140d6dc2d029578bac93ec163d331dcf969369c495e8a161ef25db8fdaff28.yml -openapi_spec_hash: 1c1d65319fc3270a2c3ec97f507d4418 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-818481ed496fc3616c5160784a26ca84efceb0c5685aca157da458f4b1628c1e.yml +openapi_spec_hash: 61393af9d4ee95f78a01fc9dcfb8731b config_hash: dfc8fae1943177a610a7d4985af30c54 From 683ef0ca266a231bbaba478d3ffb2da72c00a3e1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 02:17:49 +0000 Subject: [PATCH 14/25] chore(internal): more robust bootstrap script --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index 2bb3c94..3a8293a 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd "$(dirname "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "${SKIP_BREW:-}" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { echo -n "==> Install Homebrew dependencies? (y/N): " read -r response From 21349f9e61f49f5fd8da9513e89f07c9748568ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Apr 2026 22:13:44 +0000 Subject: [PATCH 15/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5c9ceec..adcfdb4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-818481ed496fc3616c5160784a26ca84efceb0c5685aca157da458f4b1628c1e.yml -openapi_spec_hash: 61393af9d4ee95f78a01fc9dcfb8731b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-08794b0ddbb35f16c3d1f3a803579ba4579e23ad54250be75f5757a265b1598f.yml +openapi_spec_hash: 3a9ee2b067d794986817a81346a89072 config_hash: dfc8fae1943177a610a7d4985af30c54 From 11fcffd60e91a3caec8828c7942137b1b7fdfb22 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Apr 2026 13:13:40 +0000 Subject: [PATCH 16/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index adcfdb4..ba45e9a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-08794b0ddbb35f16c3d1f3a803579ba4579e23ad54250be75f5757a265b1598f.yml -openapi_spec_hash: 3a9ee2b067d794986817a81346a89072 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-bc0a8562781b27e3e0dbea4e1822cb9e5f638a6043c2c76788929bc4340db582.yml +openapi_spec_hash: 61b01d031e495b8df39417deafa11ed1 config_hash: dfc8fae1943177a610a7d4985af30c54 From 624cb881f0eb495cb0d28e7d7cd252e5afd28620 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 26 Apr 2026 02:05:31 +0000 Subject: [PATCH 17/25] chore(formatter): run prettier and eslint separately --- eslint.config.mjs | 3 - package.json | 1 - pnpm-lock.yaml | 51 -- scripts/fast-format | 6 +- scripts/format | 3 +- scripts/lint | 3 + src/api-promise.ts | 2 +- src/client.ts | 464 +++++-------- src/core/api-promise.ts | 9 +- src/core/error.ts | 46 +- src/error.ts | 2 +- src/index.ts | 16 +- src/internal/builtin-types.ts | 23 +- src/internal/detect-platform.ts | 6 +- src/internal/errors.ts | 14 +- src/internal/headers.ts | 4 +- src/internal/parse.ts | 12 +- src/internal/qs/utils.ts | 5 +- src/internal/request-options.ts | 6 +- src/internal/shim-types.ts | 4 +- src/internal/shims.ts | 4 +- src/internal/to-file.ts | 14 +- src/internal/types.ts | 50 +- src/internal/utils/log.ts | 37 +- src/internal/utils/query.ts | 2 +- src/internal/utils/uuid.ts | 8 +- src/resource.ts | 2 +- src/resources/campaigns/campaigns.ts | 28 +- src/resources/campaigns/index.ts | 25 +- src/resources/campaigns/placements.ts | 18 +- src/resources/charts.ts | 44 +- src/resources/entitlements/entitlements.ts | 20 +- src/resources/entitlements/grants.ts | 16 +- src/resources/entitlements/index.ts | 22 +- src/resources/grants.ts | 5 +- src/resources/index.ts | 97 +-- src/resources/me/index.ts | 9 +- src/resources/me/me.ts | 9 +- src/resources/me/organizations.ts | 2 +- src/resources/paywalls/index.ts | 21 +- src/resources/paywalls/paywalls.ts | 4 +- src/resources/paywalls/templates.ts | 2 +- src/resources/products.ts | 2 +- src/resources/projects/applications.ts | 55 +- src/resources/projects/events.ts | 37 +- src/resources/projects/index.ts | 55 +- src/resources/projects/projects.ts | 59 +- src/resources/projects/webhook-endpoints.ts | 56 +- src/resources/users/events.ts | 10 +- src/resources/users/index.ts | 36 +- src/resources/users/test-mode.ts | 8 +- src/resources/users/users.ts | 59 +- src/uploads.ts | 2 +- src/version.ts | 2 +- .../api-resources/campaigns/campaigns.test.ts | 92 ++- .../campaigns/placements.test.ts | 18 +- tests/api-resources/charts.test.ts | 72 +-- .../entitlements/entitlements.test.ts | 26 +- .../api-resources/entitlements/grants.test.ts | 34 +- tests/api-resources/grants.test.ts | 20 +- tests/api-resources/me/organizations.test.ts | 2 +- tests/api-resources/paywalls/paywalls.test.ts | 46 +- .../api-resources/paywalls/templates.test.ts | 16 +- tests/api-resources/products.test.ts | 38 +- .../projects/applications.test.ts | 82 +-- tests/api-resources/projects/events.test.ts | 56 +- tests/api-resources/projects/projects.test.ts | 31 +- .../projects/webhook-endpoints.test.ts | 68 +- tests/api-resources/users/events.test.ts | 14 +- tests/api-resources/users/test-mode.test.ts | 12 +- tests/api-resources/users/users.test.ts | 56 +- tests/index.test.ts | 610 +++++++++--------- tests/qs/utils.test.ts | 2 +- tests/stringifyQuery.test.ts | 32 +- 74 files changed, 1000 insertions(+), 1827 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index fbfb9c7..381076a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,6 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; -import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -14,11 +13,9 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, - prettier, }, rules: { 'no-unused-vars': 'off', - 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index 573338f..5c94415 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.39.1", - "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2b6b50..2fbf116 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,9 +35,6 @@ importers: eslint: specifier: ^9.39.1 version: 9.39.1 - eslint-plugin-prettier: - specifier: ^5.4.1 - version: 5.4.1(eslint@9.39.1)(prettier@3.1.1) eslint-plugin-unused-imports: specifier: ^4.1.4 version: 4.1.4(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1) @@ -442,10 +439,6 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@pkgr/core@0.2.4': - resolution: {integrity: sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -936,20 +929,6 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-plugin-prettier@5.4.1: - resolution: {integrity: sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true - eslint-plugin-unused-imports@4.1.4: resolution: {integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==} peerDependencies: @@ -1025,9 +1004,6 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -1631,10 +1607,6 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - prettier@3.1.1: resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} engines: {node: '>=14'} @@ -1815,10 +1787,6 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - synckit@0.11.8: - resolution: {integrity: sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==} - engines: {node: ^14.18.0 || >=16.0.0} - test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} @@ -2524,8 +2492,6 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@pkgr/core@0.2.4': {} - '@sinclair/typebox@0.27.8': {} '@sindresorhus/is@4.6.0': {} @@ -3007,13 +2973,6 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-plugin-prettier@5.4.1(eslint@9.39.1)(prettier@3.1.1): - dependencies: - eslint: 9.39.1 - prettier: 3.1.1 - prettier-linter-helpers: 1.0.0 - synckit: 0.11.8 - eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1): dependencies: eslint: 9.39.1 @@ -3114,8 +3073,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-diff@1.3.0: {} - fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3861,10 +3818,6 @@ snapshots: prelude-ls@1.2.1: {} - prettier-linter-helpers@1.0.0: - dependencies: - fast-diff: 1.3.0 - prettier@3.1.1: {} pretty-format@29.7.0: @@ -4013,10 +3966,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - synckit@0.11.8: - dependencies: - '@pkgr/core': 0.2.4 - test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 diff --git a/scripts/fast-format b/scripts/fast-format index 53721ac..e172313 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,10 +31,8 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -# format things eslint didn't -PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" +PRETTIER_FILES="$(grep '\.\([mc]?tsx?\|[mc]?jsx?\|json\)$' "$FILE_LIST" || true)" if ! [ -z "$PRETTIER_FILES" ]; then echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ - '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern fi diff --git a/scripts/format b/scripts/format index 7a75640..b1b2c17 100755 --- a/scripts/format +++ b/scripts/format @@ -8,5 +8,4 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -# format things eslint didn't -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . diff --git a/scripts/lint b/scripts/lint index 3ffb78a..1f53254 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,6 +4,9 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running prettier --check" +./node_modules/.bin/prettier --check . + echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/src/api-promise.ts b/src/api-promise.ts index 8c775ee..4e70128 100644 --- a/src/api-promise.ts +++ b/src/api-promise.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/api-promise instead */ -export * from './core/api-promise'; +export * from "./core/api-promise" \ No newline at end of file diff --git a/src/client.ts b/src/client.ts index 17c3a50..e03dff1 100644 --- a/src/client.ts +++ b/src/client.ts @@ -17,105 +17,20 @@ import * as Errors from './core/error'; import * as Uploads from './core/uploads'; import * as API from './resources/index'; import { APIPromise } from './core/api-promise'; -import { - ChartGetDefinitionsParams, - ChartGetDefinitionsResponse, - ChartQueryDataParams, - ChartQueryDataResponse, - Charts, -} from './resources/charts'; +import { ChartGetDefinitionsParams, ChartGetDefinitionsResponse, ChartQueryDataParams, ChartQueryDataResponse, Charts } from './resources/charts'; import { GrantListParams, GrantListResponse, Grants } from './resources/grants'; -import { - ProductCreateParams, - ProductCreateResponse, - ProductDeleteResponse, - ProductListParams, - ProductListResponse, - ProductRetrieveResponse, - ProductUpdateParams, - ProductUpdateResponse, - Products, -} from './resources/products'; -import { - CampaignArchiveResponse, - CampaignCreateParams, - CampaignCreateResponse, - CampaignListParams, - CampaignListResponse, - CampaignRetrieveResponse, - CampaignUnarchiveResponse, - CampaignUpdateAudienceParams, - CampaignUpdateAudienceResponse, - CampaignUpdateParams, - CampaignUpdateResponse, - Campaigns, -} from './resources/campaigns/campaigns'; -import { - EntitlementCreateParams, - EntitlementCreateResponse, - EntitlementDeleteResponse, - EntitlementListParams, - EntitlementListResponse, - EntitlementRetrieveResponse, - EntitlementUpdateParams, - EntitlementUpdateResponse, - Entitlements, -} from './resources/entitlements/entitlements'; +import { ProductCreateParams, ProductCreateResponse, ProductDeleteResponse, ProductListParams, ProductListResponse, ProductRetrieveResponse, ProductUpdateParams, ProductUpdateResponse, Products } from './resources/products'; +import { CampaignArchiveResponse, CampaignCreateParams, CampaignCreateResponse, CampaignListParams, CampaignListResponse, CampaignRetrieveResponse, CampaignUnarchiveResponse, CampaignUpdateAudienceParams, CampaignUpdateAudienceResponse, CampaignUpdateParams, CampaignUpdateResponse, Campaigns } from './resources/campaigns/campaigns'; +import { EntitlementCreateParams, EntitlementCreateResponse, EntitlementDeleteResponse, EntitlementListParams, EntitlementListResponse, EntitlementRetrieveResponse, EntitlementUpdateParams, EntitlementUpdateResponse, Entitlements } from './resources/entitlements/entitlements'; import { Me } from './resources/me/me'; -import { - PaywallArchiveResponse, - PaywallCreateParams, - PaywallCreateResponse, - PaywallListParams, - PaywallListResponse, - PaywallPublishResponse, - PaywallRetrieveResponse, - PaywallUnarchiveResponse, - PaywallUpdateParams, - PaywallUpdateResponse, - Paywalls, -} from './resources/paywalls/paywalls'; -import { - ProjectArchiveResponse, - ProjectCreateParams, - ProjectCreateResponse, - ProjectListParams, - ProjectListResponse, - ProjectRetrieveResponse, - ProjectUnarchiveResponse, - ProjectUpdateParams, - ProjectUpdateResponse, - Projects, -} from './resources/projects/projects'; -import { - BooleanFromString, - UserListEventNamesParams, - UserListEventNamesResponse, - UserListFilterPropertiesParams, - UserListFilterPropertiesResponse, - UserResolveParams, - UserResolveResponse, - UserRetrieveActiveEntitlementsParams, - UserRetrieveActiveEntitlementsResponse, - UserRetrieveAttributesParams, - UserRetrieveAttributesResponse, - UserRetrieveDeviceAttributesParams, - UserRetrieveDeviceAttributesResponse, - UserRetrieveSubscriptionSummaryParams, - UserRetrieveSubscriptionSummaryResponse, - Users, -} from './resources/users/users'; +import { PaywallArchiveResponse, PaywallCreateParams, PaywallCreateResponse, PaywallListParams, PaywallListResponse, PaywallPublishResponse, PaywallRetrieveResponse, PaywallUnarchiveResponse, PaywallUpdateParams, PaywallUpdateResponse, Paywalls } from './resources/paywalls/paywalls'; +import { ProjectArchiveResponse, ProjectCreateParams, ProjectCreateResponse, ProjectListParams, ProjectListResponse, ProjectRetrieveResponse, ProjectUnarchiveResponse, ProjectUpdateParams, ProjectUpdateResponse, Projects } from './resources/projects/projects'; +import { BooleanFromString, UserListEventNamesParams, UserListEventNamesResponse, UserListFilterPropertiesParams, UserListFilterPropertiesResponse, UserResolveParams, UserResolveResponse, UserRetrieveActiveEntitlementsParams, UserRetrieveActiveEntitlementsResponse, UserRetrieveAttributesParams, UserRetrieveAttributesResponse, UserRetrieveDeviceAttributesParams, UserRetrieveDeviceAttributesResponse, UserRetrieveSubscriptionSummaryParams, UserRetrieveSubscriptionSummaryResponse, Users } from './resources/users/users'; import { type Fetch } from './internal/builtin-types'; import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers'; import { FinalRequestOptions, RequestOptions } from './internal/request-options'; import { readEnv } from './internal/utils/env'; -import { - type LogLevel, - type Logger, - formatRequestDetails, - loggerFor, - parseLogLevel, -} from './internal/utils/log'; +import { type LogLevel, type Logger, formatRequestDetails, loggerFor, parseLogLevel } from './internal/utils/log'; import { isEmptyObj } from './internal/utils/values'; export interface ClientOptions { @@ -199,7 +114,7 @@ export interface ClientOptions { } /** - * API Client for interfacing with the Superwall API API. + * API Client for interfacing with the Superwall API API. */ export class SuperwallAPI { apiKey: string; @@ -238,12 +153,12 @@ export class SuperwallAPI { }: ClientOptions = {}) { if (apiKey === undefined) { throw new Errors.SuperwallAPIError( - "The SUPERWALL_API_API_KEY environment variable is missing or empty; either provide it, or instantiate the SuperwallAPI client with an apiKey option, like new SuperwallAPI({ apiKey: 'My API Key' }).", + 'The SUPERWALL_API_API_KEY environment variable is missing or empty; either provide it, or instantiate the SuperwallAPI client with an apiKey option, like new SuperwallAPI({ apiKey: \'My API Key\' }).' ); } if (bearerToken === undefined) { throw new Errors.SuperwallAPIError( - "The SUPERWALL_API_BEARER_TOKEN environment variable is missing or empty; either provide it, or instantiate the SuperwallAPI client with an bearerToken option, like new SuperwallAPI({ bearerToken: 'My Bearer Token' }).", + 'The SUPERWALL_API_BEARER_TOKEN environment variable is missing or empty; either provide it, or instantiate the SuperwallAPI client with an bearerToken option, like new SuperwallAPI({ bearerToken: \'My Bearer Token\' }).' ); } @@ -260,10 +175,7 @@ export class SuperwallAPI { const defaultLogLevel = 'warn'; // Set default logLevel early so that we can log a warning in parseLogLevel. this.logLevel = defaultLogLevel; - this.logLevel = - parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? - parseLogLevel(readEnv('SUPERWALL_API_LOG'), "process.env['SUPERWALL_API_LOG']", this) ?? - defaultLogLevel; + this.logLevel = parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? parseLogLevel(readEnv('SUPERWALL_API_LOG'), 'process.env[\'SUPERWALL_API_LOG\']', this) ?? defaultLogLevel; this.fetchOptions = options.fetchOptions; this.maxRetries = options.maxRetries ?? 2; this.fetch = options.fetch ?? Shims.getDefaultFetch(); @@ -290,7 +202,7 @@ export class SuperwallAPI { fetchOptions: this.fetchOptions, apiKey: this.apiKey, bearerToken: this.bearerToken, - ...options, + ...options }); return client; } @@ -303,7 +215,7 @@ export class SuperwallAPI { } protected defaultQuery(): Record | undefined { - return this._options.defaultQuery; + return this._options.defaultQuery } protected validateHeaders({ values, nulls }: NullableHeaders) { @@ -343,11 +255,7 @@ export class SuperwallAPI { return Errors.APIError.generate(status, error, message, headers); } - buildURL( - path: string, - query: Record | null | undefined, - defaultBaseURL?: string | undefined, - ): string { + buildURL(path: string, query: Record | null | undefined, defaultBaseURL?: string | undefined): string { const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL; const url = isAbsoluteURL(path) ? @@ -435,9 +343,7 @@ export class SuperwallAPI { await this.prepareOptions(options); - const { req, url, timeout } = await this.buildRequest(options, { - retryCount: maxRetries - retriesRemaining, - }); + const { req, url, timeout } = await this.buildRequest(options, { retryCount: maxRetries - retriesRemaining }); await this.prepareRequest(req, { url, options }); @@ -446,16 +352,7 @@ export class SuperwallAPI { const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`; const startTime = Date.now(); - loggerFor(this).debug( - `[${requestLogID}] sending request`, - formatRequestDetails({ - retryOfRequestLogID, - method: options.method, - url, - options, - headers: req.headers, - }), - ); + loggerFor(this).debug(`[${requestLogID}] sending request`, formatRequestDetails({ retryOfRequestLogID, method: options.method, url, options, headers: req.headers })); if (options.signal?.aborted) { throw new Errors.APIUserAbortError(); @@ -474,45 +371,21 @@ export class SuperwallAPI { // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)" // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)" // others do not provide enough information to distinguish timeouts from other connection errors - const isTimeout = - isAbortError(response) || - /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')); + const isTimeout = isAbortError(response) || /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')) if (retriesRemaining) { - loggerFor(this).info( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`, - ); - loggerFor(this).debug( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, - formatRequestDetails({ - retryOfRequestLogID, - url, - durationMs: headersTime - startTime, - message: response.message, - }), - ); + loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`) + loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID); } - loggerFor(this).info( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`, - ); - loggerFor(this).debug( - `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, - formatRequestDetails({ - retryOfRequestLogID, - url, - durationMs: headersTime - startTime, - message: response.message, - }), - ); + loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`) + loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); if (isTimeout) { throw new Errors.APIConnectionTimeoutError(); } throw new Errors.APIConnectionError({ cause: response }); } - const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${ - response.ok ? 'succeeded' : 'failed' - } with status ${response.status} in ${headersTime - startTime}ms`; + const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${response.ok ? 'succeeded' : 'failed'} with status ${response.status} in ${headersTime - startTime}ms`; if (!response.ok) { const shouldRetry = await this.shouldRetry(response); @@ -521,60 +394,27 @@ export class SuperwallAPI { // We don't need the body of this response. await Shims.CancelReadableStream(response.body); - loggerFor(this).info(`${responseInfo} - ${retryMessage}`); - loggerFor(this).debug( - `[${requestLogID}] response error (${retryMessage})`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - headers: response.headers, - durationMs: headersTime - startTime, - }), - ); - return this.retryRequest( - options, - retriesRemaining, - retryOfRequestLogID ?? requestLogID, - response.headers, - ); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`) + loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); + return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID, response.headers); } const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`; - loggerFor(this).info(`${responseInfo} - ${retryMessage}`); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`) const errText = await response.text().catch((err: any) => castToError(err).message); const errJSON = safeJSON(errText) as any; const errMessage = errJSON ? undefined : errText; - loggerFor(this).debug( - `[${requestLogID}] response error (${retryMessage})`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - headers: response.headers, - message: errMessage, - durationMs: Date.now() - startTime, - }), - ); + loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, message: errMessage, durationMs: Date.now() - startTime })); const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers); throw err; } - loggerFor(this).info(responseInfo); - loggerFor(this).debug( - `[${requestLogID}] response start`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - headers: response.headers, - durationMs: headersTime - startTime, - }), - ); + loggerFor(this).info(responseInfo) + loggerFor(this).debug(`[${requestLogID}] response start`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); return { response, options, controller, requestLogID, retryOfRequestLogID, startTime }; } @@ -591,9 +431,7 @@ export class SuperwallAPI { const timeout = setTimeout(abort, ms); - const isReadableBody = - ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || - (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body); + const isReadableBody = ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || (typeof options.body === "object" && options.body !== null && Symbol.asyncIterator in options.body); const fetchOptions: RequestInit = { signal: controller.signal as any, @@ -608,6 +446,7 @@ export class SuperwallAPI { } try { + // use undefined this binding; fetch errors if bound to something else in browser/cloudflare return await this.fetch.call(undefined, url, fetchOptions); } finally { @@ -708,12 +547,11 @@ export class SuperwallAPI { const req: FinalizedRequestInit = { method, headers: reqHeaders, - ...(options.signal && { signal: options.signal }), - ...((globalThis as any).ReadableStream && - body instanceof (globalThis as any).ReadableStream && { duplex: 'half' }), + ...(options.signal && { signal: options.signal}), + ...((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream && { duplex: "half" }), ...(body && { body }), - ...((this.fetchOptions as any) ?? {}), - ...((options.fetchOptions as any) ?? {}), + ...(this.fetchOptions as any ?? {}), + ...(options.fetchOptions as any ?? {}), }; return { req, url, timeout: options.timeout }; @@ -738,17 +576,15 @@ export class SuperwallAPI { const headers = buildHeaders([ idempotencyHeaders, - { - Accept: 'application/json', - 'User-Agent': this.getUserAgent(), - 'X-Stainless-Retry-Count': String(retryCount), - ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), - ...getPlatformHeaders(), - }, + {Accept: 'application/json', + 'User-Agent': this.getUserAgent(), + 'X-Stainless-Retry-Count': String(retryCount), + ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), + ...getPlatformHeaders()}, await this.authHeaders(options), this._options.defaultHeaders, bodyHeaders, - options.headers, + options.headers ]); this.validateHeaders(headers); @@ -775,9 +611,11 @@ export class SuperwallAPI { ArrayBuffer.isView(body) || body instanceof ArrayBuffer || body instanceof DataView || - (typeof body === 'string' && + ( + typeof body === 'string' && // Preserve legacy string encoding behavior for now - headers.values.has('content-type')) || + headers.values.has('content-type') + ) || // `Blob` is superset of `File` ((globalThis as any).Blob && body instanceof (globalThis as any).Blob) || // `FormData` -> `multipart/form-data` @@ -808,7 +646,7 @@ export class SuperwallAPI { } static SuperwallAPI = this; - static DEFAULT_TIMEOUT = 60000; // 1 minute + static DEFAULT_TIMEOUT = 60000 // 1 minute static SuperwallAPIError = Errors.SuperwallAPIError; static APIError = Errors.APIError; @@ -872,106 +710,108 @@ SuperwallAPI.Charts = Charts; SuperwallAPI.Users = Users; export declare namespace SuperwallAPI { - export type RequestOptions = Opts.RequestOptions; - - export { - Projects as Projects, - type ProjectCreateResponse as ProjectCreateResponse, - type ProjectRetrieveResponse as ProjectRetrieveResponse, - type ProjectUpdateResponse as ProjectUpdateResponse, - type ProjectListResponse as ProjectListResponse, - type ProjectArchiveResponse as ProjectArchiveResponse, - type ProjectUnarchiveResponse as ProjectUnarchiveResponse, - type ProjectCreateParams as ProjectCreateParams, - type ProjectUpdateParams as ProjectUpdateParams, - type ProjectListParams as ProjectListParams, - }; - - export { Me as Me }; - - export { - Paywalls as Paywalls, - type PaywallCreateResponse as PaywallCreateResponse, - type PaywallRetrieveResponse as PaywallRetrieveResponse, - type PaywallUpdateResponse as PaywallUpdateResponse, - type PaywallListResponse as PaywallListResponse, - type PaywallArchiveResponse as PaywallArchiveResponse, - type PaywallPublishResponse as PaywallPublishResponse, - type PaywallUnarchiveResponse as PaywallUnarchiveResponse, - type PaywallCreateParams as PaywallCreateParams, - type PaywallUpdateParams as PaywallUpdateParams, - type PaywallListParams as PaywallListParams, - }; - - export { - Products as Products, - type ProductCreateResponse as ProductCreateResponse, - type ProductRetrieveResponse as ProductRetrieveResponse, - type ProductUpdateResponse as ProductUpdateResponse, - type ProductListResponse as ProductListResponse, - type ProductDeleteResponse as ProductDeleteResponse, - type ProductCreateParams as ProductCreateParams, - type ProductUpdateParams as ProductUpdateParams, - type ProductListParams as ProductListParams, - }; - - export { - Campaigns as Campaigns, - type CampaignCreateResponse as CampaignCreateResponse, - type CampaignRetrieveResponse as CampaignRetrieveResponse, - type CampaignUpdateResponse as CampaignUpdateResponse, - type CampaignListResponse as CampaignListResponse, - type CampaignArchiveResponse as CampaignArchiveResponse, - type CampaignUnarchiveResponse as CampaignUnarchiveResponse, - type CampaignUpdateAudienceResponse as CampaignUpdateAudienceResponse, - type CampaignCreateParams as CampaignCreateParams, - type CampaignUpdateParams as CampaignUpdateParams, - type CampaignListParams as CampaignListParams, - type CampaignUpdateAudienceParams as CampaignUpdateAudienceParams, - }; - - export { - Entitlements as Entitlements, - type EntitlementCreateResponse as EntitlementCreateResponse, - type EntitlementRetrieveResponse as EntitlementRetrieveResponse, - type EntitlementUpdateResponse as EntitlementUpdateResponse, - type EntitlementListResponse as EntitlementListResponse, - type EntitlementDeleteResponse as EntitlementDeleteResponse, - type EntitlementCreateParams as EntitlementCreateParams, - type EntitlementUpdateParams as EntitlementUpdateParams, - type EntitlementListParams as EntitlementListParams, - }; - - export { - Grants as Grants, - type GrantListResponse as GrantListResponse, - type GrantListParams as GrantListParams, - }; - - export { - Charts as Charts, - type ChartGetDefinitionsResponse as ChartGetDefinitionsResponse, - type ChartQueryDataResponse as ChartQueryDataResponse, - type ChartGetDefinitionsParams as ChartGetDefinitionsParams, - type ChartQueryDataParams as ChartQueryDataParams, - }; - - export { - Users as Users, - type BooleanFromString as BooleanFromString, - type UserListEventNamesResponse as UserListEventNamesResponse, - type UserListFilterPropertiesResponse as UserListFilterPropertiesResponse, - type UserResolveResponse as UserResolveResponse, - type UserRetrieveActiveEntitlementsResponse as UserRetrieveActiveEntitlementsResponse, - type UserRetrieveAttributesResponse as UserRetrieveAttributesResponse, - type UserRetrieveDeviceAttributesResponse as UserRetrieveDeviceAttributesResponse, - type UserRetrieveSubscriptionSummaryResponse as UserRetrieveSubscriptionSummaryResponse, - type UserListEventNamesParams as UserListEventNamesParams, - type UserListFilterPropertiesParams as UserListFilterPropertiesParams, - type UserResolveParams as UserResolveParams, - type UserRetrieveActiveEntitlementsParams as UserRetrieveActiveEntitlementsParams, - type UserRetrieveAttributesParams as UserRetrieveAttributesParams, - type UserRetrieveDeviceAttributesParams as UserRetrieveDeviceAttributesParams, - type UserRetrieveSubscriptionSummaryParams as UserRetrieveSubscriptionSummaryParams, - }; -} + export type RequestOptions = Opts.RequestOptions; + + export { + Projects as Projects, + type ProjectCreateResponse as ProjectCreateResponse, + type ProjectRetrieveResponse as ProjectRetrieveResponse, + type ProjectUpdateResponse as ProjectUpdateResponse, + type ProjectListResponse as ProjectListResponse, + type ProjectArchiveResponse as ProjectArchiveResponse, + type ProjectUnarchiveResponse as ProjectUnarchiveResponse, + type ProjectCreateParams as ProjectCreateParams, + type ProjectUpdateParams as ProjectUpdateParams, + type ProjectListParams as ProjectListParams +}; + +export { + Me as Me +}; + +export { + Paywalls as Paywalls, + type PaywallCreateResponse as PaywallCreateResponse, + type PaywallRetrieveResponse as PaywallRetrieveResponse, + type PaywallUpdateResponse as PaywallUpdateResponse, + type PaywallListResponse as PaywallListResponse, + type PaywallArchiveResponse as PaywallArchiveResponse, + type PaywallPublishResponse as PaywallPublishResponse, + type PaywallUnarchiveResponse as PaywallUnarchiveResponse, + type PaywallCreateParams as PaywallCreateParams, + type PaywallUpdateParams as PaywallUpdateParams, + type PaywallListParams as PaywallListParams +}; + +export { + Products as Products, + type ProductCreateResponse as ProductCreateResponse, + type ProductRetrieveResponse as ProductRetrieveResponse, + type ProductUpdateResponse as ProductUpdateResponse, + type ProductListResponse as ProductListResponse, + type ProductDeleteResponse as ProductDeleteResponse, + type ProductCreateParams as ProductCreateParams, + type ProductUpdateParams as ProductUpdateParams, + type ProductListParams as ProductListParams +}; + +export { + Campaigns as Campaigns, + type CampaignCreateResponse as CampaignCreateResponse, + type CampaignRetrieveResponse as CampaignRetrieveResponse, + type CampaignUpdateResponse as CampaignUpdateResponse, + type CampaignListResponse as CampaignListResponse, + type CampaignArchiveResponse as CampaignArchiveResponse, + type CampaignUnarchiveResponse as CampaignUnarchiveResponse, + type CampaignUpdateAudienceResponse as CampaignUpdateAudienceResponse, + type CampaignCreateParams as CampaignCreateParams, + type CampaignUpdateParams as CampaignUpdateParams, + type CampaignListParams as CampaignListParams, + type CampaignUpdateAudienceParams as CampaignUpdateAudienceParams +}; + +export { + Entitlements as Entitlements, + type EntitlementCreateResponse as EntitlementCreateResponse, + type EntitlementRetrieveResponse as EntitlementRetrieveResponse, + type EntitlementUpdateResponse as EntitlementUpdateResponse, + type EntitlementListResponse as EntitlementListResponse, + type EntitlementDeleteResponse as EntitlementDeleteResponse, + type EntitlementCreateParams as EntitlementCreateParams, + type EntitlementUpdateParams as EntitlementUpdateParams, + type EntitlementListParams as EntitlementListParams +}; + +export { + Grants as Grants, + type GrantListResponse as GrantListResponse, + type GrantListParams as GrantListParams +}; + +export { + Charts as Charts, + type ChartGetDefinitionsResponse as ChartGetDefinitionsResponse, + type ChartQueryDataResponse as ChartQueryDataResponse, + type ChartGetDefinitionsParams as ChartGetDefinitionsParams, + type ChartQueryDataParams as ChartQueryDataParams +}; + +export { + Users as Users, + type BooleanFromString as BooleanFromString, + type UserListEventNamesResponse as UserListEventNamesResponse, + type UserListFilterPropertiesResponse as UserListFilterPropertiesResponse, + type UserResolveResponse as UserResolveResponse, + type UserRetrieveActiveEntitlementsResponse as UserRetrieveActiveEntitlementsResponse, + type UserRetrieveAttributesResponse as UserRetrieveAttributesResponse, + type UserRetrieveDeviceAttributesResponse as UserRetrieveDeviceAttributesResponse, + type UserRetrieveSubscriptionSummaryResponse as UserRetrieveSubscriptionSummaryResponse, + type UserListEventNamesParams as UserListEventNamesParams, + type UserListFilterPropertiesParams as UserListFilterPropertiesParams, + type UserResolveParams as UserResolveParams, + type UserRetrieveActiveEntitlementsParams as UserRetrieveActiveEntitlementsParams, + type UserRetrieveAttributesParams as UserRetrieveAttributesParams, + type UserRetrieveDeviceAttributesParams as UserRetrieveDeviceAttributesParams, + type UserRetrieveSubscriptionSummaryParams as UserRetrieveSubscriptionSummaryParams +}; + } diff --git a/src/core/api-promise.ts b/src/core/api-promise.ts index 9d61a59..c468d29 100644 --- a/src/core/api-promise.ts +++ b/src/core/api-promise.ts @@ -16,10 +16,7 @@ export class APIPromise extends Promise { constructor( client: SuperwallAPI, private responsePromise: Promise, - private parseResponse: ( - client: SuperwallAPI, - props: APIResponseProps, - ) => PromiseOrValue = defaultParseResponse, + private parseResponse: (client: SuperwallAPI, props: APIResponseProps) => PromiseOrValue = defaultParseResponse, ) { super((resolve) => { // this is maybe a bit weird but this has to be a no-op to not implicitly @@ -31,9 +28,7 @@ export class APIPromise extends Promise { } _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise { - return new APIPromise(this.#client, this.responsePromise, async (client, props) => - transform(await this.parseResponse(client, props), props), - ); + return new APIPromise(this.#client, this.responsePromise, async (client, props) => transform(await this.parseResponse(client, props), props)); } /** diff --git a/src/core/error.ts b/src/core/error.ts index 2f40f8a..4d52bbf 100644 --- a/src/core/error.ts +++ b/src/core/error.ts @@ -2,13 +2,10 @@ import { castToError } from '../internal/errors'; -export class SuperwallAPIError extends Error {} +export class SuperwallAPIError extends Error { +} -export class APIError< - TStatus extends number | undefined = number | undefined, - THeaders extends Headers | undefined = Headers | undefined, - TError extends Object | undefined = Object | undefined, -> extends SuperwallAPIError { +export class APIError extends SuperwallAPIError { /** HTTP status for the response that caused the error */ readonly status: TStatus; /** HTTP headers for the response that caused the error */ @@ -16,6 +13,9 @@ export class APIError< /** JSON body of the response that caused the error */ readonly error: TError; + + ; + constructor(status: TStatus, error: TError, message: string | undefined, headers: THeaders) { super(`${APIError.makeMessage(status, error, message)}`); this.status = status; @@ -26,8 +26,7 @@ export class APIError< private static makeMessage(status: number | undefined, error: any, message: string | undefined) { const msg = error?.message ? - typeof error.message === 'string' ? - error.message + typeof error.message === 'string' ? error.message : JSON.stringify(error.message) : error ? JSON.stringify(error) : message; @@ -44,12 +43,7 @@ export class APIError< return '(no status code or body)'; } - static generate( - status: number | undefined, - errorResponse: Object | undefined, - message: string | undefined, - headers: Headers | undefined, - ): APIError { + static generate(status: number | undefined, errorResponse: Object | undefined, message: string | undefined, headers: Headers | undefined): APIError { if (!status || !headers) { return new APIConnectionError({ message, cause: castToError(errorResponse) }); } @@ -113,18 +107,26 @@ export class APIConnectionTimeoutError extends APIConnectionError { } } -export class BadRequestError extends APIError<400, Headers> {} +export class BadRequestError extends APIError<400, Headers> { +} -export class AuthenticationError extends APIError<401, Headers> {} +export class AuthenticationError extends APIError<401, Headers> { +} -export class PermissionDeniedError extends APIError<403, Headers> {} +export class PermissionDeniedError extends APIError<403, Headers> { +} -export class NotFoundError extends APIError<404, Headers> {} +export class NotFoundError extends APIError<404, Headers> { +} -export class ConflictError extends APIError<409, Headers> {} +export class ConflictError extends APIError<409, Headers> { +} -export class UnprocessableEntityError extends APIError<422, Headers> {} +export class UnprocessableEntityError extends APIError<422, Headers> { +} -export class RateLimitError extends APIError<429, Headers> {} +export class RateLimitError extends APIError<429, Headers> { +} -export class InternalServerError extends APIError {} +export class InternalServerError extends APIError { +} diff --git a/src/error.ts b/src/error.ts index fc55f46..d0832d3 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/error instead */ -export * from './core/error'; +export * from "./core/error" \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index cae5fe9..349f7f6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,18 +5,4 @@ export { SuperwallAPI as default } from './client'; export { type Uploadable, toFile } from './core/uploads'; export { APIPromise } from './core/api-promise'; export { SuperwallAPI, type ClientOptions } from './client'; -export { - SuperwallAPIError, - APIError, - APIConnectionError, - APIConnectionTimeoutError, - APIUserAbortError, - NotFoundError, - ConflictError, - RateLimitError, - BadRequestError, - AuthenticationError, - InternalServerError, - PermissionDeniedError, - UnprocessableEntityError, -} from './core/error'; +export { SuperwallAPIError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError } from './core/error'; diff --git a/src/internal/builtin-types.ts b/src/internal/builtin-types.ts index c23d3bd..6059d5d 100644 --- a/src/internal/builtin-types.ts +++ b/src/internal/builtin-types.ts @@ -1,20 +1,23 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise; +export type Fetch = ( + input: string | URL | Request, + init?: RequestInit, +) => Promise /** * An alias to the builtin `RequestInit` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/RequestInit + * + * https://developer.mozilla.org/docs/Web/API/RequestInit */ type _RequestInit = RequestInit; /** * An alias to the builtin `Response` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/Response + * + * https://developer.mozilla.org/docs/Web/API/Response */ type _Response = Response; @@ -51,15 +54,7 @@ type _Array = Array; */ type _Record = Record; -export type { - _Array as Array, - _BodyInit as BodyInit, - _HeadersInit as HeadersInit, - _Record as Record, - _RequestInfo as RequestInfo, - _RequestInit as RequestInit, - _Response as Response, -}; +export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response }; /** * A copy of the builtin `EndingType` type as it isn't fully supported in certain diff --git a/src/internal/detect-platform.ts b/src/internal/detect-platform.ts index e82d95c..394ede8 100644 --- a/src/internal/detect-platform.ts +++ b/src/internal/detect-platform.ts @@ -25,11 +25,7 @@ function getDetectedPlatform(): DetectedPlatform { if (typeof EdgeRuntime !== 'undefined') { return 'edge'; } - if ( - Object.prototype.toString.call( - typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0, - ) === '[object process]' - ) { + if (Object.prototype.toString.call(typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0) === '[object process]') { return 'node'; } return 'unknown'; diff --git a/src/internal/errors.ts b/src/internal/errors.ts index 82c7b14..c14a742 100644 --- a/src/internal/errors.ts +++ b/src/internal/errors.ts @@ -2,12 +2,12 @@ export function isAbortError(err: unknown) { return ( - typeof err === 'object' && - err !== null && - // Spec-compliant fetch implementations - (('name' in err && (err as any).name === 'AbortError') || + typeof err === 'object' && err !== null && ( + // Spec-compliant fetch implementations + ('name' in err && (err as any).name === 'AbortError') || // Expo fetch - ('message' in err && String((err as any).message).includes('FetchRequestCanceledException'))) + ('message' in err && String((err as any).message).includes('FetchRequestCanceledException')) + ) ); } @@ -24,10 +24,10 @@ export const castToError = (err: any): Error => { if (err.name) error.name = err.name; return error; } - } catch {} + } catch { } try { return new Error(JSON.stringify(err)); - } catch {} + } catch { } } return new Error(err); }; diff --git a/src/internal/headers.ts b/src/internal/headers.ts index c724a9d..fa2ea2b 100644 --- a/src/internal/headers.ts +++ b/src/internal/headers.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { isReadonlyArray } from './utils/values'; +import { isReadonlyArray } from "./utils/values"; type HeaderValue = string | undefined | null; export type HeadersLike = @@ -51,7 +51,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator(client: SuperwallAPI, props: APIResponseProps): Promise { const { response, requestLogID, retryOfRequestLogID, startTime } = props; const body = await (async () => { + // fetch refuses to read the body when the status code is 204. if (response.status === 204) { return null as T; @@ -42,15 +43,6 @@ export async function defaultParseResponse(client: SuperwallAPI, props: APIRe const text = await response.text(); return text as unknown as T; })(); - loggerFor(client).debug( - `[${requestLogID}] response parsed`, - formatRequestDetails({ - retryOfRequestLogID, - url: response.url, - status: response.status, - body, - durationMs: Date.now() - startTime, - }), - ); + loggerFor(client).debug(`[${requestLogID}] response parsed`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, body, durationMs: Date.now() - startTime })); return body; } diff --git a/src/internal/qs/utils.ts b/src/internal/qs/utils.ts index 4cd5657..f21d955 100644 --- a/src/internal/qs/utils.ts +++ b/src/internal/qs/utils.ts @@ -62,7 +62,10 @@ export function merge( if (isArray(target)) { target.push(source); } else if (target && typeof target === 'object') { - if ((options && (options.plainObjects || options.allowPrototypes)) || !has(Object.prototype, source)) { + if ( + (options && (options.plainObjects || options.allowPrototypes)) || + !has(Object.prototype, source) + ) { target[source] = true; } } else { diff --git a/src/internal/request-options.ts b/src/internal/request-options.ts index 2aabf9a..a8558b2 100644 --- a/src/internal/request-options.ts +++ b/src/internal/request-options.ts @@ -76,10 +76,14 @@ export type RequestOptions = { defaultBaseURL?: string | undefined; __binaryResponse?: boolean | undefined; + }; export type EncodedContent = { bodyHeaders: HeadersLike; body: BodyInit }; -export type RequestEncoder = (request: { headers: NullableHeaders; body: unknown }) => EncodedContent; +export type RequestEncoder = (request: { + headers: NullableHeaders; + body: unknown; +}) => EncodedContent; export const FallbackEncoder: RequestEncoder = ({ headers, body }) => { return { diff --git a/src/internal/shim-types.ts b/src/internal/shim-types.ts index 8ddf7b0..accbf57 100644 --- a/src/internal/shim-types.ts +++ b/src/internal/shim-types.ts @@ -19,8 +19,8 @@ type _ConditionalNodeReadableStream = typeof globalThis extends { ReadableStream: any } ? never : _NodeReadableStream; type _ReadableStream = NeverToAny< - | ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) - | ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) + ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) | + ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) >; export type { _ReadableStream as ReadableStream }; diff --git a/src/internal/shims.ts b/src/internal/shims.ts index b5c2d06..1541fc0 100644 --- a/src/internal/shims.ts +++ b/src/internal/shims.ts @@ -27,9 +27,7 @@ export function makeReadableStream(...args: ReadableStreamArgs): ReadableStream if (typeof ReadableStream === 'undefined') { // Note: All of the platforms / runtimes we officially support already define // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes. - throw new Error( - '`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`', - ); + throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`'); } return new ReadableStream(...args); diff --git a/src/internal/to-file.ts b/src/internal/to-file.ts index 30eada3..c72a2b4 100644 --- a/src/internal/to-file.ts +++ b/src/internal/to-file.ts @@ -1,4 +1,4 @@ -import { BlobPart, getName, makeFile, isAsyncIterable } from './uploads'; +import { BlobPart, getName, makeFile, isAsyncIterable } from "./uploads"; import type { FilePropertyBag } from './builtin-types'; import { checkFileSupport } from './uploads'; @@ -65,11 +65,8 @@ const isResponseLike = (value: any): value is ResponseLike => typeof value.url === 'string' && typeof value.blob === 'function'; -export type ToFileInput = - | FileLike - | ResponseLike - | Exclude - | AsyncIterable; +export type ToFileInput = FileLike | ResponseLike | Exclude | AsyncIterable; + /** * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats @@ -119,7 +116,9 @@ export async function toFile( return makeFile(parts, name, options); } -async function getBytes(value: BlobLikePart | AsyncIterable): Promise> { +async function getBytes( + value: BlobLikePart | AsyncIterable, +): Promise> { let parts: Array = []; if ( typeof value === 'string' || @@ -152,3 +151,4 @@ function propsForError(value: unknown): string { const props = Object.getOwnPropertyNames(value); return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; } + diff --git a/src/internal/types.ts b/src/internal/types.ts index b668dfc..c45fee3 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -7,40 +7,34 @@ export type KeysEnum = { [P in keyof Required]: true }; export type FinalizedRequestInit = RequestInit & { headers: Headers }; -type NotAny = [0] extends [1 & T] ? never : T; +type NotAny = [0] extends [(1 & T)] ? never : T; /** * Some environments overload the global fetch function, and Parameters only gets the last signature. */ -type OverloadedParameters = - T extends ( - { +type OverloadedParameters = T extends { + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; + (...args: infer D): unknown; +} + ? A | B | C | D + : T extends { (...args: infer A): unknown; (...args: infer B): unknown; (...args: infer C): unknown; - (...args: infer D): unknown; } - ) ? - A | B | C | D - : T extends ( - { - (...args: infer A): unknown; - (...args: infer B): unknown; - (...args: infer C): unknown; - } - ) ? - A | B | C - : T extends ( - { + ? A | B | C + : T extends { (...args: infer A): unknown; (...args: infer B): unknown; } - ) ? - A | B - : T extends (...args: infer A) => unknown ? A + ? A | B + : T extends (...args: infer A) => unknown + ? A : never; -/* eslint-disable */ + /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -63,19 +57,19 @@ type OverloadedParameters = * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ +/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ +/** @ts-ignore For users with undici */ /* prettier-ignore */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ +/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ +/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ +/** @ts-ignore For users who use Deno */ /* prettier-ignore */ type FetchRequestInit = NonNullable[1]>; -/* eslint-enable */ + type RequestInits = | NotAny diff --git a/src/internal/utils/log.ts b/src/internal/utils/log.ts index 615cc8b..407bf49 100644 --- a/src/internal/utils/log.ts +++ b/src/internal/utils/log.ts @@ -4,7 +4,7 @@ import { hasOwn } from './values'; import { type SuperwallAPI } from '../../client'; import { RequestOptions } from '../request-options'; -type LogFn = (message: string, ...rest: unknown[]) => void; +type LogFn = (message: string, ...rest: unknown[]) => void export type Logger = { error: LogFn; warn: LogFn; @@ -21,22 +21,14 @@ const levelNumbers = { debug: 500, }; -export const parseLogLevel = ( - maybeLevel: string | undefined, - sourceName: string, - client: SuperwallAPI, -): LogLevel | undefined => { +export const parseLogLevel = (maybeLevel: string | undefined, sourceName: string, client: SuperwallAPI): LogLevel | undefined => { if (!maybeLevel) { return undefined; } if (hasOwn(levelNumbers, maybeLevel)) { return maybeLevel; - } - loggerFor(client).warn( - `${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify( - Object.keys(levelNumbers), - )}`, - ); + }; + loggerFor(client).warn(`${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify(Object.keys(levelNumbers))}`); return undefined; }; @@ -97,24 +89,11 @@ export const formatRequestDetails = (details: { body?: unknown; }) => { if (details.options) { - details.options = { ...details.options }; + details.options = {...details.options}; delete details.options['headers']; // redundant + leaks internals } if (details.headers) { - details.headers = Object.fromEntries( - (details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map( - ([name, value]) => [ - name, - ( - name.toLowerCase() === 'authorization' || - name.toLowerCase() === 'cookie' || - name.toLowerCase() === 'set-cookie' - ) ? - '***' - : value, - ], - ), - ); + details.headers = Object.fromEntries((details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map(([name, value]) => [name, name.toLowerCase() === 'authorization' || name.toLowerCase() === 'cookie' || name.toLowerCase() === 'set-cookie' ? '***' : value])) } if ('retryOfRequestLogID' in details) { if (details.retryOfRequestLogID) { @@ -122,5 +101,5 @@ export const formatRequestDetails = (details: { } delete details.retryOfRequestLogID; } - return details; -}; + return details +} diff --git a/src/internal/utils/query.ts b/src/internal/utils/query.ts index 0139cac..06e72d9 100644 --- a/src/internal/utils/query.ts +++ b/src/internal/utils/query.ts @@ -3,5 +3,5 @@ import * as qs from '../qs/stringify'; export function stringifyQuery(query: object | Record) { - return qs.stringify(query, { arrayFormat: 'comma' }); + return qs.stringify(query, { arrayFormat: 'comma' }) } diff --git a/src/internal/utils/uuid.ts b/src/internal/utils/uuid.ts index b0e53aa..53708ba 100644 --- a/src/internal/utils/uuid.ts +++ b/src/internal/utils/uuid.ts @@ -10,8 +10,10 @@ export let uuid4 = function () { return crypto.randomUUID(); } const u8 = new Uint8Array(1); - const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff; - return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => + const randomByte = crypto + ? () => crypto.getRandomValues(u8)[0]! + : () => (Math.random() * 0xff) & 0xff; + return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16), ); -}; +} diff --git a/src/resource.ts b/src/resource.ts index 363e351..57a27a9 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/resource instead */ -export * from './core/resource'; +export * from "./core/resource" \ No newline at end of file diff --git a/src/resources/campaigns/campaigns.ts b/src/resources/campaigns/campaigns.ts index dbe01e3..2eb1112 100644 --- a/src/resources/campaigns/campaigns.ts +++ b/src/resources/campaigns/campaigns.ts @@ -2,15 +2,7 @@ import { APIResource } from '../../core/resource'; import * as PlacementsAPI from './placements'; -import { - PlacementAddParams, - PlacementAddResponse, - PlacementRemoveParams, - PlacementRemoveResponse, - PlacementUpdateParams, - PlacementUpdateResponse, - Placements, -} from './placements'; +import { PlacementAddParams, PlacementAddResponse, PlacementRemoveParams, PlacementRemoveResponse, PlacementUpdateParams, PlacementUpdateResponse, Placements } from './placements'; import * as UsersAPI from '../users/users'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; @@ -40,11 +32,7 @@ export class Campaigns extends APIResource { /** * Updates a campaign's description or notes. Requires campaigns:write scope. */ - update( - id: string, - body: CampaignUpdateParams, - options?: RequestOptions, - ): APIPromise { + update(id: string, body: CampaignUpdateParams, options?: RequestOptions): APIPromise { return this._client.patch(path`/v2/campaigns/${id}`, { body, ...options }); } @@ -75,12 +63,8 @@ export class Campaigns extends APIResource { * Updates an audience's enabled status or description. Requires campaigns:write * scope. */ - updateAudience( - audienceID: string, - params: CampaignUpdateAudienceParams, - options?: RequestOptions, - ): APIPromise { - const { id, ...body } = params; + updateAudience(audienceID: string, params: CampaignUpdateAudienceParams, options?: RequestOptions): APIPromise { + const { id, ...body } = params return this._client.patch(path`/v2/campaigns/${id}/audiences/${audienceID}`, { body, ...options }); } } @@ -982,7 +966,7 @@ export declare namespace Campaigns { type CampaignCreateParams as CampaignCreateParams, type CampaignUpdateParams as CampaignUpdateParams, type CampaignListParams as CampaignListParams, - type CampaignUpdateAudienceParams as CampaignUpdateAudienceParams, + type CampaignUpdateAudienceParams as CampaignUpdateAudienceParams }; export { @@ -992,6 +976,6 @@ export declare namespace Campaigns { type PlacementRemoveResponse as PlacementRemoveResponse, type PlacementUpdateParams as PlacementUpdateParams, type PlacementAddParams as PlacementAddParams, - type PlacementRemoveParams as PlacementRemoveParams, + type PlacementRemoveParams as PlacementRemoveParams }; } diff --git a/src/resources/campaigns/index.ts b/src/resources/campaigns/index.ts index 0b8434a..9e04aed 100644 --- a/src/resources/campaigns/index.ts +++ b/src/resources/campaigns/index.ts @@ -1,25 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Campaigns, - type CampaignCreateResponse, - type CampaignRetrieveResponse, - type CampaignUpdateResponse, - type CampaignListResponse, - type CampaignArchiveResponse, - type CampaignUnarchiveResponse, - type CampaignUpdateAudienceResponse, - type CampaignCreateParams, - type CampaignUpdateParams, - type CampaignListParams, - type CampaignUpdateAudienceParams, -} from './campaigns'; -export { - Placements, - type PlacementUpdateResponse, - type PlacementAddResponse, - type PlacementRemoveResponse, - type PlacementUpdateParams, - type PlacementAddParams, - type PlacementRemoveParams, -} from './placements'; +export { Campaigns, type CampaignCreateResponse, type CampaignRetrieveResponse, type CampaignUpdateResponse, type CampaignListResponse, type CampaignArchiveResponse, type CampaignUnarchiveResponse, type CampaignUpdateAudienceResponse, type CampaignCreateParams, type CampaignUpdateParams, type CampaignListParams, type CampaignUpdateAudienceParams } from './campaigns';; +export { Placements, type PlacementUpdateResponse, type PlacementAddResponse, type PlacementRemoveResponse, type PlacementUpdateParams, type PlacementAddParams, type PlacementRemoveParams } from './placements';; diff --git a/src/resources/campaigns/placements.ts b/src/resources/campaigns/placements.ts index 29074e1..55fe2c6 100644 --- a/src/resources/campaigns/placements.ts +++ b/src/resources/campaigns/placements.ts @@ -13,12 +13,8 @@ export class Placements extends APIResource { * Updates a placement's event name or enabled status. Requires campaigns:write * scope. */ - update( - placementID: string, - params: PlacementUpdateParams, - options?: RequestOptions, - ): APIPromise { - const { id, ...body } = params; + update(placementID: string, params: PlacementUpdateParams, options?: RequestOptions): APIPromise { + const { id, ...body } = params return this._client.patch(path`/v2/campaigns/${id}/placements/${placementID}`, { body, ...options }); } @@ -32,12 +28,8 @@ export class Placements extends APIResource { /** * Removes a placement from a campaign. Requires campaigns:write scope. */ - remove( - placementID: string, - params: PlacementRemoveParams, - options?: RequestOptions, - ): APIPromise { - const { id } = params; + remove(placementID: string, params: PlacementRemoveParams, options?: RequestOptions): APIPromise { + const { id } = params return this._client.delete(path`/v2/campaigns/${id}/placements/${placementID}`, options); } } @@ -152,6 +144,6 @@ export declare namespace Placements { type PlacementRemoveResponse as PlacementRemoveResponse, type PlacementUpdateParams as PlacementUpdateParams, type PlacementAddParams as PlacementAddParams, - type PlacementRemoveParams as PlacementRemoveParams, + type PlacementRemoveParams as PlacementRemoveParams }; } diff --git a/src/resources/charts.ts b/src/resources/charts.ts index 49d7443..7e915da 100644 --- a/src/resources/charts.ts +++ b/src/resources/charts.ts @@ -13,10 +13,7 @@ export class Charts extends APIResource { * breakdowns, filters, and date presets. This is static configuration data. * Requires charts:read scope. */ - getDefinitions( - query: ChartGetDefinitionsParams, - options?: RequestOptions, - ): APIPromise { + getDefinitions(query: ChartGetDefinitionsParams, options?: RequestOptions): APIPromise { return this._client.get('/v2/charts/definitions', { query, ...options }); } @@ -49,18 +46,7 @@ export interface ChartGetDefinitionsResponse { /** * Available date presets */ - date_presets: Array< - | 'last_24_hours' - | 'today' - | 'yesterday' - | 'last_7_days' - | 'last_30_days' - | 'last_90_days' - | 'last_180_days' - | 'last_365_days' - | 'year_to_date' - | 'custom' - >; + date_presets: Array<'last_24_hours' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_365_days' | 'year_to_date' | 'custom'>; /** * Available filters @@ -392,17 +378,7 @@ export namespace ChartQueryDataResponse { /** * Active preset */ - preset: - | 'last_24_hours' - | 'today' - | 'yesterday' - | 'last_7_days' - | 'last_30_days' - | 'last_90_days' - | 'last_180_days' - | 'last_365_days' - | 'year_to_date' - | 'custom'; + preset: 'last_24_hours' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_365_days' | 'year_to_date' | 'custom'; /** * Resolved date range @@ -689,17 +665,7 @@ export namespace ChartQueryDataParams { /** * Preset date range */ - preset?: - | 'last_24_hours' - | 'today' - | 'yesterday' - | 'last_7_days' - | 'last_30_days' - | 'last_90_days' - | 'last_180_days' - | 'last_365_days' - | 'year_to_date' - | 'custom'; + preset?: 'last_24_hours' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_365_days' | 'year_to_date' | 'custom'; /** * Custom date range (required when preset is `custom`) @@ -730,6 +696,6 @@ export declare namespace Charts { type ChartGetDefinitionsResponse as ChartGetDefinitionsResponse, type ChartQueryDataResponse as ChartQueryDataResponse, type ChartGetDefinitionsParams as ChartGetDefinitionsParams, - type ChartQueryDataParams as ChartQueryDataParams, + type ChartQueryDataParams as ChartQueryDataParams }; } diff --git a/src/resources/entitlements/entitlements.ts b/src/resources/entitlements/entitlements.ts index 9a75b7a..77b254a 100644 --- a/src/resources/entitlements/entitlements.ts +++ b/src/resources/entitlements/entitlements.ts @@ -2,15 +2,7 @@ import { APIResource } from '../../core/resource'; import * as GrantsAPI from './grants'; -import { - GrantCreateParams, - GrantCreateResponse, - GrantListParams, - GrantListResponse, - GrantRevokeParams, - GrantRevokeResponse, - Grants, -} from './grants'; +import { GrantCreateParams, GrantCreateResponse, GrantListParams, GrantListResponse, GrantRevokeParams, GrantRevokeResponse, Grants } from './grants'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; @@ -40,11 +32,7 @@ export class Entitlements extends APIResource { * Updates an entitlement's name, description, products, or metadata. Requires * entitlements:write scope. */ - update( - id: string, - body: EntitlementUpdateParams, - options?: RequestOptions, - ): APIPromise { + update(id: string, body: EntitlementUpdateParams, options?: RequestOptions): APIPromise { return this._client.patch(path`/v2/entitlements/${id}`, { body, ...options }); } @@ -382,7 +370,7 @@ export declare namespace Entitlements { type EntitlementDeleteResponse as EntitlementDeleteResponse, type EntitlementCreateParams as EntitlementCreateParams, type EntitlementUpdateParams as EntitlementUpdateParams, - type EntitlementListParams as EntitlementListParams, + type EntitlementListParams as EntitlementListParams }; export { @@ -392,6 +380,6 @@ export declare namespace Entitlements { type GrantRevokeResponse as GrantRevokeResponse, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, - type GrantRevokeParams as GrantRevokeParams, + type GrantRevokeParams as GrantRevokeParams }; } diff --git a/src/resources/entitlements/grants.ts b/src/resources/entitlements/grants.ts index 88a27b2..e084653 100644 --- a/src/resources/entitlements/grants.ts +++ b/src/resources/entitlements/grants.ts @@ -21,23 +21,15 @@ export class Grants extends APIResource { * Returns a list of manual grants for the specified entitlement. Requires * entitlements:read scope. */ - list( - id: string, - query: GrantListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { + list(id: string, query: GrantListParams | null | undefined = {}, options?: RequestOptions): APIPromise { return this._client.get(path`/v2/entitlements/${id}/grants`, { query, ...options }); } /** * Revokes a manual grant. Requires entitlements:write scope. */ - revoke( - grantID: string, - params: GrantRevokeParams, - options?: RequestOptions, - ): APIPromise { - const { id } = params; + revoke(grantID: string, params: GrantRevokeParams, options?: RequestOptions): APIPromise { + const { id } = params return this._client.delete(path`/v2/entitlements/${id}/grants/${grantID}`, options); } } @@ -260,6 +252,6 @@ export declare namespace Grants { type GrantRevokeResponse as GrantRevokeResponse, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, - type GrantRevokeParams as GrantRevokeParams, + type GrantRevokeParams as GrantRevokeParams }; } diff --git a/src/resources/entitlements/index.ts b/src/resources/entitlements/index.ts index a27500c..889d258 100644 --- a/src/resources/entitlements/index.ts +++ b/src/resources/entitlements/index.ts @@ -1,22 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Entitlements, - type EntitlementCreateResponse, - type EntitlementRetrieveResponse, - type EntitlementUpdateResponse, - type EntitlementListResponse, - type EntitlementDeleteResponse, - type EntitlementCreateParams, - type EntitlementUpdateParams, - type EntitlementListParams, -} from './entitlements'; -export { - Grants, - type GrantCreateResponse, - type GrantListResponse, - type GrantRevokeResponse, - type GrantCreateParams, - type GrantListParams, - type GrantRevokeParams, -} from './grants'; +export { Entitlements, type EntitlementCreateResponse, type EntitlementRetrieveResponse, type EntitlementUpdateResponse, type EntitlementListResponse, type EntitlementDeleteResponse, type EntitlementCreateParams, type EntitlementUpdateParams, type EntitlementListParams } from './entitlements';; +export { Grants, type GrantCreateResponse, type GrantListResponse, type GrantRevokeResponse, type GrantCreateParams, type GrantListParams, type GrantRevokeParams } from './grants';; diff --git a/src/resources/grants.ts b/src/resources/grants.ts index 18c6cd6..69962f0 100644 --- a/src/resources/grants.ts +++ b/src/resources/grants.ts @@ -136,5 +136,8 @@ export interface GrantListParams { } export declare namespace Grants { - export { type GrantListResponse as GrantListResponse, type GrantListParams as GrantListParams }; + export { + type GrantListResponse as GrantListResponse, + type GrantListParams as GrantListParams + }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index aa43103..a103860 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,90 +1,11 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Campaigns, - type CampaignCreateResponse, - type CampaignRetrieveResponse, - type CampaignUpdateResponse, - type CampaignListResponse, - type CampaignArchiveResponse, - type CampaignUnarchiveResponse, - type CampaignUpdateAudienceResponse, - type CampaignCreateParams, - type CampaignUpdateParams, - type CampaignListParams, - type CampaignUpdateAudienceParams, -} from './campaigns/campaigns'; -export { - Charts, - type ChartGetDefinitionsResponse, - type ChartQueryDataResponse, - type ChartGetDefinitionsParams, - type ChartQueryDataParams, -} from './charts'; -export { - Entitlements, - type EntitlementCreateResponse, - type EntitlementRetrieveResponse, - type EntitlementUpdateResponse, - type EntitlementListResponse, - type EntitlementDeleteResponse, - type EntitlementCreateParams, - type EntitlementUpdateParams, - type EntitlementListParams, -} from './entitlements/entitlements'; -export { Grants, type GrantListResponse, type GrantListParams } from './grants'; -export { Me } from './me/me'; -export { - Paywalls, - type PaywallCreateResponse, - type PaywallRetrieveResponse, - type PaywallUpdateResponse, - type PaywallListResponse, - type PaywallArchiveResponse, - type PaywallPublishResponse, - type PaywallUnarchiveResponse, - type PaywallCreateParams, - type PaywallUpdateParams, - type PaywallListParams, -} from './paywalls/paywalls'; -export { - Products, - type ProductCreateResponse, - type ProductRetrieveResponse, - type ProductUpdateResponse, - type ProductListResponse, - type ProductDeleteResponse, - type ProductCreateParams, - type ProductUpdateParams, - type ProductListParams, -} from './products'; -export { - Projects, - type ProjectCreateResponse, - type ProjectRetrieveResponse, - type ProjectUpdateResponse, - type ProjectListResponse, - type ProjectArchiveResponse, - type ProjectUnarchiveResponse, - type ProjectCreateParams, - type ProjectUpdateParams, - type ProjectListParams, -} from './projects/projects'; -export { - Users, - type BooleanFromString, - type UserListEventNamesResponse, - type UserListFilterPropertiesResponse, - type UserResolveResponse, - type UserRetrieveActiveEntitlementsResponse, - type UserRetrieveAttributesResponse, - type UserRetrieveDeviceAttributesResponse, - type UserRetrieveSubscriptionSummaryResponse, - type UserListEventNamesParams, - type UserListFilterPropertiesParams, - type UserResolveParams, - type UserRetrieveActiveEntitlementsParams, - type UserRetrieveAttributesParams, - type UserRetrieveDeviceAttributesParams, - type UserRetrieveSubscriptionSummaryParams, -} from './users/users'; +export { Campaigns, type CampaignCreateResponse, type CampaignRetrieveResponse, type CampaignUpdateResponse, type CampaignListResponse, type CampaignArchiveResponse, type CampaignUnarchiveResponse, type CampaignUpdateAudienceResponse, type CampaignCreateParams, type CampaignUpdateParams, type CampaignListParams, type CampaignUpdateAudienceParams } from './campaigns/campaigns';; +export { Charts, type ChartGetDefinitionsResponse, type ChartQueryDataResponse, type ChartGetDefinitionsParams, type ChartQueryDataParams } from './charts';; +export { Entitlements, type EntitlementCreateResponse, type EntitlementRetrieveResponse, type EntitlementUpdateResponse, type EntitlementListResponse, type EntitlementDeleteResponse, type EntitlementCreateParams, type EntitlementUpdateParams, type EntitlementListParams } from './entitlements/entitlements';; +export { Grants, type GrantListResponse, type GrantListParams } from './grants';; +export { Me } from './me/me';; +export { Paywalls, type PaywallCreateResponse, type PaywallRetrieveResponse, type PaywallUpdateResponse, type PaywallListResponse, type PaywallArchiveResponse, type PaywallPublishResponse, type PaywallUnarchiveResponse, type PaywallCreateParams, type PaywallUpdateParams, type PaywallListParams } from './paywalls/paywalls';; +export { Products, type ProductCreateResponse, type ProductRetrieveResponse, type ProductUpdateResponse, type ProductListResponse, type ProductDeleteResponse, type ProductCreateParams, type ProductUpdateParams, type ProductListParams } from './products';; +export { Projects, type ProjectCreateResponse, type ProjectRetrieveResponse, type ProjectUpdateResponse, type ProjectListResponse, type ProjectArchiveResponse, type ProjectUnarchiveResponse, type ProjectCreateParams, type ProjectUpdateParams, type ProjectListParams } from './projects/projects';; +export { Users, type BooleanFromString, type UserListEventNamesResponse, type UserListFilterPropertiesResponse, type UserResolveResponse, type UserRetrieveActiveEntitlementsResponse, type UserRetrieveAttributesResponse, type UserRetrieveDeviceAttributesResponse, type UserRetrieveSubscriptionSummaryResponse, type UserListEventNamesParams, type UserListFilterPropertiesParams, type UserResolveParams, type UserRetrieveActiveEntitlementsParams, type UserRetrieveAttributesParams, type UserRetrieveDeviceAttributesParams, type UserRetrieveSubscriptionSummaryParams } from './users/users';; diff --git a/src/resources/me/index.ts b/src/resources/me/index.ts index 55e8886..766b266 100644 --- a/src/resources/me/index.ts +++ b/src/resources/me/index.ts @@ -1,9 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Me } from './me'; -export { - Organizations, - type OrganizationCreateResponse, - type OrganizationListResponse, - type OrganizationCreateParams, -} from './organizations'; +export { Me } from './me';; +export { Organizations, type OrganizationCreateResponse, type OrganizationListResponse, type OrganizationCreateParams } from './organizations';; diff --git a/src/resources/me/me.ts b/src/resources/me/me.ts index 02a7fad..c87af65 100644 --- a/src/resources/me/me.ts +++ b/src/resources/me/me.ts @@ -2,12 +2,7 @@ import { APIResource } from '../../core/resource'; import * as OrganizationsAPI from './organizations'; -import { - OrganizationCreateParams, - OrganizationCreateResponse, - OrganizationListResponse, - Organizations, -} from './organizations'; +import { OrganizationCreateParams, OrganizationCreateResponse, OrganizationListResponse, Organizations } from './organizations'; export class Me extends APIResource { organizations: OrganizationsAPI.Organizations = new OrganizationsAPI.Organizations(this._client); @@ -20,6 +15,6 @@ export declare namespace Me { Organizations as Organizations, type OrganizationCreateResponse as OrganizationCreateResponse, type OrganizationListResponse as OrganizationListResponse, - type OrganizationCreateParams as OrganizationCreateParams, + type OrganizationCreateParams as OrganizationCreateParams }; } diff --git a/src/resources/me/organizations.ts b/src/resources/me/organizations.ts index ac51d3a..247582d 100644 --- a/src/resources/me/organizations.ts +++ b/src/resources/me/organizations.ts @@ -69,6 +69,6 @@ export declare namespace Organizations { export { type OrganizationCreateResponse as OrganizationCreateResponse, type OrganizationListResponse as OrganizationListResponse, - type OrganizationCreateParams as OrganizationCreateParams, + type OrganizationCreateParams as OrganizationCreateParams }; } diff --git a/src/resources/paywalls/index.ts b/src/resources/paywalls/index.ts index a0e847a..efbea8c 100644 --- a/src/resources/paywalls/index.ts +++ b/src/resources/paywalls/index.ts @@ -1,21 +1,4 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Paywalls, - type PaywallCreateResponse, - type PaywallRetrieveResponse, - type PaywallUpdateResponse, - type PaywallListResponse, - type PaywallArchiveResponse, - type PaywallPublishResponse, - type PaywallUnarchiveResponse, - type PaywallCreateParams, - type PaywallUpdateParams, - type PaywallListParams, -} from './paywalls'; -export { - Templates, - type TemplateRetrieveResponse, - type TemplateListResponse, - type TemplateListParams, -} from './templates'; +export { Paywalls, type PaywallCreateResponse, type PaywallRetrieveResponse, type PaywallUpdateResponse, type PaywallListResponse, type PaywallArchiveResponse, type PaywallPublishResponse, type PaywallUnarchiveResponse, type PaywallCreateParams, type PaywallUpdateParams, type PaywallListParams } from './paywalls';; +export { Templates, type TemplateRetrieveResponse, type TemplateListResponse, type TemplateListParams } from './templates';; diff --git a/src/resources/paywalls/paywalls.ts b/src/resources/paywalls/paywalls.ts index ca0c43a..dd94560 100644 --- a/src/resources/paywalls/paywalls.ts +++ b/src/resources/paywalls/paywalls.ts @@ -763,13 +763,13 @@ export declare namespace Paywalls { type PaywallUnarchiveResponse as PaywallUnarchiveResponse, type PaywallCreateParams as PaywallCreateParams, type PaywallUpdateParams as PaywallUpdateParams, - type PaywallListParams as PaywallListParams, + type PaywallListParams as PaywallListParams }; export { Templates as Templates, type TemplateRetrieveResponse as TemplateRetrieveResponse, type TemplateListResponse as TemplateListResponse, - type TemplateListParams as TemplateListParams, + type TemplateListParams as TemplateListParams }; } diff --git a/src/resources/paywalls/templates.ts b/src/resources/paywalls/templates.ts index 26fbf62..adc4bed 100644 --- a/src/resources/paywalls/templates.ts +++ b/src/resources/paywalls/templates.ts @@ -186,6 +186,6 @@ export declare namespace Templates { export { type TemplateRetrieveResponse as TemplateRetrieveResponse, type TemplateListResponse as TemplateListResponse, - type TemplateListParams as TemplateListParams, + type TemplateListParams as TemplateListParams }; } diff --git a/src/resources/products.ts b/src/resources/products.ts index 9f3a338..59ad63f 100644 --- a/src/resources/products.ts +++ b/src/resources/products.ts @@ -683,6 +683,6 @@ export declare namespace Products { type ProductDeleteResponse as ProductDeleteResponse, type ProductCreateParams as ProductCreateParams, type ProductUpdateParams as ProductUpdateParams, - type ProductListParams as ProductListParams, + type ProductListParams as ProductListParams }; } diff --git a/src/resources/projects/applications.ts b/src/resources/projects/applications.ts index 917c77b..8a5d6a5 100644 --- a/src/resources/projects/applications.ts +++ b/src/resources/projects/applications.ts @@ -14,11 +14,7 @@ export class Applications extends APIResource { * already has an application for that platform. Requires projects:write scope. For * web platform, domain is required. */ - create( - id: string, - body: ApplicationCreateParams, - options?: RequestOptions, - ): APIPromise { + create(id: string, body: ApplicationCreateParams, options?: RequestOptions): APIPromise { return this._client.post(path`/v2/projects/${id}/applications`, { body, ...options }); } @@ -26,12 +22,8 @@ export class Applications extends APIResource { * Updates core application identity fields (name, app_id, bundle_id) within a * project. Requires applications:write scope. */ - update( - applicationID: string, - params: ApplicationUpdateParams, - options?: RequestOptions, - ): APIPromise { - const { id, ...body } = params; + update(applicationID: string, params: ApplicationUpdateParams, options?: RequestOptions): APIPromise { + const { id, ...body } = params return this._client.patch(path`/v2/projects/${id}/applications/${applicationID}`, { body, ...options }); } @@ -39,48 +31,27 @@ export class Applications extends APIResource { * Returns overview statistics for the given application and date range within a * project. Requires applications:read scope. */ - getStatistics( - applicationID: string, - params: ApplicationGetStatisticsParams, - options?: RequestOptions, - ): APIPromise { - const { id, ...query } = params; - return this._client.get(path`/v2/projects/${id}/applications/${applicationID}/statistics`, { - query, - ...options, - }); + getStatistics(applicationID: string, params: ApplicationGetStatisticsParams, options?: RequestOptions): APIPromise { + const { id, ...query } = params + return this._client.get(path`/v2/projects/${id}/applications/${applicationID}/statistics`, { query, ...options }); } /** * Returns recent transactions for the given application and date range within a * project. Requires applications:read scope. */ - listRecentTransactions( - applicationID: string, - params: ApplicationListRecentTransactionsParams, - options?: RequestOptions, - ): APIPromise { - const { id, ...query } = params; - return this._client.get(path`/v2/projects/${id}/applications/${applicationID}/recent-transactions`, { - query, - ...options, - }); + listRecentTransactions(applicationID: string, params: ApplicationListRecentTransactionsParams, options?: RequestOptions): APIPromise { + const { id, ...query } = params + return this._client.get(path`/v2/projects/${id}/applications/${applicationID}/recent-transactions`, { query, ...options }); } /** * Updates platform-scoped application settings. Only settings supported by the * application's platform are accepted. Requires applications:write scope. */ - updateSettings( - applicationID: string, - params: ApplicationUpdateSettingsParams, - options?: RequestOptions, - ): APIPromise { - const { id, ...body } = params; - return this._client.patch(path`/v2/projects/${id}/applications/${applicationID}/settings`, { - body, - ...options, - }); + updateSettings(applicationID: string, params: ApplicationUpdateSettingsParams, options?: RequestOptions): APIPromise { + const { id, ...body } = params + return this._client.patch(path`/v2/projects/${id}/applications/${applicationID}/settings`, { body, ...options }); } } @@ -575,6 +546,6 @@ export declare namespace Applications { type ApplicationUpdateParams as ApplicationUpdateParams, type ApplicationGetStatisticsParams as ApplicationGetStatisticsParams, type ApplicationListRecentTransactionsParams as ApplicationListRecentTransactionsParams, - type ApplicationUpdateSettingsParams as ApplicationUpdateSettingsParams, + type ApplicationUpdateSettingsParams as ApplicationUpdateSettingsParams }; } diff --git a/src/resources/projects/events.ts b/src/resources/projects/events.ts index b3bfe24..02aaf35 100644 --- a/src/resources/projects/events.ts +++ b/src/resources/projects/events.ts @@ -14,12 +14,8 @@ export class Events extends APIResource { /** * Retrieves an event by ID. Requires webhooks:read scope. */ - retrieve( - eventID: string, - params: EventRetrieveParams, - options?: RequestOptions, - ): APIPromise { - const { project_id } = params; + retrieve(eventID: string, params: EventRetrieveParams, options?: RequestOptions): APIPromise { + const { project_id } = params return this._client.get(path`/v2/projects/${project_id}/events/${eventID}`, options); } @@ -27,39 +23,24 @@ export class Events extends APIResource { * Returns a list of events (webhook messages) for the project. Supports pagination * and filtering. Requires webhooks:read scope. */ - list( - projectID: string, - query: EventListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { + list(projectID: string, query: EventListParams | null | undefined = {}, options?: RequestOptions): APIPromise { return this._client.get(path`/v2/projects/${projectID}/events`, { query, ...options }); } /** * Returns a list of delivery attempts for an event. Requires webhooks:read scope. */ - listAttempts( - eventID: string, - params: EventListAttemptsParams, - options?: RequestOptions, - ): APIPromise { - const { project_id, ...query } = params; - return this._client.get(path`/v2/projects/${project_id}/events/${eventID}/attempts`, { - query, - ...options, - }); + listAttempts(eventID: string, params: EventListAttemptsParams, options?: RequestOptions): APIPromise { + const { project_id, ...query } = params + return this._client.get(path`/v2/projects/${project_id}/events/${eventID}/attempts`, { query, ...options }); } /** * Retries delivery of an event to a specific endpoint. Requires webhooks:write * scope. */ - retryDelivery( - eventID: string, - params: EventRetryDeliveryParams, - options?: RequestOptions, - ): APIPromise { - const { project_id, ...body } = params; + retryDelivery(eventID: string, params: EventRetryDeliveryParams, options?: RequestOptions): APIPromise { + const { project_id, ...body } = params return this._client.post(path`/v2/projects/${project_id}/events/${eventID}/retry`, { body, ...options }); } } @@ -365,6 +346,6 @@ export declare namespace Events { type EventRetrieveParams as EventRetrieveParams, type EventListParams as EventListParams, type EventListAttemptsParams as EventListAttemptsParams, - type EventRetryDeliveryParams as EventRetryDeliveryParams, + type EventRetryDeliveryParams as EventRetryDeliveryParams }; } diff --git a/src/resources/projects/index.ts b/src/resources/projects/index.ts index 1c16f64..43b6524 100644 --- a/src/resources/projects/index.ts +++ b/src/resources/projects/index.ts @@ -1,53 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Applications, - type ApplicationCreateResponse, - type ApplicationUpdateResponse, - type ApplicationGetStatisticsResponse, - type ApplicationListRecentTransactionsResponse, - type ApplicationUpdateSettingsResponse, - type ApplicationCreateParams, - type ApplicationUpdateParams, - type ApplicationGetStatisticsParams, - type ApplicationListRecentTransactionsParams, - type ApplicationUpdateSettingsParams, -} from './applications'; -export { - Events, - type EventRetrieveResponse, - type EventListResponse, - type EventListAttemptsResponse, - type EventRetryDeliveryResponse, - type EventRetrieveParams, - type EventListParams, - type EventListAttemptsParams, - type EventRetryDeliveryParams, -} from './events'; -export { - Projects, - type ProjectCreateResponse, - type ProjectRetrieveResponse, - type ProjectUpdateResponse, - type ProjectListResponse, - type ProjectArchiveResponse, - type ProjectUnarchiveResponse, - type ProjectCreateParams, - type ProjectUpdateParams, - type ProjectListParams, -} from './projects'; -export { - WebhookEndpoints, - type WebhookEndpointCreateResponse, - type WebhookEndpointRetrieveResponse, - type WebhookEndpointUpdateResponse, - type WebhookEndpointListResponse, - type WebhookEndpointDeleteResponse, - type WebhookEndpointRotateSecretResponse, - type WebhookEndpointCreateParams, - type WebhookEndpointRetrieveParams, - type WebhookEndpointUpdateParams, - type WebhookEndpointListParams, - type WebhookEndpointDeleteParams, - type WebhookEndpointRotateSecretParams, -} from './webhook-endpoints'; +export { Applications, type ApplicationCreateResponse, type ApplicationUpdateResponse, type ApplicationGetStatisticsResponse, type ApplicationListRecentTransactionsResponse, type ApplicationUpdateSettingsResponse, type ApplicationCreateParams, type ApplicationUpdateParams, type ApplicationGetStatisticsParams, type ApplicationListRecentTransactionsParams, type ApplicationUpdateSettingsParams } from './applications';; +export { Events, type EventRetrieveResponse, type EventListResponse, type EventListAttemptsResponse, type EventRetryDeliveryResponse, type EventRetrieveParams, type EventListParams, type EventListAttemptsParams, type EventRetryDeliveryParams } from './events';; +export { Projects, type ProjectCreateResponse, type ProjectRetrieveResponse, type ProjectUpdateResponse, type ProjectListResponse, type ProjectArchiveResponse, type ProjectUnarchiveResponse, type ProjectCreateParams, type ProjectUpdateParams, type ProjectListParams } from './projects';; +export { WebhookEndpoints, type WebhookEndpointCreateResponse, type WebhookEndpointRetrieveResponse, type WebhookEndpointUpdateResponse, type WebhookEndpointListResponse, type WebhookEndpointDeleteResponse, type WebhookEndpointRotateSecretResponse, type WebhookEndpointCreateParams, type WebhookEndpointRetrieveParams, type WebhookEndpointUpdateParams, type WebhookEndpointListParams, type WebhookEndpointDeleteParams, type WebhookEndpointRotateSecretParams } from './webhook-endpoints';; diff --git a/src/resources/projects/projects.ts b/src/resources/projects/projects.ts index 029df38..4fbc132 100644 --- a/src/resources/projects/projects.ts +++ b/src/resources/projects/projects.ts @@ -2,47 +2,11 @@ import { APIResource } from '../../core/resource'; import * as ApplicationsAPI from './applications'; -import { - ApplicationCreateParams, - ApplicationCreateResponse, - ApplicationGetStatisticsParams, - ApplicationGetStatisticsResponse, - ApplicationListRecentTransactionsParams, - ApplicationListRecentTransactionsResponse, - ApplicationUpdateParams, - ApplicationUpdateResponse, - ApplicationUpdateSettingsParams, - ApplicationUpdateSettingsResponse, - Applications, -} from './applications'; +import { ApplicationCreateParams, ApplicationCreateResponse, ApplicationGetStatisticsParams, ApplicationGetStatisticsResponse, ApplicationListRecentTransactionsParams, ApplicationListRecentTransactionsResponse, ApplicationUpdateParams, ApplicationUpdateResponse, ApplicationUpdateSettingsParams, ApplicationUpdateSettingsResponse, Applications } from './applications'; import * as EventsAPI from './events'; -import { - EventListAttemptsParams, - EventListAttemptsResponse, - EventListParams, - EventListResponse, - EventRetrieveParams, - EventRetrieveResponse, - EventRetryDeliveryParams, - EventRetryDeliveryResponse, - Events, -} from './events'; +import { EventListAttemptsParams, EventListAttemptsResponse, EventListParams, EventListResponse, EventRetrieveParams, EventRetrieveResponse, EventRetryDeliveryParams, EventRetryDeliveryResponse, Events } from './events'; import * as WebhookEndpointsAPI from './webhook-endpoints'; -import { - WebhookEndpointCreateParams, - WebhookEndpointCreateResponse, - WebhookEndpointDeleteParams, - WebhookEndpointDeleteResponse, - WebhookEndpointListParams, - WebhookEndpointListResponse, - WebhookEndpointRetrieveParams, - WebhookEndpointRetrieveResponse, - WebhookEndpointRotateSecretParams, - WebhookEndpointRotateSecretResponse, - WebhookEndpointUpdateParams, - WebhookEndpointUpdateResponse, - WebhookEndpoints, -} from './webhook-endpoints'; +import { WebhookEndpointCreateParams, WebhookEndpointCreateResponse, WebhookEndpointDeleteParams, WebhookEndpointDeleteResponse, WebhookEndpointListParams, WebhookEndpointListResponse, WebhookEndpointRetrieveParams, WebhookEndpointRetrieveResponse, WebhookEndpointRotateSecretParams, WebhookEndpointRotateSecretResponse, WebhookEndpointUpdateParams, WebhookEndpointUpdateResponse, WebhookEndpoints } from './webhook-endpoints'; import * as UsersAPI from '../users/users'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; @@ -53,9 +17,7 @@ import { path } from '../../internal/utils/path'; */ export class Projects extends APIResource { applications: ApplicationsAPI.Applications = new ApplicationsAPI.Applications(this._client); - webhookEndpoints: WebhookEndpointsAPI.WebhookEndpoints = new WebhookEndpointsAPI.WebhookEndpoints( - this._client, - ); + webhookEndpoints: WebhookEndpointsAPI.WebhookEndpoints = new WebhookEndpointsAPI.WebhookEndpoints(this._client); events: EventsAPI.Events = new EventsAPI.Events(this._client); /** @@ -83,10 +45,7 @@ export class Projects extends APIResource { * Returns a list of projects for the organization. Supports pagination and * filtering by archived status. Requires projects:read scope. */ - list( - query: ProjectListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { + list(query: ProjectListParams | null | undefined = {}, options?: RequestOptions): APIPromise { return this._client.get('/v2/projects', { query, ...options }); } @@ -666,7 +625,7 @@ export declare namespace Projects { type ProjectUnarchiveResponse as ProjectUnarchiveResponse, type ProjectCreateParams as ProjectCreateParams, type ProjectUpdateParams as ProjectUpdateParams, - type ProjectListParams as ProjectListParams, + type ProjectListParams as ProjectListParams }; export { @@ -680,7 +639,7 @@ export declare namespace Projects { type ApplicationUpdateParams as ApplicationUpdateParams, type ApplicationGetStatisticsParams as ApplicationGetStatisticsParams, type ApplicationListRecentTransactionsParams as ApplicationListRecentTransactionsParams, - type ApplicationUpdateSettingsParams as ApplicationUpdateSettingsParams, + type ApplicationUpdateSettingsParams as ApplicationUpdateSettingsParams }; export { @@ -696,7 +655,7 @@ export declare namespace Projects { type WebhookEndpointUpdateParams as WebhookEndpointUpdateParams, type WebhookEndpointListParams as WebhookEndpointListParams, type WebhookEndpointDeleteParams as WebhookEndpointDeleteParams, - type WebhookEndpointRotateSecretParams as WebhookEndpointRotateSecretParams, + type WebhookEndpointRotateSecretParams as WebhookEndpointRotateSecretParams }; export { @@ -708,6 +667,6 @@ export declare namespace Projects { type EventRetrieveParams as EventRetrieveParams, type EventListParams as EventListParams, type EventListAttemptsParams as EventListAttemptsParams, - type EventRetryDeliveryParams as EventRetryDeliveryParams, + type EventRetryDeliveryParams as EventRetryDeliveryParams }; } diff --git a/src/resources/projects/webhook-endpoints.ts b/src/resources/projects/webhook-endpoints.ts index 7f1f017..6c32722 100644 --- a/src/resources/projects/webhook-endpoints.ts +++ b/src/resources/projects/webhook-endpoints.ts @@ -12,23 +12,15 @@ export class WebhookEndpoints extends APIResource { /** * Creates a new webhook endpoint for the project. Requires webhooks:write scope. */ - create( - projectID: string, - body: WebhookEndpointCreateParams, - options?: RequestOptions, - ): APIPromise { + create(projectID: string, body: WebhookEndpointCreateParams, options?: RequestOptions): APIPromise { return this._client.post(path`/v2/projects/${projectID}/webhook_endpoints`, { body, ...options }); } /** * Retrieves a webhook endpoint by ID. Requires webhooks:read scope. */ - retrieve( - endpointID: string, - params: WebhookEndpointRetrieveParams, - options?: RequestOptions, - ): APIPromise { - const { project_id } = params; + retrieve(endpointID: string, params: WebhookEndpointRetrieveParams, options?: RequestOptions): APIPromise { + const { project_id } = params return this._client.get(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}`, options); } @@ -36,39 +28,24 @@ export class WebhookEndpoints extends APIResource { * Updates a webhook endpoint's URL, description, or other settings. Requires * webhooks:write scope. */ - update( - endpointID: string, - params: WebhookEndpointUpdateParams, - options?: RequestOptions, - ): APIPromise { - const { project_id, ...body } = params; - return this._client.patch(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}`, { - body, - ...options, - }); + update(endpointID: string, params: WebhookEndpointUpdateParams, options?: RequestOptions): APIPromise { + const { project_id, ...body } = params + return this._client.patch(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}`, { body, ...options }); } /** * Returns a list of webhook endpoints for the project. Supports pagination. * Requires webhooks:read scope. */ - list( - projectID: string, - query: WebhookEndpointListParams | null | undefined = {}, - options?: RequestOptions, - ): APIPromise { + list(projectID: string, query: WebhookEndpointListParams | null | undefined = {}, options?: RequestOptions): APIPromise { return this._client.get(path`/v2/projects/${projectID}/webhook_endpoints`, { query, ...options }); } /** * Deletes a webhook endpoint. Requires webhooks:write scope. */ - delete( - endpointID: string, - params: WebhookEndpointDeleteParams, - options?: RequestOptions, - ): APIPromise { - const { project_id } = params; + delete(endpointID: string, params: WebhookEndpointDeleteParams, options?: RequestOptions): APIPromise { + const { project_id } = params return this._client.delete(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}`, options); } @@ -76,16 +53,9 @@ export class WebhookEndpoints extends APIResource { * Rotates the signing secret for a webhook endpoint. The new secret will be used * immediately. Requires webhooks:write scope. */ - rotateSecret( - endpointID: string, - params: WebhookEndpointRotateSecretParams, - options?: RequestOptions, - ): APIPromise { - const { project_id } = params; - return this._client.post( - path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}/rotate_secret`, - options, - ); + rotateSecret(endpointID: string, params: WebhookEndpointRotateSecretParams, options?: RequestOptions): APIPromise { + const { project_id } = params + return this._client.post(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}/rotate_secret`, options); } } @@ -507,6 +477,6 @@ export declare namespace WebhookEndpoints { type WebhookEndpointUpdateParams as WebhookEndpointUpdateParams, type WebhookEndpointListParams as WebhookEndpointListParams, type WebhookEndpointDeleteParams as WebhookEndpointDeleteParams, - type WebhookEndpointRotateSecretParams as WebhookEndpointRotateSecretParams, + type WebhookEndpointRotateSecretParams as WebhookEndpointRotateSecretParams }; } diff --git a/src/resources/users/events.ts b/src/resources/users/events.ts index 65b7322..8ffb6d5 100644 --- a/src/resources/users/events.ts +++ b/src/resources/users/events.ts @@ -14,11 +14,7 @@ export class Events extends APIResource { * Retrieves a single event by ID. The `application_id` query parameter is required * for authorization. Requires users:read scope. */ - retrieve( - eventID: string, - query: EventRetrieveParams, - options?: RequestOptions, - ): APIPromise { + retrieve(eventID: string, query: EventRetrieveParams, options?: RequestOptions): APIPromise { return this._client.get(path`/v2/users/events/${eventID}`, { query, ...options }); } @@ -30,7 +26,7 @@ export class Events extends APIResource { } } -export type JsonValue = string | number | boolean | null | Array | unknown; +export type JsonValue = string | number | boolean | null | Array | unknown export interface EventRetrieveResponse { /** @@ -156,6 +152,6 @@ export declare namespace Events { type EventRetrieveResponse as EventRetrieveResponse, type EventListResponse as EventListResponse, type EventRetrieveParams as EventRetrieveParams, - type EventListParams as EventListParams, + type EventListParams as EventListParams }; } diff --git a/src/resources/users/index.ts b/src/resources/users/index.ts index ee24da8..7993a29 100644 --- a/src/resources/users/index.ts +++ b/src/resources/users/index.ts @@ -1,35 +1,5 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { - Events, - type JsonValue, - type EventRetrieveResponse, - type EventListResponse, - type EventRetrieveParams, - type EventListParams, -} from './events'; -export { - TestMode, - type TestModeUpdateResponse, - type TestModeListResponse, - type TestModeUpdateParams, - type TestModeListParams, -} from './test-mode'; -export { - Users, - type BooleanFromString, - type UserListEventNamesResponse, - type UserListFilterPropertiesResponse, - type UserResolveResponse, - type UserRetrieveActiveEntitlementsResponse, - type UserRetrieveAttributesResponse, - type UserRetrieveDeviceAttributesResponse, - type UserRetrieveSubscriptionSummaryResponse, - type UserListEventNamesParams, - type UserListFilterPropertiesParams, - type UserResolveParams, - type UserRetrieveActiveEntitlementsParams, - type UserRetrieveAttributesParams, - type UserRetrieveDeviceAttributesParams, - type UserRetrieveSubscriptionSummaryParams, -} from './users'; +export { Events, type JsonValue, type EventRetrieveResponse, type EventListResponse, type EventRetrieveParams, type EventListParams } from './events';; +export { TestMode, type TestModeUpdateResponse, type TestModeListResponse, type TestModeUpdateParams, type TestModeListParams } from './test-mode';; +export { Users, type BooleanFromString, type UserListEventNamesResponse, type UserListFilterPropertiesResponse, type UserResolveResponse, type UserRetrieveActiveEntitlementsResponse, type UserRetrieveAttributesResponse, type UserRetrieveDeviceAttributesResponse, type UserRetrieveSubscriptionSummaryResponse, type UserListEventNamesParams, type UserListFilterPropertiesParams, type UserResolveParams, type UserRetrieveActiveEntitlementsParams, type UserRetrieveAttributesParams, type UserRetrieveDeviceAttributesParams, type UserRetrieveSubscriptionSummaryParams } from './users';; diff --git a/src/resources/users/test-mode.ts b/src/resources/users/test-mode.ts index 454ab79..c29c472 100644 --- a/src/resources/users/test-mode.ts +++ b/src/resources/users/test-mode.ts @@ -12,11 +12,7 @@ export class TestMode extends APIResource { /** * Update User Test Mode */ - update( - appUserID: string, - body: TestModeUpdateParams, - options?: RequestOptions, - ): APIPromise { + update(appUserID: string, body: TestModeUpdateParams, options?: RequestOptions): APIPromise { return this._client.patch(path`/v2/users/${appUserID}/test-mode`, { body, ...options }); } @@ -82,6 +78,6 @@ export declare namespace TestMode { type TestModeUpdateResponse as TestModeUpdateResponse, type TestModeListResponse as TestModeListResponse, type TestModeUpdateParams as TestModeUpdateParams, - type TestModeListParams as TestModeListParams, + type TestModeListParams as TestModeListParams }; } diff --git a/src/resources/users/users.ts b/src/resources/users/users.ts index 923fb2c..7769e75 100644 --- a/src/resources/users/users.ts +++ b/src/resources/users/users.ts @@ -2,22 +2,9 @@ import { APIResource } from '../../core/resource'; import * as EventsAPI from './events'; -import { - EventListParams, - EventListResponse, - EventRetrieveParams, - EventRetrieveResponse, - Events, - JsonValue, -} from './events'; +import { EventListParams, EventListResponse, EventRetrieveParams, EventRetrieveResponse, Events, JsonValue } from './events'; import * as TestModeAPI from './test-mode'; -import { - TestMode, - TestModeListParams, - TestModeListResponse, - TestModeUpdateParams, - TestModeUpdateResponse, -} from './test-mode'; +import { TestMode, TestModeListParams, TestModeListResponse, TestModeUpdateParams, TestModeUpdateResponse } from './test-mode'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; @@ -32,20 +19,14 @@ export class Users extends APIResource { /** * List User Event Names */ - listEventNames( - query: UserListEventNamesParams, - options?: RequestOptions, - ): APIPromise { + listEventNames(query: UserListEventNamesParams, options?: RequestOptions): APIPromise { return this._client.get('/v2/users/event-names', { query, ...options }); } /** * List User Filter Properties */ - listFilterProperties( - query: UserListFilterPropertiesParams, - options?: RequestOptions, - ): APIPromise { + listFilterProperties(query: UserListFilterPropertiesParams, options?: RequestOptions): APIPromise { return this._client.get('/v2/users/filter-properties', { query, ...options }); } @@ -59,44 +40,28 @@ export class Users extends APIResource { /** * Get User Active Entitlements */ - retrieveActiveEntitlements( - appUserID: string, - query: UserRetrieveActiveEntitlementsParams, - options?: RequestOptions, - ): APIPromise { + retrieveActiveEntitlements(appUserID: string, query: UserRetrieveActiveEntitlementsParams, options?: RequestOptions): APIPromise { return this._client.get(path`/v2/users/${appUserID}/active-entitlements`, { query, ...options }); } /** * Get User Attributes */ - retrieveAttributes( - appUserID: string, - query: UserRetrieveAttributesParams, - options?: RequestOptions, - ): APIPromise { + retrieveAttributes(appUserID: string, query: UserRetrieveAttributesParams, options?: RequestOptions): APIPromise { return this._client.get(path`/v2/users/${appUserID}/attributes`, { query, ...options }); } /** * Get User Device Attributes */ - retrieveDeviceAttributes( - appUserID: string, - query: UserRetrieveDeviceAttributesParams, - options?: RequestOptions, - ): APIPromise { + retrieveDeviceAttributes(appUserID: string, query: UserRetrieveDeviceAttributesParams, options?: RequestOptions): APIPromise { return this._client.get(path`/v2/users/${appUserID}/device-attributes`, { query, ...options }); } /** * Get User Subscription Summary */ - retrieveSubscriptionSummary( - appUserID: string, - query: UserRetrieveSubscriptionSummaryParams, - options?: RequestOptions, - ): APIPromise { + retrieveSubscriptionSummary(appUserID: string, query: UserRetrieveSubscriptionSummaryParams, options?: RequestOptions): APIPromise { return this._client.get(path`/v2/users/${appUserID}/subscription-summary`, { query, ...options }); } } @@ -104,7 +69,7 @@ export class Users extends APIResource { /** * a string to be decoded into a boolean */ -export type BooleanFromString = 'true' | 'false'; +export type BooleanFromString = 'true' | 'false' export interface UserListEventNamesResponse { data: Array; @@ -357,7 +322,7 @@ export declare namespace Users { type UserRetrieveActiveEntitlementsParams as UserRetrieveActiveEntitlementsParams, type UserRetrieveAttributesParams as UserRetrieveAttributesParams, type UserRetrieveDeviceAttributesParams as UserRetrieveDeviceAttributesParams, - type UserRetrieveSubscriptionSummaryParams as UserRetrieveSubscriptionSummaryParams, + type UserRetrieveSubscriptionSummaryParams as UserRetrieveSubscriptionSummaryParams }; export { @@ -366,7 +331,7 @@ export declare namespace Users { type EventRetrieveResponse as EventRetrieveResponse, type EventListResponse as EventListResponse, type EventRetrieveParams as EventRetrieveParams, - type EventListParams as EventListParams, + type EventListParams as EventListParams }; export { @@ -374,6 +339,6 @@ export declare namespace Users { type TestModeUpdateResponse as TestModeUpdateResponse, type TestModeListResponse as TestModeListResponse, type TestModeUpdateParams as TestModeUpdateParams, - type TestModeListParams as TestModeListParams, + type TestModeListParams as TestModeListParams }; } diff --git a/src/uploads.ts b/src/uploads.ts index b2ef647..d543708 100644 --- a/src/uploads.ts +++ b/src/uploads.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/uploads instead */ -export * from './core/uploads'; +export * from "./core/uploads" \ No newline at end of file diff --git a/src/version.ts b/src/version.ts index 88f4d40..45d3c6c 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.3.0'; // x-release-please-version +export const VERSION = '0.3.0';// x-release-please-version diff --git a/tests/api-resources/campaigns/campaigns.test.ts b/tests/api-resources/campaigns/campaigns.test.ts index 934491f..cc1a165 100644 --- a/tests/api-resources/campaigns/campaigns.test.ts +++ b/tests/api-resources/campaigns/campaigns.test.ts @@ -5,28 +5,22 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource campaigns', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.campaigns.create({ - application_id: 'application_id', - audiences: [ - { - variants: [ - { - paywall: 'paywall', - percentage: 0, - type: 'treatment', - }, - ], - }, - ], - description: 'x', - placements: [{ event_name: 'x' }], - }); + application_id: 'application_id', + audiences: [{ variants: [{ + paywall: 'paywall', + percentage: 0, + type: 'treatment', + }] }], + description: 'x', + placements: [{ event_name: 'x' }], + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -39,32 +33,26 @@ describe('resource campaigns', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.campaigns.create({ - application_id: 'application_id', - audiences: [ - { - variants: [ - { - paywall: 'paywall', - percentage: 0, - type: 'treatment', - }, - ], - description: 'description', - enabled: true, - expression: 'expression', - variant_optimization: 'none', - }, - ], - description: 'x', - placements: [ - { - event_name: 'x', - enabled: true, - remove_from_other_campaigns: true, - }, - ], - notes: 'notes', - }); + application_id: 'application_id', + audiences: [{ + variants: [{ + paywall: 'paywall', + percentage: 0, + type: 'treatment', + }], + description: 'description', + enabled: true, + expression: 'expression', + variant_optimization: 'none', + }], + description: 'x', + placements: [{ + event_name: 'x', + enabled: true, + remove_from_other_campaigns: true, + }], + notes: 'notes', + }); }); // Mock server tests are disabled @@ -106,12 +94,12 @@ describe('resource campaigns', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.campaigns.list({ - application_id: 'application_id', - archived: 'true', - ending_before: 'ending_before', - limit: 'limit', - starting_after: 'starting_after', - }); + application_id: 'application_id', + archived: 'true', + ending_before: 'ending_before', + limit: 'limit', + starting_after: 'starting_after', + }); }); // Mock server tests are disabled @@ -153,9 +141,9 @@ describe('resource campaigns', () => { // Mock server tests are disabled test.skip('updateAudience: required and optional params', async () => { const response = await client.campaigns.updateAudience('audience_id', { - id: 'id', - description: 'description', - enabled: true, - }); + id: 'id', + description: 'description', + enabled: true, + }); }); }); diff --git a/tests/api-resources/campaigns/placements.test.ts b/tests/api-resources/campaigns/placements.test.ts index b5065af..8fe6c28 100644 --- a/tests/api-resources/campaigns/placements.test.ts +++ b/tests/api-resources/campaigns/placements.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource placements', () => { @@ -24,10 +24,10 @@ describe('resource placements', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.campaigns.placements.update('placement_id', { - id: 'id', - enabled: true, - event_name: 'x', - }); + id: 'id', + enabled: true, + event_name: 'x', + }); }); // Mock server tests are disabled @@ -45,10 +45,10 @@ describe('resource placements', () => { // Mock server tests are disabled test.skip('add: required and optional params', async () => { const response = await client.campaigns.placements.add('id', { - event_name: 'x', - enabled: true, - remove_from_other_campaigns: true, - }); + event_name: 'x', + enabled: true, + remove_from_other_campaigns: true, + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/charts.test.ts b/tests/api-resources/charts.test.ts index abc92e0..79b96ee 100644 --- a/tests/api-resources/charts.test.ts +++ b/tests/api-resources/charts.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource charts', () => { @@ -29,10 +29,10 @@ describe('resource charts', () => { // Mock server tests are disabled test.skip('queryData: only required params', async () => { const responsePromise = client.charts.queryData({ - application_id: 'application_id', - x_axis: 'x_axis', - y_axis: 'y_axis', - }); + application_id: 'application_id', + x_axis: 'x_axis', + y_axis: 'y_axis', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,36 +45,36 @@ describe('resource charts', () => { // Mock server tests are disabled test.skip('queryData: required and optional params', async () => { const response = await client.charts.queryData({ - application_id: 'application_id', - x_axis: 'x_axis', - y_axis: 'y_axis', - app_version: ['string'], - auto_renew_status: ['string'], - breakdown: 'breakdown', - campaign_id: ['string'], - conversion_timeframe: 'd1', - country_code: ['string'], - date_filter: { - dimension: 'purchaseDate', - preset: 'last_24_hours', - range: { from: 'from', to: 'to' }, - }, - date_interval: 'auto', - environment: ['string'], - event_type: ['string'], - experiment_id: ['string'], - include: ['string'], - max_data_points: 0, - paywall_id: ['string'], - placement: ['string'], - product_duration: ['string'], - product_id: ['string'], - revenue_source: ['string'], - revenue_type: ['string'], - sdk_version: ['string'], - store: ['string'], - sub_start_type: ['string'], - variant_id: ['string'], - }); + application_id: 'application_id', + x_axis: 'x_axis', + y_axis: 'y_axis', + app_version: ['string'], + auto_renew_status: ['string'], + breakdown: 'breakdown', + campaign_id: ['string'], + conversion_timeframe: 'd1', + country_code: ['string'], + date_filter: { + dimension: 'purchaseDate', + preset: 'last_24_hours', + range: { from: 'from', to: 'to' }, + }, + date_interval: 'auto', + environment: ['string'], + event_type: ['string'], + experiment_id: ['string'], + include: ['string'], + max_data_points: 0, + paywall_id: ['string'], + placement: ['string'], + product_duration: ['string'], + product_id: ['string'], + revenue_source: ['string'], + revenue_type: ['string'], + sdk_version: ['string'], + store: ['string'], + sub_start_type: ['string'], + variant_id: ['string'], + }); }); }); diff --git a/tests/api-resources/entitlements/entitlements.test.ts b/tests/api-resources/entitlements/entitlements.test.ts index cc29d37..10e4b8d 100644 --- a/tests/api-resources/entitlements/entitlements.test.ts +++ b/tests/api-resources/entitlements/entitlements.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource entitlements', () => { @@ -24,13 +24,13 @@ describe('resource entitlements', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.entitlements.create({ - identifier: 'x', - project_id: 'project_id', - description: 'description', - metadata: { foo: 'string' }, - name: 'name', - products: ['string'], - }); + identifier: 'x', + project_id: 'project_id', + description: 'description', + metadata: { foo: 'string' }, + name: 'name', + products: ['string'], + }); }); // Mock server tests are disabled @@ -72,11 +72,11 @@ describe('resource entitlements', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.entitlements.list({ - project_id: 'project_id', - ending_before: 'ending_before', - limit: 'limit', - starting_after: 'starting_after', - }); + project_id: 'project_id', + ending_before: 'ending_before', + limit: 'limit', + starting_after: 'starting_after', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/entitlements/grants.test.ts b/tests/api-resources/entitlements/grants.test.ts index ca8dd29..a421d24 100644 --- a/tests/api-resources/entitlements/grants.test.ts +++ b/tests/api-resources/entitlements/grants.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource grants', () => { @@ -24,11 +24,11 @@ describe('resource grants', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.entitlements.grants.create('id', { - device_id: 'x', - expires_at: 'expires_at', - reason: 'reason', - user_id: 'user_id', - }); + device_id: 'x', + expires_at: 'expires_at', + reason: 'reason', + user_id: 'user_id', + }); }); // Mock server tests are disabled @@ -46,19 +46,15 @@ describe('resource grants', () => { // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.entitlements.grants.list( - 'id', - { - ending_before: 'ending_before', - include_expired: 'true', - include_revoked: 'true', - limit: 'limit', - starting_after: 'starting_after', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(SuperwallAPI.NotFoundError); + await expect(client.entitlements.grants.list('id', { + ending_before: 'ending_before', + include_expired: 'true', + include_revoked: 'true', + limit: 'limit', + starting_after: 'starting_after', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(SuperwallAPI.NotFoundError); }); // Mock server tests are disabled diff --git a/tests/api-resources/grants.test.ts b/tests/api-resources/grants.test.ts index 8b513a8..cb465e3 100644 --- a/tests/api-resources/grants.test.ts +++ b/tests/api-resources/grants.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource grants', () => { @@ -24,14 +24,14 @@ describe('resource grants', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.grants.list({ - project_id: 'project_id', - device_id: 'device_id', - ending_before: 'ending_before', - include_expired: 'true', - include_revoked: 'true', - limit: 'limit', - starting_after: 'starting_after', - user_id: 'user_id', - }); + project_id: 'project_id', + device_id: 'device_id', + ending_before: 'ending_before', + include_expired: 'true', + include_revoked: 'true', + limit: 'limit', + starting_after: 'starting_after', + user_id: 'user_id', + }); }); }); diff --git a/tests/api-resources/me/organizations.test.ts b/tests/api-resources/me/organizations.test.ts index c2cc4bb..d8ce876 100644 --- a/tests/api-resources/me/organizations.test.ts +++ b/tests/api-resources/me/organizations.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource organizations', () => { diff --git a/tests/api-resources/paywalls/paywalls.test.ts b/tests/api-resources/paywalls/paywalls.test.ts index 8cb49ca..8e8a5bf 100644 --- a/tests/api-resources/paywalls/paywalls.test.ts +++ b/tests/api-resources/paywalls/paywalls.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource paywalls', () => { @@ -24,22 +24,20 @@ describe('resource paywalls', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.paywalls.create({ - application_id: 'application_id', - name: 'x', - feature_gating: 'gated', - identifier: 'identifier', - metadata: { foo: 'string' }, - presentation_style: 'fullscreen', - products: [ - { - identifier: 'identifier', - reference_name: 'x', - store: 'app-store', - }, - ], - template: 'template', - url: 'url', - }); + application_id: 'application_id', + name: 'x', + feature_gating: 'gated', + identifier: 'identifier', + metadata: { foo: 'string' }, + presentation_style: 'fullscreen', + products: [{ + identifier: 'identifier', + reference_name: 'x', + store: 'app-store', + }], + template: 'template', + url: 'url', + }); }); // Mock server tests are disabled @@ -81,13 +79,13 @@ describe('resource paywalls', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.paywalls.list({ - application_id: 'application_id', - archived: 'true', - ending_before: 'ending_before', - limit: 'limit', - starting_after: 'starting_after', - status: 'draft', - }); + application_id: 'application_id', + archived: 'true', + ending_before: 'ending_before', + limit: 'limit', + starting_after: 'starting_after', + status: 'draft', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/paywalls/templates.test.ts b/tests/api-resources/paywalls/templates.test.ts index 30fcfa5..6148f64 100644 --- a/tests/api-resources/paywalls/templates.test.ts +++ b/tests/api-resources/paywalls/templates.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource templates', () => { @@ -36,12 +36,12 @@ describe('resource templates', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.paywalls.templates.list({ - application_id: 'application_id', - category: 'category', - ending_before: 'ending_before', - limit: 'limit', - starting_after: 'starting_after', - visibility: 'public', - }); + application_id: 'application_id', + category: 'category', + ending_before: 'ending_before', + limit: 'limit', + starting_after: 'starting_after', + visibility: 'public', + }); }); }); diff --git a/tests/api-resources/products.test.ts b/tests/api-resources/products.test.ts index 4cfc46c..1127061 100644 --- a/tests/api-resources/products.test.ts +++ b/tests/api-resources/products.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource products', () => { @@ -24,18 +24,18 @@ describe('resource products', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.products.create({ - identifier: 'x', - project_id: 'project_id', - entitlements: ['string'], - metadata: { foo: 'string' }, - name: 'name', - price: { amount: 0, currency: 'currency' }, - subscription: { - period: 'day', - period_count: 0, - trial_period_days: 0, - }, - }); + identifier: 'x', + project_id: 'project_id', + entitlements: ['string'], + metadata: { foo: 'string' }, + name: 'name', + price: { amount: 0, currency: 'currency' }, + subscription: { + period: 'day', + period_count: 0, + trial_period_days: 0, + }, + }); }); // Mock server tests are disabled @@ -77,12 +77,12 @@ describe('resource products', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.products.list({ - project_id: 'project_id', - ending_before: 'ending_before', - limit: 'limit', - platform: 'ios', - starting_after: 'starting_after', - }); + project_id: 'project_id', + ending_before: 'ending_before', + limit: 'limit', + platform: 'ios', + starting_after: 'starting_after', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/projects/applications.test.ts b/tests/api-resources/projects/applications.test.ts index 525f188..a2dcd8a 100644 --- a/tests/api-resources/projects/applications.test.ts +++ b/tests/api-resources/projects/applications.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource applications', () => { @@ -24,12 +24,12 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.projects.applications.create('id', { - name: 'x', - platform: 'ios', - app_id: 'app_id', - bundle_id: 'bundle_id', - domain: 'domain', - }); + name: 'x', + platform: 'ios', + app_id: 'app_id', + bundle_id: 'bundle_id', + domain: 'domain', + }); }); // Mock server tests are disabled @@ -47,21 +47,21 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.projects.applications.update('application_id', { - id: 'id', - app_id: 'app_id', - bundle_id: 'bundle_id', - name: 'x', - }); + id: 'id', + app_id: 'app_id', + bundle_id: 'bundle_id', + name: 'x', + }); }); // Mock server tests are disabled test.skip('getStatistics: only required params', async () => { const responsePromise = client.projects.applications.getStatistics('application_id', { - id: 'id', - environment: 'PRODUCTION', - from: 'from', - to: 'to', - }); + id: 'id', + environment: 'PRODUCTION', + from: 'from', + to: 'to', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -74,21 +74,21 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('getStatistics: required and optional params', async () => { const response = await client.projects.applications.getStatistics('application_id', { - id: 'id', - environment: 'PRODUCTION', - from: 'from', - to: 'to', - }); + id: 'id', + environment: 'PRODUCTION', + from: 'from', + to: 'to', + }); }); // Mock server tests are disabled test.skip('listRecentTransactions: only required params', async () => { const responsePromise = client.projects.applications.listRecentTransactions('application_id', { - id: 'id', - environment: 'PRODUCTION', - from: 'from', - to: 'to', - }); + id: 'id', + environment: 'PRODUCTION', + from: 'from', + to: 'to', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -101,11 +101,11 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('listRecentTransactions: required and optional params', async () => { const response = await client.projects.applications.listRecentTransactions('application_id', { - id: 'id', - environment: 'PRODUCTION', - from: 'from', - to: 'to', - }); + id: 'id', + environment: 'PRODUCTION', + from: 'from', + to: 'to', + }); }); // Mock server tests are disabled @@ -123,14 +123,14 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('updateSettings: required and optional params', async () => { const response = await client.projects.applications.updateSettings('application_id', { - id: 'id', - app_store_connect_shared_secret: 'app_store_connect_shared_secret', - apple_small_business_end_date: 'apple_small_business_end_date', - apple_small_business_start_date: 'apple_small_business_start_date', - apple_url_scheme: 'apple_url_scheme', - notification_redirect_url: 'notification_redirect_url', - revenue_cat_public_api_key: 'revenue_cat_public_api_key', - stripe_private_key: 'stripe_private_key', - }); + id: 'id', + app_store_connect_shared_secret: 'app_store_connect_shared_secret', + apple_small_business_end_date: 'apple_small_business_end_date', + apple_small_business_start_date: 'apple_small_business_start_date', + apple_url_scheme: 'apple_url_scheme', + notification_redirect_url: 'notification_redirect_url', + revenue_cat_public_api_key: 'revenue_cat_public_api_key', + stripe_private_key: 'stripe_private_key', + }); }); }); diff --git a/tests/api-resources/projects/events.test.ts b/tests/api-resources/projects/events.test.ts index e200fe6..d3cc9ff 100644 --- a/tests/api-resources/projects/events.test.ts +++ b/tests/api-resources/projects/events.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource events', () => { @@ -41,22 +41,18 @@ describe('resource events', () => { // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.projects.events.list( - 'project_id', - { - after: 'after', - before: 'before', - channel: 'channel', - event_types: ['string'], - iterator: 'iterator', - limit: 'limit', - tag: 'tag', - with_content: 'true', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(SuperwallAPI.NotFoundError); + await expect(client.projects.events.list('project_id', { + after: 'after', + before: 'before', + channel: 'channel', + event_types: ['string'], + iterator: 'iterator', + limit: 'limit', + tag: 'tag', + with_content: 'true', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(SuperwallAPI.NotFoundError); }); // Mock server tests are disabled @@ -74,22 +70,19 @@ describe('resource events', () => { // Mock server tests are disabled test.skip('listAttempts: required and optional params', async () => { const response = await client.projects.events.listAttempts('event_id', { - project_id: 'project_id', - after: 'after', - before: 'before', - iterator: 'iterator', - limit: 'limit', - status: 'status', - status_code_class: 'status_code_class', - }); + project_id: 'project_id', + after: 'after', + before: 'before', + iterator: 'iterator', + limit: 'limit', + status: 'status', + status_code_class: 'status_code_class', + }); }); // Mock server tests are disabled test.skip('retryDelivery: only required params', async () => { - const responsePromise = client.projects.events.retryDelivery('event_id', { - project_id: 'project_id', - endpoint_id: 'endpoint_id', - }); + const responsePromise = client.projects.events.retryDelivery('event_id', { project_id: 'project_id', endpoint_id: 'endpoint_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -101,9 +94,6 @@ describe('resource events', () => { // Mock server tests are disabled test.skip('retryDelivery: required and optional params', async () => { - const response = await client.projects.events.retryDelivery('event_id', { - project_id: 'project_id', - endpoint_id: 'endpoint_id', - }); + const response = await client.projects.events.retryDelivery('event_id', { project_id: 'project_id', endpoint_id: 'endpoint_id' }); }); }); diff --git a/tests/api-resources/projects/projects.test.ts b/tests/api-resources/projects/projects.test.ts index e67da56..ecdc53e 100644 --- a/tests/api-resources/projects/projects.test.ts +++ b/tests/api-resources/projects/projects.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource projects', () => { @@ -24,10 +24,10 @@ describe('resource projects', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.projects.create({ - name: 'x', - organization_id: 0, - metadata: { foo: 'string' }, - }); + name: 'x', + organization_id: 0, + metadata: { foo: 'string' }, + }); }); // Mock server tests are disabled @@ -69,18 +69,15 @@ describe('resource projects', () => { // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.projects.list( - { - archived: 'true', - ending_before: 'ending_before', - limit: 'limit', - organization_id: 'organization_id', - starting_after: 'starting_after', - }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(SuperwallAPI.NotFoundError); + await expect(client.projects.list({ + archived: 'true', + ending_before: 'ending_before', + limit: 'limit', + organization_id: 'organization_id', + starting_after: 'starting_after', + }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(SuperwallAPI.NotFoundError); }); // Mock server tests are disabled diff --git a/tests/api-resources/projects/webhook-endpoints.test.ts b/tests/api-resources/projects/webhook-endpoints.test.ts index 7dc8c42..05f224d 100644 --- a/tests/api-resources/projects/webhook-endpoints.test.ts +++ b/tests/api-resources/projects/webhook-endpoints.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource webhookEndpoints', () => { @@ -24,19 +24,17 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.projects.webhookEndpoints.create('project_id', { - url: 'x', - description: 'description', - filter_types: ['string'], - headers: { foo: 'string' }, - metadata: { foo: 'string' }, - }); + url: 'x', + description: 'description', + filter_types: ['string'], + headers: { foo: 'string' }, + metadata: { foo: 'string' }, + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.projects.webhookEndpoints.retrieve('endpoint_id', { - project_id: 'project_id', - }); + const responsePromise = client.projects.webhookEndpoints.retrieve('endpoint_id', { project_id: 'project_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -48,16 +46,12 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.projects.webhookEndpoints.retrieve('endpoint_id', { - project_id: 'project_id', - }); + const response = await client.projects.webhookEndpoints.retrieve('endpoint_id', { project_id: 'project_id' }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.projects.webhookEndpoints.update('endpoint_id', { - project_id: 'project_id', - }); + const responsePromise = client.projects.webhookEndpoints.update('endpoint_id', { project_id: 'project_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -70,14 +64,14 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.projects.webhookEndpoints.update('endpoint_id', { - project_id: 'project_id', - description: 'description', - disabled: true, - filter_types: ['string'], - headers: { foo: 'string' }, - metadata: { foo: 'string' }, - url: 'url', - }); + project_id: 'project_id', + description: 'description', + disabled: true, + filter_types: ['string'], + headers: { foo: 'string' }, + metadata: { foo: 'string' }, + url: 'url', + }); }); // Mock server tests are disabled @@ -95,20 +89,14 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect( - client.projects.webhookEndpoints.list( - 'project_id', - { iterator: 'iterator', limit: 'limit' }, - { path: '/_stainless_unknown_path' }, - ), - ).rejects.toThrow(SuperwallAPI.NotFoundError); + await expect(client.projects.webhookEndpoints.list('project_id', { iterator: 'iterator', limit: 'limit' }, { path: '/_stainless_unknown_path' })) + .rejects + .toThrow(SuperwallAPI.NotFoundError); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.projects.webhookEndpoints.delete('endpoint_id', { - project_id: 'project_id', - }); + const responsePromise = client.projects.webhookEndpoints.delete('endpoint_id', { project_id: 'project_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -120,16 +108,12 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.projects.webhookEndpoints.delete('endpoint_id', { - project_id: 'project_id', - }); + const response = await client.projects.webhookEndpoints.delete('endpoint_id', { project_id: 'project_id' }); }); // Mock server tests are disabled test.skip('rotateSecret: only required params', async () => { - const responsePromise = client.projects.webhookEndpoints.rotateSecret('endpoint_id', { - project_id: 'project_id', - }); + const responsePromise = client.projects.webhookEndpoints.rotateSecret('endpoint_id', { project_id: 'project_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -141,8 +125,6 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('rotateSecret: required and optional params', async () => { - const response = await client.projects.webhookEndpoints.rotateSecret('endpoint_id', { - project_id: 'project_id', - }); + const response = await client.projects.webhookEndpoints.rotateSecret('endpoint_id', { project_id: 'project_id' }); }); }); diff --git a/tests/api-resources/users/events.test.ts b/tests/api-resources/users/events.test.ts index 8afa107..c27855b 100644 --- a/tests/api-resources/users/events.test.ts +++ b/tests/api-resources/users/events.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource events', () => { @@ -41,11 +41,11 @@ describe('resource events', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.users.events.list('app_user_id', { - application_id: 'application_id', - event_group: 'app', - limit: 'limit', - offset: 'offset', - search_term: 'search_term', - }); + application_id: 'application_id', + event_group: 'app', + limit: 'limit', + offset: 'offset', + search_term: 'search_term', + }); }); }); diff --git a/tests/api-resources/users/test-mode.test.ts b/tests/api-resources/users/test-mode.test.ts index c3e82b6..487aae4 100644 --- a/tests/api-resources/users/test-mode.test.ts +++ b/tests/api-resources/users/test-mode.test.ts @@ -5,16 +5,13 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource testMode', () => { // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.users.testMode.update('app_user_id', { - application_id: 'application_id', - test_mode_enabled: true, - }); + const responsePromise = client.users.testMode.update('app_user_id', { application_id: 'application_id', test_mode_enabled: true }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -26,10 +23,7 @@ describe('resource testMode', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { - const response = await client.users.testMode.update('app_user_id', { - application_id: 'application_id', - test_mode_enabled: true, - }); + const response = await client.users.testMode.update('app_user_id', { application_id: 'application_id', test_mode_enabled: true }); }); // Mock server tests are disabled diff --git a/tests/api-resources/users/users.test.ts b/tests/api-resources/users/users.test.ts index ec1fe62..deca073 100644 --- a/tests/api-resources/users/users.test.ts +++ b/tests/api-resources/users/users.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', }); describe('resource users', () => { @@ -24,12 +24,12 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('listEventNames: required and optional params', async () => { const response = await client.users.listEventNames({ - application_id: 'application_id', - include_all: 'true', - is_web: 'true', - limit: 'limit', - offset: 'offset', - }); + application_id: 'application_id', + include_all: 'true', + is_web: 'true', + limit: 'limit', + offset: 'offset', + }); }); // Mock server tests are disabled @@ -51,10 +51,7 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('resolve: only required params', async () => { - const responsePromise = client.users.resolve({ - app_user_id: 'app_user_id', - application_id: 'application_id', - }); + const responsePromise = client.users.resolve({ app_user_id: 'app_user_id', application_id: 'application_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -66,17 +63,12 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('resolve: required and optional params', async () => { - const response = await client.users.resolve({ - app_user_id: 'app_user_id', - application_id: 'application_id', - }); + const response = await client.users.resolve({ app_user_id: 'app_user_id', application_id: 'application_id' }); }); // Mock server tests are disabled test.skip('retrieveActiveEntitlements: only required params', async () => { - const responsePromise = client.users.retrieveActiveEntitlements('app_user_id', { - application_id: 'application_id', - }); + const responsePromise = client.users.retrieveActiveEntitlements('app_user_id', { application_id: 'application_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -88,16 +80,12 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('retrieveActiveEntitlements: required and optional params', async () => { - const response = await client.users.retrieveActiveEntitlements('app_user_id', { - application_id: 'application_id', - }); + const response = await client.users.retrieveActiveEntitlements('app_user_id', { application_id: 'application_id' }); }); // Mock server tests are disabled test.skip('retrieveAttributes: only required params', async () => { - const responsePromise = client.users.retrieveAttributes('app_user_id', { - application_id: 'application_id', - }); + const responsePromise = client.users.retrieveAttributes('app_user_id', { application_id: 'application_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -109,16 +97,12 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('retrieveAttributes: required and optional params', async () => { - const response = await client.users.retrieveAttributes('app_user_id', { - application_id: 'application_id', - }); + const response = await client.users.retrieveAttributes('app_user_id', { application_id: 'application_id' }); }); // Mock server tests are disabled test.skip('retrieveDeviceAttributes: only required params', async () => { - const responsePromise = client.users.retrieveDeviceAttributes('app_user_id', { - application_id: 'application_id', - }); + const responsePromise = client.users.retrieveDeviceAttributes('app_user_id', { application_id: 'application_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -130,16 +114,12 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('retrieveDeviceAttributes: required and optional params', async () => { - const response = await client.users.retrieveDeviceAttributes('app_user_id', { - application_id: 'application_id', - }); + const response = await client.users.retrieveDeviceAttributes('app_user_id', { application_id: 'application_id' }); }); // Mock server tests are disabled test.skip('retrieveSubscriptionSummary: only required params', async () => { - const responsePromise = client.users.retrieveSubscriptionSummary('app_user_id', { - application_id: 'application_id', - }); + const responsePromise = client.users.retrieveSubscriptionSummary('app_user_id', { application_id: 'application_id' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -151,8 +131,6 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('retrieveSubscriptionSummary: required and optional params', async () => { - const response = await client.users.retrieveSubscriptionSummary('app_user_id', { - application_id: 'application_id', - }); + const response = await client.users.retrieveSubscriptionSummary('app_user_id', { application_id: 'application_id' }); }); }); diff --git a/tests/index.test.ts b/tests/index.test.ts index 48b1b77..c094a4d 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -21,11 +21,11 @@ describe('instantiate client', () => { describe('defaultHeaders', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-My-Default-Header': '2' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-My-Default-Header': '2' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}) test('they are used in the request', async () => { const { req } = await client.buildRequest({ path: '/foo', method: 'post' }); @@ -50,209 +50,207 @@ describe('instantiate client', () => { expect(req.headers.has('x-my-default-header')).toBe(false); }); }); - describe('logging', () => { - const env = process.env; +describe('logging', () => { + const env = process.env; - beforeEach(() => { - process.env = { ...env }; - process.env['SUPERWALL_API_LOG'] = undefined; - }); + beforeEach(() => { + process.env = { ...env }; + process.env['SUPERWALL_API_LOG'] = undefined; + }); - afterEach(() => { - process.env = env; - }); + afterEach(() => { + process.env = env; + }); - const forceAPIResponseForClient = async (client: SuperwallAPI) => { - await new APIPromise( - client, - Promise.resolve({ - response: new Response(), - controller: new AbortController(), - requestLogID: 'log_000000', - retryOfRequestLogID: undefined, - startTime: Date.now(), - options: { - method: 'get', - path: '/', - }, - }), - ); + const forceAPIResponseForClient = async (client: SuperwallAPI) => { + await new APIPromise( + client, + Promise.resolve({ + response: new Response(), + controller: new AbortController(), + requestLogID: 'log_000000', + retryOfRequestLogID: undefined, + startTime: Date.now(), + options: { + method: 'get', + path: '/', + }, + }), + ); + }; + + test('debug logs when log level is debug', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), }; - test('debug logs when log level is debug', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; - - const client = new SuperwallAPI({ - logger: logger, - logLevel: 'debug', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + const client = new SuperwallAPI({ + logger: logger, + logLevel: 'debug', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - test('default logLevel is warn', async () => { - const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.logLevel).toBe('warn'); - }); + test('default logLevel is warn', async () => { + const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); + expect(client.logLevel).toBe('warn'); + }); - test('debug logs are skipped when log level is info', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('debug logs are skipped when log level is info', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - const client = new SuperwallAPI({ - logger: logger, - logLevel: 'info', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + const client = new SuperwallAPI({ + logger: logger, + logLevel: 'info', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - test('debug logs happen with debug env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('debug logs happen with debug env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - process.env['SUPERWALL_API_LOG'] = 'debug'; - const client = new SuperwallAPI({ - logger: logger, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); - expect(client.logLevel).toBe('debug'); + process.env['SUPERWALL_API_LOG'] = 'debug'; + const client = new SuperwallAPI({ + logger: logger, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); + expect(client.logLevel).toBe('debug'); - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - test('warn when env var level is invalid', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + test('warn when env var level is invalid', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; - process.env['SUPERWALL_API_LOG'] = 'not a log level'; - const client = new SuperwallAPI({ - logger: logger, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); - expect(client.logLevel).toBe('warn'); - expect(warnMock).toHaveBeenCalledWith( - 'process.env[\'SUPERWALL_API_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]', - ); - }); + process.env['SUPERWALL_API_LOG'] = 'not a log level'; + const client = new SuperwallAPI({ + logger: logger, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); + expect(client.logLevel).toBe('warn'); + expect(warnMock).toHaveBeenCalledWith('process.env[\'SUPERWALL_API_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]'); + }); - test('client log level overrides env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('client log level overrides env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - process.env['SUPERWALL_API_LOG'] = 'debug'; - const client = new SuperwallAPI({ - logger: logger, - logLevel: 'off', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + process.env['SUPERWALL_API_LOG'] = 'debug'; + const client = new SuperwallAPI({ + logger: logger, + logLevel: 'off', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - test('no warning logged for invalid env var level + valid client level', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + test('no warning logged for invalid env var level + valid client level', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; - process.env['SUPERWALL_API_LOG'] = 'not a log level'; - const client = new SuperwallAPI({ - logger: logger, - logLevel: 'debug', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); - expect(client.logLevel).toBe('debug'); - expect(warnMock).not.toHaveBeenCalled(); - }); + process.env['SUPERWALL_API_LOG'] = 'not a log level'; + const client = new SuperwallAPI({ + logger: logger, + logLevel: 'debug', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); + expect(client.logLevel).toBe('debug'); + expect(warnMock).not.toHaveBeenCalled(); }); +}); describe('defaultQuery', () => { test('with null query params given', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo'); }); test('multiple default query params', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo', hello: 'world' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo', hello: 'world' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo&hello=world'); }); test('overriding with `undefined`', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultQuery: { hello: 'world' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultQuery: { hello: 'world' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}) expect(client.buildURL('/foo', { hello: undefined })).toEqual('http://localhost:5000/foo'); }); }); test('custom fetch', async () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: (url) => { - return Promise.resolve( - new Response(JSON.stringify({ url, custom: true }), { - headers: { 'Content-Type': 'application/json' }, - }), - ); - }, - }); + baseURL: 'http://localhost:5000/', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: (url) => { + return Promise.resolve( + new Response(JSON.stringify({ url, custom: true }), { + headers: { 'Content-Type': 'application/json' }, + }), + ); +}, +}); const response = await client.get('/foo'); expect(response).toEqual({ url: 'http://localhost:5000/foo', custom: true }); @@ -261,37 +259,39 @@ describe('instantiate client', () => { test('explicit global fetch', async () => { // make sure the global fetch type is assignable to our Fetch type const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: defaultFetch, - }); + baseURL: 'http://localhost:5000/', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: defaultFetch, +}); }); test('custom signal', async () => { const client = new SuperwallAPI({ - baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: (...args) => { - return new Promise((resolve, reject) => - setTimeout( - () => - defaultFetch(...args) - .then(resolve) - .catch(reject), - 300, - ), - ); - }, - }); + baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: (...args) => { + return new Promise((resolve, reject) => + setTimeout( + () => + defaultFetch(...args) + .then(resolve) + .catch(reject), + 300, + ), + ); +}, +}); const controller = new AbortController(); setTimeout(() => controller.abort(), 200); const spy = jest.spyOn(client, 'request'); - await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError(APIUserAbortError); + await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError( + APIUserAbortError, + ); expect(spy).toHaveBeenCalledTimes(1); }); @@ -303,11 +303,11 @@ describe('instantiate client', () => { }; const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - }); + baseURL: 'http://localhost:5000/', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, +}); await client.patch('/foo'); expect(capturedRequest?.method).toEqual('PATCH'); @@ -316,19 +316,19 @@ describe('instantiate client', () => { describe('baseUrl', () => { test('trailing slash', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/custom/path/', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/custom/path/', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); test('no trailing slash', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/custom/path', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/custom/path', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); @@ -338,10 +338,10 @@ describe('instantiate client', () => { test('explicit option', () => { const client = new SuperwallAPI({ - baseURL: 'https://example.com', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'https://example.com', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); expect(client.baseURL).toEqual('https://example.com'); }); @@ -354,48 +354,42 @@ describe('instantiate client', () => { test('empty env variable', () => { process.env['SUPERWALL_API_BASE_URL'] = ''; // empty const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.baseURL).toEqual('https://api.superwall.com'); + expect(client.baseURL).toEqual('https://api.superwall.com') }); test('blank env variable', () => { process.env['SUPERWALL_API_BASE_URL'] = ' '; // blank const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.baseURL).toEqual('https://api.superwall.com'); + expect(client.baseURL).toEqual('https://api.superwall.com') }); test('in request options', () => { const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( - 'http://localhost:5000/option/foo', - ); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/option/foo'); }); test('in request options overridden by client options', () => { const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - baseURL: 'http://localhost:5000/client', - }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( - 'http://localhost:5000/client/foo', - ); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + baseURL: 'http://localhost:5000/client', + }); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/client/foo'); }); test('in request options overridden by env variable', () => { process.env['SUPERWALL_API_BASE_URL'] = 'http://localhost:5000/env'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( - 'http://localhost:5000/env/foo', - ); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/env/foo'); }); }); test('maxRetries option is correctly set', () => { const client = new SuperwallAPI({ - maxRetries: 4, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + maxRetries: 4, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', +}); expect(client.maxRetries).toEqual(4); // default @@ -406,11 +400,11 @@ describe('instantiate client', () => { describe('withOptions', () => { test('creates a new client with overridden options', async () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - maxRetries: 3, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + maxRetries: 3, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); const newClient = client.withOptions({ maxRetries: 5, @@ -432,12 +426,12 @@ describe('instantiate client', () => { test('inherits options from the parent client', async () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-Test-Header': 'test-value' }, - defaultQuery: { 'test-param': 'test-value' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-Test-Header': 'test-value' }, + defaultQuery: { 'test-param': 'test-value' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); const newClient = client.withOptions({ baseURL: 'http://localhost:5001/', @@ -452,11 +446,11 @@ describe('instantiate client', () => { test('respects runtime property changes when creating new client', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - timeout: 1000, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + timeout: 1000, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); // Modify the client properties directly after creation client.baseURL = 'http://localhost:6000/'; @@ -506,18 +500,13 @@ describe('request building', () => { describe('custom headers', () => { test('handles undefined', async () => { - const { req } = await client.buildRequest({ - path: '/foo', - method: 'post', - body: { value: 'hello' }, - headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null }, - }); + const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: { value: 'hello' }, headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null } }); expect(req.headers.get('x-foo')).toEqual('bar'); expect(req.headers.get('x-Foo')).toEqual('bar'); expect(req.headers.get('X-Foo')).toEqual('bar'); expect(req.headers.get('x-baz')).toEqual(null); }); - }); + }) }); describe('default encoder', () => { @@ -594,41 +583,38 @@ describe('default encoder', () => { describe('retries', () => { test('retry on timeout', async () => { let count = 0; - const testFetch = async ( - url: string | URL | Request, - { signal }: RequestInit = {}, - ): Promise => { - if (count++ === 0) { - return new Promise( - (resolve, reject) => signal?.addEventListener('abort', () => reject(new Error('timed out'))), - ); - } - return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); - }; - - const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - timeout: 10, - fetch: testFetch, - }); + const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { + if (count++ === 0) { + return new Promise((resolve, reject) => + signal?.addEventListener('abort', () => reject(new Error('timed out'))), + ); + } + return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); + }; - expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); - expect(count).toEqual(2); - expect( - await client - .request({ path: '/foo', method: 'get' }) - .asResponse() - .then((r) => r.text()), - ).toEqual(JSON.stringify({ a: 1 })); - expect(count).toEqual(3); + const client = new SuperwallAPI({ + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + timeout: 10, + fetch: testFetch, }); + expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); + expect(count).toEqual(2); + expect( + await client + .request({ path: '/foo', method: 'get' }) + .asResponse() + .then((r) => r.text()), + ).toEqual(JSON.stringify({ a: 1 })); + expect(count).toEqual(3); + }); + test('retry count header', async () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -642,11 +628,11 @@ describe('retries', () => { }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); @@ -658,7 +644,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -671,11 +657,11 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -692,7 +678,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -705,12 +691,12 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - defaultHeaders: { 'X-Stainless-Retry-Count': null }, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + defaultHeaders: { 'X-Stainless-Retry-Count': null }, + }); expect( await client.request({ @@ -726,7 +712,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++; + count++ if (count <= 2) { return new Response(undefined, { status: 429, @@ -739,11 +725,11 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -758,10 +744,7 @@ describe('retries', () => { test('retry on 429 with retry-after', async () => { let count = 0; - const testFetch = async ( - url: string | URL | Request, - { signal }: RequestInit = {}, - ): Promise => { + const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, @@ -774,10 +757,10 @@ describe('retries', () => { }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + }); expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); expect(count).toEqual(2); @@ -792,10 +775,7 @@ describe('retries', () => { test('retry on 429 with retry-after-ms', async () => { let count = 0; - const testFetch = async ( - url: string | URL | Request, - { signal }: RequestInit = {}, - ): Promise => { + const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, @@ -808,10 +788,10 @@ describe('retries', () => { }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + }); expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); expect(count).toEqual(2); diff --git a/tests/qs/utils.test.ts b/tests/qs/utils.test.ts index a1b3205..d62d0bf 100644 --- a/tests/qs/utils.test.ts +++ b/tests/qs/utils.test.ts @@ -66,7 +66,7 @@ describe('merge()', function () { // st.equal(getCount, 1); expect(setCount).toEqual(0); expect(getCount).toEqual(1); - observed[0] = observed[0]; + observed[0] = observed[0]; // st.equal(setCount, 1); // st.equal(getCount, 2); expect(setCount).toEqual(1); diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts index 7c641a4..22cdadf 100644 --- a/tests/stringifyQuery.test.ts +++ b/tests/stringifyQuery.test.ts @@ -2,20 +2,18 @@ import { stringifyQuery } from 'superwall-api/internal/utils/query'; -describe(stringifyQuery, () => { - for (const [input, expected] of [ - [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], - [{ a: null, b: false, c: undefined }, 'a=&b=false'], - [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], - [ - { 'a/b': 'c/d', 'e=f': 'g&h' }, - `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( - 'e=f', - )}=${encodeURIComponent('g&h')}`, - ], - ] as const) { - it(`${JSON.stringify(input)} -> ${expected}`, () => { - expect(stringifyQuery(input)).toEqual(expected); - }); - } -}); +describe(stringifyQuery, () => { for (const [input, expected] of [ + [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], + [{ a: null, b: false, c: undefined }, 'a=&b=false'], + [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], + [ + { 'a/b': 'c/d', 'e=f': 'g&h' }, + `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( + 'e=f', + )}=${encodeURIComponent('g&h')}`, + ], +] as const) { + it(`${JSON.stringify(input)} -> ${expected}`, () => { + expect(stringifyQuery(input)).toEqual(expected); + }); +} }) From 22584613c0444f83628c57ed931aa6ded2dad5d0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Apr 2026 11:13:39 +0000 Subject: [PATCH 18/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ba45e9a..5b692df 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-bc0a8562781b27e3e0dbea4e1822cb9e5f638a6043c2c76788929bc4340db582.yml -openapi_spec_hash: 61b01d031e495b8df39417deafa11ed1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-3d19f0b2fea63e35b09acbd5cc206ce1b1da3e51c59eb7b50098495e6fb7a609.yml +openapi_spec_hash: 9bc708f1c1cab1d21be58912fdc3c9bd config_hash: dfc8fae1943177a610a7d4985af30c54 From f9215a4439cee90959da5384acb4da1c21b5070a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 02:10:22 +0000 Subject: [PATCH 19/25] chore(internal): codegen related update --- eslint.config.mjs | 3 + package.json | 1 + pnpm-lock.yaml | 51 ++ scripts/fast-format | 6 +- scripts/format | 3 +- scripts/lint | 3 - scripts/utils/postprocess-files.cjs | 9 +- src/api-promise.ts | 2 +- src/client.ts | 464 ++++++++----- src/core/api-promise.ts | 9 +- src/core/error.ts | 46 +- src/error.ts | 2 +- src/index.ts | 16 +- src/internal/builtin-types.ts | 23 +- src/internal/detect-platform.ts | 6 +- src/internal/errors.ts | 14 +- src/internal/headers.ts | 4 +- src/internal/parse.ts | 12 +- src/internal/qs/utils.ts | 5 +- src/internal/request-options.ts | 6 +- src/internal/shim-types.ts | 4 +- src/internal/shims.ts | 4 +- src/internal/to-file.ts | 14 +- src/internal/types.ts | 50 +- src/internal/utils/log.ts | 37 +- src/internal/utils/query.ts | 2 +- src/internal/utils/uuid.ts | 8 +- src/resource.ts | 2 +- src/resources/campaigns/campaigns.ts | 28 +- src/resources/campaigns/index.ts | 25 +- src/resources/campaigns/placements.ts | 18 +- src/resources/charts.ts | 44 +- src/resources/entitlements/entitlements.ts | 20 +- src/resources/entitlements/grants.ts | 16 +- src/resources/entitlements/index.ts | 22 +- src/resources/grants.ts | 5 +- src/resources/index.ts | 97 ++- src/resources/me/index.ts | 9 +- src/resources/me/me.ts | 9 +- src/resources/me/organizations.ts | 2 +- src/resources/paywalls/index.ts | 21 +- src/resources/paywalls/paywalls.ts | 4 +- src/resources/paywalls/templates.ts | 2 +- src/resources/products.ts | 2 +- src/resources/projects/applications.ts | 55 +- src/resources/projects/events.ts | 37 +- src/resources/projects/index.ts | 55 +- src/resources/projects/projects.ts | 59 +- src/resources/projects/webhook-endpoints.ts | 56 +- src/resources/users/events.ts | 10 +- src/resources/users/index.ts | 36 +- src/resources/users/test-mode.ts | 8 +- src/resources/users/users.ts | 59 +- src/uploads.ts | 2 +- src/version.ts | 2 +- .../api-resources/campaigns/campaigns.test.ts | 92 +-- .../campaigns/placements.test.ts | 18 +- tests/api-resources/charts.test.ts | 72 +-- .../entitlements/entitlements.test.ts | 26 +- .../api-resources/entitlements/grants.test.ts | 34 +- tests/api-resources/grants.test.ts | 20 +- tests/api-resources/me/organizations.test.ts | 2 +- tests/api-resources/paywalls/paywalls.test.ts | 46 +- .../api-resources/paywalls/templates.test.ts | 16 +- tests/api-resources/products.test.ts | 38 +- .../projects/applications.test.ts | 82 +-- tests/api-resources/projects/events.test.ts | 56 +- tests/api-resources/projects/projects.test.ts | 31 +- .../projects/webhook-endpoints.test.ts | 68 +- tests/api-resources/users/events.test.ts | 14 +- tests/api-resources/users/test-mode.test.ts | 12 +- tests/api-resources/users/users.test.ts | 56 +- tests/index.test.ts | 610 +++++++++--------- tests/qs/utils.test.ts | 2 +- tests/stringifyQuery.test.ts | 32 +- 75 files changed, 1835 insertions(+), 1001 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 381076a..fbfb9c7 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,6 +1,7 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; +import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -13,9 +14,11 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, + prettier, }, rules: { 'no-unused-vars': 'off', + 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index 5c94415..573338f 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.39.1", + "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2fbf116..c2b6b50 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,6 +35,9 @@ importers: eslint: specifier: ^9.39.1 version: 9.39.1 + eslint-plugin-prettier: + specifier: ^5.4.1 + version: 5.4.1(eslint@9.39.1)(prettier@3.1.1) eslint-plugin-unused-imports: specifier: ^4.1.4 version: 4.1.4(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1) @@ -439,6 +442,10 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@pkgr/core@0.2.4': + resolution: {integrity: sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==} + engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -929,6 +936,20 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + eslint-plugin-prettier@5.4.1: + resolution: {integrity: sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' + prettier: '>=3.0.0' + peerDependenciesMeta: + '@types/eslint': + optional: true + eslint-config-prettier: + optional: true + eslint-plugin-unused-imports@4.1.4: resolution: {integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==} peerDependencies: @@ -1004,6 +1025,9 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -1607,6 +1631,10 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier-linter-helpers@1.0.0: + resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + engines: {node: '>=6.0.0'} + prettier@3.1.1: resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} engines: {node: '>=14'} @@ -1787,6 +1815,10 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + synckit@0.11.8: + resolution: {integrity: sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==} + engines: {node: ^14.18.0 || >=16.0.0} + test-exclude@6.0.0: resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} engines: {node: '>=8'} @@ -2492,6 +2524,8 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@pkgr/core@0.2.4': {} + '@sinclair/typebox@0.27.8': {} '@sindresorhus/is@4.6.0': {} @@ -2973,6 +3007,13 @@ snapshots: escape-string-regexp@4.0.0: {} + eslint-plugin-prettier@5.4.1(eslint@9.39.1)(prettier@3.1.1): + dependencies: + eslint: 9.39.1 + prettier: 3.1.1 + prettier-linter-helpers: 1.0.0 + synckit: 0.11.8 + eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1): dependencies: eslint: 9.39.1 @@ -3073,6 +3114,8 @@ snapshots: fast-deep-equal@3.1.3: {} + fast-diff@1.3.0: {} + fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3818,6 +3861,10 @@ snapshots: prelude-ls@1.2.1: {} + prettier-linter-helpers@1.0.0: + dependencies: + fast-diff: 1.3.0 + prettier@3.1.1: {} pretty-format@29.7.0: @@ -3966,6 +4013,10 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + synckit@0.11.8: + dependencies: + '@pkgr/core': 0.2.4 + test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 diff --git a/scripts/fast-format b/scripts/fast-format index e172313..53721ac 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,8 +31,10 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -PRETTIER_FILES="$(grep '\.\([mc]?tsx?\|[mc]?jsx?\|json\)$' "$FILE_LIST" || true)" +# format things eslint didn't +PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" if ! [ -z "$PRETTIER_FILES" ]; then echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ + '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' fi diff --git a/scripts/format b/scripts/format index b1b2c17..7a75640 100755 --- a/scripts/format +++ b/scripts/format @@ -8,4 +8,5 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . +# format things eslint didn't +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' diff --git a/scripts/lint b/scripts/lint index 1f53254..3ffb78a 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,9 +4,6 @@ set -e cd "$(dirname "$0")/.." -echo "==> Running prettier --check" -./node_modules/.bin/prettier --check . - echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/scripts/utils/postprocess-files.cjs b/scripts/utils/postprocess-files.cjs index deae575..a8cdeb7 100644 --- a/scripts/utils/postprocess-files.cjs +++ b/scripts/utils/postprocess-files.cjs @@ -23,12 +23,19 @@ async function postprocess() { // strip out lib="dom", types="node", and types="react" references; these // are needed at build time, but would pollute the user's TS environment - const transformed = code.replace( + let transformed = code.replace( /^ *\/\/\/ * ' '.repeat(match.length - 1) + '\n', ); + // TypeScript's declaration emitter collapses /** @ts-ignore */ onto the same + // line as the type declaration, which doesn't work. So we convert to // @ts-ignore + // on its own line to properly suppresses errors. + if (file.endsWith('.d.ts') || file.endsWith('.d.mts') || file.endsWith('.d.cts')) { + transformed = transformed.replace(/\/\*\* @ts-ignore\b[^*]*\*\/ /gm, '// @ts-ignore\n'); + } + if (transformed !== code) { console.error(`wrote ${path.relative(process.cwd(), file)}`); await fs.promises.writeFile(file, transformed, 'utf8'); diff --git a/src/api-promise.ts b/src/api-promise.ts index 4e70128..8c775ee 100644 --- a/src/api-promise.ts +++ b/src/api-promise.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/api-promise instead */ -export * from "./core/api-promise" \ No newline at end of file +export * from './core/api-promise'; diff --git a/src/client.ts b/src/client.ts index e03dff1..17c3a50 100644 --- a/src/client.ts +++ b/src/client.ts @@ -17,20 +17,105 @@ import * as Errors from './core/error'; import * as Uploads from './core/uploads'; import * as API from './resources/index'; import { APIPromise } from './core/api-promise'; -import { ChartGetDefinitionsParams, ChartGetDefinitionsResponse, ChartQueryDataParams, ChartQueryDataResponse, Charts } from './resources/charts'; +import { + ChartGetDefinitionsParams, + ChartGetDefinitionsResponse, + ChartQueryDataParams, + ChartQueryDataResponse, + Charts, +} from './resources/charts'; import { GrantListParams, GrantListResponse, Grants } from './resources/grants'; -import { ProductCreateParams, ProductCreateResponse, ProductDeleteResponse, ProductListParams, ProductListResponse, ProductRetrieveResponse, ProductUpdateParams, ProductUpdateResponse, Products } from './resources/products'; -import { CampaignArchiveResponse, CampaignCreateParams, CampaignCreateResponse, CampaignListParams, CampaignListResponse, CampaignRetrieveResponse, CampaignUnarchiveResponse, CampaignUpdateAudienceParams, CampaignUpdateAudienceResponse, CampaignUpdateParams, CampaignUpdateResponse, Campaigns } from './resources/campaigns/campaigns'; -import { EntitlementCreateParams, EntitlementCreateResponse, EntitlementDeleteResponse, EntitlementListParams, EntitlementListResponse, EntitlementRetrieveResponse, EntitlementUpdateParams, EntitlementUpdateResponse, Entitlements } from './resources/entitlements/entitlements'; +import { + ProductCreateParams, + ProductCreateResponse, + ProductDeleteResponse, + ProductListParams, + ProductListResponse, + ProductRetrieveResponse, + ProductUpdateParams, + ProductUpdateResponse, + Products, +} from './resources/products'; +import { + CampaignArchiveResponse, + CampaignCreateParams, + CampaignCreateResponse, + CampaignListParams, + CampaignListResponse, + CampaignRetrieveResponse, + CampaignUnarchiveResponse, + CampaignUpdateAudienceParams, + CampaignUpdateAudienceResponse, + CampaignUpdateParams, + CampaignUpdateResponse, + Campaigns, +} from './resources/campaigns/campaigns'; +import { + EntitlementCreateParams, + EntitlementCreateResponse, + EntitlementDeleteResponse, + EntitlementListParams, + EntitlementListResponse, + EntitlementRetrieveResponse, + EntitlementUpdateParams, + EntitlementUpdateResponse, + Entitlements, +} from './resources/entitlements/entitlements'; import { Me } from './resources/me/me'; -import { PaywallArchiveResponse, PaywallCreateParams, PaywallCreateResponse, PaywallListParams, PaywallListResponse, PaywallPublishResponse, PaywallRetrieveResponse, PaywallUnarchiveResponse, PaywallUpdateParams, PaywallUpdateResponse, Paywalls } from './resources/paywalls/paywalls'; -import { ProjectArchiveResponse, ProjectCreateParams, ProjectCreateResponse, ProjectListParams, ProjectListResponse, ProjectRetrieveResponse, ProjectUnarchiveResponse, ProjectUpdateParams, ProjectUpdateResponse, Projects } from './resources/projects/projects'; -import { BooleanFromString, UserListEventNamesParams, UserListEventNamesResponse, UserListFilterPropertiesParams, UserListFilterPropertiesResponse, UserResolveParams, UserResolveResponse, UserRetrieveActiveEntitlementsParams, UserRetrieveActiveEntitlementsResponse, UserRetrieveAttributesParams, UserRetrieveAttributesResponse, UserRetrieveDeviceAttributesParams, UserRetrieveDeviceAttributesResponse, UserRetrieveSubscriptionSummaryParams, UserRetrieveSubscriptionSummaryResponse, Users } from './resources/users/users'; +import { + PaywallArchiveResponse, + PaywallCreateParams, + PaywallCreateResponse, + PaywallListParams, + PaywallListResponse, + PaywallPublishResponse, + PaywallRetrieveResponse, + PaywallUnarchiveResponse, + PaywallUpdateParams, + PaywallUpdateResponse, + Paywalls, +} from './resources/paywalls/paywalls'; +import { + ProjectArchiveResponse, + ProjectCreateParams, + ProjectCreateResponse, + ProjectListParams, + ProjectListResponse, + ProjectRetrieveResponse, + ProjectUnarchiveResponse, + ProjectUpdateParams, + ProjectUpdateResponse, + Projects, +} from './resources/projects/projects'; +import { + BooleanFromString, + UserListEventNamesParams, + UserListEventNamesResponse, + UserListFilterPropertiesParams, + UserListFilterPropertiesResponse, + UserResolveParams, + UserResolveResponse, + UserRetrieveActiveEntitlementsParams, + UserRetrieveActiveEntitlementsResponse, + UserRetrieveAttributesParams, + UserRetrieveAttributesResponse, + UserRetrieveDeviceAttributesParams, + UserRetrieveDeviceAttributesResponse, + UserRetrieveSubscriptionSummaryParams, + UserRetrieveSubscriptionSummaryResponse, + Users, +} from './resources/users/users'; import { type Fetch } from './internal/builtin-types'; import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers'; import { FinalRequestOptions, RequestOptions } from './internal/request-options'; import { readEnv } from './internal/utils/env'; -import { type LogLevel, type Logger, formatRequestDetails, loggerFor, parseLogLevel } from './internal/utils/log'; +import { + type LogLevel, + type Logger, + formatRequestDetails, + loggerFor, + parseLogLevel, +} from './internal/utils/log'; import { isEmptyObj } from './internal/utils/values'; export interface ClientOptions { @@ -114,7 +199,7 @@ export interface ClientOptions { } /** - * API Client for interfacing with the Superwall API API. + * API Client for interfacing with the Superwall API API. */ export class SuperwallAPI { apiKey: string; @@ -153,12 +238,12 @@ export class SuperwallAPI { }: ClientOptions = {}) { if (apiKey === undefined) { throw new Errors.SuperwallAPIError( - 'The SUPERWALL_API_API_KEY environment variable is missing or empty; either provide it, or instantiate the SuperwallAPI client with an apiKey option, like new SuperwallAPI({ apiKey: \'My API Key\' }).' + "The SUPERWALL_API_API_KEY environment variable is missing or empty; either provide it, or instantiate the SuperwallAPI client with an apiKey option, like new SuperwallAPI({ apiKey: 'My API Key' }).", ); } if (bearerToken === undefined) { throw new Errors.SuperwallAPIError( - 'The SUPERWALL_API_BEARER_TOKEN environment variable is missing or empty; either provide it, or instantiate the SuperwallAPI client with an bearerToken option, like new SuperwallAPI({ bearerToken: \'My Bearer Token\' }).' + "The SUPERWALL_API_BEARER_TOKEN environment variable is missing or empty; either provide it, or instantiate the SuperwallAPI client with an bearerToken option, like new SuperwallAPI({ bearerToken: 'My Bearer Token' }).", ); } @@ -175,7 +260,10 @@ export class SuperwallAPI { const defaultLogLevel = 'warn'; // Set default logLevel early so that we can log a warning in parseLogLevel. this.logLevel = defaultLogLevel; - this.logLevel = parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? parseLogLevel(readEnv('SUPERWALL_API_LOG'), 'process.env[\'SUPERWALL_API_LOG\']', this) ?? defaultLogLevel; + this.logLevel = + parseLogLevel(options.logLevel, 'ClientOptions.logLevel', this) ?? + parseLogLevel(readEnv('SUPERWALL_API_LOG'), "process.env['SUPERWALL_API_LOG']", this) ?? + defaultLogLevel; this.fetchOptions = options.fetchOptions; this.maxRetries = options.maxRetries ?? 2; this.fetch = options.fetch ?? Shims.getDefaultFetch(); @@ -202,7 +290,7 @@ export class SuperwallAPI { fetchOptions: this.fetchOptions, apiKey: this.apiKey, bearerToken: this.bearerToken, - ...options + ...options, }); return client; } @@ -215,7 +303,7 @@ export class SuperwallAPI { } protected defaultQuery(): Record | undefined { - return this._options.defaultQuery + return this._options.defaultQuery; } protected validateHeaders({ values, nulls }: NullableHeaders) { @@ -255,7 +343,11 @@ export class SuperwallAPI { return Errors.APIError.generate(status, error, message, headers); } - buildURL(path: string, query: Record | null | undefined, defaultBaseURL?: string | undefined): string { + buildURL( + path: string, + query: Record | null | undefined, + defaultBaseURL?: string | undefined, + ): string { const baseURL = (!this.#baseURLOverridden() && defaultBaseURL) || this.baseURL; const url = isAbsoluteURL(path) ? @@ -343,7 +435,9 @@ export class SuperwallAPI { await this.prepareOptions(options); - const { req, url, timeout } = await this.buildRequest(options, { retryCount: maxRetries - retriesRemaining }); + const { req, url, timeout } = await this.buildRequest(options, { + retryCount: maxRetries - retriesRemaining, + }); await this.prepareRequest(req, { url, options }); @@ -352,7 +446,16 @@ export class SuperwallAPI { const retryLogStr = retryOfRequestLogID === undefined ? '' : `, retryOf: ${retryOfRequestLogID}`; const startTime = Date.now(); - loggerFor(this).debug(`[${requestLogID}] sending request`, formatRequestDetails({ retryOfRequestLogID, method: options.method, url, options, headers: req.headers })); + loggerFor(this).debug( + `[${requestLogID}] sending request`, + formatRequestDetails({ + retryOfRequestLogID, + method: options.method, + url, + options, + headers: req.headers, + }), + ); if (options.signal?.aborted) { throw new Errors.APIUserAbortError(); @@ -371,21 +474,45 @@ export class SuperwallAPI { // deno throws "TypeError: error sending request for url (https://example/): client error (Connect): tcp connect error: Operation timed out (os error 60): Operation timed out (os error 60)" // undici throws "TypeError: fetch failed" with cause "ConnectTimeoutError: Connect Timeout Error (attempted address: example:443, timeout: 1ms)" // others do not provide enough information to distinguish timeouts from other connection errors - const isTimeout = isAbortError(response) || /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')) + const isTimeout = + isAbortError(response) || + /timed? ?out/i.test(String(response) + ('cause' in response ? String(response.cause) : '')); if (retriesRemaining) { - loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`) - loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); + loggerFor(this).info( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - ${retryMessage}`, + ); + loggerFor(this).debug( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (${retryMessage})`, + formatRequestDetails({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + }), + ); return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID); } - loggerFor(this).info(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`) - loggerFor(this).debug(`[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, formatRequestDetails({ retryOfRequestLogID, url, durationMs: headersTime - startTime, message: response.message })); + loggerFor(this).info( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} - error; no more retries left`, + ); + loggerFor(this).debug( + `[${requestLogID}] connection ${isTimeout ? 'timed out' : 'failed'} (error; no more retries left)`, + formatRequestDetails({ + retryOfRequestLogID, + url, + durationMs: headersTime - startTime, + message: response.message, + }), + ); if (isTimeout) { throw new Errors.APIConnectionTimeoutError(); } throw new Errors.APIConnectionError({ cause: response }); } - const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${response.ok ? 'succeeded' : 'failed'} with status ${response.status} in ${headersTime - startTime}ms`; + const responseInfo = `[${requestLogID}${retryLogStr}] ${req.method} ${url} ${ + response.ok ? 'succeeded' : 'failed' + } with status ${response.status} in ${headersTime - startTime}ms`; if (!response.ok) { const shouldRetry = await this.shouldRetry(response); @@ -394,27 +521,60 @@ export class SuperwallAPI { // We don't need the body of this response. await Shims.CancelReadableStream(response.body); - loggerFor(this).info(`${responseInfo} - ${retryMessage}`) - loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); - return this.retryRequest(options, retriesRemaining, retryOfRequestLogID ?? requestLogID, response.headers); + loggerFor(this).info(`${responseInfo} - ${retryMessage}`); + loggerFor(this).debug( + `[${requestLogID}] response error (${retryMessage})`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + }), + ); + return this.retryRequest( + options, + retriesRemaining, + retryOfRequestLogID ?? requestLogID, + response.headers, + ); } const retryMessage = shouldRetry ? `error; no more retries left` : `error; not retryable`; - loggerFor(this).info(`${responseInfo} - ${retryMessage}`) + loggerFor(this).info(`${responseInfo} - ${retryMessage}`); const errText = await response.text().catch((err: any) => castToError(err).message); const errJSON = safeJSON(errText) as any; const errMessage = errJSON ? undefined : errText; - loggerFor(this).debug(`[${requestLogID}] response error (${retryMessage})`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, message: errMessage, durationMs: Date.now() - startTime })); + loggerFor(this).debug( + `[${requestLogID}] response error (${retryMessage})`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + message: errMessage, + durationMs: Date.now() - startTime, + }), + ); const err = this.makeStatusError(response.status, errJSON, errMessage, response.headers); throw err; } - loggerFor(this).info(responseInfo) - loggerFor(this).debug(`[${requestLogID}] response start`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, headers: response.headers, durationMs: headersTime - startTime })); + loggerFor(this).info(responseInfo); + loggerFor(this).debug( + `[${requestLogID}] response start`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + headers: response.headers, + durationMs: headersTime - startTime, + }), + ); return { response, options, controller, requestLogID, retryOfRequestLogID, startTime }; } @@ -431,7 +591,9 @@ export class SuperwallAPI { const timeout = setTimeout(abort, ms); - const isReadableBody = ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || (typeof options.body === "object" && options.body !== null && Symbol.asyncIterator in options.body); + const isReadableBody = + ((globalThis as any).ReadableStream && options.body instanceof (globalThis as any).ReadableStream) || + (typeof options.body === 'object' && options.body !== null && Symbol.asyncIterator in options.body); const fetchOptions: RequestInit = { signal: controller.signal as any, @@ -446,7 +608,6 @@ export class SuperwallAPI { } try { - // use undefined this binding; fetch errors if bound to something else in browser/cloudflare return await this.fetch.call(undefined, url, fetchOptions); } finally { @@ -547,11 +708,12 @@ export class SuperwallAPI { const req: FinalizedRequestInit = { method, headers: reqHeaders, - ...(options.signal && { signal: options.signal}), - ...((globalThis as any).ReadableStream && body instanceof (globalThis as any).ReadableStream && { duplex: "half" }), + ...(options.signal && { signal: options.signal }), + ...((globalThis as any).ReadableStream && + body instanceof (globalThis as any).ReadableStream && { duplex: 'half' }), ...(body && { body }), - ...(this.fetchOptions as any ?? {}), - ...(options.fetchOptions as any ?? {}), + ...((this.fetchOptions as any) ?? {}), + ...((options.fetchOptions as any) ?? {}), }; return { req, url, timeout: options.timeout }; @@ -576,15 +738,17 @@ export class SuperwallAPI { const headers = buildHeaders([ idempotencyHeaders, - {Accept: 'application/json', - 'User-Agent': this.getUserAgent(), - 'X-Stainless-Retry-Count': String(retryCount), - ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), - ...getPlatformHeaders()}, + { + Accept: 'application/json', + 'User-Agent': this.getUserAgent(), + 'X-Stainless-Retry-Count': String(retryCount), + ...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}), + ...getPlatformHeaders(), + }, await this.authHeaders(options), this._options.defaultHeaders, bodyHeaders, - options.headers + options.headers, ]); this.validateHeaders(headers); @@ -611,11 +775,9 @@ export class SuperwallAPI { ArrayBuffer.isView(body) || body instanceof ArrayBuffer || body instanceof DataView || - ( - typeof body === 'string' && + (typeof body === 'string' && // Preserve legacy string encoding behavior for now - headers.values.has('content-type') - ) || + headers.values.has('content-type')) || // `Blob` is superset of `File` ((globalThis as any).Blob && body instanceof (globalThis as any).Blob) || // `FormData` -> `multipart/form-data` @@ -646,7 +808,7 @@ export class SuperwallAPI { } static SuperwallAPI = this; - static DEFAULT_TIMEOUT = 60000 // 1 minute + static DEFAULT_TIMEOUT = 60000; // 1 minute static SuperwallAPIError = Errors.SuperwallAPIError; static APIError = Errors.APIError; @@ -710,108 +872,106 @@ SuperwallAPI.Charts = Charts; SuperwallAPI.Users = Users; export declare namespace SuperwallAPI { - export type RequestOptions = Opts.RequestOptions; - - export { - Projects as Projects, - type ProjectCreateResponse as ProjectCreateResponse, - type ProjectRetrieveResponse as ProjectRetrieveResponse, - type ProjectUpdateResponse as ProjectUpdateResponse, - type ProjectListResponse as ProjectListResponse, - type ProjectArchiveResponse as ProjectArchiveResponse, - type ProjectUnarchiveResponse as ProjectUnarchiveResponse, - type ProjectCreateParams as ProjectCreateParams, - type ProjectUpdateParams as ProjectUpdateParams, - type ProjectListParams as ProjectListParams -}; - -export { - Me as Me -}; - -export { - Paywalls as Paywalls, - type PaywallCreateResponse as PaywallCreateResponse, - type PaywallRetrieveResponse as PaywallRetrieveResponse, - type PaywallUpdateResponse as PaywallUpdateResponse, - type PaywallListResponse as PaywallListResponse, - type PaywallArchiveResponse as PaywallArchiveResponse, - type PaywallPublishResponse as PaywallPublishResponse, - type PaywallUnarchiveResponse as PaywallUnarchiveResponse, - type PaywallCreateParams as PaywallCreateParams, - type PaywallUpdateParams as PaywallUpdateParams, - type PaywallListParams as PaywallListParams -}; - -export { - Products as Products, - type ProductCreateResponse as ProductCreateResponse, - type ProductRetrieveResponse as ProductRetrieveResponse, - type ProductUpdateResponse as ProductUpdateResponse, - type ProductListResponse as ProductListResponse, - type ProductDeleteResponse as ProductDeleteResponse, - type ProductCreateParams as ProductCreateParams, - type ProductUpdateParams as ProductUpdateParams, - type ProductListParams as ProductListParams -}; - -export { - Campaigns as Campaigns, - type CampaignCreateResponse as CampaignCreateResponse, - type CampaignRetrieveResponse as CampaignRetrieveResponse, - type CampaignUpdateResponse as CampaignUpdateResponse, - type CampaignListResponse as CampaignListResponse, - type CampaignArchiveResponse as CampaignArchiveResponse, - type CampaignUnarchiveResponse as CampaignUnarchiveResponse, - type CampaignUpdateAudienceResponse as CampaignUpdateAudienceResponse, - type CampaignCreateParams as CampaignCreateParams, - type CampaignUpdateParams as CampaignUpdateParams, - type CampaignListParams as CampaignListParams, - type CampaignUpdateAudienceParams as CampaignUpdateAudienceParams -}; - -export { - Entitlements as Entitlements, - type EntitlementCreateResponse as EntitlementCreateResponse, - type EntitlementRetrieveResponse as EntitlementRetrieveResponse, - type EntitlementUpdateResponse as EntitlementUpdateResponse, - type EntitlementListResponse as EntitlementListResponse, - type EntitlementDeleteResponse as EntitlementDeleteResponse, - type EntitlementCreateParams as EntitlementCreateParams, - type EntitlementUpdateParams as EntitlementUpdateParams, - type EntitlementListParams as EntitlementListParams -}; - -export { - Grants as Grants, - type GrantListResponse as GrantListResponse, - type GrantListParams as GrantListParams -}; - -export { - Charts as Charts, - type ChartGetDefinitionsResponse as ChartGetDefinitionsResponse, - type ChartQueryDataResponse as ChartQueryDataResponse, - type ChartGetDefinitionsParams as ChartGetDefinitionsParams, - type ChartQueryDataParams as ChartQueryDataParams -}; - -export { - Users as Users, - type BooleanFromString as BooleanFromString, - type UserListEventNamesResponse as UserListEventNamesResponse, - type UserListFilterPropertiesResponse as UserListFilterPropertiesResponse, - type UserResolveResponse as UserResolveResponse, - type UserRetrieveActiveEntitlementsResponse as UserRetrieveActiveEntitlementsResponse, - type UserRetrieveAttributesResponse as UserRetrieveAttributesResponse, - type UserRetrieveDeviceAttributesResponse as UserRetrieveDeviceAttributesResponse, - type UserRetrieveSubscriptionSummaryResponse as UserRetrieveSubscriptionSummaryResponse, - type UserListEventNamesParams as UserListEventNamesParams, - type UserListFilterPropertiesParams as UserListFilterPropertiesParams, - type UserResolveParams as UserResolveParams, - type UserRetrieveActiveEntitlementsParams as UserRetrieveActiveEntitlementsParams, - type UserRetrieveAttributesParams as UserRetrieveAttributesParams, - type UserRetrieveDeviceAttributesParams as UserRetrieveDeviceAttributesParams, - type UserRetrieveSubscriptionSummaryParams as UserRetrieveSubscriptionSummaryParams -}; - } + export type RequestOptions = Opts.RequestOptions; + + export { + Projects as Projects, + type ProjectCreateResponse as ProjectCreateResponse, + type ProjectRetrieveResponse as ProjectRetrieveResponse, + type ProjectUpdateResponse as ProjectUpdateResponse, + type ProjectListResponse as ProjectListResponse, + type ProjectArchiveResponse as ProjectArchiveResponse, + type ProjectUnarchiveResponse as ProjectUnarchiveResponse, + type ProjectCreateParams as ProjectCreateParams, + type ProjectUpdateParams as ProjectUpdateParams, + type ProjectListParams as ProjectListParams, + }; + + export { Me as Me }; + + export { + Paywalls as Paywalls, + type PaywallCreateResponse as PaywallCreateResponse, + type PaywallRetrieveResponse as PaywallRetrieveResponse, + type PaywallUpdateResponse as PaywallUpdateResponse, + type PaywallListResponse as PaywallListResponse, + type PaywallArchiveResponse as PaywallArchiveResponse, + type PaywallPublishResponse as PaywallPublishResponse, + type PaywallUnarchiveResponse as PaywallUnarchiveResponse, + type PaywallCreateParams as PaywallCreateParams, + type PaywallUpdateParams as PaywallUpdateParams, + type PaywallListParams as PaywallListParams, + }; + + export { + Products as Products, + type ProductCreateResponse as ProductCreateResponse, + type ProductRetrieveResponse as ProductRetrieveResponse, + type ProductUpdateResponse as ProductUpdateResponse, + type ProductListResponse as ProductListResponse, + type ProductDeleteResponse as ProductDeleteResponse, + type ProductCreateParams as ProductCreateParams, + type ProductUpdateParams as ProductUpdateParams, + type ProductListParams as ProductListParams, + }; + + export { + Campaigns as Campaigns, + type CampaignCreateResponse as CampaignCreateResponse, + type CampaignRetrieveResponse as CampaignRetrieveResponse, + type CampaignUpdateResponse as CampaignUpdateResponse, + type CampaignListResponse as CampaignListResponse, + type CampaignArchiveResponse as CampaignArchiveResponse, + type CampaignUnarchiveResponse as CampaignUnarchiveResponse, + type CampaignUpdateAudienceResponse as CampaignUpdateAudienceResponse, + type CampaignCreateParams as CampaignCreateParams, + type CampaignUpdateParams as CampaignUpdateParams, + type CampaignListParams as CampaignListParams, + type CampaignUpdateAudienceParams as CampaignUpdateAudienceParams, + }; + + export { + Entitlements as Entitlements, + type EntitlementCreateResponse as EntitlementCreateResponse, + type EntitlementRetrieveResponse as EntitlementRetrieveResponse, + type EntitlementUpdateResponse as EntitlementUpdateResponse, + type EntitlementListResponse as EntitlementListResponse, + type EntitlementDeleteResponse as EntitlementDeleteResponse, + type EntitlementCreateParams as EntitlementCreateParams, + type EntitlementUpdateParams as EntitlementUpdateParams, + type EntitlementListParams as EntitlementListParams, + }; + + export { + Grants as Grants, + type GrantListResponse as GrantListResponse, + type GrantListParams as GrantListParams, + }; + + export { + Charts as Charts, + type ChartGetDefinitionsResponse as ChartGetDefinitionsResponse, + type ChartQueryDataResponse as ChartQueryDataResponse, + type ChartGetDefinitionsParams as ChartGetDefinitionsParams, + type ChartQueryDataParams as ChartQueryDataParams, + }; + + export { + Users as Users, + type BooleanFromString as BooleanFromString, + type UserListEventNamesResponse as UserListEventNamesResponse, + type UserListFilterPropertiesResponse as UserListFilterPropertiesResponse, + type UserResolveResponse as UserResolveResponse, + type UserRetrieveActiveEntitlementsResponse as UserRetrieveActiveEntitlementsResponse, + type UserRetrieveAttributesResponse as UserRetrieveAttributesResponse, + type UserRetrieveDeviceAttributesResponse as UserRetrieveDeviceAttributesResponse, + type UserRetrieveSubscriptionSummaryResponse as UserRetrieveSubscriptionSummaryResponse, + type UserListEventNamesParams as UserListEventNamesParams, + type UserListFilterPropertiesParams as UserListFilterPropertiesParams, + type UserResolveParams as UserResolveParams, + type UserRetrieveActiveEntitlementsParams as UserRetrieveActiveEntitlementsParams, + type UserRetrieveAttributesParams as UserRetrieveAttributesParams, + type UserRetrieveDeviceAttributesParams as UserRetrieveDeviceAttributesParams, + type UserRetrieveSubscriptionSummaryParams as UserRetrieveSubscriptionSummaryParams, + }; +} diff --git a/src/core/api-promise.ts b/src/core/api-promise.ts index c468d29..9d61a59 100644 --- a/src/core/api-promise.ts +++ b/src/core/api-promise.ts @@ -16,7 +16,10 @@ export class APIPromise extends Promise { constructor( client: SuperwallAPI, private responsePromise: Promise, - private parseResponse: (client: SuperwallAPI, props: APIResponseProps) => PromiseOrValue = defaultParseResponse, + private parseResponse: ( + client: SuperwallAPI, + props: APIResponseProps, + ) => PromiseOrValue = defaultParseResponse, ) { super((resolve) => { // this is maybe a bit weird but this has to be a no-op to not implicitly @@ -28,7 +31,9 @@ export class APIPromise extends Promise { } _thenUnwrap(transform: (data: T, props: APIResponseProps) => U): APIPromise { - return new APIPromise(this.#client, this.responsePromise, async (client, props) => transform(await this.parseResponse(client, props), props)); + return new APIPromise(this.#client, this.responsePromise, async (client, props) => + transform(await this.parseResponse(client, props), props), + ); } /** diff --git a/src/core/error.ts b/src/core/error.ts index 4d52bbf..2f40f8a 100644 --- a/src/core/error.ts +++ b/src/core/error.ts @@ -2,10 +2,13 @@ import { castToError } from '../internal/errors'; -export class SuperwallAPIError extends Error { -} +export class SuperwallAPIError extends Error {} -export class APIError extends SuperwallAPIError { +export class APIError< + TStatus extends number | undefined = number | undefined, + THeaders extends Headers | undefined = Headers | undefined, + TError extends Object | undefined = Object | undefined, +> extends SuperwallAPIError { /** HTTP status for the response that caused the error */ readonly status: TStatus; /** HTTP headers for the response that caused the error */ @@ -13,9 +16,6 @@ export class APIError { -} +export class BadRequestError extends APIError<400, Headers> {} -export class AuthenticationError extends APIError<401, Headers> { -} +export class AuthenticationError extends APIError<401, Headers> {} -export class PermissionDeniedError extends APIError<403, Headers> { -} +export class PermissionDeniedError extends APIError<403, Headers> {} -export class NotFoundError extends APIError<404, Headers> { -} +export class NotFoundError extends APIError<404, Headers> {} -export class ConflictError extends APIError<409, Headers> { -} +export class ConflictError extends APIError<409, Headers> {} -export class UnprocessableEntityError extends APIError<422, Headers> { -} +export class UnprocessableEntityError extends APIError<422, Headers> {} -export class RateLimitError extends APIError<429, Headers> { -} +export class RateLimitError extends APIError<429, Headers> {} -export class InternalServerError extends APIError { -} +export class InternalServerError extends APIError {} diff --git a/src/error.ts b/src/error.ts index d0832d3..fc55f46 100644 --- a/src/error.ts +++ b/src/error.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/error instead */ -export * from "./core/error" \ No newline at end of file +export * from './core/error'; diff --git a/src/index.ts b/src/index.ts index 349f7f6..cae5fe9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,4 +5,18 @@ export { SuperwallAPI as default } from './client'; export { type Uploadable, toFile } from './core/uploads'; export { APIPromise } from './core/api-promise'; export { SuperwallAPI, type ClientOptions } from './client'; -export { SuperwallAPIError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError } from './core/error'; +export { + SuperwallAPIError, + APIError, + APIConnectionError, + APIConnectionTimeoutError, + APIUserAbortError, + NotFoundError, + ConflictError, + RateLimitError, + BadRequestError, + AuthenticationError, + InternalServerError, + PermissionDeniedError, + UnprocessableEntityError, +} from './core/error'; diff --git a/src/internal/builtin-types.ts b/src/internal/builtin-types.ts index 6059d5d..c23d3bd 100644 --- a/src/internal/builtin-types.ts +++ b/src/internal/builtin-types.ts @@ -1,23 +1,20 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export type Fetch = ( - input: string | URL | Request, - init?: RequestInit, -) => Promise +export type Fetch = (input: string | URL | Request, init?: RequestInit) => Promise; /** * An alias to the builtin `RequestInit` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/RequestInit + * + * https://developer.mozilla.org/docs/Web/API/RequestInit */ type _RequestInit = RequestInit; /** * An alias to the builtin `Response` type so we can * easily alias it in import statements if there are name clashes. - * - * https://developer.mozilla.org/docs/Web/API/Response + * + * https://developer.mozilla.org/docs/Web/API/Response */ type _Response = Response; @@ -54,7 +51,15 @@ type _Array = Array; */ type _Record = Record; -export type { _Array as Array, _BodyInit as BodyInit, _HeadersInit as HeadersInit, _Record as Record, _RequestInfo as RequestInfo, _RequestInit as RequestInit, _Response as Response }; +export type { + _Array as Array, + _BodyInit as BodyInit, + _HeadersInit as HeadersInit, + _Record as Record, + _RequestInfo as RequestInfo, + _RequestInit as RequestInit, + _Response as Response, +}; /** * A copy of the builtin `EndingType` type as it isn't fully supported in certain diff --git a/src/internal/detect-platform.ts b/src/internal/detect-platform.ts index 394ede8..e82d95c 100644 --- a/src/internal/detect-platform.ts +++ b/src/internal/detect-platform.ts @@ -25,7 +25,11 @@ function getDetectedPlatform(): DetectedPlatform { if (typeof EdgeRuntime !== 'undefined') { return 'edge'; } - if (Object.prototype.toString.call(typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0) === '[object process]') { + if ( + Object.prototype.toString.call( + typeof (globalThis as any).process !== 'undefined' ? (globalThis as any).process : 0, + ) === '[object process]' + ) { return 'node'; } return 'unknown'; diff --git a/src/internal/errors.ts b/src/internal/errors.ts index c14a742..82c7b14 100644 --- a/src/internal/errors.ts +++ b/src/internal/errors.ts @@ -2,12 +2,12 @@ export function isAbortError(err: unknown) { return ( - typeof err === 'object' && err !== null && ( - // Spec-compliant fetch implementations - ('name' in err && (err as any).name === 'AbortError') || + typeof err === 'object' && + err !== null && + // Spec-compliant fetch implementations + (('name' in err && (err as any).name === 'AbortError') || // Expo fetch - ('message' in err && String((err as any).message).includes('FetchRequestCanceledException')) - ) + ('message' in err && String((err as any).message).includes('FetchRequestCanceledException'))) ); } @@ -24,10 +24,10 @@ export const castToError = (err: any): Error => { if (err.name) error.name = err.name; return error; } - } catch { } + } catch {} try { return new Error(JSON.stringify(err)); - } catch { } + } catch {} } return new Error(err); }; diff --git a/src/internal/headers.ts b/src/internal/headers.ts index fa2ea2b..c724a9d 100644 --- a/src/internal/headers.ts +++ b/src/internal/headers.ts @@ -1,6 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -import { isReadonlyArray } from "./utils/values"; +import { isReadonlyArray } from './utils/values'; type HeaderValue = string | undefined | null; export type HeadersLike = @@ -51,7 +51,7 @@ function* iterateHeaders(headers: HeadersLike): IterableIterator(client: SuperwallAPI, props: APIResponseProps): Promise { const { response, requestLogID, retryOfRequestLogID, startTime } = props; const body = await (async () => { - // fetch refuses to read the body when the status code is 204. if (response.status === 204) { return null as T; @@ -43,6 +42,15 @@ export async function defaultParseResponse(client: SuperwallAPI, props: APIRe const text = await response.text(); return text as unknown as T; })(); - loggerFor(client).debug(`[${requestLogID}] response parsed`, formatRequestDetails({ retryOfRequestLogID, url: response.url, status: response.status, body, durationMs: Date.now() - startTime })); + loggerFor(client).debug( + `[${requestLogID}] response parsed`, + formatRequestDetails({ + retryOfRequestLogID, + url: response.url, + status: response.status, + body, + durationMs: Date.now() - startTime, + }), + ); return body; } diff --git a/src/internal/qs/utils.ts b/src/internal/qs/utils.ts index f21d955..4cd5657 100644 --- a/src/internal/qs/utils.ts +++ b/src/internal/qs/utils.ts @@ -62,10 +62,7 @@ export function merge( if (isArray(target)) { target.push(source); } else if (target && typeof target === 'object') { - if ( - (options && (options.plainObjects || options.allowPrototypes)) || - !has(Object.prototype, source) - ) { + if ((options && (options.plainObjects || options.allowPrototypes)) || !has(Object.prototype, source)) { target[source] = true; } } else { diff --git a/src/internal/request-options.ts b/src/internal/request-options.ts index a8558b2..2aabf9a 100644 --- a/src/internal/request-options.ts +++ b/src/internal/request-options.ts @@ -76,14 +76,10 @@ export type RequestOptions = { defaultBaseURL?: string | undefined; __binaryResponse?: boolean | undefined; - }; export type EncodedContent = { bodyHeaders: HeadersLike; body: BodyInit }; -export type RequestEncoder = (request: { - headers: NullableHeaders; - body: unknown; -}) => EncodedContent; +export type RequestEncoder = (request: { headers: NullableHeaders; body: unknown }) => EncodedContent; export const FallbackEncoder: RequestEncoder = ({ headers, body }) => { return { diff --git a/src/internal/shim-types.ts b/src/internal/shim-types.ts index accbf57..8ddf7b0 100644 --- a/src/internal/shim-types.ts +++ b/src/internal/shim-types.ts @@ -19,8 +19,8 @@ type _ConditionalNodeReadableStream = typeof globalThis extends { ReadableStream: any } ? never : _NodeReadableStream; type _ReadableStream = NeverToAny< - ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) | - ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) + | ([0] extends [1 & _DOMReadableStream] ? never : _DOMReadableStream) + | ([0] extends [1 & _ConditionalNodeReadableStream] ? never : _ConditionalNodeReadableStream) >; export type { _ReadableStream as ReadableStream }; diff --git a/src/internal/shims.ts b/src/internal/shims.ts index 1541fc0..b5c2d06 100644 --- a/src/internal/shims.ts +++ b/src/internal/shims.ts @@ -27,7 +27,9 @@ export function makeReadableStream(...args: ReadableStreamArgs): ReadableStream if (typeof ReadableStream === 'undefined') { // Note: All of the platforms / runtimes we officially support already define // `ReadableStream` as a global, so this should only ever be hit on unsupported runtimes. - throw new Error('`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`'); + throw new Error( + '`ReadableStream` is not defined as a global; You will need to polyfill it, `globalThis.ReadableStream = ReadableStream`', + ); } return new ReadableStream(...args); diff --git a/src/internal/to-file.ts b/src/internal/to-file.ts index c72a2b4..30eada3 100644 --- a/src/internal/to-file.ts +++ b/src/internal/to-file.ts @@ -1,4 +1,4 @@ -import { BlobPart, getName, makeFile, isAsyncIterable } from "./uploads"; +import { BlobPart, getName, makeFile, isAsyncIterable } from './uploads'; import type { FilePropertyBag } from './builtin-types'; import { checkFileSupport } from './uploads'; @@ -65,8 +65,11 @@ const isResponseLike = (value: any): value is ResponseLike => typeof value.url === 'string' && typeof value.blob === 'function'; -export type ToFileInput = FileLike | ResponseLike | Exclude | AsyncIterable; - +export type ToFileInput = + | FileLike + | ResponseLike + | Exclude + | AsyncIterable; /** * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats @@ -116,9 +119,7 @@ export async function toFile( return makeFile(parts, name, options); } -async function getBytes( - value: BlobLikePart | AsyncIterable, -): Promise> { +async function getBytes(value: BlobLikePart | AsyncIterable): Promise> { let parts: Array = []; if ( typeof value === 'string' || @@ -151,4 +152,3 @@ function propsForError(value: unknown): string { const props = Object.getOwnPropertyNames(value); return `; props: [${props.map((p) => `"${p}"`).join(', ')}]`; } - diff --git a/src/internal/types.ts b/src/internal/types.ts index c45fee3..b668dfc 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -7,34 +7,40 @@ export type KeysEnum = { [P in keyof Required]: true }; export type FinalizedRequestInit = RequestInit & { headers: Headers }; -type NotAny = [0] extends [(1 & T)] ? never : T; +type NotAny = [0] extends [1 & T] ? never : T; /** * Some environments overload the global fetch function, and Parameters only gets the last signature. */ -type OverloadedParameters = T extends { - (...args: infer A): unknown; - (...args: infer B): unknown; - (...args: infer C): unknown; - (...args: infer D): unknown; -} - ? A | B | C | D - : T extends { +type OverloadedParameters = + T extends ( + { (...args: infer A): unknown; (...args: infer B): unknown; (...args: infer C): unknown; + (...args: infer D): unknown; } - ? A | B | C - : T extends { + ) ? + A | B | C | D + : T extends ( + { + (...args: infer A): unknown; + (...args: infer B): unknown; + (...args: infer C): unknown; + } + ) ? + A | B | C + : T extends ( + { (...args: infer A): unknown; (...args: infer B): unknown; } - ? A | B - : T extends (...args: infer A) => unknown - ? A + ) ? + A | B + : T extends (...args: infer A) => unknown ? A : never; - +/* eslint-disable */ /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -57,19 +63,19 @@ type OverloadedParameters = T extends { * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ +/** @ts-ignore For users with \@types/node */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ /* prettier-ignore */ +/** @ts-ignore For users with undici */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ +/** @ts-ignore For users with \@types/bun */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ +/** @ts-ignore For users with node-fetch@2 */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ /* prettier-ignore */ +/** @ts-ignore For users who use Deno */ type FetchRequestInit = NonNullable[1]>; - +/* eslint-enable */ type RequestInits = | NotAny diff --git a/src/internal/utils/log.ts b/src/internal/utils/log.ts index 407bf49..615cc8b 100644 --- a/src/internal/utils/log.ts +++ b/src/internal/utils/log.ts @@ -4,7 +4,7 @@ import { hasOwn } from './values'; import { type SuperwallAPI } from '../../client'; import { RequestOptions } from '../request-options'; -type LogFn = (message: string, ...rest: unknown[]) => void +type LogFn = (message: string, ...rest: unknown[]) => void; export type Logger = { error: LogFn; warn: LogFn; @@ -21,14 +21,22 @@ const levelNumbers = { debug: 500, }; -export const parseLogLevel = (maybeLevel: string | undefined, sourceName: string, client: SuperwallAPI): LogLevel | undefined => { +export const parseLogLevel = ( + maybeLevel: string | undefined, + sourceName: string, + client: SuperwallAPI, +): LogLevel | undefined => { if (!maybeLevel) { return undefined; } if (hasOwn(levelNumbers, maybeLevel)) { return maybeLevel; - }; - loggerFor(client).warn(`${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify(Object.keys(levelNumbers))}`); + } + loggerFor(client).warn( + `${sourceName} was set to ${JSON.stringify(maybeLevel)}, expected one of ${JSON.stringify( + Object.keys(levelNumbers), + )}`, + ); return undefined; }; @@ -89,11 +97,24 @@ export const formatRequestDetails = (details: { body?: unknown; }) => { if (details.options) { - details.options = {...details.options}; + details.options = { ...details.options }; delete details.options['headers']; // redundant + leaks internals } if (details.headers) { - details.headers = Object.fromEntries((details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map(([name, value]) => [name, name.toLowerCase() === 'authorization' || name.toLowerCase() === 'cookie' || name.toLowerCase() === 'set-cookie' ? '***' : value])) + details.headers = Object.fromEntries( + (details.headers instanceof Headers ? [...details.headers] : Object.entries(details.headers)).map( + ([name, value]) => [ + name, + ( + name.toLowerCase() === 'authorization' || + name.toLowerCase() === 'cookie' || + name.toLowerCase() === 'set-cookie' + ) ? + '***' + : value, + ], + ), + ); } if ('retryOfRequestLogID' in details) { if (details.retryOfRequestLogID) { @@ -101,5 +122,5 @@ export const formatRequestDetails = (details: { } delete details.retryOfRequestLogID; } - return details -} + return details; +}; diff --git a/src/internal/utils/query.ts b/src/internal/utils/query.ts index 06e72d9..0139cac 100644 --- a/src/internal/utils/query.ts +++ b/src/internal/utils/query.ts @@ -3,5 +3,5 @@ import * as qs from '../qs/stringify'; export function stringifyQuery(query: object | Record) { - return qs.stringify(query, { arrayFormat: 'comma' }) + return qs.stringify(query, { arrayFormat: 'comma' }); } diff --git a/src/internal/utils/uuid.ts b/src/internal/utils/uuid.ts index 53708ba..b0e53aa 100644 --- a/src/internal/utils/uuid.ts +++ b/src/internal/utils/uuid.ts @@ -10,10 +10,8 @@ export let uuid4 = function () { return crypto.randomUUID(); } const u8 = new Uint8Array(1); - const randomByte = crypto - ? () => crypto.getRandomValues(u8)[0]! - : () => (Math.random() * 0xff) & 0xff; - return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => + const randomByte = crypto ? () => crypto.getRandomValues(u8)[0]! : () => (Math.random() * 0xff) & 0xff; + return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, (c) => (+c ^ (randomByte() & (15 >> (+c / 4)))).toString(16), ); -} +}; diff --git a/src/resource.ts b/src/resource.ts index 57a27a9..363e351 100644 --- a/src/resource.ts +++ b/src/resource.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/resource instead */ -export * from "./core/resource" \ No newline at end of file +export * from './core/resource'; diff --git a/src/resources/campaigns/campaigns.ts b/src/resources/campaigns/campaigns.ts index 2eb1112..dbe01e3 100644 --- a/src/resources/campaigns/campaigns.ts +++ b/src/resources/campaigns/campaigns.ts @@ -2,7 +2,15 @@ import { APIResource } from '../../core/resource'; import * as PlacementsAPI from './placements'; -import { PlacementAddParams, PlacementAddResponse, PlacementRemoveParams, PlacementRemoveResponse, PlacementUpdateParams, PlacementUpdateResponse, Placements } from './placements'; +import { + PlacementAddParams, + PlacementAddResponse, + PlacementRemoveParams, + PlacementRemoveResponse, + PlacementUpdateParams, + PlacementUpdateResponse, + Placements, +} from './placements'; import * as UsersAPI from '../users/users'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; @@ -32,7 +40,11 @@ export class Campaigns extends APIResource { /** * Updates a campaign's description or notes. Requires campaigns:write scope. */ - update(id: string, body: CampaignUpdateParams, options?: RequestOptions): APIPromise { + update( + id: string, + body: CampaignUpdateParams, + options?: RequestOptions, + ): APIPromise { return this._client.patch(path`/v2/campaigns/${id}`, { body, ...options }); } @@ -63,8 +75,12 @@ export class Campaigns extends APIResource { * Updates an audience's enabled status or description. Requires campaigns:write * scope. */ - updateAudience(audienceID: string, params: CampaignUpdateAudienceParams, options?: RequestOptions): APIPromise { - const { id, ...body } = params + updateAudience( + audienceID: string, + params: CampaignUpdateAudienceParams, + options?: RequestOptions, + ): APIPromise { + const { id, ...body } = params; return this._client.patch(path`/v2/campaigns/${id}/audiences/${audienceID}`, { body, ...options }); } } @@ -966,7 +982,7 @@ export declare namespace Campaigns { type CampaignCreateParams as CampaignCreateParams, type CampaignUpdateParams as CampaignUpdateParams, type CampaignListParams as CampaignListParams, - type CampaignUpdateAudienceParams as CampaignUpdateAudienceParams + type CampaignUpdateAudienceParams as CampaignUpdateAudienceParams, }; export { @@ -976,6 +992,6 @@ export declare namespace Campaigns { type PlacementRemoveResponse as PlacementRemoveResponse, type PlacementUpdateParams as PlacementUpdateParams, type PlacementAddParams as PlacementAddParams, - type PlacementRemoveParams as PlacementRemoveParams + type PlacementRemoveParams as PlacementRemoveParams, }; } diff --git a/src/resources/campaigns/index.ts b/src/resources/campaigns/index.ts index 9e04aed..0b8434a 100644 --- a/src/resources/campaigns/index.ts +++ b/src/resources/campaigns/index.ts @@ -1,4 +1,25 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Campaigns, type CampaignCreateResponse, type CampaignRetrieveResponse, type CampaignUpdateResponse, type CampaignListResponse, type CampaignArchiveResponse, type CampaignUnarchiveResponse, type CampaignUpdateAudienceResponse, type CampaignCreateParams, type CampaignUpdateParams, type CampaignListParams, type CampaignUpdateAudienceParams } from './campaigns';; -export { Placements, type PlacementUpdateResponse, type PlacementAddResponse, type PlacementRemoveResponse, type PlacementUpdateParams, type PlacementAddParams, type PlacementRemoveParams } from './placements';; +export { + Campaigns, + type CampaignCreateResponse, + type CampaignRetrieveResponse, + type CampaignUpdateResponse, + type CampaignListResponse, + type CampaignArchiveResponse, + type CampaignUnarchiveResponse, + type CampaignUpdateAudienceResponse, + type CampaignCreateParams, + type CampaignUpdateParams, + type CampaignListParams, + type CampaignUpdateAudienceParams, +} from './campaigns'; +export { + Placements, + type PlacementUpdateResponse, + type PlacementAddResponse, + type PlacementRemoveResponse, + type PlacementUpdateParams, + type PlacementAddParams, + type PlacementRemoveParams, +} from './placements'; diff --git a/src/resources/campaigns/placements.ts b/src/resources/campaigns/placements.ts index 55fe2c6..29074e1 100644 --- a/src/resources/campaigns/placements.ts +++ b/src/resources/campaigns/placements.ts @@ -13,8 +13,12 @@ export class Placements extends APIResource { * Updates a placement's event name or enabled status. Requires campaigns:write * scope. */ - update(placementID: string, params: PlacementUpdateParams, options?: RequestOptions): APIPromise { - const { id, ...body } = params + update( + placementID: string, + params: PlacementUpdateParams, + options?: RequestOptions, + ): APIPromise { + const { id, ...body } = params; return this._client.patch(path`/v2/campaigns/${id}/placements/${placementID}`, { body, ...options }); } @@ -28,8 +32,12 @@ export class Placements extends APIResource { /** * Removes a placement from a campaign. Requires campaigns:write scope. */ - remove(placementID: string, params: PlacementRemoveParams, options?: RequestOptions): APIPromise { - const { id } = params + remove( + placementID: string, + params: PlacementRemoveParams, + options?: RequestOptions, + ): APIPromise { + const { id } = params; return this._client.delete(path`/v2/campaigns/${id}/placements/${placementID}`, options); } } @@ -144,6 +152,6 @@ export declare namespace Placements { type PlacementRemoveResponse as PlacementRemoveResponse, type PlacementUpdateParams as PlacementUpdateParams, type PlacementAddParams as PlacementAddParams, - type PlacementRemoveParams as PlacementRemoveParams + type PlacementRemoveParams as PlacementRemoveParams, }; } diff --git a/src/resources/charts.ts b/src/resources/charts.ts index 7e915da..49d7443 100644 --- a/src/resources/charts.ts +++ b/src/resources/charts.ts @@ -13,7 +13,10 @@ export class Charts extends APIResource { * breakdowns, filters, and date presets. This is static configuration data. * Requires charts:read scope. */ - getDefinitions(query: ChartGetDefinitionsParams, options?: RequestOptions): APIPromise { + getDefinitions( + query: ChartGetDefinitionsParams, + options?: RequestOptions, + ): APIPromise { return this._client.get('/v2/charts/definitions', { query, ...options }); } @@ -46,7 +49,18 @@ export interface ChartGetDefinitionsResponse { /** * Available date presets */ - date_presets: Array<'last_24_hours' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_365_days' | 'year_to_date' | 'custom'>; + date_presets: Array< + | 'last_24_hours' + | 'today' + | 'yesterday' + | 'last_7_days' + | 'last_30_days' + | 'last_90_days' + | 'last_180_days' + | 'last_365_days' + | 'year_to_date' + | 'custom' + >; /** * Available filters @@ -378,7 +392,17 @@ export namespace ChartQueryDataResponse { /** * Active preset */ - preset: 'last_24_hours' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_365_days' | 'year_to_date' | 'custom'; + preset: + | 'last_24_hours' + | 'today' + | 'yesterday' + | 'last_7_days' + | 'last_30_days' + | 'last_90_days' + | 'last_180_days' + | 'last_365_days' + | 'year_to_date' + | 'custom'; /** * Resolved date range @@ -665,7 +689,17 @@ export namespace ChartQueryDataParams { /** * Preset date range */ - preset?: 'last_24_hours' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_365_days' | 'year_to_date' | 'custom'; + preset?: + | 'last_24_hours' + | 'today' + | 'yesterday' + | 'last_7_days' + | 'last_30_days' + | 'last_90_days' + | 'last_180_days' + | 'last_365_days' + | 'year_to_date' + | 'custom'; /** * Custom date range (required when preset is `custom`) @@ -696,6 +730,6 @@ export declare namespace Charts { type ChartGetDefinitionsResponse as ChartGetDefinitionsResponse, type ChartQueryDataResponse as ChartQueryDataResponse, type ChartGetDefinitionsParams as ChartGetDefinitionsParams, - type ChartQueryDataParams as ChartQueryDataParams + type ChartQueryDataParams as ChartQueryDataParams, }; } diff --git a/src/resources/entitlements/entitlements.ts b/src/resources/entitlements/entitlements.ts index 77b254a..9a75b7a 100644 --- a/src/resources/entitlements/entitlements.ts +++ b/src/resources/entitlements/entitlements.ts @@ -2,7 +2,15 @@ import { APIResource } from '../../core/resource'; import * as GrantsAPI from './grants'; -import { GrantCreateParams, GrantCreateResponse, GrantListParams, GrantListResponse, GrantRevokeParams, GrantRevokeResponse, Grants } from './grants'; +import { + GrantCreateParams, + GrantCreateResponse, + GrantListParams, + GrantListResponse, + GrantRevokeParams, + GrantRevokeResponse, + Grants, +} from './grants'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; @@ -32,7 +40,11 @@ export class Entitlements extends APIResource { * Updates an entitlement's name, description, products, or metadata. Requires * entitlements:write scope. */ - update(id: string, body: EntitlementUpdateParams, options?: RequestOptions): APIPromise { + update( + id: string, + body: EntitlementUpdateParams, + options?: RequestOptions, + ): APIPromise { return this._client.patch(path`/v2/entitlements/${id}`, { body, ...options }); } @@ -370,7 +382,7 @@ export declare namespace Entitlements { type EntitlementDeleteResponse as EntitlementDeleteResponse, type EntitlementCreateParams as EntitlementCreateParams, type EntitlementUpdateParams as EntitlementUpdateParams, - type EntitlementListParams as EntitlementListParams + type EntitlementListParams as EntitlementListParams, }; export { @@ -380,6 +392,6 @@ export declare namespace Entitlements { type GrantRevokeResponse as GrantRevokeResponse, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, - type GrantRevokeParams as GrantRevokeParams + type GrantRevokeParams as GrantRevokeParams, }; } diff --git a/src/resources/entitlements/grants.ts b/src/resources/entitlements/grants.ts index e084653..88a27b2 100644 --- a/src/resources/entitlements/grants.ts +++ b/src/resources/entitlements/grants.ts @@ -21,15 +21,23 @@ export class Grants extends APIResource { * Returns a list of manual grants for the specified entitlement. Requires * entitlements:read scope. */ - list(id: string, query: GrantListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + list( + id: string, + query: GrantListParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { return this._client.get(path`/v2/entitlements/${id}/grants`, { query, ...options }); } /** * Revokes a manual grant. Requires entitlements:write scope. */ - revoke(grantID: string, params: GrantRevokeParams, options?: RequestOptions): APIPromise { - const { id } = params + revoke( + grantID: string, + params: GrantRevokeParams, + options?: RequestOptions, + ): APIPromise { + const { id } = params; return this._client.delete(path`/v2/entitlements/${id}/grants/${grantID}`, options); } } @@ -252,6 +260,6 @@ export declare namespace Grants { type GrantRevokeResponse as GrantRevokeResponse, type GrantCreateParams as GrantCreateParams, type GrantListParams as GrantListParams, - type GrantRevokeParams as GrantRevokeParams + type GrantRevokeParams as GrantRevokeParams, }; } diff --git a/src/resources/entitlements/index.ts b/src/resources/entitlements/index.ts index 889d258..a27500c 100644 --- a/src/resources/entitlements/index.ts +++ b/src/resources/entitlements/index.ts @@ -1,4 +1,22 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Entitlements, type EntitlementCreateResponse, type EntitlementRetrieveResponse, type EntitlementUpdateResponse, type EntitlementListResponse, type EntitlementDeleteResponse, type EntitlementCreateParams, type EntitlementUpdateParams, type EntitlementListParams } from './entitlements';; -export { Grants, type GrantCreateResponse, type GrantListResponse, type GrantRevokeResponse, type GrantCreateParams, type GrantListParams, type GrantRevokeParams } from './grants';; +export { + Entitlements, + type EntitlementCreateResponse, + type EntitlementRetrieveResponse, + type EntitlementUpdateResponse, + type EntitlementListResponse, + type EntitlementDeleteResponse, + type EntitlementCreateParams, + type EntitlementUpdateParams, + type EntitlementListParams, +} from './entitlements'; +export { + Grants, + type GrantCreateResponse, + type GrantListResponse, + type GrantRevokeResponse, + type GrantCreateParams, + type GrantListParams, + type GrantRevokeParams, +} from './grants'; diff --git a/src/resources/grants.ts b/src/resources/grants.ts index 69962f0..18c6cd6 100644 --- a/src/resources/grants.ts +++ b/src/resources/grants.ts @@ -136,8 +136,5 @@ export interface GrantListParams { } export declare namespace Grants { - export { - type GrantListResponse as GrantListResponse, - type GrantListParams as GrantListParams - }; + export { type GrantListResponse as GrantListResponse, type GrantListParams as GrantListParams }; } diff --git a/src/resources/index.ts b/src/resources/index.ts index a103860..aa43103 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -1,11 +1,90 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Campaigns, type CampaignCreateResponse, type CampaignRetrieveResponse, type CampaignUpdateResponse, type CampaignListResponse, type CampaignArchiveResponse, type CampaignUnarchiveResponse, type CampaignUpdateAudienceResponse, type CampaignCreateParams, type CampaignUpdateParams, type CampaignListParams, type CampaignUpdateAudienceParams } from './campaigns/campaigns';; -export { Charts, type ChartGetDefinitionsResponse, type ChartQueryDataResponse, type ChartGetDefinitionsParams, type ChartQueryDataParams } from './charts';; -export { Entitlements, type EntitlementCreateResponse, type EntitlementRetrieveResponse, type EntitlementUpdateResponse, type EntitlementListResponse, type EntitlementDeleteResponse, type EntitlementCreateParams, type EntitlementUpdateParams, type EntitlementListParams } from './entitlements/entitlements';; -export { Grants, type GrantListResponse, type GrantListParams } from './grants';; -export { Me } from './me/me';; -export { Paywalls, type PaywallCreateResponse, type PaywallRetrieveResponse, type PaywallUpdateResponse, type PaywallListResponse, type PaywallArchiveResponse, type PaywallPublishResponse, type PaywallUnarchiveResponse, type PaywallCreateParams, type PaywallUpdateParams, type PaywallListParams } from './paywalls/paywalls';; -export { Products, type ProductCreateResponse, type ProductRetrieveResponse, type ProductUpdateResponse, type ProductListResponse, type ProductDeleteResponse, type ProductCreateParams, type ProductUpdateParams, type ProductListParams } from './products';; -export { Projects, type ProjectCreateResponse, type ProjectRetrieveResponse, type ProjectUpdateResponse, type ProjectListResponse, type ProjectArchiveResponse, type ProjectUnarchiveResponse, type ProjectCreateParams, type ProjectUpdateParams, type ProjectListParams } from './projects/projects';; -export { Users, type BooleanFromString, type UserListEventNamesResponse, type UserListFilterPropertiesResponse, type UserResolveResponse, type UserRetrieveActiveEntitlementsResponse, type UserRetrieveAttributesResponse, type UserRetrieveDeviceAttributesResponse, type UserRetrieveSubscriptionSummaryResponse, type UserListEventNamesParams, type UserListFilterPropertiesParams, type UserResolveParams, type UserRetrieveActiveEntitlementsParams, type UserRetrieveAttributesParams, type UserRetrieveDeviceAttributesParams, type UserRetrieveSubscriptionSummaryParams } from './users/users';; +export { + Campaigns, + type CampaignCreateResponse, + type CampaignRetrieveResponse, + type CampaignUpdateResponse, + type CampaignListResponse, + type CampaignArchiveResponse, + type CampaignUnarchiveResponse, + type CampaignUpdateAudienceResponse, + type CampaignCreateParams, + type CampaignUpdateParams, + type CampaignListParams, + type CampaignUpdateAudienceParams, +} from './campaigns/campaigns'; +export { + Charts, + type ChartGetDefinitionsResponse, + type ChartQueryDataResponse, + type ChartGetDefinitionsParams, + type ChartQueryDataParams, +} from './charts'; +export { + Entitlements, + type EntitlementCreateResponse, + type EntitlementRetrieveResponse, + type EntitlementUpdateResponse, + type EntitlementListResponse, + type EntitlementDeleteResponse, + type EntitlementCreateParams, + type EntitlementUpdateParams, + type EntitlementListParams, +} from './entitlements/entitlements'; +export { Grants, type GrantListResponse, type GrantListParams } from './grants'; +export { Me } from './me/me'; +export { + Paywalls, + type PaywallCreateResponse, + type PaywallRetrieveResponse, + type PaywallUpdateResponse, + type PaywallListResponse, + type PaywallArchiveResponse, + type PaywallPublishResponse, + type PaywallUnarchiveResponse, + type PaywallCreateParams, + type PaywallUpdateParams, + type PaywallListParams, +} from './paywalls/paywalls'; +export { + Products, + type ProductCreateResponse, + type ProductRetrieveResponse, + type ProductUpdateResponse, + type ProductListResponse, + type ProductDeleteResponse, + type ProductCreateParams, + type ProductUpdateParams, + type ProductListParams, +} from './products'; +export { + Projects, + type ProjectCreateResponse, + type ProjectRetrieveResponse, + type ProjectUpdateResponse, + type ProjectListResponse, + type ProjectArchiveResponse, + type ProjectUnarchiveResponse, + type ProjectCreateParams, + type ProjectUpdateParams, + type ProjectListParams, +} from './projects/projects'; +export { + Users, + type BooleanFromString, + type UserListEventNamesResponse, + type UserListFilterPropertiesResponse, + type UserResolveResponse, + type UserRetrieveActiveEntitlementsResponse, + type UserRetrieveAttributesResponse, + type UserRetrieveDeviceAttributesResponse, + type UserRetrieveSubscriptionSummaryResponse, + type UserListEventNamesParams, + type UserListFilterPropertiesParams, + type UserResolveParams, + type UserRetrieveActiveEntitlementsParams, + type UserRetrieveAttributesParams, + type UserRetrieveDeviceAttributesParams, + type UserRetrieveSubscriptionSummaryParams, +} from './users/users'; diff --git a/src/resources/me/index.ts b/src/resources/me/index.ts index 766b266..55e8886 100644 --- a/src/resources/me/index.ts +++ b/src/resources/me/index.ts @@ -1,4 +1,9 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Me } from './me';; -export { Organizations, type OrganizationCreateResponse, type OrganizationListResponse, type OrganizationCreateParams } from './organizations';; +export { Me } from './me'; +export { + Organizations, + type OrganizationCreateResponse, + type OrganizationListResponse, + type OrganizationCreateParams, +} from './organizations'; diff --git a/src/resources/me/me.ts b/src/resources/me/me.ts index c87af65..02a7fad 100644 --- a/src/resources/me/me.ts +++ b/src/resources/me/me.ts @@ -2,7 +2,12 @@ import { APIResource } from '../../core/resource'; import * as OrganizationsAPI from './organizations'; -import { OrganizationCreateParams, OrganizationCreateResponse, OrganizationListResponse, Organizations } from './organizations'; +import { + OrganizationCreateParams, + OrganizationCreateResponse, + OrganizationListResponse, + Organizations, +} from './organizations'; export class Me extends APIResource { organizations: OrganizationsAPI.Organizations = new OrganizationsAPI.Organizations(this._client); @@ -15,6 +20,6 @@ export declare namespace Me { Organizations as Organizations, type OrganizationCreateResponse as OrganizationCreateResponse, type OrganizationListResponse as OrganizationListResponse, - type OrganizationCreateParams as OrganizationCreateParams + type OrganizationCreateParams as OrganizationCreateParams, }; } diff --git a/src/resources/me/organizations.ts b/src/resources/me/organizations.ts index 247582d..ac51d3a 100644 --- a/src/resources/me/organizations.ts +++ b/src/resources/me/organizations.ts @@ -69,6 +69,6 @@ export declare namespace Organizations { export { type OrganizationCreateResponse as OrganizationCreateResponse, type OrganizationListResponse as OrganizationListResponse, - type OrganizationCreateParams as OrganizationCreateParams + type OrganizationCreateParams as OrganizationCreateParams, }; } diff --git a/src/resources/paywalls/index.ts b/src/resources/paywalls/index.ts index efbea8c..a0e847a 100644 --- a/src/resources/paywalls/index.ts +++ b/src/resources/paywalls/index.ts @@ -1,4 +1,21 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Paywalls, type PaywallCreateResponse, type PaywallRetrieveResponse, type PaywallUpdateResponse, type PaywallListResponse, type PaywallArchiveResponse, type PaywallPublishResponse, type PaywallUnarchiveResponse, type PaywallCreateParams, type PaywallUpdateParams, type PaywallListParams } from './paywalls';; -export { Templates, type TemplateRetrieveResponse, type TemplateListResponse, type TemplateListParams } from './templates';; +export { + Paywalls, + type PaywallCreateResponse, + type PaywallRetrieveResponse, + type PaywallUpdateResponse, + type PaywallListResponse, + type PaywallArchiveResponse, + type PaywallPublishResponse, + type PaywallUnarchiveResponse, + type PaywallCreateParams, + type PaywallUpdateParams, + type PaywallListParams, +} from './paywalls'; +export { + Templates, + type TemplateRetrieveResponse, + type TemplateListResponse, + type TemplateListParams, +} from './templates'; diff --git a/src/resources/paywalls/paywalls.ts b/src/resources/paywalls/paywalls.ts index dd94560..ca0c43a 100644 --- a/src/resources/paywalls/paywalls.ts +++ b/src/resources/paywalls/paywalls.ts @@ -763,13 +763,13 @@ export declare namespace Paywalls { type PaywallUnarchiveResponse as PaywallUnarchiveResponse, type PaywallCreateParams as PaywallCreateParams, type PaywallUpdateParams as PaywallUpdateParams, - type PaywallListParams as PaywallListParams + type PaywallListParams as PaywallListParams, }; export { Templates as Templates, type TemplateRetrieveResponse as TemplateRetrieveResponse, type TemplateListResponse as TemplateListResponse, - type TemplateListParams as TemplateListParams + type TemplateListParams as TemplateListParams, }; } diff --git a/src/resources/paywalls/templates.ts b/src/resources/paywalls/templates.ts index adc4bed..26fbf62 100644 --- a/src/resources/paywalls/templates.ts +++ b/src/resources/paywalls/templates.ts @@ -186,6 +186,6 @@ export declare namespace Templates { export { type TemplateRetrieveResponse as TemplateRetrieveResponse, type TemplateListResponse as TemplateListResponse, - type TemplateListParams as TemplateListParams + type TemplateListParams as TemplateListParams, }; } diff --git a/src/resources/products.ts b/src/resources/products.ts index 59ad63f..9f3a338 100644 --- a/src/resources/products.ts +++ b/src/resources/products.ts @@ -683,6 +683,6 @@ export declare namespace Products { type ProductDeleteResponse as ProductDeleteResponse, type ProductCreateParams as ProductCreateParams, type ProductUpdateParams as ProductUpdateParams, - type ProductListParams as ProductListParams + type ProductListParams as ProductListParams, }; } diff --git a/src/resources/projects/applications.ts b/src/resources/projects/applications.ts index 8a5d6a5..917c77b 100644 --- a/src/resources/projects/applications.ts +++ b/src/resources/projects/applications.ts @@ -14,7 +14,11 @@ export class Applications extends APIResource { * already has an application for that platform. Requires projects:write scope. For * web platform, domain is required. */ - create(id: string, body: ApplicationCreateParams, options?: RequestOptions): APIPromise { + create( + id: string, + body: ApplicationCreateParams, + options?: RequestOptions, + ): APIPromise { return this._client.post(path`/v2/projects/${id}/applications`, { body, ...options }); } @@ -22,8 +26,12 @@ export class Applications extends APIResource { * Updates core application identity fields (name, app_id, bundle_id) within a * project. Requires applications:write scope. */ - update(applicationID: string, params: ApplicationUpdateParams, options?: RequestOptions): APIPromise { - const { id, ...body } = params + update( + applicationID: string, + params: ApplicationUpdateParams, + options?: RequestOptions, + ): APIPromise { + const { id, ...body } = params; return this._client.patch(path`/v2/projects/${id}/applications/${applicationID}`, { body, ...options }); } @@ -31,27 +39,48 @@ export class Applications extends APIResource { * Returns overview statistics for the given application and date range within a * project. Requires applications:read scope. */ - getStatistics(applicationID: string, params: ApplicationGetStatisticsParams, options?: RequestOptions): APIPromise { - const { id, ...query } = params - return this._client.get(path`/v2/projects/${id}/applications/${applicationID}/statistics`, { query, ...options }); + getStatistics( + applicationID: string, + params: ApplicationGetStatisticsParams, + options?: RequestOptions, + ): APIPromise { + const { id, ...query } = params; + return this._client.get(path`/v2/projects/${id}/applications/${applicationID}/statistics`, { + query, + ...options, + }); } /** * Returns recent transactions for the given application and date range within a * project. Requires applications:read scope. */ - listRecentTransactions(applicationID: string, params: ApplicationListRecentTransactionsParams, options?: RequestOptions): APIPromise { - const { id, ...query } = params - return this._client.get(path`/v2/projects/${id}/applications/${applicationID}/recent-transactions`, { query, ...options }); + listRecentTransactions( + applicationID: string, + params: ApplicationListRecentTransactionsParams, + options?: RequestOptions, + ): APIPromise { + const { id, ...query } = params; + return this._client.get(path`/v2/projects/${id}/applications/${applicationID}/recent-transactions`, { + query, + ...options, + }); } /** * Updates platform-scoped application settings. Only settings supported by the * application's platform are accepted. Requires applications:write scope. */ - updateSettings(applicationID: string, params: ApplicationUpdateSettingsParams, options?: RequestOptions): APIPromise { - const { id, ...body } = params - return this._client.patch(path`/v2/projects/${id}/applications/${applicationID}/settings`, { body, ...options }); + updateSettings( + applicationID: string, + params: ApplicationUpdateSettingsParams, + options?: RequestOptions, + ): APIPromise { + const { id, ...body } = params; + return this._client.patch(path`/v2/projects/${id}/applications/${applicationID}/settings`, { + body, + ...options, + }); } } @@ -546,6 +575,6 @@ export declare namespace Applications { type ApplicationUpdateParams as ApplicationUpdateParams, type ApplicationGetStatisticsParams as ApplicationGetStatisticsParams, type ApplicationListRecentTransactionsParams as ApplicationListRecentTransactionsParams, - type ApplicationUpdateSettingsParams as ApplicationUpdateSettingsParams + type ApplicationUpdateSettingsParams as ApplicationUpdateSettingsParams, }; } diff --git a/src/resources/projects/events.ts b/src/resources/projects/events.ts index 02aaf35..b3bfe24 100644 --- a/src/resources/projects/events.ts +++ b/src/resources/projects/events.ts @@ -14,8 +14,12 @@ export class Events extends APIResource { /** * Retrieves an event by ID. Requires webhooks:read scope. */ - retrieve(eventID: string, params: EventRetrieveParams, options?: RequestOptions): APIPromise { - const { project_id } = params + retrieve( + eventID: string, + params: EventRetrieveParams, + options?: RequestOptions, + ): APIPromise { + const { project_id } = params; return this._client.get(path`/v2/projects/${project_id}/events/${eventID}`, options); } @@ -23,24 +27,39 @@ export class Events extends APIResource { * Returns a list of events (webhook messages) for the project. Supports pagination * and filtering. Requires webhooks:read scope. */ - list(projectID: string, query: EventListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + list( + projectID: string, + query: EventListParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { return this._client.get(path`/v2/projects/${projectID}/events`, { query, ...options }); } /** * Returns a list of delivery attempts for an event. Requires webhooks:read scope. */ - listAttempts(eventID: string, params: EventListAttemptsParams, options?: RequestOptions): APIPromise { - const { project_id, ...query } = params - return this._client.get(path`/v2/projects/${project_id}/events/${eventID}/attempts`, { query, ...options }); + listAttempts( + eventID: string, + params: EventListAttemptsParams, + options?: RequestOptions, + ): APIPromise { + const { project_id, ...query } = params; + return this._client.get(path`/v2/projects/${project_id}/events/${eventID}/attempts`, { + query, + ...options, + }); } /** * Retries delivery of an event to a specific endpoint. Requires webhooks:write * scope. */ - retryDelivery(eventID: string, params: EventRetryDeliveryParams, options?: RequestOptions): APIPromise { - const { project_id, ...body } = params + retryDelivery( + eventID: string, + params: EventRetryDeliveryParams, + options?: RequestOptions, + ): APIPromise { + const { project_id, ...body } = params; return this._client.post(path`/v2/projects/${project_id}/events/${eventID}/retry`, { body, ...options }); } } @@ -346,6 +365,6 @@ export declare namespace Events { type EventRetrieveParams as EventRetrieveParams, type EventListParams as EventListParams, type EventListAttemptsParams as EventListAttemptsParams, - type EventRetryDeliveryParams as EventRetryDeliveryParams + type EventRetryDeliveryParams as EventRetryDeliveryParams, }; } diff --git a/src/resources/projects/index.ts b/src/resources/projects/index.ts index 43b6524..1c16f64 100644 --- a/src/resources/projects/index.ts +++ b/src/resources/projects/index.ts @@ -1,6 +1,53 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Applications, type ApplicationCreateResponse, type ApplicationUpdateResponse, type ApplicationGetStatisticsResponse, type ApplicationListRecentTransactionsResponse, type ApplicationUpdateSettingsResponse, type ApplicationCreateParams, type ApplicationUpdateParams, type ApplicationGetStatisticsParams, type ApplicationListRecentTransactionsParams, type ApplicationUpdateSettingsParams } from './applications';; -export { Events, type EventRetrieveResponse, type EventListResponse, type EventListAttemptsResponse, type EventRetryDeliveryResponse, type EventRetrieveParams, type EventListParams, type EventListAttemptsParams, type EventRetryDeliveryParams } from './events';; -export { Projects, type ProjectCreateResponse, type ProjectRetrieveResponse, type ProjectUpdateResponse, type ProjectListResponse, type ProjectArchiveResponse, type ProjectUnarchiveResponse, type ProjectCreateParams, type ProjectUpdateParams, type ProjectListParams } from './projects';; -export { WebhookEndpoints, type WebhookEndpointCreateResponse, type WebhookEndpointRetrieveResponse, type WebhookEndpointUpdateResponse, type WebhookEndpointListResponse, type WebhookEndpointDeleteResponse, type WebhookEndpointRotateSecretResponse, type WebhookEndpointCreateParams, type WebhookEndpointRetrieveParams, type WebhookEndpointUpdateParams, type WebhookEndpointListParams, type WebhookEndpointDeleteParams, type WebhookEndpointRotateSecretParams } from './webhook-endpoints';; +export { + Applications, + type ApplicationCreateResponse, + type ApplicationUpdateResponse, + type ApplicationGetStatisticsResponse, + type ApplicationListRecentTransactionsResponse, + type ApplicationUpdateSettingsResponse, + type ApplicationCreateParams, + type ApplicationUpdateParams, + type ApplicationGetStatisticsParams, + type ApplicationListRecentTransactionsParams, + type ApplicationUpdateSettingsParams, +} from './applications'; +export { + Events, + type EventRetrieveResponse, + type EventListResponse, + type EventListAttemptsResponse, + type EventRetryDeliveryResponse, + type EventRetrieveParams, + type EventListParams, + type EventListAttemptsParams, + type EventRetryDeliveryParams, +} from './events'; +export { + Projects, + type ProjectCreateResponse, + type ProjectRetrieveResponse, + type ProjectUpdateResponse, + type ProjectListResponse, + type ProjectArchiveResponse, + type ProjectUnarchiveResponse, + type ProjectCreateParams, + type ProjectUpdateParams, + type ProjectListParams, +} from './projects'; +export { + WebhookEndpoints, + type WebhookEndpointCreateResponse, + type WebhookEndpointRetrieveResponse, + type WebhookEndpointUpdateResponse, + type WebhookEndpointListResponse, + type WebhookEndpointDeleteResponse, + type WebhookEndpointRotateSecretResponse, + type WebhookEndpointCreateParams, + type WebhookEndpointRetrieveParams, + type WebhookEndpointUpdateParams, + type WebhookEndpointListParams, + type WebhookEndpointDeleteParams, + type WebhookEndpointRotateSecretParams, +} from './webhook-endpoints'; diff --git a/src/resources/projects/projects.ts b/src/resources/projects/projects.ts index 4fbc132..029df38 100644 --- a/src/resources/projects/projects.ts +++ b/src/resources/projects/projects.ts @@ -2,11 +2,47 @@ import { APIResource } from '../../core/resource'; import * as ApplicationsAPI from './applications'; -import { ApplicationCreateParams, ApplicationCreateResponse, ApplicationGetStatisticsParams, ApplicationGetStatisticsResponse, ApplicationListRecentTransactionsParams, ApplicationListRecentTransactionsResponse, ApplicationUpdateParams, ApplicationUpdateResponse, ApplicationUpdateSettingsParams, ApplicationUpdateSettingsResponse, Applications } from './applications'; +import { + ApplicationCreateParams, + ApplicationCreateResponse, + ApplicationGetStatisticsParams, + ApplicationGetStatisticsResponse, + ApplicationListRecentTransactionsParams, + ApplicationListRecentTransactionsResponse, + ApplicationUpdateParams, + ApplicationUpdateResponse, + ApplicationUpdateSettingsParams, + ApplicationUpdateSettingsResponse, + Applications, +} from './applications'; import * as EventsAPI from './events'; -import { EventListAttemptsParams, EventListAttemptsResponse, EventListParams, EventListResponse, EventRetrieveParams, EventRetrieveResponse, EventRetryDeliveryParams, EventRetryDeliveryResponse, Events } from './events'; +import { + EventListAttemptsParams, + EventListAttemptsResponse, + EventListParams, + EventListResponse, + EventRetrieveParams, + EventRetrieveResponse, + EventRetryDeliveryParams, + EventRetryDeliveryResponse, + Events, +} from './events'; import * as WebhookEndpointsAPI from './webhook-endpoints'; -import { WebhookEndpointCreateParams, WebhookEndpointCreateResponse, WebhookEndpointDeleteParams, WebhookEndpointDeleteResponse, WebhookEndpointListParams, WebhookEndpointListResponse, WebhookEndpointRetrieveParams, WebhookEndpointRetrieveResponse, WebhookEndpointRotateSecretParams, WebhookEndpointRotateSecretResponse, WebhookEndpointUpdateParams, WebhookEndpointUpdateResponse, WebhookEndpoints } from './webhook-endpoints'; +import { + WebhookEndpointCreateParams, + WebhookEndpointCreateResponse, + WebhookEndpointDeleteParams, + WebhookEndpointDeleteResponse, + WebhookEndpointListParams, + WebhookEndpointListResponse, + WebhookEndpointRetrieveParams, + WebhookEndpointRetrieveResponse, + WebhookEndpointRotateSecretParams, + WebhookEndpointRotateSecretResponse, + WebhookEndpointUpdateParams, + WebhookEndpointUpdateResponse, + WebhookEndpoints, +} from './webhook-endpoints'; import * as UsersAPI from '../users/users'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; @@ -17,7 +53,9 @@ import { path } from '../../internal/utils/path'; */ export class Projects extends APIResource { applications: ApplicationsAPI.Applications = new ApplicationsAPI.Applications(this._client); - webhookEndpoints: WebhookEndpointsAPI.WebhookEndpoints = new WebhookEndpointsAPI.WebhookEndpoints(this._client); + webhookEndpoints: WebhookEndpointsAPI.WebhookEndpoints = new WebhookEndpointsAPI.WebhookEndpoints( + this._client, + ); events: EventsAPI.Events = new EventsAPI.Events(this._client); /** @@ -45,7 +83,10 @@ export class Projects extends APIResource { * Returns a list of projects for the organization. Supports pagination and * filtering by archived status. Requires projects:read scope. */ - list(query: ProjectListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + list( + query: ProjectListParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { return this._client.get('/v2/projects', { query, ...options }); } @@ -625,7 +666,7 @@ export declare namespace Projects { type ProjectUnarchiveResponse as ProjectUnarchiveResponse, type ProjectCreateParams as ProjectCreateParams, type ProjectUpdateParams as ProjectUpdateParams, - type ProjectListParams as ProjectListParams + type ProjectListParams as ProjectListParams, }; export { @@ -639,7 +680,7 @@ export declare namespace Projects { type ApplicationUpdateParams as ApplicationUpdateParams, type ApplicationGetStatisticsParams as ApplicationGetStatisticsParams, type ApplicationListRecentTransactionsParams as ApplicationListRecentTransactionsParams, - type ApplicationUpdateSettingsParams as ApplicationUpdateSettingsParams + type ApplicationUpdateSettingsParams as ApplicationUpdateSettingsParams, }; export { @@ -655,7 +696,7 @@ export declare namespace Projects { type WebhookEndpointUpdateParams as WebhookEndpointUpdateParams, type WebhookEndpointListParams as WebhookEndpointListParams, type WebhookEndpointDeleteParams as WebhookEndpointDeleteParams, - type WebhookEndpointRotateSecretParams as WebhookEndpointRotateSecretParams + type WebhookEndpointRotateSecretParams as WebhookEndpointRotateSecretParams, }; export { @@ -667,6 +708,6 @@ export declare namespace Projects { type EventRetrieveParams as EventRetrieveParams, type EventListParams as EventListParams, type EventListAttemptsParams as EventListAttemptsParams, - type EventRetryDeliveryParams as EventRetryDeliveryParams + type EventRetryDeliveryParams as EventRetryDeliveryParams, }; } diff --git a/src/resources/projects/webhook-endpoints.ts b/src/resources/projects/webhook-endpoints.ts index 6c32722..7f1f017 100644 --- a/src/resources/projects/webhook-endpoints.ts +++ b/src/resources/projects/webhook-endpoints.ts @@ -12,15 +12,23 @@ export class WebhookEndpoints extends APIResource { /** * Creates a new webhook endpoint for the project. Requires webhooks:write scope. */ - create(projectID: string, body: WebhookEndpointCreateParams, options?: RequestOptions): APIPromise { + create( + projectID: string, + body: WebhookEndpointCreateParams, + options?: RequestOptions, + ): APIPromise { return this._client.post(path`/v2/projects/${projectID}/webhook_endpoints`, { body, ...options }); } /** * Retrieves a webhook endpoint by ID. Requires webhooks:read scope. */ - retrieve(endpointID: string, params: WebhookEndpointRetrieveParams, options?: RequestOptions): APIPromise { - const { project_id } = params + retrieve( + endpointID: string, + params: WebhookEndpointRetrieveParams, + options?: RequestOptions, + ): APIPromise { + const { project_id } = params; return this._client.get(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}`, options); } @@ -28,24 +36,39 @@ export class WebhookEndpoints extends APIResource { * Updates a webhook endpoint's URL, description, or other settings. Requires * webhooks:write scope. */ - update(endpointID: string, params: WebhookEndpointUpdateParams, options?: RequestOptions): APIPromise { - const { project_id, ...body } = params - return this._client.patch(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}`, { body, ...options }); + update( + endpointID: string, + params: WebhookEndpointUpdateParams, + options?: RequestOptions, + ): APIPromise { + const { project_id, ...body } = params; + return this._client.patch(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}`, { + body, + ...options, + }); } /** * Returns a list of webhook endpoints for the project. Supports pagination. * Requires webhooks:read scope. */ - list(projectID: string, query: WebhookEndpointListParams | null | undefined = {}, options?: RequestOptions): APIPromise { + list( + projectID: string, + query: WebhookEndpointListParams | null | undefined = {}, + options?: RequestOptions, + ): APIPromise { return this._client.get(path`/v2/projects/${projectID}/webhook_endpoints`, { query, ...options }); } /** * Deletes a webhook endpoint. Requires webhooks:write scope. */ - delete(endpointID: string, params: WebhookEndpointDeleteParams, options?: RequestOptions): APIPromise { - const { project_id } = params + delete( + endpointID: string, + params: WebhookEndpointDeleteParams, + options?: RequestOptions, + ): APIPromise { + const { project_id } = params; return this._client.delete(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}`, options); } @@ -53,9 +76,16 @@ export class WebhookEndpoints extends APIResource { * Rotates the signing secret for a webhook endpoint. The new secret will be used * immediately. Requires webhooks:write scope. */ - rotateSecret(endpointID: string, params: WebhookEndpointRotateSecretParams, options?: RequestOptions): APIPromise { - const { project_id } = params - return this._client.post(path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}/rotate_secret`, options); + rotateSecret( + endpointID: string, + params: WebhookEndpointRotateSecretParams, + options?: RequestOptions, + ): APIPromise { + const { project_id } = params; + return this._client.post( + path`/v2/projects/${project_id}/webhook_endpoints/${endpointID}/rotate_secret`, + options, + ); } } @@ -477,6 +507,6 @@ export declare namespace WebhookEndpoints { type WebhookEndpointUpdateParams as WebhookEndpointUpdateParams, type WebhookEndpointListParams as WebhookEndpointListParams, type WebhookEndpointDeleteParams as WebhookEndpointDeleteParams, - type WebhookEndpointRotateSecretParams as WebhookEndpointRotateSecretParams + type WebhookEndpointRotateSecretParams as WebhookEndpointRotateSecretParams, }; } diff --git a/src/resources/users/events.ts b/src/resources/users/events.ts index 8ffb6d5..65b7322 100644 --- a/src/resources/users/events.ts +++ b/src/resources/users/events.ts @@ -14,7 +14,11 @@ export class Events extends APIResource { * Retrieves a single event by ID. The `application_id` query parameter is required * for authorization. Requires users:read scope. */ - retrieve(eventID: string, query: EventRetrieveParams, options?: RequestOptions): APIPromise { + retrieve( + eventID: string, + query: EventRetrieveParams, + options?: RequestOptions, + ): APIPromise { return this._client.get(path`/v2/users/events/${eventID}`, { query, ...options }); } @@ -26,7 +30,7 @@ export class Events extends APIResource { } } -export type JsonValue = string | number | boolean | null | Array | unknown +export type JsonValue = string | number | boolean | null | Array | unknown; export interface EventRetrieveResponse { /** @@ -152,6 +156,6 @@ export declare namespace Events { type EventRetrieveResponse as EventRetrieveResponse, type EventListResponse as EventListResponse, type EventRetrieveParams as EventRetrieveParams, - type EventListParams as EventListParams + type EventListParams as EventListParams, }; } diff --git a/src/resources/users/index.ts b/src/resources/users/index.ts index 7993a29..ee24da8 100644 --- a/src/resources/users/index.ts +++ b/src/resources/users/index.ts @@ -1,5 +1,35 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -export { Events, type JsonValue, type EventRetrieveResponse, type EventListResponse, type EventRetrieveParams, type EventListParams } from './events';; -export { TestMode, type TestModeUpdateResponse, type TestModeListResponse, type TestModeUpdateParams, type TestModeListParams } from './test-mode';; -export { Users, type BooleanFromString, type UserListEventNamesResponse, type UserListFilterPropertiesResponse, type UserResolveResponse, type UserRetrieveActiveEntitlementsResponse, type UserRetrieveAttributesResponse, type UserRetrieveDeviceAttributesResponse, type UserRetrieveSubscriptionSummaryResponse, type UserListEventNamesParams, type UserListFilterPropertiesParams, type UserResolveParams, type UserRetrieveActiveEntitlementsParams, type UserRetrieveAttributesParams, type UserRetrieveDeviceAttributesParams, type UserRetrieveSubscriptionSummaryParams } from './users';; +export { + Events, + type JsonValue, + type EventRetrieveResponse, + type EventListResponse, + type EventRetrieveParams, + type EventListParams, +} from './events'; +export { + TestMode, + type TestModeUpdateResponse, + type TestModeListResponse, + type TestModeUpdateParams, + type TestModeListParams, +} from './test-mode'; +export { + Users, + type BooleanFromString, + type UserListEventNamesResponse, + type UserListFilterPropertiesResponse, + type UserResolveResponse, + type UserRetrieveActiveEntitlementsResponse, + type UserRetrieveAttributesResponse, + type UserRetrieveDeviceAttributesResponse, + type UserRetrieveSubscriptionSummaryResponse, + type UserListEventNamesParams, + type UserListFilterPropertiesParams, + type UserResolveParams, + type UserRetrieveActiveEntitlementsParams, + type UserRetrieveAttributesParams, + type UserRetrieveDeviceAttributesParams, + type UserRetrieveSubscriptionSummaryParams, +} from './users'; diff --git a/src/resources/users/test-mode.ts b/src/resources/users/test-mode.ts index c29c472..454ab79 100644 --- a/src/resources/users/test-mode.ts +++ b/src/resources/users/test-mode.ts @@ -12,7 +12,11 @@ export class TestMode extends APIResource { /** * Update User Test Mode */ - update(appUserID: string, body: TestModeUpdateParams, options?: RequestOptions): APIPromise { + update( + appUserID: string, + body: TestModeUpdateParams, + options?: RequestOptions, + ): APIPromise { return this._client.patch(path`/v2/users/${appUserID}/test-mode`, { body, ...options }); } @@ -78,6 +82,6 @@ export declare namespace TestMode { type TestModeUpdateResponse as TestModeUpdateResponse, type TestModeListResponse as TestModeListResponse, type TestModeUpdateParams as TestModeUpdateParams, - type TestModeListParams as TestModeListParams + type TestModeListParams as TestModeListParams, }; } diff --git a/src/resources/users/users.ts b/src/resources/users/users.ts index 7769e75..923fb2c 100644 --- a/src/resources/users/users.ts +++ b/src/resources/users/users.ts @@ -2,9 +2,22 @@ import { APIResource } from '../../core/resource'; import * as EventsAPI from './events'; -import { EventListParams, EventListResponse, EventRetrieveParams, EventRetrieveResponse, Events, JsonValue } from './events'; +import { + EventListParams, + EventListResponse, + EventRetrieveParams, + EventRetrieveResponse, + Events, + JsonValue, +} from './events'; import * as TestModeAPI from './test-mode'; -import { TestMode, TestModeListParams, TestModeListResponse, TestModeUpdateParams, TestModeUpdateResponse } from './test-mode'; +import { + TestMode, + TestModeListParams, + TestModeListResponse, + TestModeUpdateParams, + TestModeUpdateResponse, +} from './test-mode'; import { APIPromise } from '../../core/api-promise'; import { RequestOptions } from '../../internal/request-options'; import { path } from '../../internal/utils/path'; @@ -19,14 +32,20 @@ export class Users extends APIResource { /** * List User Event Names */ - listEventNames(query: UserListEventNamesParams, options?: RequestOptions): APIPromise { + listEventNames( + query: UserListEventNamesParams, + options?: RequestOptions, + ): APIPromise { return this._client.get('/v2/users/event-names', { query, ...options }); } /** * List User Filter Properties */ - listFilterProperties(query: UserListFilterPropertiesParams, options?: RequestOptions): APIPromise { + listFilterProperties( + query: UserListFilterPropertiesParams, + options?: RequestOptions, + ): APIPromise { return this._client.get('/v2/users/filter-properties', { query, ...options }); } @@ -40,28 +59,44 @@ export class Users extends APIResource { /** * Get User Active Entitlements */ - retrieveActiveEntitlements(appUserID: string, query: UserRetrieveActiveEntitlementsParams, options?: RequestOptions): APIPromise { + retrieveActiveEntitlements( + appUserID: string, + query: UserRetrieveActiveEntitlementsParams, + options?: RequestOptions, + ): APIPromise { return this._client.get(path`/v2/users/${appUserID}/active-entitlements`, { query, ...options }); } /** * Get User Attributes */ - retrieveAttributes(appUserID: string, query: UserRetrieveAttributesParams, options?: RequestOptions): APIPromise { + retrieveAttributes( + appUserID: string, + query: UserRetrieveAttributesParams, + options?: RequestOptions, + ): APIPromise { return this._client.get(path`/v2/users/${appUserID}/attributes`, { query, ...options }); } /** * Get User Device Attributes */ - retrieveDeviceAttributes(appUserID: string, query: UserRetrieveDeviceAttributesParams, options?: RequestOptions): APIPromise { + retrieveDeviceAttributes( + appUserID: string, + query: UserRetrieveDeviceAttributesParams, + options?: RequestOptions, + ): APIPromise { return this._client.get(path`/v2/users/${appUserID}/device-attributes`, { query, ...options }); } /** * Get User Subscription Summary */ - retrieveSubscriptionSummary(appUserID: string, query: UserRetrieveSubscriptionSummaryParams, options?: RequestOptions): APIPromise { + retrieveSubscriptionSummary( + appUserID: string, + query: UserRetrieveSubscriptionSummaryParams, + options?: RequestOptions, + ): APIPromise { return this._client.get(path`/v2/users/${appUserID}/subscription-summary`, { query, ...options }); } } @@ -69,7 +104,7 @@ export class Users extends APIResource { /** * a string to be decoded into a boolean */ -export type BooleanFromString = 'true' | 'false' +export type BooleanFromString = 'true' | 'false'; export interface UserListEventNamesResponse { data: Array; @@ -322,7 +357,7 @@ export declare namespace Users { type UserRetrieveActiveEntitlementsParams as UserRetrieveActiveEntitlementsParams, type UserRetrieveAttributesParams as UserRetrieveAttributesParams, type UserRetrieveDeviceAttributesParams as UserRetrieveDeviceAttributesParams, - type UserRetrieveSubscriptionSummaryParams as UserRetrieveSubscriptionSummaryParams + type UserRetrieveSubscriptionSummaryParams as UserRetrieveSubscriptionSummaryParams, }; export { @@ -331,7 +366,7 @@ export declare namespace Users { type EventRetrieveResponse as EventRetrieveResponse, type EventListResponse as EventListResponse, type EventRetrieveParams as EventRetrieveParams, - type EventListParams as EventListParams + type EventListParams as EventListParams, }; export { @@ -339,6 +374,6 @@ export declare namespace Users { type TestModeUpdateResponse as TestModeUpdateResponse, type TestModeListResponse as TestModeListResponse, type TestModeUpdateParams as TestModeUpdateParams, - type TestModeListParams as TestModeListParams + type TestModeListParams as TestModeListParams, }; } diff --git a/src/uploads.ts b/src/uploads.ts index d543708..b2ef647 100644 --- a/src/uploads.ts +++ b/src/uploads.ts @@ -1,2 +1,2 @@ /** @deprecated Import from ./core/uploads instead */ -export * from "./core/uploads" \ No newline at end of file +export * from './core/uploads'; diff --git a/src/version.ts b/src/version.ts index 45d3c6c..88f4d40 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.3.0';// x-release-please-version +export const VERSION = '0.3.0'; // x-release-please-version diff --git a/tests/api-resources/campaigns/campaigns.test.ts b/tests/api-resources/campaigns/campaigns.test.ts index cc1a165..934491f 100644 --- a/tests/api-resources/campaigns/campaigns.test.ts +++ b/tests/api-resources/campaigns/campaigns.test.ts @@ -5,22 +5,28 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource campaigns', () => { // Mock server tests are disabled test.skip('create: only required params', async () => { const responsePromise = client.campaigns.create({ - application_id: 'application_id', - audiences: [{ variants: [{ - paywall: 'paywall', - percentage: 0, - type: 'treatment', - }] }], - description: 'x', - placements: [{ event_name: 'x' }], - }); + application_id: 'application_id', + audiences: [ + { + variants: [ + { + paywall: 'paywall', + percentage: 0, + type: 'treatment', + }, + ], + }, + ], + description: 'x', + placements: [{ event_name: 'x' }], + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -33,26 +39,32 @@ describe('resource campaigns', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.campaigns.create({ - application_id: 'application_id', - audiences: [{ - variants: [{ - paywall: 'paywall', - percentage: 0, - type: 'treatment', - }], - description: 'description', - enabled: true, - expression: 'expression', - variant_optimization: 'none', - }], - description: 'x', - placements: [{ - event_name: 'x', - enabled: true, - remove_from_other_campaigns: true, - }], - notes: 'notes', - }); + application_id: 'application_id', + audiences: [ + { + variants: [ + { + paywall: 'paywall', + percentage: 0, + type: 'treatment', + }, + ], + description: 'description', + enabled: true, + expression: 'expression', + variant_optimization: 'none', + }, + ], + description: 'x', + placements: [ + { + event_name: 'x', + enabled: true, + remove_from_other_campaigns: true, + }, + ], + notes: 'notes', + }); }); // Mock server tests are disabled @@ -94,12 +106,12 @@ describe('resource campaigns', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.campaigns.list({ - application_id: 'application_id', - archived: 'true', - ending_before: 'ending_before', - limit: 'limit', - starting_after: 'starting_after', - }); + application_id: 'application_id', + archived: 'true', + ending_before: 'ending_before', + limit: 'limit', + starting_after: 'starting_after', + }); }); // Mock server tests are disabled @@ -141,9 +153,9 @@ describe('resource campaigns', () => { // Mock server tests are disabled test.skip('updateAudience: required and optional params', async () => { const response = await client.campaigns.updateAudience('audience_id', { - id: 'id', - description: 'description', - enabled: true, - }); + id: 'id', + description: 'description', + enabled: true, + }); }); }); diff --git a/tests/api-resources/campaigns/placements.test.ts b/tests/api-resources/campaigns/placements.test.ts index 8fe6c28..b5065af 100644 --- a/tests/api-resources/campaigns/placements.test.ts +++ b/tests/api-resources/campaigns/placements.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource placements', () => { @@ -24,10 +24,10 @@ describe('resource placements', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.campaigns.placements.update('placement_id', { - id: 'id', - enabled: true, - event_name: 'x', - }); + id: 'id', + enabled: true, + event_name: 'x', + }); }); // Mock server tests are disabled @@ -45,10 +45,10 @@ describe('resource placements', () => { // Mock server tests are disabled test.skip('add: required and optional params', async () => { const response = await client.campaigns.placements.add('id', { - event_name: 'x', - enabled: true, - remove_from_other_campaigns: true, - }); + event_name: 'x', + enabled: true, + remove_from_other_campaigns: true, + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/charts.test.ts b/tests/api-resources/charts.test.ts index 79b96ee..abc92e0 100644 --- a/tests/api-resources/charts.test.ts +++ b/tests/api-resources/charts.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource charts', () => { @@ -29,10 +29,10 @@ describe('resource charts', () => { // Mock server tests are disabled test.skip('queryData: only required params', async () => { const responsePromise = client.charts.queryData({ - application_id: 'application_id', - x_axis: 'x_axis', - y_axis: 'y_axis', - }); + application_id: 'application_id', + x_axis: 'x_axis', + y_axis: 'y_axis', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -45,36 +45,36 @@ describe('resource charts', () => { // Mock server tests are disabled test.skip('queryData: required and optional params', async () => { const response = await client.charts.queryData({ - application_id: 'application_id', - x_axis: 'x_axis', - y_axis: 'y_axis', - app_version: ['string'], - auto_renew_status: ['string'], - breakdown: 'breakdown', - campaign_id: ['string'], - conversion_timeframe: 'd1', - country_code: ['string'], - date_filter: { - dimension: 'purchaseDate', - preset: 'last_24_hours', - range: { from: 'from', to: 'to' }, - }, - date_interval: 'auto', - environment: ['string'], - event_type: ['string'], - experiment_id: ['string'], - include: ['string'], - max_data_points: 0, - paywall_id: ['string'], - placement: ['string'], - product_duration: ['string'], - product_id: ['string'], - revenue_source: ['string'], - revenue_type: ['string'], - sdk_version: ['string'], - store: ['string'], - sub_start_type: ['string'], - variant_id: ['string'], - }); + application_id: 'application_id', + x_axis: 'x_axis', + y_axis: 'y_axis', + app_version: ['string'], + auto_renew_status: ['string'], + breakdown: 'breakdown', + campaign_id: ['string'], + conversion_timeframe: 'd1', + country_code: ['string'], + date_filter: { + dimension: 'purchaseDate', + preset: 'last_24_hours', + range: { from: 'from', to: 'to' }, + }, + date_interval: 'auto', + environment: ['string'], + event_type: ['string'], + experiment_id: ['string'], + include: ['string'], + max_data_points: 0, + paywall_id: ['string'], + placement: ['string'], + product_duration: ['string'], + product_id: ['string'], + revenue_source: ['string'], + revenue_type: ['string'], + sdk_version: ['string'], + store: ['string'], + sub_start_type: ['string'], + variant_id: ['string'], + }); }); }); diff --git a/tests/api-resources/entitlements/entitlements.test.ts b/tests/api-resources/entitlements/entitlements.test.ts index 10e4b8d..cc29d37 100644 --- a/tests/api-resources/entitlements/entitlements.test.ts +++ b/tests/api-resources/entitlements/entitlements.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource entitlements', () => { @@ -24,13 +24,13 @@ describe('resource entitlements', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.entitlements.create({ - identifier: 'x', - project_id: 'project_id', - description: 'description', - metadata: { foo: 'string' }, - name: 'name', - products: ['string'], - }); + identifier: 'x', + project_id: 'project_id', + description: 'description', + metadata: { foo: 'string' }, + name: 'name', + products: ['string'], + }); }); // Mock server tests are disabled @@ -72,11 +72,11 @@ describe('resource entitlements', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.entitlements.list({ - project_id: 'project_id', - ending_before: 'ending_before', - limit: 'limit', - starting_after: 'starting_after', - }); + project_id: 'project_id', + ending_before: 'ending_before', + limit: 'limit', + starting_after: 'starting_after', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/entitlements/grants.test.ts b/tests/api-resources/entitlements/grants.test.ts index a421d24..ca8dd29 100644 --- a/tests/api-resources/entitlements/grants.test.ts +++ b/tests/api-resources/entitlements/grants.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource grants', () => { @@ -24,11 +24,11 @@ describe('resource grants', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.entitlements.grants.create('id', { - device_id: 'x', - expires_at: 'expires_at', - reason: 'reason', - user_id: 'user_id', - }); + device_id: 'x', + expires_at: 'expires_at', + reason: 'reason', + user_id: 'user_id', + }); }); // Mock server tests are disabled @@ -46,15 +46,19 @@ describe('resource grants', () => { // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect(client.entitlements.grants.list('id', { - ending_before: 'ending_before', - include_expired: 'true', - include_revoked: 'true', - limit: 'limit', - starting_after: 'starting_after', - }, { path: '/_stainless_unknown_path' })) - .rejects - .toThrow(SuperwallAPI.NotFoundError); + await expect( + client.entitlements.grants.list( + 'id', + { + ending_before: 'ending_before', + include_expired: 'true', + include_revoked: 'true', + limit: 'limit', + starting_after: 'starting_after', + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(SuperwallAPI.NotFoundError); }); // Mock server tests are disabled diff --git a/tests/api-resources/grants.test.ts b/tests/api-resources/grants.test.ts index cb465e3..8b513a8 100644 --- a/tests/api-resources/grants.test.ts +++ b/tests/api-resources/grants.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource grants', () => { @@ -24,14 +24,14 @@ describe('resource grants', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.grants.list({ - project_id: 'project_id', - device_id: 'device_id', - ending_before: 'ending_before', - include_expired: 'true', - include_revoked: 'true', - limit: 'limit', - starting_after: 'starting_after', - user_id: 'user_id', - }); + project_id: 'project_id', + device_id: 'device_id', + ending_before: 'ending_before', + include_expired: 'true', + include_revoked: 'true', + limit: 'limit', + starting_after: 'starting_after', + user_id: 'user_id', + }); }); }); diff --git a/tests/api-resources/me/organizations.test.ts b/tests/api-resources/me/organizations.test.ts index d8ce876..c2cc4bb 100644 --- a/tests/api-resources/me/organizations.test.ts +++ b/tests/api-resources/me/organizations.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource organizations', () => { diff --git a/tests/api-resources/paywalls/paywalls.test.ts b/tests/api-resources/paywalls/paywalls.test.ts index 8e8a5bf..8cb49ca 100644 --- a/tests/api-resources/paywalls/paywalls.test.ts +++ b/tests/api-resources/paywalls/paywalls.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource paywalls', () => { @@ -24,20 +24,22 @@ describe('resource paywalls', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.paywalls.create({ - application_id: 'application_id', - name: 'x', - feature_gating: 'gated', - identifier: 'identifier', - metadata: { foo: 'string' }, - presentation_style: 'fullscreen', - products: [{ - identifier: 'identifier', - reference_name: 'x', - store: 'app-store', - }], - template: 'template', - url: 'url', - }); + application_id: 'application_id', + name: 'x', + feature_gating: 'gated', + identifier: 'identifier', + metadata: { foo: 'string' }, + presentation_style: 'fullscreen', + products: [ + { + identifier: 'identifier', + reference_name: 'x', + store: 'app-store', + }, + ], + template: 'template', + url: 'url', + }); }); // Mock server tests are disabled @@ -79,13 +81,13 @@ describe('resource paywalls', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.paywalls.list({ - application_id: 'application_id', - archived: 'true', - ending_before: 'ending_before', - limit: 'limit', - starting_after: 'starting_after', - status: 'draft', - }); + application_id: 'application_id', + archived: 'true', + ending_before: 'ending_before', + limit: 'limit', + starting_after: 'starting_after', + status: 'draft', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/paywalls/templates.test.ts b/tests/api-resources/paywalls/templates.test.ts index 6148f64..30fcfa5 100644 --- a/tests/api-resources/paywalls/templates.test.ts +++ b/tests/api-resources/paywalls/templates.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource templates', () => { @@ -36,12 +36,12 @@ describe('resource templates', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.paywalls.templates.list({ - application_id: 'application_id', - category: 'category', - ending_before: 'ending_before', - limit: 'limit', - starting_after: 'starting_after', - visibility: 'public', - }); + application_id: 'application_id', + category: 'category', + ending_before: 'ending_before', + limit: 'limit', + starting_after: 'starting_after', + visibility: 'public', + }); }); }); diff --git a/tests/api-resources/products.test.ts b/tests/api-resources/products.test.ts index 1127061..4cfc46c 100644 --- a/tests/api-resources/products.test.ts +++ b/tests/api-resources/products.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource products', () => { @@ -24,18 +24,18 @@ describe('resource products', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.products.create({ - identifier: 'x', - project_id: 'project_id', - entitlements: ['string'], - metadata: { foo: 'string' }, - name: 'name', - price: { amount: 0, currency: 'currency' }, - subscription: { - period: 'day', - period_count: 0, - trial_period_days: 0, - }, - }); + identifier: 'x', + project_id: 'project_id', + entitlements: ['string'], + metadata: { foo: 'string' }, + name: 'name', + price: { amount: 0, currency: 'currency' }, + subscription: { + period: 'day', + period_count: 0, + trial_period_days: 0, + }, + }); }); // Mock server tests are disabled @@ -77,12 +77,12 @@ describe('resource products', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.products.list({ - project_id: 'project_id', - ending_before: 'ending_before', - limit: 'limit', - platform: 'ios', - starting_after: 'starting_after', - }); + project_id: 'project_id', + ending_before: 'ending_before', + limit: 'limit', + platform: 'ios', + starting_after: 'starting_after', + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/projects/applications.test.ts b/tests/api-resources/projects/applications.test.ts index a2dcd8a..525f188 100644 --- a/tests/api-resources/projects/applications.test.ts +++ b/tests/api-resources/projects/applications.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource applications', () => { @@ -24,12 +24,12 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.projects.applications.create('id', { - name: 'x', - platform: 'ios', - app_id: 'app_id', - bundle_id: 'bundle_id', - domain: 'domain', - }); + name: 'x', + platform: 'ios', + app_id: 'app_id', + bundle_id: 'bundle_id', + domain: 'domain', + }); }); // Mock server tests are disabled @@ -47,21 +47,21 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.projects.applications.update('application_id', { - id: 'id', - app_id: 'app_id', - bundle_id: 'bundle_id', - name: 'x', - }); + id: 'id', + app_id: 'app_id', + bundle_id: 'bundle_id', + name: 'x', + }); }); // Mock server tests are disabled test.skip('getStatistics: only required params', async () => { const responsePromise = client.projects.applications.getStatistics('application_id', { - id: 'id', - environment: 'PRODUCTION', - from: 'from', - to: 'to', - }); + id: 'id', + environment: 'PRODUCTION', + from: 'from', + to: 'to', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -74,21 +74,21 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('getStatistics: required and optional params', async () => { const response = await client.projects.applications.getStatistics('application_id', { - id: 'id', - environment: 'PRODUCTION', - from: 'from', - to: 'to', - }); + id: 'id', + environment: 'PRODUCTION', + from: 'from', + to: 'to', + }); }); // Mock server tests are disabled test.skip('listRecentTransactions: only required params', async () => { const responsePromise = client.projects.applications.listRecentTransactions('application_id', { - id: 'id', - environment: 'PRODUCTION', - from: 'from', - to: 'to', - }); + id: 'id', + environment: 'PRODUCTION', + from: 'from', + to: 'to', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -101,11 +101,11 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('listRecentTransactions: required and optional params', async () => { const response = await client.projects.applications.listRecentTransactions('application_id', { - id: 'id', - environment: 'PRODUCTION', - from: 'from', - to: 'to', - }); + id: 'id', + environment: 'PRODUCTION', + from: 'from', + to: 'to', + }); }); // Mock server tests are disabled @@ -123,14 +123,14 @@ describe('resource applications', () => { // Mock server tests are disabled test.skip('updateSettings: required and optional params', async () => { const response = await client.projects.applications.updateSettings('application_id', { - id: 'id', - app_store_connect_shared_secret: 'app_store_connect_shared_secret', - apple_small_business_end_date: 'apple_small_business_end_date', - apple_small_business_start_date: 'apple_small_business_start_date', - apple_url_scheme: 'apple_url_scheme', - notification_redirect_url: 'notification_redirect_url', - revenue_cat_public_api_key: 'revenue_cat_public_api_key', - stripe_private_key: 'stripe_private_key', - }); + id: 'id', + app_store_connect_shared_secret: 'app_store_connect_shared_secret', + apple_small_business_end_date: 'apple_small_business_end_date', + apple_small_business_start_date: 'apple_small_business_start_date', + apple_url_scheme: 'apple_url_scheme', + notification_redirect_url: 'notification_redirect_url', + revenue_cat_public_api_key: 'revenue_cat_public_api_key', + stripe_private_key: 'stripe_private_key', + }); }); }); diff --git a/tests/api-resources/projects/events.test.ts b/tests/api-resources/projects/events.test.ts index d3cc9ff..e200fe6 100644 --- a/tests/api-resources/projects/events.test.ts +++ b/tests/api-resources/projects/events.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource events', () => { @@ -41,18 +41,22 @@ describe('resource events', () => { // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect(client.projects.events.list('project_id', { - after: 'after', - before: 'before', - channel: 'channel', - event_types: ['string'], - iterator: 'iterator', - limit: 'limit', - tag: 'tag', - with_content: 'true', - }, { path: '/_stainless_unknown_path' })) - .rejects - .toThrow(SuperwallAPI.NotFoundError); + await expect( + client.projects.events.list( + 'project_id', + { + after: 'after', + before: 'before', + channel: 'channel', + event_types: ['string'], + iterator: 'iterator', + limit: 'limit', + tag: 'tag', + with_content: 'true', + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(SuperwallAPI.NotFoundError); }); // Mock server tests are disabled @@ -70,19 +74,22 @@ describe('resource events', () => { // Mock server tests are disabled test.skip('listAttempts: required and optional params', async () => { const response = await client.projects.events.listAttempts('event_id', { - project_id: 'project_id', - after: 'after', - before: 'before', - iterator: 'iterator', - limit: 'limit', - status: 'status', - status_code_class: 'status_code_class', - }); + project_id: 'project_id', + after: 'after', + before: 'before', + iterator: 'iterator', + limit: 'limit', + status: 'status', + status_code_class: 'status_code_class', + }); }); // Mock server tests are disabled test.skip('retryDelivery: only required params', async () => { - const responsePromise = client.projects.events.retryDelivery('event_id', { project_id: 'project_id', endpoint_id: 'endpoint_id' }); + const responsePromise = client.projects.events.retryDelivery('event_id', { + project_id: 'project_id', + endpoint_id: 'endpoint_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -94,6 +101,9 @@ describe('resource events', () => { // Mock server tests are disabled test.skip('retryDelivery: required and optional params', async () => { - const response = await client.projects.events.retryDelivery('event_id', { project_id: 'project_id', endpoint_id: 'endpoint_id' }); + const response = await client.projects.events.retryDelivery('event_id', { + project_id: 'project_id', + endpoint_id: 'endpoint_id', + }); }); }); diff --git a/tests/api-resources/projects/projects.test.ts b/tests/api-resources/projects/projects.test.ts index ecdc53e..e67da56 100644 --- a/tests/api-resources/projects/projects.test.ts +++ b/tests/api-resources/projects/projects.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource projects', () => { @@ -24,10 +24,10 @@ describe('resource projects', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.projects.create({ - name: 'x', - organization_id: 0, - metadata: { foo: 'string' }, - }); + name: 'x', + organization_id: 0, + metadata: { foo: 'string' }, + }); }); // Mock server tests are disabled @@ -69,15 +69,18 @@ describe('resource projects', () => { // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect(client.projects.list({ - archived: 'true', - ending_before: 'ending_before', - limit: 'limit', - organization_id: 'organization_id', - starting_after: 'starting_after', - }, { path: '/_stainless_unknown_path' })) - .rejects - .toThrow(SuperwallAPI.NotFoundError); + await expect( + client.projects.list( + { + archived: 'true', + ending_before: 'ending_before', + limit: 'limit', + organization_id: 'organization_id', + starting_after: 'starting_after', + }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(SuperwallAPI.NotFoundError); }); // Mock server tests are disabled diff --git a/tests/api-resources/projects/webhook-endpoints.test.ts b/tests/api-resources/projects/webhook-endpoints.test.ts index 05f224d..7dc8c42 100644 --- a/tests/api-resources/projects/webhook-endpoints.test.ts +++ b/tests/api-resources/projects/webhook-endpoints.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource webhookEndpoints', () => { @@ -24,17 +24,19 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('create: required and optional params', async () => { const response = await client.projects.webhookEndpoints.create('project_id', { - url: 'x', - description: 'description', - filter_types: ['string'], - headers: { foo: 'string' }, - metadata: { foo: 'string' }, - }); + url: 'x', + description: 'description', + filter_types: ['string'], + headers: { foo: 'string' }, + metadata: { foo: 'string' }, + }); }); // Mock server tests are disabled test.skip('retrieve: only required params', async () => { - const responsePromise = client.projects.webhookEndpoints.retrieve('endpoint_id', { project_id: 'project_id' }); + const responsePromise = client.projects.webhookEndpoints.retrieve('endpoint_id', { + project_id: 'project_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -46,12 +48,16 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('retrieve: required and optional params', async () => { - const response = await client.projects.webhookEndpoints.retrieve('endpoint_id', { project_id: 'project_id' }); + const response = await client.projects.webhookEndpoints.retrieve('endpoint_id', { + project_id: 'project_id', + }); }); // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.projects.webhookEndpoints.update('endpoint_id', { project_id: 'project_id' }); + const responsePromise = client.projects.webhookEndpoints.update('endpoint_id', { + project_id: 'project_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -64,14 +70,14 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { const response = await client.projects.webhookEndpoints.update('endpoint_id', { - project_id: 'project_id', - description: 'description', - disabled: true, - filter_types: ['string'], - headers: { foo: 'string' }, - metadata: { foo: 'string' }, - url: 'url', - }); + project_id: 'project_id', + description: 'description', + disabled: true, + filter_types: ['string'], + headers: { foo: 'string' }, + metadata: { foo: 'string' }, + url: 'url', + }); }); // Mock server tests are disabled @@ -89,14 +95,20 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('list: request options and params are passed correctly', async () => { // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error - await expect(client.projects.webhookEndpoints.list('project_id', { iterator: 'iterator', limit: 'limit' }, { path: '/_stainless_unknown_path' })) - .rejects - .toThrow(SuperwallAPI.NotFoundError); + await expect( + client.projects.webhookEndpoints.list( + 'project_id', + { iterator: 'iterator', limit: 'limit' }, + { path: '/_stainless_unknown_path' }, + ), + ).rejects.toThrow(SuperwallAPI.NotFoundError); }); // Mock server tests are disabled test.skip('delete: only required params', async () => { - const responsePromise = client.projects.webhookEndpoints.delete('endpoint_id', { project_id: 'project_id' }); + const responsePromise = client.projects.webhookEndpoints.delete('endpoint_id', { + project_id: 'project_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -108,12 +120,16 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('delete: required and optional params', async () => { - const response = await client.projects.webhookEndpoints.delete('endpoint_id', { project_id: 'project_id' }); + const response = await client.projects.webhookEndpoints.delete('endpoint_id', { + project_id: 'project_id', + }); }); // Mock server tests are disabled test.skip('rotateSecret: only required params', async () => { - const responsePromise = client.projects.webhookEndpoints.rotateSecret('endpoint_id', { project_id: 'project_id' }); + const responsePromise = client.projects.webhookEndpoints.rotateSecret('endpoint_id', { + project_id: 'project_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -125,6 +141,8 @@ describe('resource webhookEndpoints', () => { // Mock server tests are disabled test.skip('rotateSecret: required and optional params', async () => { - const response = await client.projects.webhookEndpoints.rotateSecret('endpoint_id', { project_id: 'project_id' }); + const response = await client.projects.webhookEndpoints.rotateSecret('endpoint_id', { + project_id: 'project_id', + }); }); }); diff --git a/tests/api-resources/users/events.test.ts b/tests/api-resources/users/events.test.ts index c27855b..8afa107 100644 --- a/tests/api-resources/users/events.test.ts +++ b/tests/api-resources/users/events.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource events', () => { @@ -41,11 +41,11 @@ describe('resource events', () => { // Mock server tests are disabled test.skip('list: required and optional params', async () => { const response = await client.users.events.list('app_user_id', { - application_id: 'application_id', - event_group: 'app', - limit: 'limit', - offset: 'offset', - search_term: 'search_term', - }); + application_id: 'application_id', + event_group: 'app', + limit: 'limit', + offset: 'offset', + search_term: 'search_term', + }); }); }); diff --git a/tests/api-resources/users/test-mode.test.ts b/tests/api-resources/users/test-mode.test.ts index 487aae4..c3e82b6 100644 --- a/tests/api-resources/users/test-mode.test.ts +++ b/tests/api-resources/users/test-mode.test.ts @@ -5,13 +5,16 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource testMode', () => { // Mock server tests are disabled test.skip('update: only required params', async () => { - const responsePromise = client.users.testMode.update('app_user_id', { application_id: 'application_id', test_mode_enabled: true }); + const responsePromise = client.users.testMode.update('app_user_id', { + application_id: 'application_id', + test_mode_enabled: true, + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -23,7 +26,10 @@ describe('resource testMode', () => { // Mock server tests are disabled test.skip('update: required and optional params', async () => { - const response = await client.users.testMode.update('app_user_id', { application_id: 'application_id', test_mode_enabled: true }); + const response = await client.users.testMode.update('app_user_id', { + application_id: 'application_id', + test_mode_enabled: true, + }); }); // Mock server tests are disabled diff --git a/tests/api-resources/users/users.test.ts b/tests/api-resources/users/users.test.ts index deca073..ec1fe62 100644 --- a/tests/api-resources/users/users.test.ts +++ b/tests/api-resources/users/users.test.ts @@ -5,7 +5,7 @@ import SuperwallAPI from 'superwall-api'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token', - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', }); describe('resource users', () => { @@ -24,12 +24,12 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('listEventNames: required and optional params', async () => { const response = await client.users.listEventNames({ - application_id: 'application_id', - include_all: 'true', - is_web: 'true', - limit: 'limit', - offset: 'offset', - }); + application_id: 'application_id', + include_all: 'true', + is_web: 'true', + limit: 'limit', + offset: 'offset', + }); }); // Mock server tests are disabled @@ -51,7 +51,10 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('resolve: only required params', async () => { - const responsePromise = client.users.resolve({ app_user_id: 'app_user_id', application_id: 'application_id' }); + const responsePromise = client.users.resolve({ + app_user_id: 'app_user_id', + application_id: 'application_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -63,12 +66,17 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('resolve: required and optional params', async () => { - const response = await client.users.resolve({ app_user_id: 'app_user_id', application_id: 'application_id' }); + const response = await client.users.resolve({ + app_user_id: 'app_user_id', + application_id: 'application_id', + }); }); // Mock server tests are disabled test.skip('retrieveActiveEntitlements: only required params', async () => { - const responsePromise = client.users.retrieveActiveEntitlements('app_user_id', { application_id: 'application_id' }); + const responsePromise = client.users.retrieveActiveEntitlements('app_user_id', { + application_id: 'application_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -80,12 +88,16 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('retrieveActiveEntitlements: required and optional params', async () => { - const response = await client.users.retrieveActiveEntitlements('app_user_id', { application_id: 'application_id' }); + const response = await client.users.retrieveActiveEntitlements('app_user_id', { + application_id: 'application_id', + }); }); // Mock server tests are disabled test.skip('retrieveAttributes: only required params', async () => { - const responsePromise = client.users.retrieveAttributes('app_user_id', { application_id: 'application_id' }); + const responsePromise = client.users.retrieveAttributes('app_user_id', { + application_id: 'application_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -97,12 +109,16 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('retrieveAttributes: required and optional params', async () => { - const response = await client.users.retrieveAttributes('app_user_id', { application_id: 'application_id' }); + const response = await client.users.retrieveAttributes('app_user_id', { + application_id: 'application_id', + }); }); // Mock server tests are disabled test.skip('retrieveDeviceAttributes: only required params', async () => { - const responsePromise = client.users.retrieveDeviceAttributes('app_user_id', { application_id: 'application_id' }); + const responsePromise = client.users.retrieveDeviceAttributes('app_user_id', { + application_id: 'application_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -114,12 +130,16 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('retrieveDeviceAttributes: required and optional params', async () => { - const response = await client.users.retrieveDeviceAttributes('app_user_id', { application_id: 'application_id' }); + const response = await client.users.retrieveDeviceAttributes('app_user_id', { + application_id: 'application_id', + }); }); // Mock server tests are disabled test.skip('retrieveSubscriptionSummary: only required params', async () => { - const responsePromise = client.users.retrieveSubscriptionSummary('app_user_id', { application_id: 'application_id' }); + const responsePromise = client.users.retrieveSubscriptionSummary('app_user_id', { + application_id: 'application_id', + }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -131,6 +151,8 @@ describe('resource users', () => { // Mock server tests are disabled test.skip('retrieveSubscriptionSummary: required and optional params', async () => { - const response = await client.users.retrieveSubscriptionSummary('app_user_id', { application_id: 'application_id' }); + const response = await client.users.retrieveSubscriptionSummary('app_user_id', { + application_id: 'application_id', + }); }); }); diff --git a/tests/index.test.ts b/tests/index.test.ts index c094a4d..48b1b77 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -21,11 +21,11 @@ describe('instantiate client', () => { describe('defaultHeaders', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-My-Default-Header': '2' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}) + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-My-Default-Header': '2' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); test('they are used in the request', async () => { const { req } = await client.buildRequest({ path: '/foo', method: 'post' }); @@ -50,207 +50,209 @@ describe('instantiate client', () => { expect(req.headers.has('x-my-default-header')).toBe(false); }); }); -describe('logging', () => { - const env = process.env; + describe('logging', () => { + const env = process.env; - beforeEach(() => { - process.env = { ...env }; - process.env['SUPERWALL_API_LOG'] = undefined; - }); + beforeEach(() => { + process.env = { ...env }; + process.env['SUPERWALL_API_LOG'] = undefined; + }); - afterEach(() => { - process.env = env; - }); + afterEach(() => { + process.env = env; + }); - const forceAPIResponseForClient = async (client: SuperwallAPI) => { - await new APIPromise( - client, - Promise.resolve({ - response: new Response(), - controller: new AbortController(), - requestLogID: 'log_000000', - retryOfRequestLogID: undefined, - startTime: Date.now(), - options: { - method: 'get', - path: '/', - }, - }), - ); - }; - - test('debug logs when log level is debug', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), + const forceAPIResponseForClient = async (client: SuperwallAPI) => { + await new APIPromise( + client, + Promise.resolve({ + response: new Response(), + controller: new AbortController(), + requestLogID: 'log_000000', + retryOfRequestLogID: undefined, + startTime: Date.now(), + options: { + method: 'get', + path: '/', + }, + }), + ); }; - const client = new SuperwallAPI({ - logger: logger, - logLevel: 'debug', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); + test('debug logs when log level is debug', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + const client = new SuperwallAPI({ + logger: logger, + logLevel: 'debug', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); - test('default logLevel is warn', async () => { - const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.logLevel).toBe('warn'); - }); + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - test('debug logs are skipped when log level is info', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + test('default logLevel is warn', async () => { + const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); + expect(client.logLevel).toBe('warn'); + }); - const client = new SuperwallAPI({ - logger: logger, - logLevel: 'info', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); + test('debug logs are skipped when log level is info', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + const client = new SuperwallAPI({ + logger: logger, + logLevel: 'info', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); - test('debug logs happen with debug env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - process.env['SUPERWALL_API_LOG'] = 'debug'; - const client = new SuperwallAPI({ - logger: logger, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); - expect(client.logLevel).toBe('debug'); + test('debug logs happen with debug env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - await forceAPIResponseForClient(client); - expect(debugMock).toHaveBeenCalled(); - }); + process.env['SUPERWALL_API_LOG'] = 'debug'; + const client = new SuperwallAPI({ + logger: logger, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); + expect(client.logLevel).toBe('debug'); - test('warn when env var level is invalid', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + await forceAPIResponseForClient(client); + expect(debugMock).toHaveBeenCalled(); + }); - process.env['SUPERWALL_API_LOG'] = 'not a log level'; - const client = new SuperwallAPI({ - logger: logger, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); - expect(client.logLevel).toBe('warn'); - expect(warnMock).toHaveBeenCalledWith('process.env[\'SUPERWALL_API_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]'); - }); + test('warn when env var level is invalid', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; - test('client log level overrides env var', async () => { - const debugMock = jest.fn(); - const logger = { - debug: debugMock, - info: jest.fn(), - warn: jest.fn(), - error: jest.fn(), - }; + process.env['SUPERWALL_API_LOG'] = 'not a log level'; + const client = new SuperwallAPI({ + logger: logger, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); + expect(client.logLevel).toBe('warn'); + expect(warnMock).toHaveBeenCalledWith( + 'process.env[\'SUPERWALL_API_LOG\'] was set to "not a log level", expected one of ["off","error","warn","info","debug"]', + ); + }); - process.env['SUPERWALL_API_LOG'] = 'debug'; - const client = new SuperwallAPI({ - logger: logger, - logLevel: 'off', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); + test('client log level overrides env var', async () => { + const debugMock = jest.fn(); + const logger = { + debug: debugMock, + info: jest.fn(), + warn: jest.fn(), + error: jest.fn(), + }; - await forceAPIResponseForClient(client); - expect(debugMock).not.toHaveBeenCalled(); - }); + process.env['SUPERWALL_API_LOG'] = 'debug'; + const client = new SuperwallAPI({ + logger: logger, + logLevel: 'off', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); - test('no warning logged for invalid env var level + valid client level', async () => { - const warnMock = jest.fn(); - const logger = { - debug: jest.fn(), - info: jest.fn(), - warn: warnMock, - error: jest.fn(), - }; + await forceAPIResponseForClient(client); + expect(debugMock).not.toHaveBeenCalled(); + }); - process.env['SUPERWALL_API_LOG'] = 'not a log level'; - const client = new SuperwallAPI({ - logger: logger, - logLevel: 'debug', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); - expect(client.logLevel).toBe('debug'); - expect(warnMock).not.toHaveBeenCalled(); + test('no warning logged for invalid env var level + valid client level', async () => { + const warnMock = jest.fn(); + const logger = { + debug: jest.fn(), + info: jest.fn(), + warn: warnMock, + error: jest.fn(), + }; + + process.env['SUPERWALL_API_LOG'] = 'not a log level'; + const client = new SuperwallAPI({ + logger: logger, + logLevel: 'debug', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); + expect(client.logLevel).toBe('debug'); + expect(warnMock).not.toHaveBeenCalled(); + }); }); -}); describe('defaultQuery', () => { test('with null query params given', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo'); }); test('multiple default query params', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultQuery: { apiVersion: 'foo', hello: 'world' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); + baseURL: 'http://localhost:5000/', + defaultQuery: { apiVersion: 'foo', hello: 'world' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/foo?apiVersion=foo&hello=world'); }); test('overriding with `undefined`', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultQuery: { hello: 'world' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}) + baseURL: 'http://localhost:5000/', + defaultQuery: { hello: 'world' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', { hello: undefined })).toEqual('http://localhost:5000/foo'); }); }); test('custom fetch', async () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: (url) => { - return Promise.resolve( - new Response(JSON.stringify({ url, custom: true }), { - headers: { 'Content-Type': 'application/json' }, - }), - ); -}, -}); + baseURL: 'http://localhost:5000/', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: (url) => { + return Promise.resolve( + new Response(JSON.stringify({ url, custom: true }), { + headers: { 'Content-Type': 'application/json' }, + }), + ); + }, + }); const response = await client.get('/foo'); expect(response).toEqual({ url: 'http://localhost:5000/foo', custom: true }); @@ -259,39 +261,37 @@ describe('logging', () => { test('explicit global fetch', async () => { // make sure the global fetch type is assignable to our Fetch type const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: defaultFetch, -}); + baseURL: 'http://localhost:5000/', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: defaultFetch, + }); }); test('custom signal', async () => { const client = new SuperwallAPI({ - baseURL: process.env["TEST_API_BASE_URL"] ?? 'http://127.0.0.1:4010', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: (...args) => { - return new Promise((resolve, reject) => - setTimeout( - () => - defaultFetch(...args) - .then(resolve) - .catch(reject), - 300, - ), - ); -}, -}); + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: (...args) => { + return new Promise((resolve, reject) => + setTimeout( + () => + defaultFetch(...args) + .then(resolve) + .catch(reject), + 300, + ), + ); + }, + }); const controller = new AbortController(); setTimeout(() => controller.abort(), 200); const spy = jest.spyOn(client, 'request'); - await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError( - APIUserAbortError, - ); + await expect(client.get('/foo', { signal: controller.signal })).rejects.toThrowError(APIUserAbortError); expect(spy).toHaveBeenCalledTimes(1); }); @@ -303,11 +303,11 @@ describe('logging', () => { }; const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, -}); + baseURL: 'http://localhost:5000/', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + }); await client.patch('/foo'); expect(capturedRequest?.method).toEqual('PATCH'); @@ -316,19 +316,19 @@ describe('logging', () => { describe('baseUrl', () => { test('trailing slash', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/custom/path/', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); + baseURL: 'http://localhost:5000/custom/path/', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); test('no trailing slash', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/custom/path', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); + baseURL: 'http://localhost:5000/custom/path', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); expect(client.buildURL('/foo', null)).toEqual('http://localhost:5000/custom/path/foo'); }); @@ -338,10 +338,10 @@ describe('logging', () => { test('explicit option', () => { const client = new SuperwallAPI({ - baseURL: 'https://example.com', - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); + baseURL: 'https://example.com', + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); expect(client.baseURL).toEqual('https://example.com'); }); @@ -354,42 +354,48 @@ describe('logging', () => { test('empty env variable', () => { process.env['SUPERWALL_API_BASE_URL'] = ''; // empty const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.baseURL).toEqual('https://api.superwall.com') + expect(client.baseURL).toEqual('https://api.superwall.com'); }); test('blank env variable', () => { process.env['SUPERWALL_API_BASE_URL'] = ' '; // blank const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.baseURL).toEqual('https://api.superwall.com') + expect(client.baseURL).toEqual('https://api.superwall.com'); }); test('in request options', () => { const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/option/foo'); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( + 'http://localhost:5000/option/foo', + ); }); test('in request options overridden by client options', () => { const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - baseURL: 'http://localhost:5000/client', - }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/client/foo'); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + baseURL: 'http://localhost:5000/client', + }); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( + 'http://localhost:5000/client/foo', + ); }); test('in request options overridden by env variable', () => { process.env['SUPERWALL_API_BASE_URL'] = 'http://localhost:5000/env'; const client = new SuperwallAPI({ apiKey: 'My API Key', bearerToken: 'My Bearer Token' }); - expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual('http://localhost:5000/env/foo'); + expect(client.buildURL('/foo', null, 'http://localhost:5000/option')).toEqual( + 'http://localhost:5000/env/foo', + ); }); }); test('maxRetries option is correctly set', () => { const client = new SuperwallAPI({ - maxRetries: 4, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', -}); + maxRetries: 4, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); expect(client.maxRetries).toEqual(4); // default @@ -400,11 +406,11 @@ describe('logging', () => { describe('withOptions', () => { test('creates a new client with overridden options', async () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - maxRetries: 3, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + maxRetries: 3, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); const newClient = client.withOptions({ maxRetries: 5, @@ -426,12 +432,12 @@ describe('logging', () => { test('inherits options from the parent client', async () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - defaultHeaders: { 'X-Test-Header': 'test-value' }, - defaultQuery: { 'test-param': 'test-value' }, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + defaultHeaders: { 'X-Test-Header': 'test-value' }, + defaultQuery: { 'test-param': 'test-value' }, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); const newClient = client.withOptions({ baseURL: 'http://localhost:5001/', @@ -446,11 +452,11 @@ describe('logging', () => { test('respects runtime property changes when creating new client', () => { const client = new SuperwallAPI({ - baseURL: 'http://localhost:5000/', - timeout: 1000, - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - }); + baseURL: 'http://localhost:5000/', + timeout: 1000, + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + }); // Modify the client properties directly after creation client.baseURL = 'http://localhost:6000/'; @@ -500,13 +506,18 @@ describe('request building', () => { describe('custom headers', () => { test('handles undefined', async () => { - const { req } = await client.buildRequest({ path: '/foo', method: 'post', body: { value: 'hello' }, headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null } }); + const { req } = await client.buildRequest({ + path: '/foo', + method: 'post', + body: { value: 'hello' }, + headers: { 'X-Foo': 'baz', 'x-foo': 'bar', 'x-Foo': undefined, 'x-baz': 'bam', 'X-Baz': null }, + }); expect(req.headers.get('x-foo')).toEqual('bar'); expect(req.headers.get('x-Foo')).toEqual('bar'); expect(req.headers.get('X-Foo')).toEqual('bar'); expect(req.headers.get('x-baz')).toEqual(null); }); - }) + }); }); describe('default encoder', () => { @@ -583,38 +594,41 @@ describe('default encoder', () => { describe('retries', () => { test('retry on timeout', async () => { let count = 0; - const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { - if (count++ === 0) { - return new Promise((resolve, reject) => - signal?.addEventListener('abort', () => reject(new Error('timed out'))), - ); - } - return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); - }; - - const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - timeout: 10, - fetch: testFetch, - }); + const testFetch = async ( + url: string | URL | Request, + { signal }: RequestInit = {}, + ): Promise => { + if (count++ === 0) { + return new Promise( + (resolve, reject) => signal?.addEventListener('abort', () => reject(new Error('timed out'))), + ); + } + return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); + }; - expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); - expect(count).toEqual(2); - expect( - await client - .request({ path: '/foo', method: 'get' }) - .asResponse() - .then((r) => r.text()), - ).toEqual(JSON.stringify({ a: 1 })); - expect(count).toEqual(3); + const client = new SuperwallAPI({ + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + timeout: 10, + fetch: testFetch, }); + expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); + expect(count).toEqual(2); + expect( + await client + .request({ path: '/foo', method: 'get' }) + .asResponse() + .then((r) => r.text()), + ).toEqual(JSON.stringify({ a: 1 })); + expect(count).toEqual(3); + }); + test('retry count header', async () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++ + count++; if (count <= 2) { return new Response(undefined, { status: 429, @@ -628,11 +642,11 @@ describe('retries', () => { }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); @@ -644,7 +658,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++ + count++; if (count <= 2) { return new Response(undefined, { status: 429, @@ -657,11 +671,11 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -678,7 +692,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++ + count++; if (count <= 2) { return new Response(undefined, { status: 429, @@ -691,12 +705,12 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - defaultHeaders: { 'X-Stainless-Retry-Count': null }, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + defaultHeaders: { 'X-Stainless-Retry-Count': null }, + }); expect( await client.request({ @@ -712,7 +726,7 @@ describe('retries', () => { let count = 0; let capturedRequest: RequestInit | undefined; const testFetch = async (url: string | URL | Request, init: RequestInit = {}): Promise => { - count++ + count++; if (count <= 2) { return new Response(undefined, { status: 429, @@ -725,11 +739,11 @@ describe('retries', () => { return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } }); }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - maxRetries: 4, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + maxRetries: 4, + }); expect( await client.request({ @@ -744,7 +758,10 @@ describe('retries', () => { test('retry on 429 with retry-after', async () => { let count = 0; - const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { + const testFetch = async ( + url: string | URL | Request, + { signal }: RequestInit = {}, + ): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, @@ -757,10 +774,10 @@ describe('retries', () => { }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + }); expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); expect(count).toEqual(2); @@ -775,7 +792,10 @@ describe('retries', () => { test('retry on 429 with retry-after-ms', async () => { let count = 0; - const testFetch = async (url: string | URL | Request, { signal }: RequestInit = {}): Promise => { + const testFetch = async ( + url: string | URL | Request, + { signal }: RequestInit = {}, + ): Promise => { if (count++ === 0) { return new Response(undefined, { status: 429, @@ -788,10 +808,10 @@ describe('retries', () => { }; const client = new SuperwallAPI({ - apiKey: 'My API Key', - bearerToken: 'My Bearer Token', - fetch: testFetch, - }); + apiKey: 'My API Key', + bearerToken: 'My Bearer Token', + fetch: testFetch, + }); expect(await client.request({ path: '/foo', method: 'get' })).toEqual({ a: 1 }); expect(count).toEqual(2); diff --git a/tests/qs/utils.test.ts b/tests/qs/utils.test.ts index d62d0bf..a1b3205 100644 --- a/tests/qs/utils.test.ts +++ b/tests/qs/utils.test.ts @@ -66,7 +66,7 @@ describe('merge()', function () { // st.equal(getCount, 1); expect(setCount).toEqual(0); expect(getCount).toEqual(1); - observed[0] = observed[0]; + observed[0] = observed[0]; // st.equal(setCount, 1); // st.equal(getCount, 2); expect(setCount).toEqual(1); diff --git a/tests/stringifyQuery.test.ts b/tests/stringifyQuery.test.ts index 22cdadf..7c641a4 100644 --- a/tests/stringifyQuery.test.ts +++ b/tests/stringifyQuery.test.ts @@ -2,18 +2,20 @@ import { stringifyQuery } from 'superwall-api/internal/utils/query'; -describe(stringifyQuery, () => { for (const [input, expected] of [ - [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], - [{ a: null, b: false, c: undefined }, 'a=&b=false'], - [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], - [ - { 'a/b': 'c/d', 'e=f': 'g&h' }, - `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( - 'e=f', - )}=${encodeURIComponent('g&h')}`, - ], -] as const) { - it(`${JSON.stringify(input)} -> ${expected}`, () => { - expect(stringifyQuery(input)).toEqual(expected); - }); -} }) +describe(stringifyQuery, () => { + for (const [input, expected] of [ + [{ a: '1', b: 2, c: true }, 'a=1&b=2&c=true'], + [{ a: null, b: false, c: undefined }, 'a=&b=false'], + [{ 'a/b': 1.28341 }, `${encodeURIComponent('a/b')}=1.28341`], + [ + { 'a/b': 'c/d', 'e=f': 'g&h' }, + `${encodeURIComponent('a/b')}=${encodeURIComponent('c/d')}&${encodeURIComponent( + 'e=f', + )}=${encodeURIComponent('g&h')}`, + ], + ] as const) { + it(`${JSON.stringify(input)} -> ${expected}`, () => { + expect(stringifyQuery(input)).toEqual(expected); + }); + } +}); From 454d412cf04f2038e827312dd261017d165c6424 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 02:10:58 +0000 Subject: [PATCH 20/25] feat: support setting headers via env --- src/client.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/client.ts b/src/client.ts index 17c3a50..fa96545 100644 --- a/src/client.ts +++ b/src/client.ts @@ -269,6 +269,18 @@ export class SuperwallAPI { this.fetch = options.fetch ?? Shims.getDefaultFetch(); this.#encoder = Opts.FallbackEncoder; + const customHeadersEnv = readEnv('SUPERWALL_API_CUSTOM_HEADERS'); + if (customHeadersEnv) { + const parsed: Record = {}; + for (const line of customHeadersEnv.split('\n')) { + const colon = line.indexOf(':'); + if (colon >= 0) { + parsed[line.substring(0, colon).trim()] = line.substring(colon + 1).trim(); + } + } + options.defaultHeaders = { ...parsed, ...options.defaultHeaders }; + } + this._options = options; this.apiKey = apiKey; From 16dac9a2d08e118f55823968782ad877ef7d0063 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:14:58 +0000 Subject: [PATCH 21/25] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5b692df..fa8bf4a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-3d19f0b2fea63e35b09acbd5cc206ce1b1da3e51c59eb7b50098495e6fb7a609.yml -openapi_spec_hash: 9bc708f1c1cab1d21be58912fdc3c9bd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-0030d74538bb0aa4cc97da30877e96ba6e18eb13612306bc38ffd21a45f3c6e9.yml +openapi_spec_hash: c92516a697752fb3120de2c19a81fca5 config_hash: dfc8fae1943177a610a7d4985af30c54 From aa977e028fc00bf39e8d3dec390288a72be5f737 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Apr 2026 02:24:51 +0000 Subject: [PATCH 22/25] chore(format): run eslint and prettier separately --- .github/workflows/release-doctor.yml | 1 - eslint.config.mjs | 3 - package.json | 1 - pnpm-lock.yaml | 2964 +++++++++++++++++++------- scripts/fast-format | 9 +- scripts/format | 3 +- scripts/lint | 3 + src/internal/types.ts | 14 +- 8 files changed, 2154 insertions(+), 844 deletions(-) diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 73981d4..bd900ca 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -19,4 +19,3 @@ jobs: bash ./bin/check-release-environment env: NPM_TOKEN: ${{ secrets.SUPERWALL_API_NPM_TOKEN || secrets.NPM_TOKEN }} - diff --git a/eslint.config.mjs b/eslint.config.mjs index fbfb9c7..381076a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,6 @@ // @ts-check import tseslint from 'typescript-eslint'; import unusedImports from 'eslint-plugin-unused-imports'; -import prettier from 'eslint-plugin-prettier'; export default tseslint.config( { @@ -14,11 +13,9 @@ export default tseslint.config( plugins: { '@typescript-eslint': tseslint.plugin, 'unused-imports': unusedImports, - prettier, }, rules: { 'no-unused-vars': 'off', - 'prettier/prettier': 'error', 'unused-imports/no-unused-imports': 'error', 'no-restricted-imports': [ 'error', diff --git a/package.json b/package.json index 573338f..5c94415 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "@typescript-eslint/eslint-plugin": "8.31.1", "@typescript-eslint/parser": "8.31.1", "eslint": "^9.39.1", - "eslint-plugin-prettier": "^5.4.1", "eslint-plugin-unused-imports": "^4.1.4", "iconv-lite": "^0.6.3", "jest": "^29.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2b6b50..0540538 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,6 @@ overrides: minimatch: ^9.0.5 importers: - .: devDependencies: '@arethetypeswrong/cli': @@ -35,9 +34,6 @@ importers: eslint: specifier: ^9.39.1 version: 9.39.1 - eslint-plugin-prettier: - specifier: ^5.4.1 - version: 5.4.1(eslint@9.39.1)(prettier@3.1.1) eslint-plugin-unused-imports: specifier: ^4.1.4 version: 4.1.4(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1) @@ -76,275 +72,454 @@ importers: version: 8.31.1(eslint@9.39.1)(typescript@5.8.3) packages: - '@andrewbranch/untar.js@1.0.3': - resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==} + resolution: + { + integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==, + } '@arethetypeswrong/cli@0.17.0': - resolution: {integrity: sha512-xSMW7bfzVWpYw5JFgZqBXqr6PdR0/REmn3DkxCES5N0JTcB0CVgbIynJCvKBFmXaPc3hzmmTrb7+yPDRoOSZdA==} - engines: {node: '>=18'} + resolution: + { + integrity: sha512-xSMW7bfzVWpYw5JFgZqBXqr6PdR0/REmn3DkxCES5N0JTcB0CVgbIynJCvKBFmXaPc3hzmmTrb7+yPDRoOSZdA==, + } + engines: { node: '>=18' } hasBin: true '@arethetypeswrong/core@0.17.0': - resolution: {integrity: sha512-FHyhFizXNetigTVsIhqXKGYLpazPS5YNojEPpZEUcBPt9wVvoEbNIvG+hybuBR+pjlRcbyuqhukHZm1fr+bDgA==} - engines: {node: '>=18'} + resolution: + { + integrity: sha512-FHyhFizXNetigTVsIhqXKGYLpazPS5YNojEPpZEUcBPt9wVvoEbNIvG+hybuBR+pjlRcbyuqhukHZm1fr+bDgA==, + } + engines: { node: '>=18' } '@babel/code-frame@7.28.6': - resolution: {integrity: sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==, + } + engines: { node: '>=6.9.0' } '@babel/compat-data@7.28.6': - resolution: {integrity: sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-2lfu57JtzctfIrcGMz992hyLlByuzgIk58+hhGCxjKZ3rWI82NnVLjXcaTqkI2NvlcvOskZaiZ5kjUALo3Lpxg==, + } + engines: { node: '>=6.9.0' } '@babel/core@7.28.6': - resolution: {integrity: sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-H3mcG6ZDLTlYfaSNi0iOKkigqMFvkTKlGUYlD8GW7nNOYRrevuA46iTypPyv+06V3fEmvvazfntkBU34L0azAw==, + } + engines: { node: '>=6.9.0' } '@babel/generator@7.28.6': - resolution: {integrity: sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-lOoVRwADj8hjf7al89tvQ2a1lf53Z+7tiXMgpZJL3maQPDxh0DgLMN62B2MKUOFcoodBHLMbDM6WAbKgNy5Suw==, + } + engines: { node: '>=6.9.0' } '@babel/helper-compilation-targets@7.28.6': - resolution: {integrity: sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-JYtls3hqi15fcx5GaSNL7SCTJ2MNmjrkHXg4FSpOA/grxK8KwyZ5bubHsCq8FXCkua6xhuaaBit+3b7+VZRfcA==, + } + engines: { node: '>=6.9.0' } '@babel/helper-globals@7.28.0': - resolution: {integrity: sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==, + } + engines: { node: '>=6.9.0' } '@babel/helper-module-imports@7.28.6': - resolution: {integrity: sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-l5XkZK7r7wa9LucGw9LwZyyCUscb4x37JWTPz7swwFE/0FMQAGpiWUZn8u9DzkSBWEcK25jmvubfpw2dnAMdbw==, + } + engines: { node: '>=6.9.0' } '@babel/helper-module-transforms@7.28.6': - resolution: {integrity: sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-67oXFAYr2cDLDVGLXTEABjdBJZ6drElUSI7WKp70NrpyISso3plG9SAGEF6y7zbha/wOzUByWWTJvEDVNIUGcA==, + } + engines: { node: '>=6.9.0' } peerDependencies: '@babel/core': ^7.0.0 '@babel/helper-plugin-utils@7.28.6': - resolution: {integrity: sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-S9gzZ/bz83GRysI7gAD4wPT/AI3uCnY+9xn+Mx/KPs2JwHJIz1W8PZkg2cqyt3RNOBM8ejcXhV6y8Og7ly/Dug==, + } + engines: { node: '>=6.9.0' } '@babel/helper-string-parser@7.27.1': - resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==, + } + engines: { node: '>=6.9.0' } '@babel/helper-validator-identifier@7.28.5': - resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==, + } + engines: { node: '>=6.9.0' } '@babel/helper-validator-option@7.27.1': - resolution: {integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-YvjJow9FxbhFFKDSuFnVCe2WxXk1zWc22fFePVNEaWJEu8IrZVlda6N0uHwzZrUM1il7NC9Mlp4MaJYbYd9JSg==, + } + engines: { node: '>=6.9.0' } '@babel/helpers@7.28.6': - resolution: {integrity: sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==, + } + engines: { node: '>=6.9.0' } '@babel/parser@7.28.6': - resolution: {integrity: sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ==} - engines: {node: '>=6.0.0'} + resolution: + { + integrity: sha512-TeR9zWR18BvbfPmGbLampPMW+uW1NZnJlRuuHso8i87QZNq2JRF9i6RgxRqtEq+wQGsS19NNTWr2duhnE49mfQ==, + } + engines: { node: '>=6.0.0' } hasBin: true '@babel/plugin-syntax-async-generators@7.8.4': - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + resolution: + { + integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-bigint@7.8.3': - resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + resolution: + { + integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-class-properties@7.12.13': - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + resolution: + { + integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-class-static-block@7.14.5': - resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==, + } + engines: { node: '>=6.9.0' } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-import-attributes@7.28.6': - resolution: {integrity: sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==, + } + engines: { node: '>=6.9.0' } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-import-meta@7.10.4': - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + resolution: + { + integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-json-strings@7.8.3': - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + resolution: + { + integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-jsx@7.28.6': - resolution: {integrity: sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-wgEmr06G6sIpqr8YDwA2dSRTE3bJ+V0IfpzfSY3Lfgd7YWOaAdlykvJi13ZKBt8cZHfgH1IXN+CL656W3uUa4w==, + } + engines: { node: '>=6.9.0' } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-logical-assignment-operators@7.10.4': - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + resolution: + { + integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + resolution: + { + integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-numeric-separator@7.10.4': - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + resolution: + { + integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-object-rest-spread@7.8.3': - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + resolution: + { + integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-optional-catch-binding@7.8.3': - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + resolution: + { + integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-optional-chaining@7.8.3': - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + resolution: + { + integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==, + } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-private-property-in-object@7.14.5': - resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==, + } + engines: { node: '>=6.9.0' } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-top-level-await@7.14.5': - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==, + } + engines: { node: '>=6.9.0' } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/plugin-syntax-typescript@7.28.6': - resolution: {integrity: sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-+nDNmQye7nlnuuHDboPbGm00Vqg3oO8niRRL27/4LYHUsHYh0zJ1xWOz0uRwNFmM1Avzk8wZbc6rdiYhomzv/A==, + } + engines: { node: '>=6.9.0' } peerDependencies: '@babel/core': ^7.0.0-0 '@babel/template@7.28.6': - resolution: {integrity: sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==, + } + engines: { node: '>=6.9.0' } '@babel/traverse@7.28.6': - resolution: {integrity: sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-fgWX62k02qtjqdSNTAGxmKYY/7FSL9WAS1o2Hu5+I5m9T0yxZzr4cnrfXQ/MX0rIifthCSs6FKTlzYbJcPtMNg==, + } + engines: { node: '>=6.9.0' } '@babel/types@7.28.6': - resolution: {integrity: sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-0ZrskXVEHSWIqZM/sQZ4EV3jZJXRkio/WCxaqKZP1g//CEWEPSfeZFcms4XeKBCHU0ZKnIkdJeU/kF+eRp5lBg==, + } + engines: { node: '>=6.9.0' } '@bcoe/v8-coverage@0.2.3': - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + resolution: + { + integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==, + } '@colors/colors@1.5.0': - resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} - engines: {node: '>=0.1.90'} + resolution: + { + integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==, + } + engines: { node: '>=0.1.90' } '@cspotcode/source-map-consumer@0.8.0': - resolution: {integrity: sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==} - engines: {node: '>= 12'} + resolution: + { + integrity: sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg==, + } + engines: { node: '>= 12' } '@cspotcode/source-map-support@0.7.0': - resolution: {integrity: sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==} - engines: {node: '>=12'} + resolution: + { + integrity: sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA==, + } + engines: { node: '>=12' } '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + resolution: + { + integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==, + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 '@eslint-community/eslint-utils@4.9.0': - resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + resolution: + { + integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==, + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 '@eslint-community/regexpp@4.12.1': - resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + resolution: + { + integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==, + } + engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 } '@eslint-community/regexpp@4.12.2': - resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + resolution: + { + integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==, + } + engines: { node: ^12.0.0 || ^14.0.0 || >=16.0.0 } '@eslint/config-array@0.21.1': - resolution: {integrity: sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/config-helpers@0.4.2': - resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/core@0.17.0': - resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/eslintrc@3.3.3': - resolution: {integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/js@9.39.1': - resolution: {integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/object-schema@2.1.7': - resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@eslint/plugin-kit@0.4.1': - resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@humanfs/core@0.19.1': - resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} - engines: {node: '>=18.18.0'} + resolution: + { + integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==, + } + engines: { node: '>=18.18.0' } '@humanfs/node@0.16.7': - resolution: {integrity: sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==} - engines: {node: '>=18.18.0'} + resolution: + { + integrity: sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==, + } + engines: { node: '>=18.18.0' } '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} + resolution: + { + integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==, + } + engines: { node: '>=12.22' } '@humanwhocodes/retry@0.4.3': - resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} - engines: {node: '>=18.18'} + resolution: + { + integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==, + } + engines: { node: '>=18.18' } '@istanbuljs/load-nyc-config@1.1.0': - resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==, + } + engines: { node: '>=8' } '@istanbuljs/schema@0.1.3': - resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==, + } + engines: { node: '>=8' } '@jest/console@29.7.0': - resolution: {integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/core@29.7.0': - resolution: {integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: @@ -352,32 +527,53 @@ packages: optional: true '@jest/create-cache-key-function@29.7.0': - resolution: {integrity: sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-4QqS3LY5PBmTRHj9sAg1HLoPzqAI0uOX6wI/TRqHIcOxlFidy6YEmCQJk6FSZjNLGCeubDMfmkWL+qaLKhSGQA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/environment@29.7.0': - resolution: {integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/expect-utils@29.7.0': - resolution: {integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/expect@29.7.0': - resolution: {integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/fake-timers@29.7.0': - resolution: {integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/globals@29.7.0': - resolution: {integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/reporters@29.7.0': - resolution: {integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: @@ -385,147 +581,236 @@ packages: optional: true '@jest/schemas@29.6.3': - resolution: {integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/source-map@29.6.3': - resolution: {integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/test-result@29.7.0': - resolution: {integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/test-sequencer@29.7.0': - resolution: {integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/transform@29.7.0': - resolution: {integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } '@jest/types@29.6.3': - resolution: {integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==, + } + 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==} + resolution: + { + integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==, + } '@jridgewell/remapping@2.3.5': - resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + resolution: + { + integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==, + } '@jridgewell/resolve-uri@3.1.1': - resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} - engines: {node: '>=6.0.0'} + resolution: + { + integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==, + } + engines: { node: '>=6.0.0' } '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + resolution: + { + integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==, + } '@jridgewell/sourcemap-codec@1.5.5': - resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + resolution: + { + integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==, + } '@jridgewell/trace-mapping@0.3.20': - resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} + resolution: + { + integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==, + } '@jridgewell/trace-mapping@0.3.31': - resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + resolution: + { + integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==, + } '@nodelib/fs.scandir@2.1.5': - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} + resolution: + { + integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==, + } + engines: { node: '>= 8' } '@nodelib/fs.stat@2.0.5': - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} + resolution: + { + integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==, + } + engines: { node: '>= 8' } '@nodelib/fs.walk@1.2.8': - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - - '@pkgr/core@0.2.4': - resolution: {integrity: sha512-ROFF39F6ZrnzSUEmQQZUar0Jt4xVoP9WnDRdWwF4NNcXs3xBTLgBUDoOwW141y1jP+S8nahIbdxbFC7IShw9Iw==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} + resolution: + { + integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==, + } + engines: { node: '>= 8' } '@sinclair/typebox@0.27.8': - resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + resolution: + { + integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==, + } '@sindresorhus/is@4.6.0': - resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==, + } + engines: { node: '>=10' } '@sinonjs/commons@3.0.0': - resolution: {integrity: sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==} + resolution: + { + integrity: sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==, + } '@sinonjs/fake-timers@10.3.0': - resolution: {integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==} + resolution: + { + integrity: sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==, + } '@swc/core-darwin-arm64@1.4.16': - resolution: {integrity: sha512-UOCcH1GvjRnnM/LWT6VCGpIk0OhHRq6v1U6QXuPt5wVsgXnXQwnf5k3sG5Cm56hQHDvhRPY6HCsHi/p0oek8oQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-UOCcH1GvjRnnM/LWT6VCGpIk0OhHRq6v1U6QXuPt5wVsgXnXQwnf5k3sG5Cm56hQHDvhRPY6HCsHi/p0oek8oQ==, + } + engines: { node: '>=10' } cpu: [arm64] os: [darwin] '@swc/core-darwin-x64@1.4.16': - resolution: {integrity: sha512-t3bgqFoYLWvyVtVL6KkFNCINEoOrIlyggT/kJRgi1y0aXSr0oVgcrQ4ezJpdeahZZ4N+Q6vT3ffM30yIunELNA==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-t3bgqFoYLWvyVtVL6KkFNCINEoOrIlyggT/kJRgi1y0aXSr0oVgcrQ4ezJpdeahZZ4N+Q6vT3ffM30yIunELNA==, + } + engines: { node: '>=10' } cpu: [x64] os: [darwin] '@swc/core-linux-arm-gnueabihf@1.4.16': - resolution: {integrity: sha512-DvHuwvEF86YvSd0lwnzVcjOTZ0jcxewIbsN0vc/0fqm9qBdMMjr9ox6VCam1n3yYeRtj4VFgrjeNFksqbUejdQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-DvHuwvEF86YvSd0lwnzVcjOTZ0jcxewIbsN0vc/0fqm9qBdMMjr9ox6VCam1n3yYeRtj4VFgrjeNFksqbUejdQ==, + } + engines: { node: '>=10' } cpu: [arm] os: [linux] '@swc/core-linux-arm64-gnu@1.4.16': - resolution: {integrity: sha512-9Uu5YlPbyCvbidjKtYEsPpyZlu16roOZ5c2tP1vHfnU9bgf5Tz5q5VovSduNxPHx+ed2iC1b1URODHvDzbbDuQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-9Uu5YlPbyCvbidjKtYEsPpyZlu16roOZ5c2tP1vHfnU9bgf5Tz5q5VovSduNxPHx+ed2iC1b1URODHvDzbbDuQ==, + } + engines: { node: '>=10' } cpu: [arm64] os: [linux] libc: [glibc] '@swc/core-linux-arm64-musl@1.4.16': - resolution: {integrity: sha512-/YZq/qB1CHpeoL0eMzyqK5/tYZn/rzKoCYDviFU4uduSUIJsDJQuQA/skdqUzqbheOXKAd4mnJ1hT04RbJ8FPQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-/YZq/qB1CHpeoL0eMzyqK5/tYZn/rzKoCYDviFU4uduSUIJsDJQuQA/skdqUzqbheOXKAd4mnJ1hT04RbJ8FPQ==, + } + engines: { node: '>=10' } cpu: [arm64] os: [linux] libc: [musl] '@swc/core-linux-x64-gnu@1.4.16': - resolution: {integrity: sha512-UUjaW5VTngZYDcA8yQlrFmqs1tLi1TxbKlnaJwoNhel9zRQ0yG1YEVGrzTvv4YApSuIiDK18t+Ip927bwucuVQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-UUjaW5VTngZYDcA8yQlrFmqs1tLi1TxbKlnaJwoNhel9zRQ0yG1YEVGrzTvv4YApSuIiDK18t+Ip927bwucuVQ==, + } + engines: { node: '>=10' } cpu: [x64] os: [linux] libc: [glibc] '@swc/core-linux-x64-musl@1.4.16': - resolution: {integrity: sha512-aFhxPifevDTwEDKPi4eRYWzC0p/WYJeiFkkpNU5Uc7a7M5iMWPAbPFUbHesdlb9Jfqs5c07oyz86u+/HySBNPQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-aFhxPifevDTwEDKPi4eRYWzC0p/WYJeiFkkpNU5Uc7a7M5iMWPAbPFUbHesdlb9Jfqs5c07oyz86u+/HySBNPQ==, + } + engines: { node: '>=10' } cpu: [x64] os: [linux] libc: [musl] '@swc/core-win32-arm64-msvc@1.4.16': - resolution: {integrity: sha512-bTD43MbhIHL2s5QgCwyleaGwl96Gk/scF2TaVKdUe4QlJCDV/YK9h5oIBAp63ckHtE8GHlH4c8dZNBiAXn4Org==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-bTD43MbhIHL2s5QgCwyleaGwl96Gk/scF2TaVKdUe4QlJCDV/YK9h5oIBAp63ckHtE8GHlH4c8dZNBiAXn4Org==, + } + engines: { node: '>=10' } cpu: [arm64] os: [win32] '@swc/core-win32-ia32-msvc@1.4.16': - resolution: {integrity: sha512-/lmZeAN/qV5XbK2SEvi8e2RkIg8FQNYiSA8y2/Zb4gTUMKVO5JMLH0BSWMiIKMstKDPDSxMWgwJaQHF8UMyPmQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-/lmZeAN/qV5XbK2SEvi8e2RkIg8FQNYiSA8y2/Zb4gTUMKVO5JMLH0BSWMiIKMstKDPDSxMWgwJaQHF8UMyPmQ==, + } + engines: { node: '>=10' } cpu: [ia32] os: [win32] '@swc/core-win32-x64-msvc@1.4.16': - resolution: {integrity: sha512-BPAfFfODWXtUu6SwaTTftDHvcbDyWBSI/oanUeRbQR5vVWkXoQ3cxLTsDluc3H74IqXS5z1Uyoe0vNo2hB1opA==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-BPAfFfODWXtUu6SwaTTftDHvcbDyWBSI/oanUeRbQR5vVWkXoQ3cxLTsDluc3H74IqXS5z1Uyoe0vNo2hB1opA==, + } + engines: { node: '>=10' } cpu: [x64] os: [win32] '@swc/core@1.4.16': - resolution: {integrity: sha512-Xaf+UBvW6JNuV131uvSNyMXHn+bh6LyKN4tbv7tOUFQpXyz/t9YWRE04emtlUW9Y0qrm/GKFCbY8n3z6BpZbTA==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-Xaf+UBvW6JNuV131uvSNyMXHn+bh6LyKN4tbv7tOUFQpXyz/t9YWRE04emtlUW9Y0qrm/GKFCbY8n3z6BpZbTA==, + } + engines: { node: '>=10' } peerDependencies: '@swc/helpers': ^0.5.0 peerDependenciesMeta: @@ -533,331 +818,583 @@ packages: optional: true '@swc/counter@0.1.3': - resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + resolution: + { + integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==, + } '@swc/jest@0.2.36': - resolution: {integrity: sha512-8X80dp81ugxs4a11z1ka43FPhP+/e+mJNXJSxiNYk8gIX/jPBtY4gQTrKu/KIoco8bzKuPI5lUxjfLiGsfvnlw==} - engines: {npm: '>= 7.0.0'} + resolution: + { + integrity: sha512-8X80dp81ugxs4a11z1ka43FPhP+/e+mJNXJSxiNYk8gIX/jPBtY4gQTrKu/KIoco8bzKuPI5lUxjfLiGsfvnlw==, + } + engines: { npm: '>= 7.0.0' } peerDependencies: '@swc/core': '*' '@swc/types@0.1.6': - resolution: {integrity: sha512-/JLo/l2JsT/LRd80C3HfbmVpxOAJ11FO2RCEslFrgzLltoP9j8XIbsyDcfCt2WWyX+CM96rBoNM+IToAkFOugg==} + resolution: + { + integrity: sha512-/JLo/l2JsT/LRd80C3HfbmVpxOAJ11FO2RCEslFrgzLltoP9j8XIbsyDcfCt2WWyX+CM96rBoNM+IToAkFOugg==, + } '@tsconfig/node10@1.0.8': - resolution: {integrity: sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==} + resolution: + { + integrity: sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg==, + } '@tsconfig/node12@1.0.9': - resolution: {integrity: sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==} + resolution: + { + integrity: sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw==, + } '@tsconfig/node14@1.0.1': - resolution: {integrity: sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==} + resolution: + { + integrity: sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg==, + } '@tsconfig/node16@1.0.2': - resolution: {integrity: sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==} + resolution: + { + integrity: sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==, + } '@types/babel__core@7.20.5': - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} + resolution: + { + integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==, + } '@types/babel__generator@7.6.8': - resolution: {integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==} + resolution: + { + integrity: sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==, + } '@types/babel__template@7.4.4': - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} + resolution: + { + integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==, + } '@types/babel__traverse@7.20.4': - resolution: {integrity: sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==} + resolution: + { + integrity: sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==, + } '@types/estree@1.0.8': - resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} + resolution: + { + integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==, + } '@types/graceful-fs@4.1.9': - resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} + resolution: + { + integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==, + } '@types/istanbul-lib-coverage@2.0.6': - resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + resolution: + { + integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==, + } '@types/istanbul-lib-report@3.0.3': - resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} + resolution: + { + integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==, + } '@types/istanbul-reports@3.0.4': - resolution: {integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==} + resolution: + { + integrity: sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==, + } '@types/jest@29.5.11': - resolution: {integrity: sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==} + resolution: + { + integrity: sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ==, + } '@types/json-schema@7.0.15': - resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + resolution: + { + integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==, + } '@types/node@20.19.11': - resolution: {integrity: sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow==} + resolution: + { + integrity: sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow==, + } '@types/stack-utils@2.0.3': - resolution: {integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==} + resolution: + { + integrity: sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==, + } '@types/yargs-parser@21.0.3': - resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} + resolution: + { + integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==, + } '@types/yargs@17.0.32': - resolution: {integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==} + resolution: + { + integrity: sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==, + } '@typescript-eslint/eslint-plugin@8.31.1': - resolution: {integrity: sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-oUlH4h1ABavI4F0Xnl8/fOtML/eu8nI2A1nYd+f+55XI0BLu+RIqKoCiZKNo6DtqZBEQm5aNKA20G3Z5w3R6GQ==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/parser@8.31.1': - resolution: {integrity: sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-oU/OtYVydhXnumd0BobL9rkJg7wFJ9bFFPmSmB/bf/XWN85hlViji59ko6bSKBXyseT9V8l+CN1nwmlbiN0G7Q==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/scope-manager@8.31.1': - resolution: {integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-BMNLOElPxrtNQMIsFHE+3P0Yf1z0dJqV9zLdDxN/xLlWMlXK/ApEsVEKzpizg9oal8bAT5Sc7+ocal7AC1HCVw==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@typescript-eslint/type-utils@8.31.1': - resolution: {integrity: sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-fNaT/m9n0+dpSp8G/iOQ05GoHYXbxw81x+yvr7TArTuZuCA6VVKbqWYVZrV5dVagpDTtj/O8k5HBEE/p/HM5LA==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/types@8.31.1': - resolution: {integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-SfepaEFUDQYRoA70DD9GtytljBePSj17qPxFHA/h3eg6lPTqGJ5mWOtbXCk1YrVU1cTJRd14nhaXWFu0l2troQ==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } '@typescript-eslint/typescript-estree@8.31.1': - resolution: {integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-kaA0ueLe2v7KunYOyWYtlf/QhhZb7+qh4Yw6Ni5kgukMIG+iP773tjgBiLWIXYumWCwEq3nLW+TUywEp8uEeag==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/utils@8.31.1': - resolution: {integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-2DSI4SNfF5T4oRveQ4nUrSjUqjMND0nLq9rEkz0gfGr3tg0S5KB6DhwR+WZPCjzkZl3cH+4x2ce3EsL50FubjQ==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/visitor-keys@8.31.1': - resolution: {integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-I+/rgqOVBn6f0o7NDTmAPWWC6NuqhV174lfYvAm9fUaWeiefLdux9/YI3/nLugEn9L8fcSi0XmpKi/r5u0nmpw==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } acorn-jsx@5.3.2: - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + resolution: + { + integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==, + } peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} + resolution: + { + integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==, + } + engines: { node: '>=0.4.0' } acorn@8.14.0: - resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} - engines: {node: '>=0.4.0'} + resolution: + { + integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==, + } + engines: { node: '>=0.4.0' } hasBin: true acorn@8.15.0: - resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} - engines: {node: '>=0.4.0'} + resolution: + { + integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==, + } + engines: { node: '>=0.4.0' } hasBin: true aggregate-error@3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==, + } + engines: { node: '>=8' } ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + resolution: + { + integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==, + } ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==, + } + engines: { node: '>=8' } ansi-escapes@7.0.0: - resolution: {integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==} - engines: {node: '>=18'} + resolution: + { + integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==, + } + engines: { node: '>=18' } ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==, + } + engines: { node: '>=8' } ansi-regex@6.1.0: - resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} - engines: {node: '>=12'} + resolution: + { + integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==, + } + engines: { node: '>=12' } ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==, + } + engines: { node: '>=8' } ansi-styles@5.2.0: - resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==, + } + engines: { node: '>=10' } any-promise@1.3.0: - resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + resolution: + { + integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==, + } anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} + resolution: + { + integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==, + } + engines: { node: '>= 8' } arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + resolution: + { + integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==, + } argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + resolution: + { + integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==, + } argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + resolution: + { + integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==, + } babel-jest@29.7.0: - resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } peerDependencies: '@babel/core': ^7.8.0 babel-plugin-istanbul@6.1.1: - resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==, + } + engines: { node: '>=8' } babel-plugin-jest-hoist@29.6.3: - resolution: {integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } babel-preset-current-node-syntax@1.2.0: - resolution: {integrity: sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==} + resolution: + { + integrity: sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==, + } peerDependencies: '@babel/core': ^7.0.0 || ^8.0.0-0 babel-preset-jest@29.6.3: - resolution: {integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } peerDependencies: '@babel/core': ^7.0.0 balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + resolution: + { + integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, + } baseline-browser-mapping@2.9.14: - resolution: {integrity: sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==} + resolution: + { + integrity: sha512-B0xUquLkiGLgHhpPBqvl7GWegWBUNuujQ6kXd/r1U38ElPT6Ok8KZ8e+FpUGEc2ZoRQUzq/aUnaKFc/svWUGSg==, + } hasBin: true brace-expansion@2.0.2: - resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} + resolution: + { + integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==, + } braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==, + } + engines: { node: '>=8' } browserslist@4.28.1: - resolution: {integrity: sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + resolution: + { + integrity: sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==, + } + engines: { node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 } hasBin: true bs-logger@0.2.6: - resolution: {integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==} - engines: {node: '>= 6'} + resolution: + { + integrity: sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==, + } + engines: { node: '>= 6' } bser@2.1.1: - resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + resolution: + { + integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==, + } buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + resolution: + { + integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==, + } callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==, + } + engines: { node: '>=6' } camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==, + } + engines: { node: '>=6' } camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==, + } + engines: { node: '>=10' } caniuse-lite@1.0.30001764: - resolution: {integrity: sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g==} + resolution: + { + integrity: sha512-9JGuzl2M+vPL+pz70gtMF9sHdMFbY9FJaQBi186cHKH3pSzDvzoUJUPV6fqiKIMyXbud9ZLg4F3Yza1vJ1+93g==, + } chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==, + } + engines: { node: '>=10' } chalk@5.3.0: - resolution: {integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + resolution: + { + integrity: sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==, + } + engines: { node: ^12.17.0 || ^14.13 || >=16.0.0 } char-regex@1.0.2: - resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==, + } + engines: { node: '>=10' } ci-info@3.9.0: - resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==, + } + engines: { node: '>=8' } cjs-module-lexer@1.4.1: - resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} + resolution: + { + integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==, + } clean-stack@2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==, + } + engines: { node: '>=6' } cli-highlight@2.1.11: - resolution: {integrity: sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==} - engines: {node: '>=8.0.0', npm: '>=5.0.0'} + resolution: + { + integrity: sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==, + } + engines: { node: '>=8.0.0', npm: '>=5.0.0' } hasBin: true cli-table3@0.6.5: - resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} - engines: {node: 10.* || >= 12.*} + resolution: + { + integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==, + } + engines: { node: 10.* || >= 12.* } cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + resolution: + { + integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==, + } cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} + resolution: + { + integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==, + } + engines: { node: '>=12' } co@4.6.0: - resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + resolution: + { + integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==, + } + engines: { iojs: '>= 1.0.0', node: '>= 0.12.0' } collect-v8-coverage@1.0.2: - resolution: {integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==} + resolution: + { + integrity: sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==, + } color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} + resolution: + { + integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==, + } + engines: { node: '>=7.0.0' } color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + resolution: + { + integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==, + } commander@10.0.1: - resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} - engines: {node: '>=14'} + resolution: + { + integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==, + } + engines: { node: '>=14' } convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + resolution: + { + integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==, + } create-jest@29.7.0: - resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } hasBin: true create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + resolution: + { + integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==, + } cross-spawn@7.0.6: - resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} - engines: {node: '>= 8'} + resolution: + { + integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==, + } + engines: { node: '>= 8' } debug@4.4.1: - resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} - engines: {node: '>=6.0'} + resolution: + { + integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==, + } + engines: { node: '>=6.0' } peerDependencies: supports-color: '*' peerDependenciesMeta: @@ -865,8 +1402,11 @@ packages: optional: true debug@4.4.3: - resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} - engines: {node: '>=6.0'} + resolution: + { + integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==, + } + engines: { node: '>=6.0' } peerDependencies: supports-color: '*' peerDependenciesMeta: @@ -874,7 +1414,10 @@ packages: optional: true dedent@1.5.1: - resolution: {integrity: sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==} + resolution: + { + integrity: sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==, + } peerDependencies: babel-plugin-macros: ^3.1.0 peerDependenciesMeta: @@ -882,76 +1425,110 @@ packages: optional: true deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + resolution: + { + integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==, + } deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==, + } + engines: { node: '>=0.10.0' } detect-newline@3.1.0: - resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==, + } + engines: { node: '>=8' } diff-sequences@29.6.3: - resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} + resolution: + { + integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==, + } + engines: { node: '>=0.3.1' } electron-to-chromium@1.5.267: - resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==} + resolution: + { + integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==, + } emittery@0.13.1: - resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} - engines: {node: '>=12'} + resolution: + { + integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==, + } + engines: { node: '>=12' } emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + resolution: + { + integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==, + } emojilib@2.4.0: - resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} + resolution: + { + integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==, + } environment@1.1.0: - resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} - engines: {node: '>=18'} + resolution: + { + integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==, + } + engines: { node: '>=18' } error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + resolution: + { + integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==, + } escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==, + } + engines: { node: '>=6' } escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==, + } + engines: { node: '>=6' } escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==, + } + engines: { node: '>=8' } escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - - eslint-plugin-prettier@5.4.1: - resolution: {integrity: sha512-9dF+KuU/Ilkq27A8idRP7N2DH8iUR6qXcjF3FR2wETY21PZdBrIjwCau8oboyGj9b7etWmTGEeM8e7oOed6ZWg==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true + resolution: + { + integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==, + } + engines: { node: '>=10' } eslint-plugin-unused-imports@4.1.4: - resolution: {integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==} + resolution: + { + integrity: sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==, + } peerDependencies: '@typescript-eslint/eslint-plugin': ^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0 eslint: ^9.0.0 || ^8.0.0 @@ -960,24 +1537,39 @@ packages: optional: true eslint-scope@8.4.0: - resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } eslint-visitor-keys@3.4.3: - resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + resolution: + { + integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==, + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } eslint-visitor-keys@4.2.0: - resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } eslint-visitor-keys@4.2.1: - resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } eslint@9.39.1: - resolution: {integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } hasBin: true peerDependencies: jiti: '*' @@ -986,275 +1578,482 @@ packages: optional: true espree@10.4.0: - resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} + resolution: + { + integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==, + } + engines: { node: '>=4' } hasBin: true esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} - engines: {node: '>=0.10'} + resolution: + { + integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==, + } + engines: { node: '>=0.10' } esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} + resolution: + { + integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==, + } + engines: { node: '>=4.0' } estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} + resolution: + { + integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==, + } + engines: { node: '>=4.0' } esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==, + } + engines: { node: '>=0.10.0' } execa@5.1.1: - resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==, + } + engines: { node: '>=10' } exit@0.1.2: - resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} - engines: {node: '>= 0.8.0'} + resolution: + { + integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==, + } + engines: { node: '>= 0.8.0' } expect@29.7.0: - resolution: {integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - - fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + resolution: + { + integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==, + } fast-glob@3.3.2: - resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} - engines: {node: '>=8.6.0'} + resolution: + { + integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==, + } + engines: { node: '>=8.6.0' } fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + resolution: + { + integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==, + } fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + resolution: + { + integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==, + } fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + resolution: + { + integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==, + } fb-watchman@2.0.2: - resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + resolution: + { + integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==, + } fflate@0.8.2: - resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + resolution: + { + integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==, + } file-entry-cache@8.0.0: - resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} - engines: {node: '>=16.0.0'} + resolution: + { + integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==, + } + engines: { node: '>=16.0.0' } fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==, + } + engines: { node: '>=8' } find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==, + } + engines: { node: '>=8' } find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==, + } + engines: { node: '>=10' } flat-cache@4.0.1: - resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} - engines: {node: '>=16'} + resolution: + { + integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==, + } + engines: { node: '>=16' } flatted@3.3.3: - resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} + resolution: + { + integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==, + } fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + resolution: + { + integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==, + } fsevents@2.3.3: - resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + resolution: + { + integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==, + } + engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } os: [darwin] function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + resolution: + { + integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==, + } gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} + resolution: + { + integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==, + } + engines: { node: '>=6.9.0' } get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} + resolution: + { + integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==, + } + engines: { node: 6.* || 8.* || >= 10.* } get-package-type@0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} + resolution: + { + integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==, + } + engines: { node: '>=8.0.0' } get-stdin@8.0.0: - resolution: {integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==, + } + engines: { node: '>=10' } get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==, + } + engines: { node: '>=10' } glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} + resolution: + { + integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==, + } + engines: { node: '>= 6' } glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} + resolution: + { + integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==, + } + engines: { node: '>=10.13.0' } glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} + resolution: + { + integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==, + } deprecated: Glob versions prior to v9 are no longer supported glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} + resolution: + { + integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==, + } + engines: { node: '>=12' } deprecated: Glob versions prior to v9 are no longer supported globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} - engines: {node: '>=18'} + resolution: + { + integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==, + } + engines: { node: '>=18' } graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + resolution: + { + integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==, + } graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + resolution: + { + integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==, + } handlebars@4.7.8: - resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} - engines: {node: '>=0.4.7'} + resolution: + { + integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==, + } + engines: { node: '>=0.4.7' } hasBin: true has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==, + } + engines: { node: '>=8' } hasown@2.0.0: - resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} - engines: {node: '>= 0.4'} + resolution: + { + integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==, + } + engines: { node: '>= 0.4' } highlight.js@10.7.3: - resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} + resolution: + { + integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==, + } html-escaper@2.0.2: - resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + resolution: + { + integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==, + } human-signals@2.1.0: - resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} - engines: {node: '>=10.17.0'} + resolution: + { + integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==, + } + engines: { node: '>=10.17.0' } iconv-lite@0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==, + } + engines: { node: '>=0.10.0' } ignore-walk@5.0.1: - resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + resolution: + { + integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==, + } + engines: { node: ^12.13.0 || ^14.15.0 || >=16.0.0 } ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} - engines: {node: '>= 4'} + resolution: + { + integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==, + } + engines: { node: '>= 4' } import-fresh@3.3.1: - resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==, + } + engines: { node: '>=6' } import-local@3.1.0: - resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==, + } + engines: { node: '>=8' } hasBin: true imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} + resolution: + { + integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==, + } + engines: { node: '>=0.8.19' } indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==, + } + engines: { node: '>=8' } inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + resolution: + { + integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==, + } deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + resolution: + { + integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==, + } is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + resolution: + { + integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==, + } is-core-module@2.13.1: - resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + resolution: + { + integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==, + } is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==, + } + engines: { node: '>=0.10.0' } is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==, + } + engines: { node: '>=8' } is-generator-fn@2.1.0: - resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==, + } + engines: { node: '>=6' } is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==, + } + engines: { node: '>=0.10.0' } is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} + resolution: + { + integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==, + } + engines: { node: '>=0.12.0' } is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==, + } + engines: { node: '>=8' } isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + resolution: + { + integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==, + } istanbul-lib-coverage@3.2.2: - resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==, + } + engines: { node: '>=8' } istanbul-lib-instrument@5.2.1: - resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==, + } + engines: { node: '>=8' } istanbul-lib-instrument@6.0.3: - resolution: {integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==, + } + engines: { node: '>=10' } istanbul-lib-report@3.0.1: - resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==, + } + engines: { node: '>=10' } istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==, + } + engines: { node: '>=10' } istanbul-reports@3.1.6: - resolution: {integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==, + } + engines: { node: '>=8' } jest-changed-files@29.7.0: - resolution: {integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-circus@29.7.0: - resolution: {integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-cli@29.7.0: - resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } hasBin: true peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -1263,8 +2062,11 @@ packages: optional: true jest-config@29.7.0: - resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } peerDependencies: '@types/node': '*' ts-node: '>=9.0.0' @@ -1275,48 +2077,81 @@ packages: optional: true jest-diff@29.7.0: - resolution: {integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-docblock@29.7.0: - resolution: {integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-each@29.7.0: - resolution: {integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-environment-node@29.7.0: - resolution: {integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-get-type@29.6.3: - resolution: {integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-haste-map@29.7.0: - resolution: {integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-leak-detector@29.7.0: - resolution: {integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-matcher-utils@29.7.0: - resolution: {integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-message-util@29.7.0: - resolution: {integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-mock@29.7.0: - resolution: {integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-pnp-resolver@1.2.3: - resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==, + } + engines: { node: '>=6' } peerDependencies: jest-resolve: '*' peerDependenciesMeta: @@ -1324,48 +2159,81 @@ packages: optional: true jest-regex-util@29.6.3: - resolution: {integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-resolve-dependencies@29.7.0: - resolution: {integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-resolve@29.7.0: - resolution: {integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-runner@29.7.0: - resolution: {integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-runtime@29.7.0: - resolution: {integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-snapshot@29.7.0: - resolution: {integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-util@29.7.0: - resolution: {integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-validate@29.7.0: - resolution: {integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-watcher@29.7.0: - resolution: {integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest-worker@29.7.0: - resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } jest@29.7.0: - resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } hasBin: true peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -1374,478 +2242,842 @@ packages: optional: true js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + resolution: + { + integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==, + } js-yaml@3.14.2: - resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} + resolution: + { + integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==, + } hasBin: true js-yaml@4.1.1: - resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} + resolution: + { + integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==, + } hasBin: true jsesc@3.1.0: - resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==, + } + engines: { node: '>=6' } hasBin: true json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + resolution: + { + integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==, + } json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + resolution: + { + integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==, + } json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + resolution: + { + integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==, + } json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + resolution: + { + integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==, + } json5@2.2.3: - resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==, + } + engines: { node: '>=6' } hasBin: true jsonc-parser@3.2.1: - resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==} + resolution: + { + integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==, + } keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + resolution: + { + integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==, + } kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==, + } + engines: { node: '>=6' } leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==, + } + engines: { node: '>=6' } levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} + resolution: + { + integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==, + } + engines: { node: '>= 0.8.0' } lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + resolution: + { + integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==, + } locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==, + } + engines: { node: '>=8' } locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==, + } + engines: { node: '>=10' } lodash.memoize@4.1.2: - resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + resolution: + { + integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==, + } lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + resolution: + { + integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==, + } lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + resolution: + { + integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==, + } lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + resolution: + { + integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==, + } make-dir@4.0.0: - resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==, + } + engines: { node: '>=10' } make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + resolution: + { + integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==, + } makeerror@1.0.12: - resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + resolution: + { + integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==, + } marked-terminal@7.2.1: - resolution: {integrity: sha512-rQ1MoMFXZICWNsKMiiHwP/Z+92PLKskTPXj+e7uwXmuMPkNn7iTqC+IvDekVm1MPeC9wYQeLxeFaOvudRR/XbQ==} - engines: {node: '>=16.0.0'} + resolution: + { + integrity: sha512-rQ1MoMFXZICWNsKMiiHwP/Z+92PLKskTPXj+e7uwXmuMPkNn7iTqC+IvDekVm1MPeC9wYQeLxeFaOvudRR/XbQ==, + } + engines: { node: '>=16.0.0' } peerDependencies: marked: '>=1 <15' marked@9.1.6: - resolution: {integrity: sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==} - engines: {node: '>= 16'} + resolution: + { + integrity: sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==, + } + engines: { node: '>= 16' } hasBin: true merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + resolution: + { + integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==, + } merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} + resolution: + { + integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==, + } + engines: { node: '>= 8' } micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} + resolution: + { + integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==, + } + engines: { node: '>=8.6' } mimic-fn@2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==, + } + engines: { node: '>=6' } minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} + resolution: + { + integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==, + } + engines: { node: '>=16 || 14 >=14.17' } minimist@1.2.6: - resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} + resolution: + { + integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==, + } mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} + resolution: + { + integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==, + } + engines: { node: '>=4' } ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + resolution: + { + integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==, + } mz@2.7.0: - resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + resolution: + { + integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==, + } natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + resolution: + { + integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==, + } neo-async@2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + resolution: + { + integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==, + } node-emoji@2.1.3: - resolution: {integrity: sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA==} - engines: {node: '>=18'} + resolution: + { + integrity: sha512-E2WEOVsgs7O16zsURJ/eH8BqhF029wGpEOnv7Urwdo2wmQanOACwJQh0devF9D9RhoZru0+9JXIS0dBXIAz+lA==, + } + engines: { node: '>=18' } node-int64@0.4.0: - resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + resolution: + { + integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==, + } node-releases@2.0.27: - resolution: {integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==} + resolution: + { + integrity: sha512-nmh3lCkYZ3grZvqcCH+fjmQ7X+H0OeZgP40OierEaAptX4XofMh5kwNbWh7lBduUzCcV/8kZ+NDLCwm2iorIlA==, + } normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==, + } + engines: { node: '>=0.10.0' } npm-bundled@2.0.1: - resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + resolution: + { + integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==, + } + engines: { node: ^12.13.0 || ^14.15.0 || >=16.0.0 } npm-normalize-package-bin@2.0.0: - resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + resolution: + { + integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==, + } + engines: { node: ^12.13.0 || ^14.15.0 || >=16.0.0 } npm-packlist@5.1.3: - resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + resolution: + { + integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==, + } + engines: { node: ^12.13.0 || ^14.15.0 || >=16.0.0 } hasBin: true npm-run-path@4.0.1: - resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==, + } + engines: { node: '>=8' } object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==, + } + engines: { node: '>=0.10.0' } once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + resolution: + { + integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==, + } onetime@5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==, + } + engines: { node: '>=6' } optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} - engines: {node: '>= 0.8.0'} + resolution: + { + integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==, + } + engines: { node: '>= 0.8.0' } p-all@3.0.0: - resolution: {integrity: sha512-qUZbvbBFVXm6uJ7U/WDiO0fv6waBMbjlCm4E66oZdRR+egswICarIdHyVSZZHudH8T5SF8x/JG0q0duFzPnlBw==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-qUZbvbBFVXm6uJ7U/WDiO0fv6waBMbjlCm4E66oZdRR+egswICarIdHyVSZZHudH8T5SF8x/JG0q0duFzPnlBw==, + } + engines: { node: '>=10' } p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==, + } + engines: { node: '>=6' } p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==, + } + engines: { node: '>=10' } p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==, + } + engines: { node: '>=8' } p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==, + } + engines: { node: '>=10' } p-map@4.0.0: - resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==, + } + engines: { node: '>=10' } p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==, + } + engines: { node: '>=6' } parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==, + } + engines: { node: '>=6' } parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==, + } + engines: { node: '>=8' } parse5-htmlparser2-tree-adapter@6.0.1: - resolution: {integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==} + resolution: + { + integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==, + } parse5@5.1.1: - resolution: {integrity: sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==} + resolution: + { + integrity: sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==, + } parse5@6.0.1: - resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} + resolution: + { + integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==, + } path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==, + } + engines: { node: '>=8' } path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==, + } + engines: { node: '>=0.10.0' } path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==, + } + engines: { node: '>=8' } path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + resolution: + { + integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==, + } picocolors@1.1.1: - resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + resolution: + { + integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==, + } picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} + resolution: + { + integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==, + } + engines: { node: '>=8.6' } pirates@4.0.6: - resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} - engines: {node: '>= 6'} + resolution: + { + integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==, + } + engines: { node: '>= 6' } pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==, + } + engines: { node: '>=8' } prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - - prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} + resolution: + { + integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==, + } + engines: { node: '>= 0.8.0' } prettier@3.1.1: - resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} - engines: {node: '>=14'} + resolution: + { + integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==, + } + engines: { node: '>=14' } hasBin: true pretty-format@29.7.0: - resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + resolution: + { + integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==, + } + engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} + resolution: + { + integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==, + } + engines: { node: '>= 6' } publint@0.2.12: - resolution: {integrity: sha512-YNeUtCVeM4j9nDiTT2OPczmlyzOkIXNtdDZnSuajAxS/nZ6j3t7Vs9SUB4euQNddiltIwu7Tdd3s+hr08fAsMw==} - engines: {node: '>=16'} + resolution: + { + integrity: sha512-YNeUtCVeM4j9nDiTT2OPczmlyzOkIXNtdDZnSuajAxS/nZ6j3t7Vs9SUB4euQNddiltIwu7Tdd3s+hr08fAsMw==, + } + engines: { node: '>=16' } hasBin: true punycode@2.3.1: - resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==, + } + engines: { node: '>=6' } pure-rand@6.0.4: - resolution: {integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==} + resolution: + { + integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==, + } queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + resolution: + { + integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==, + } react-is@18.2.0: - resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + resolution: + { + integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==, + } readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} + resolution: + { + integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==, + } + engines: { node: '>= 6' } require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==, + } + engines: { node: '>=0.10.0' } resolve-cwd@3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==, + } + engines: { node: '>=8' } resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} + resolution: + { + integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==, + } + engines: { node: '>=4' } resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==, + } + engines: { node: '>=8' } resolve.exports@2.0.2: - resolution: {integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==, + } + engines: { node: '>=10' } resolve@1.22.8: - resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + resolution: + { + integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==, + } hasBin: true reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + resolution: + { + integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==, + } + engines: { iojs: '>=1.0.0', node: '>=0.10.0' } run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + resolution: + { + integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==, + } sade@1.8.1: - resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==, + } + engines: { node: '>=6' } safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + resolution: + { + integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==, + } safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + resolution: + { + integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==, + } semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + resolution: + { + integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==, + } hasBin: true semver@7.7.1: - resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==, + } + engines: { node: '>=10' } hasBin: true semver@7.7.3: - resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==, + } + engines: { node: '>=10' } hasBin: true shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==, + } + engines: { node: '>=8' } shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==, + } + engines: { node: '>=8' } signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + resolution: + { + integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==, + } sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + resolution: + { + integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==, + } skin-tone@2.0.0: - resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==, + } + engines: { node: '>=8' } slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==, + } + engines: { node: '>=8' } source-map-support@0.5.13: - resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + resolution: + { + integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==, + } source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==, + } + engines: { node: '>=0.10.0' } sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + resolution: + { + integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==, + } stack-utils@2.0.6: - resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==, + } + engines: { node: '>=10' } string-length@4.0.2: - resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==, + } + engines: { node: '>=10' } string-to-stream@3.0.1: - resolution: {integrity: sha512-Hl092MV3USJuUCC6mfl9sPzGloA3K5VwdIeJjYIkXY/8K+mUvaeEabWJgArp+xXrsWxCajeT2pc4axbVhIZJyg==} + resolution: + { + integrity: sha512-Hl092MV3USJuUCC6mfl9sPzGloA3K5VwdIeJjYIkXY/8K+mUvaeEabWJgArp+xXrsWxCajeT2pc4axbVhIZJyg==, + } string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, + } + engines: { node: '>=8' } string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + resolution: + { + integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==, + } strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==, + } + engines: { node: '>=8' } strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} + resolution: + { + integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==, + } + engines: { node: '>=4' } strip-bom@4.0.0: - resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==, + } + engines: { node: '>=8' } strip-final-newline@2.0.0: - resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==, + } + engines: { node: '>=6' } strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==, + } + engines: { node: '>=8' } superstruct@1.0.4: - resolution: {integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==} - engines: {node: '>=14.0.0'} + resolution: + { + integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==, + } + engines: { node: '>=14.0.0' } supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==, + } + engines: { node: '>=8' } supports-color@8.1.1: - resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==, + } + engines: { node: '>=10' } supports-hyperlinks@3.1.0: - resolution: {integrity: sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==} - engines: {node: '>=14.18'} + resolution: + { + integrity: sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==, + } + engines: { node: '>=14.18' } supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - - synckit@0.11.8: - resolution: {integrity: sha512-+XZ+r1XGIJGeQk3VvXhT6xx/VpbHsRzsTkGgF6E5RX9TTXD0118l87puaEBZ566FhqblC6U0d4XnubznJDm30A==} - engines: {node: ^14.18.0 || >=16.0.0} + resolution: + { + integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==, + } + engines: { node: '>= 0.4' } test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} + resolution: + { + integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==, + } + engines: { node: '>=8' } thenify-all@1.6.0: - resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} - engines: {node: '>=0.8'} + resolution: + { + integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==, + } + engines: { node: '>=0.8' } thenify@3.3.1: - resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + resolution: + { + integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==, + } tmpl@1.0.5: - resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + resolution: + { + integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==, + } to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} + resolution: + { + integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==, + } + engines: { node: '>=8.0' } ts-api-utils@2.0.1: - resolution: {integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==} - engines: {node: '>=18.12'} + resolution: + { + integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==, + } + engines: { node: '>=18.12' } peerDependencies: typescript: '>=4.8.4' ts-jest@29.4.6: - resolution: {integrity: sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA==} - engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} + resolution: + { + integrity: sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA==, + } + engines: { node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0 } hasBin: true peerDependencies: '@babel/core': '>=7.0.0-beta.0 <8' @@ -1871,7 +3103,10 @@ packages: optional: true ts-node@10.7.0: - resolution: {integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==} + resolution: + { + integrity: sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A==, + } hasBin: true peerDependencies: '@swc/core': '>=1.2.50' @@ -1885,147 +3120,249 @@ packages: optional: true tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz: - resolution: {integrity: sha512-tWyCXnx0WqCkVlo5s+4KMj7HC0/0YrCZY0PustUwX9F2lNwd8Kp07q/Q56uGvV9q80XaSDrhy0YqBmrX5TDNpQ==, tarball: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz} + resolution: + { + integrity: sha512-tWyCXnx0WqCkVlo5s+4KMj7HC0/0YrCZY0PustUwX9F2lNwd8Kp07q/Q56uGvV9q80XaSDrhy0YqBmrX5TDNpQ==, + tarball: https://github.com/stainless-api/tsc-multi/releases/download/v1.1.9/tsc-multi.tgz, + } version: 1.1.9 - engines: {node: '>=14'} + engines: { node: '>=14' } hasBin: true peerDependencies: typescript: '>=4.3.0' tsconfig-paths@4.2.0: - resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==, + } + engines: { node: '>=6' } tslib@2.8.1: - resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + resolution: + { + integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==, + } type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} + resolution: + { + integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==, + } + engines: { node: '>= 0.8.0' } type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} + resolution: + { + integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==, + } + engines: { node: '>=4' } type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==, + } + engines: { node: '>=10' } type-fest@4.41.0: - resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} - engines: {node: '>=16'} + resolution: + { + integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==, + } + engines: { node: '>=16' } typescript-eslint@8.31.1: - resolution: {integrity: sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + resolution: + { + integrity: sha512-j6DsEotD/fH39qKzXTQRwYYWlt7D+0HmfpOK+DVhwJOFLcdmn92hq3mBb7HlKJHbjjI/gTOqEcc9d6JfpFf/VA==, + } + engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.9.0' typescript@5.6.1-rc: - resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} - engines: {node: '>=14.17'} + resolution: + { + integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==, + } + engines: { node: '>=14.17' } hasBin: true typescript@5.8.3: - resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} - engines: {node: '>=14.17'} + resolution: + { + integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==, + } + engines: { node: '>=14.17' } hasBin: true uglify-js@3.19.3: - resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} - engines: {node: '>=0.8.0'} + resolution: + { + integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==, + } + engines: { node: '>=0.8.0' } hasBin: true undici-types@6.21.0: - resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + resolution: + { + integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==, + } unicode-emoji-modifier-base@1.0.0: - resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} - engines: {node: '>=4'} + resolution: + { + integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==, + } + engines: { node: '>=4' } update-browserslist-db@1.2.3: - resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} + resolution: + { + integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==, + } hasBin: true peerDependencies: browserslist: '>= 4.21.0' uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + resolution: + { + integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==, + } util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + resolution: + { + integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==, + } v8-compile-cache-lib@3.0.0: - resolution: {integrity: sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==} + resolution: + { + integrity: sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA==, + } v8-to-istanbul@9.2.0: - resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} - engines: {node: '>=10.12.0'} + resolution: + { + integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==, + } + engines: { node: '>=10.12.0' } validate-npm-package-name@5.0.1: - resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + resolution: + { + integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==, + } + engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } walker@1.0.8: - resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + resolution: + { + integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==, + } which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} + resolution: + { + integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==, + } + engines: { node: '>= 8' } hasBin: true word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} + resolution: + { + integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==, + } + engines: { node: '>=0.10.0' } wordwrap@1.0.0: - resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + resolution: + { + integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==, + } wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==, + } + engines: { node: '>=10' } wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + resolution: + { + integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==, + } write-file-atomic@4.0.2: - resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + resolution: + { + integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==, + } + engines: { node: ^12.13.0 || ^14.15.0 || >=16.0.0 } y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==, + } + engines: { node: '>=10' } yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + resolution: + { + integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==, + } yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==, + } + engines: { node: '>=10' } yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} + resolution: + { + integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==, + } + engines: { node: '>=12' } yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==, + } + engines: { node: '>=10' } yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} + resolution: + { + integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==, + } + engines: { node: '>=12' } yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} + resolution: + { + integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==, + } + engines: { node: '>=6' } yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} + resolution: + { + integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==, + } + engines: { node: '>=10' } snapshots: - '@andrewbranch/untar.js@1.0.3': {} '@arethetypeswrong/cli@0.17.0': @@ -2524,8 +3861,6 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 - '@pkgr/core@0.2.4': {} - '@sinclair/typebox@0.27.8': {} '@sindresorhus/is@4.6.0': {} @@ -3007,13 +4342,6 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-plugin-prettier@5.4.1(eslint@9.39.1)(prettier@3.1.1): - dependencies: - eslint: 9.39.1 - prettier: 3.1.1 - prettier-linter-helpers: 1.0.0 - synckit: 0.11.8 - eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.31.1(@typescript-eslint/parser@8.31.1(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1)(typescript@5.8.3))(eslint@9.39.1): dependencies: eslint: 9.39.1 @@ -3114,8 +4442,6 @@ snapshots: fast-deep-equal@3.1.3: {} - fast-diff@1.3.0: {} - fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3861,10 +5187,6 @@ snapshots: prelude-ls@1.2.1: {} - prettier-linter-helpers@1.0.0: - dependencies: - fast-diff: 1.3.0 - prettier@3.1.1: {} pretty-format@29.7.0: @@ -4013,10 +5335,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - synckit@0.11.8: - dependencies: - '@pkgr/core': 0.2.4 - test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 diff --git a/scripts/fast-format b/scripts/fast-format index 53721ac..f1873ae 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -31,10 +31,7 @@ if ! [ -z "$ESLINT_FILES" ]; then fi echo "==> Running prettier --write" -# format things eslint didn't -PRETTIER_FILES="$(grep '\.\(js\|json\)$' "$FILE_LIST" || true)" -if ! [ -z "$PRETTIER_FILES" ]; then - echo "$PRETTIER_FILES" | xargs ./node_modules/.bin/prettier \ - --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern \ - '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +if ! [ -z "$FILE_LIST" ]; then + cat "$FILE_LIST" | xargs ./node_modules/.bin/prettier \ + --write --cache --cache-strategy metadata --no-error-on-unmatched-pattern --ignore-unknown fi diff --git a/scripts/format b/scripts/format index 7a75640..b1b2c17 100755 --- a/scripts/format +++ b/scripts/format @@ -8,5 +8,4 @@ echo "==> Running eslint --fix" ./node_modules/.bin/eslint --fix . echo "==> Running prettier --write" -# format things eslint didn't -./node_modules/.bin/prettier --write --cache --cache-strategy metadata . '!**/dist' '!**/*.ts' '!**/*.mts' '!**/*.cts' '!**/*.js' '!**/*.mjs' '!**/*.cjs' +./node_modules/.bin/prettier --write --cache --cache-strategy metadata . diff --git a/scripts/lint b/scripts/lint index 3ffb78a..1f53254 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,6 +4,9 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running prettier --check" +./node_modules/.bin/prettier --check . + echo "==> Running eslint" ./node_modules/.bin/eslint . diff --git a/src/internal/types.ts b/src/internal/types.ts index b668dfc..a050513 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -40,7 +40,6 @@ type OverloadedParameters = : T extends (...args: infer A) => unknown ? A : never; -/* eslint-disable */ /** * These imports attempt to get types from a parent package's dependencies. * Unresolved bare specifiers can trigger [automatic type acquisition][1] in some projects, which @@ -63,19 +62,18 @@ type OverloadedParameters = * * [1]: https://www.typescriptlang.org/tsconfig/#typeAcquisition */ -/** @ts-ignore For users with \@types/node */ +/** @ts-ignore For users with \@types/node */ /* prettier-ignore */ type UndiciTypesRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with undici */ +/** @ts-ignore For users with undici */ /* prettier-ignore */ type UndiciRequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with \@types/bun */ +/** @ts-ignore For users with \@types/bun */ /* prettier-ignore */ type BunRequestInit = globalThis.FetchRequestInit; -/** @ts-ignore For users with node-fetch@2 */ +/** @ts-ignore For users with node-fetch@2 */ /* prettier-ignore */ type NodeFetch2RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ +/** @ts-ignore For users with node-fetch@3, doesn't need file extension because types are at ./@types/index.d.ts */ /* prettier-ignore */ type NodeFetch3RequestInit = NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny | NotAny; -/** @ts-ignore For users who use Deno */ +/** @ts-ignore For users who use Deno */ /* prettier-ignore */ type FetchRequestInit = NonNullable[1]>; -/* eslint-enable */ type RequestInits = | NotAny From 9d9f3fd370c7cdf0c2faefb109d4a865e92a6ad9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 02:30:01 +0000 Subject: [PATCH 23/25] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index fa8bf4a..b12407c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo%2Fsuperwall-api-0030d74538bb0aa4cc97da30877e96ba6e18eb13612306bc38ffd21a45f3c6e9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo/superwall-api-0030d74538bb0aa4cc97da30877e96ba6e18eb13612306bc38ffd21a45f3c6e9.yml openapi_spec_hash: c92516a697752fb3120de2c19a81fca5 config_hash: dfc8fae1943177a610a7d4985af30c54 From 59ee37a170b23b66d7c94647e13a2ae6b099c461 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 02:17:08 +0000 Subject: [PATCH 24/25] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b12407c..b4eeb20 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 69 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo/superwall-api-0030d74538bb0aa4cc97da30877e96ba6e18eb13612306bc38ffd21a45f3c6e9.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/superwall-Makisuo/superwall-api-202ca16fba7345bc15c70f67f42ee4041e844b782624a31e41956a2d07d9feec.yml openapi_spec_hash: c92516a697752fb3120de2c19a81fca5 config_hash: dfc8fae1943177a610a7d4985af30c54 From f3896fa2d61a01a382fa842249ea9141d4ad7907 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 May 2026 02:17:31 +0000 Subject: [PATCH 25/25] release: 0.4.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 22 ++++++++++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0ee8c01..2537c1f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.3.0" + ".": "0.4.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 35febcc..f52ecf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +## 0.4.0 (2026-05-01) + +Full Changelog: [v0.3.0...v0.4.0](https://github.com/superwall/superwall-sdk-typescript/compare/v0.3.0...v0.4.0) + +### Features + +* **api:** api update ([d2194c5](https://github.com/superwall/superwall-sdk-typescript/commit/d2194c57fad5d00a6ccdecc1a5382e0e3ccabbc5)) +* **api:** api update ([7e1c460](https://github.com/superwall/superwall-sdk-typescript/commit/7e1c4606938a6d959f86e371771744287e028619)) +* **api:** api update ([4a22fbf](https://github.com/superwall/superwall-sdk-typescript/commit/4a22fbf0e305a352d50c703cb9ef0d63d05e62f8)) +* support setting headers via env ([454d412](https://github.com/superwall/superwall-sdk-typescript/commit/454d412cf04f2038e827312dd261017d165c6424)) + + +### Chores + +* **ci:** skip lint on metadata-only changes ([be93869](https://github.com/superwall/superwall-sdk-typescript/commit/be93869d4fc6fdaa81a0f80d6f2a76dcb4634273)) +* **format:** run eslint and prettier separately ([aa977e0](https://github.com/superwall/superwall-sdk-typescript/commit/aa977e028fc00bf39e8d3dec390288a72be5f737)) +* **formatter:** run prettier and eslint separately ([624cb88](https://github.com/superwall/superwall-sdk-typescript/commit/624cb881f0eb495cb0d28e7d7cd252e5afd28620)) +* **internal:** codegen related update ([f9215a4](https://github.com/superwall/superwall-sdk-typescript/commit/f9215a4439cee90959da5384acb4da1c21b5070a)) +* **internal:** codegen related update ([9f0ffa0](https://github.com/superwall/superwall-sdk-typescript/commit/9f0ffa05a31e5ebf667efccc17f6cd6a6450a434)) +* **internal:** more robust bootstrap script ([683ef0c](https://github.com/superwall/superwall-sdk-typescript/commit/683ef0ca266a231bbaba478d3ffb2da72c00a3e1)) +* **internal:** update gitignore ([9450ea4](https://github.com/superwall/superwall-sdk-typescript/commit/9450ea469048b4d0a0dd858076e98b8f2ab638e5)) + ## 0.3.0 (2026-03-17) Full Changelog: [v0.2.0...v0.3.0](https://github.com/superwall/superwall-sdk-typescript/compare/v0.2.0...v0.3.0) diff --git a/package.json b/package.json index 5c94415..937cc19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "superwall-api", - "version": "0.3.0", + "version": "0.4.0", "description": "The official TypeScript library for the Superwall API", "author": "Superwall API <>", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 88f4d40..4e7f788 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.3.0'; // x-release-please-version +export const VERSION = '0.4.0'; // x-release-please-version