import { Module } from '@nestjs/common'
import { MongooseModule } from '@nestjs/mongoose'
import { OcisCredential, OcisCredentialSchema } from '../schemas/ocis-credential.schema.js'
import { AuthentikClient } from './authentik.client.js'
import { OcisClient } from './ocis.client.js'
import { StalwartClient } from './stalwart.client.js'
import { StripeClient } from './stripe.client.js'

@Module({
  imports: [
    // OcisClient persists the rotating OCIS service refresh token here.
    MongooseModule.forFeature([{ name: OcisCredential.name, schema: OcisCredentialSchema }]),
  ],
  providers: [AuthentikClient, StalwartClient, OcisClient, StripeClient],
  exports: [AuthentikClient, StalwartClient, OcisClient, StripeClient],
})
export class IntegrationsModule {}
