Skip to content

Commit 651a217

Browse files
razor-xseambot
andauthored
feat: Add workspace.is_publishable_key_auth_enabled (#263)
* Add workspace.is_publishable_key_auth_enabled * ci: Generate code * Add test for connected_accounts.accepted_capabilities * Add test for connected_accounts.accepted_capabilities to list * Remove extra key * ci: Generate code --------- Co-authored-by: Seam Bot <[email protected]>
1 parent e46b6b3 commit 651a217

File tree

6 files changed

+12
-4
lines changed

6 files changed

+12
-4
lines changed

src/lib/database/store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ const initializer = immer<Database>((set, get) => ({
139139
created_at: params.created_at ?? new Date().toISOString(),
140140
is_sandbox: params.is_sandbox ?? false,
141141
is_suspended: params.is_suspended ?? false,
142+
is_publishable_key_auth_enabled: true,
142143
connect_partner_name: params.connect_partner_name ?? null,
143144
company_name:
144145
params.company_name ??

src/lib/zod/workspace.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ export const hex_color_code = z.string().refine((value) => {
1111
export const workspace = z.object({
1212
workspace_id: z.string(),
1313
name: z.string(),
14-
publishable_key: z.string(),
1514
created_at: z.string(),
1615
is_sandbox: z.boolean(),
16+
publishable_key: z.string(),
17+
is_publishable_key_auth_enabled: z.boolean(),
1718
is_suspended: z.boolean(),
1819
company_name: z.string(),
1920
connect_partner_name: z

src/route-types.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5122,9 +5122,10 @@ export type Routes = {
51225122
workspace: {
51235123
workspace_id: string
51245124
name: string
5125-
publishable_key: string
51265125
created_at: string
51275126
is_sandbox: boolean
5127+
publishable_key: string
5128+
is_publishable_key_auth_enabled: boolean
51285129
is_suspended: boolean
51295130
company_name: string
51305131
/** deprecated: use company_name */
@@ -5151,9 +5152,10 @@ export type Routes = {
51515152
workspace: {
51525153
workspace_id: string
51535154
name: string
5154-
publishable_key: string
51555155
created_at: string
51565156
is_sandbox: boolean
5157+
publishable_key: string
5158+
is_publishable_key_auth_enabled: boolean
51575159
is_suspended: boolean
51585160
company_name: string
51595161
/** deprecated: use company_name */
@@ -5180,9 +5182,10 @@ export type Routes = {
51805182
workspaces: {
51815183
workspace_id: string
51825184
name: string
5183-
publishable_key: string
51845185
created_at: string
51855186
is_sandbox: boolean
5187+
publishable_key: string
5188+
is_publishable_key_auth_enabled: boolean
51865189
is_suspended: boolean
51875190
company_name: string
51885191
/** deprecated: use company_name */

test/api/connected_accounts/get.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ test("GET /connected_accounts/get", async (t: ExecutionContext) => {
3434

3535
t.is(connected_account.user_identifier.email, connected_account_email)
3636
t.truthy(connected_account.custom_metadata)
37+
t.deepEqual(connected_account.accepted_capabilities, [])
3738
})

test/api/connected_accounts/list.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ test("GET /connected_accounts/list with limit", async (t: ExecutionContext) => {
1717
} = await axios.get("/connected_accounts/list", { params: { limit: 1 } })
1818

1919
t.is(connected_accounts.length, 1)
20+
t.deepEqual(connected_accounts[0]?.accepted_capabilities, [])
2021
})
2122

2223
test("GET /connected_accounts/list with pages", async (t: ExecutionContext) => {

test/api/workspaces/create.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ test("POST /workspaces/create", async (t: ExecutionContext) => {
2525

2626
t.truthy(workspace)
2727
t.is(workspace.connect_partner_name, "Test")
28+
t.true(workspace.is_publishable_key_auth_enabled)
2829
})

0 commit comments

Comments
 (0)