import { ExtendedIntegrationPluginId, Plugin } from '../../types/index.js';
import { PUBLIC_INTEGRATIONS_LOGO_URL } from './constants.js';
import { getNativeOpenApiPlugin } from './shared/index.js';

export const ZoomPlugin: Plugin = getNativeOpenApiPlugin({
  name: 'Zoom',
  id: ExtendedIntegrationPluginId.ZOOM,
  authMethods: {
    oauth2BringYourOwn: {
      authorizationUrl: 'https://zoom.us/oauth/authorize',
      tokenUrl: 'https://zoom.us/oauth/token',
      revokeTokenUrl: 'https://zoom.us/oauth/revoke',
      iconUrl: `${PUBLIC_INTEGRATIONS_LOGO_URL}/zoom.png`,
      authorizationExtraParams: {
        responseType: 'code'
      }
    }
  },
  serverURL: 'https://api.zoom.us/v2'
});
