import type { ValueOf } from '@aurora';

export const ClientGrantType = {
  AUTHORIZATION_CODE: 'AUTHORIZATION_CODE',
  CLIENT_CREDENTIALS: 'CLIENT_CREDENTIALS',
  PASSWORD: 'PASSWORD',
  REFRESH_TOKEN: 'REFRESH_TOKEN',
} as const;

export type ClientGrantType = ValueOf<typeof ClientGrantType>;

export interface CreateTokenInput {
  grantType: ClientGrantType;
  username?: string;
  password?: string;
  refreshToken?: string;
}

export interface OAuthTokens {
  accessToken: string;
  refreshToken: string;
}
