diff --git a/packages/connector-alipay-native/src/index.ts b/packages/connector-alipay-native/src/index.ts index d62259e7e..68d45ed96 100644 --- a/packages/connector-alipay-native/src/index.ts +++ b/packages/connector-alipay-native/src/index.ts @@ -45,13 +45,9 @@ export type { AlipayNativeConfig } from './types'; export class AlipayNativeConnector implements SocialConnector { public metadata: ConnectorMetadata = defaultMetadata; - public getConfig: GetConnectorConfig; - private readonly signingPamameters: SigningPamameters = signingPamameters; - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = alipayNativeConfigGuard.safeParse(config); diff --git a/packages/connector-alipay/src/index.ts b/packages/connector-alipay/src/index.ts index 5680cf88d..ca2bfd050 100644 --- a/packages/connector-alipay/src/index.ts +++ b/packages/connector-alipay/src/index.ts @@ -39,13 +39,9 @@ export type { AlipayConfig } from './types'; export class AlipayConnector implements SocialConnector { public metadata: ConnectorMetadata = defaultMetadata; - public getConfig: GetConnectorConfig; - private readonly signingPamameters: SigningPamameters = signingPamameters; - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = alipayConfigGuard.safeParse(config); diff --git a/packages/connector-aliyun-dm/src/index.ts b/packages/connector-aliyun-dm/src/index.ts index 02233edf7..78aa2ca45 100644 --- a/packages/connector-aliyun-dm/src/index.ts +++ b/packages/connector-aliyun-dm/src/index.ts @@ -17,11 +17,7 @@ import { SendEmailResponse, AliyunDmConfig, aliyunDmConfigGuard } from './types' export class AliyunDmConnector implements EmailConnector { public metadata: ConnectorMetadata = defaultMetadata; - public readonly getConfig: GetConnectorConfig; - - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = aliyunDmConfigGuard.safeParse(config); diff --git a/packages/connector-aliyun-sms/src/index.ts b/packages/connector-aliyun-sms/src/index.ts index aac33c984..a79077db9 100644 --- a/packages/connector-aliyun-sms/src/index.ts +++ b/packages/connector-aliyun-sms/src/index.ts @@ -17,11 +17,7 @@ import { aliyunSmsConfigGuard, AliyunSmsConfig, SendSmsResponse } from './types' export class AliyunSmsConnector implements SmsConnector { public metadata: ConnectorMetadata = defaultMetadata; - public readonly getConfig: GetConnectorConfig; - - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = aliyunSmsConfigGuard.safeParse(config); diff --git a/packages/connector-facebook/src/index.ts b/packages/connector-facebook/src/index.ts index b35d70627..2b525a8b8 100644 --- a/packages/connector-facebook/src/index.ts +++ b/packages/connector-facebook/src/index.ts @@ -35,11 +35,7 @@ import { export class FacebookConnector implements SocialConnector { public metadata: ConnectorMetadata = defaultMetadata; - public readonly getConfig: GetConnectorConfig; - - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = facebookConfigGuard.safeParse(config); diff --git a/packages/connector-github/src/index.ts b/packages/connector-github/src/index.ts index a48e95807..a5764b11b 100644 --- a/packages/connector-github/src/index.ts +++ b/packages/connector-github/src/index.ts @@ -25,11 +25,7 @@ import { githubConfigGuard, AccessTokenResponse, GithubConfig, UserInfoResponse export class GithubConnector implements SocialConnector { public metadata: ConnectorMetadata = defaultMetadata; - public readonly getConfig: GetConnectorConfig; - - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = githubConfigGuard.safeParse(config); diff --git a/packages/connector-google/src/index.ts b/packages/connector-google/src/index.ts index fd128b108..430ae58cd 100644 --- a/packages/connector-google/src/index.ts +++ b/packages/connector-google/src/index.ts @@ -29,11 +29,7 @@ import { googleConfigGuard, AccessTokenResponse, GoogleConfig, UserInfoResponse export class GoogleConnector implements SocialConnector { public metadata: ConnectorMetadata = defaultMetadata; - public readonly getConfig: GetConnectorConfig; - - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = googleConfigGuard.safeParse(config); diff --git a/packages/connector-sendgrid-mail/src/index.ts b/packages/connector-sendgrid-mail/src/index.ts index 675310d6c..d4c4e25c9 100644 --- a/packages/connector-sendgrid-mail/src/index.ts +++ b/packages/connector-sendgrid-mail/src/index.ts @@ -24,11 +24,7 @@ import { export class SendGridMailConnector implements EmailConnector { public metadata: ConnectorMetadata = defaultMetadata; - public readonly getConfig: GetConnectorConfig; - - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = sendGridMailConfigGuard.safeParse(config); diff --git a/packages/connector-twilio-sms/src/index.ts b/packages/connector-twilio-sms/src/index.ts index 0e6991718..b9d667bbe 100644 --- a/packages/connector-twilio-sms/src/index.ts +++ b/packages/connector-twilio-sms/src/index.ts @@ -16,11 +16,7 @@ import { twilioSmsConfigGuard, SendSmsResponse, TwilioSmsConfig, PublicParameter export class TwilioSmsConnector implements SmsConnector { public metadata: ConnectorMetadata = defaultMetadata; - public readonly getConfig: GetConnectorConfig; - - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = twilioSmsConfigGuard.safeParse(config); diff --git a/packages/connector-wechat-native/src/index.ts b/packages/connector-wechat-native/src/index.ts index 0a7d35f64..599cdacf1 100644 --- a/packages/connector-wechat-native/src/index.ts +++ b/packages/connector-wechat-native/src/index.ts @@ -37,11 +37,7 @@ import { export class WeChatNativeConnector implements SocialConnector { public metadata: ConnectorMetadata = defaultMetadata; - public getConfig: GetConnectorConfig; - - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = weChatNativeConfigGuard.safeParse(config); diff --git a/packages/connector-wechat/src/index.ts b/packages/connector-wechat/src/index.ts index aadc6fd4d..a20cd9e2b 100644 --- a/packages/connector-wechat/src/index.ts +++ b/packages/connector-wechat/src/index.ts @@ -33,11 +33,7 @@ import { weChatConfigGuard, AccessTokenResponse, UserInfoResponse, WeChatConfig export class WeChatConnector implements SocialConnector { public metadata: ConnectorMetadata = defaultMetadata; - public getConfig: GetConnectorConfig; - - constructor(getConnectorConfig: GetConnectorConfig) { - this.getConfig = getConnectorConfig; - } + constructor(public readonly getConfig: GetConnectorConfig) {} public validateConfig: ValidateConfig = async (config: unknown) => { const result = weChatConfigGuard.safeParse(config);