Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

1.1 KB
Raw Blame
/** An OAuth app either talks to a browser redirect or polls a device code. */
export type OAuthAppType = 'device' | 'web';

export interface OAuthAppItem {
  applicationType?: string | null;
  createdAt: Date;
  description?: string | null;
  enabled?: boolean | null;
  grants?: string[] | null;
  /** Whether a client secret has been issued; the secret itself is never read back. */
  hasSecret?: boolean;
  id: string;
  lastUsedAt?: Date | null;
  logoUri?: string | null;
  name: string;
  redirectUris?: string[] | null;
  scopes?: string[] | null;
  updatedAt?: Date;
}

export interface CreateOAuthAppParams {
  description?: string;
  /**
   * Whether a web app gets its client secret at creation (returned once as
   * `clientSecret`). Clients that generate it on demand send `false`; older
   * clients omit it and rely on the server default of `true`.
   */
  issueSecret?: boolean;
  logoUri?: string;
  name: string;
  redirectUris?: string[];
  type?: OAuthAppType;
}

export interface UpdateOAuthAppParams {
  description?: string;
  /** `null` removes the logo. */
  logoUri?: string | null;
  name?: string;
  redirectUris?: string[];
}