Skip to content

Commit b540f7a

Browse files
authored
feat(ExtBridge): expose variantKey in baseConfig (#2274)
1 parent 09b86cf commit b540f7a

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

packages/ext-bridge/src/config/schemas.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ const baseConfig = z.object({
55
userId: z.string(),
66
extensionId: z.string(),
77
extensionInstanceId: z.string(),
8+
variantKey: z.string().optional().nullable(),
89
});
910

10-
const contextParameters = z
11-
.object({
12-
appInstallationId: z.string().optional(),
13-
projectId: z.string().optional(),
14-
customerId: z.string().optional(),
15-
})
16-
.catchall(z.string());
11+
const contextParameters = z.object({
12+
appInstallationId: z.string().optional(),
13+
projectId: z.string().optional(),
14+
customerId: z.string().optional(),
15+
});
1716

18-
export const config = baseConfig.merge(contextParameters);
17+
export const config = baseConfig
18+
.extend(contextParameters.shape)
19+
.catchall(z.string());

0 commit comments

Comments
 (0)