Skip to content

Commit 702a41f

Browse files
authored
fix: [#4853] ConfigurationBotFrameworkAuthentication errors when initialized with process.env (#4857)
* Fix config options type to support process.env * Fix eslint * Fix test:compat
1 parent b8501c6 commit 702a41f

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

libraries/botbuilder-core/etc/botbuilder-core.api.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,13 @@ export class ConfigurationBotFrameworkAuthentication extends BotFrameworkAuthent
352352
createUserTokenClient(claimsIdentity: ClaimsIdentity): Promise<UserTokenClient>;
353353
}
354354

355-
// Warning: (ae-forgotten-export) The symbol "TypedOptions" needs to be exported by the entry point index.d.ts
355+
// Warning: (ae-forgotten-export) The symbol "ZodOptions" needs to be exported by the entry point index.d.ts
356356
//
357357
// @public
358-
export type ConfigurationBotFrameworkAuthenticationOptions = z.infer<typeof TypedOptions>;
358+
export interface ConfigurationBotFrameworkAuthenticationOptions extends ZodOptions {
359+
// (undocumented)
360+
[key: string]: string | boolean | undefined;
361+
}
359362

360363
// @public
361364
export class ConfigurationServiceClientCredentialFactory extends PasswordServiceClientCredentialFactory {

libraries/botbuilder-core/src/configurationBotFrameworkAuthentication.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,14 @@ const TypedOptions = z
112112
})
113113
.partial();
114114

115+
type ZodOptions = z.infer<typeof TypedOptions>;
116+
115117
/**
116118
* Contains settings used to configure a [ConfigurationBotFrameworkAuthentication](xref:botbuilder-core.ConfigurationBotFrameworkAuthentication) instance.
117119
*/
118-
export type ConfigurationBotFrameworkAuthenticationOptions = z.infer<typeof TypedOptions>;
120+
export interface ConfigurationBotFrameworkAuthenticationOptions extends ZodOptions {
121+
[key: string]: string | boolean | undefined;
122+
}
119123

120124
/**
121125
* Creates a [BotFrameworkAuthentication](xref:botframework-connector.BotFrameworkAuthentication) instance from an object with the authentication values or a [Configuration](xref:botbuilder-dialogs-adaptive-runtime-core.Configuration) instance.

0 commit comments

Comments
 (0)