From 86f0a90fe71d2efc75823f4675e00f9890fcb75b Mon Sep 17 00:00:00 2001 From: Max Beatty Date: Tue, 1 Oct 2024 10:36:23 -0700 Subject: [PATCH] fix(types): proxies is an array (#20) fixes #19 --- .changeset/selfish-balloons-yell.md | 5 +++++ src/index.ts | 26 ++++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 .changeset/selfish-balloons-yell.md diff --git a/.changeset/selfish-balloons-yell.md b/.changeset/selfish-balloons-yell.md new file mode 100644 index 0000000..449116b --- /dev/null +++ b/.changeset/selfish-balloons-yell.md @@ -0,0 +1,5 @@ +--- +'@browserbasehq/sdk': patch +--- + +Fix type for custom proxies diff --git a/src/index.ts b/src/index.ts index e084c28..9b60a1f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -64,18 +64,20 @@ export type CreateSessionOptions = { timeout?: number proxies?: | boolean - | { - type: 'browserbase' - geolocation?: { country: string; state?: string; city?: string } - domainPattern?: string - } - | { - type: 'external' - server: string - domainPattern?: string - username?: string - password?: string - } + | Array< + | { + type: 'browserbase' + geolocation?: { country: string; state?: string; city?: string } + domainPattern?: string + } + | { + type: 'external' + server: string + domainPattern?: string + username?: string + password?: string + } + > } export type Session = {