UNPKG

@sociate/sociate-api-sdk

Version:

Javascript client for Sociate AI APIs

72 lines (71 loc) 1.47 kB
import { CompanyPublic } from "./company"; import { UserDocument, UserPublic } from "./users"; export interface AuthLoginRequest { username: string; password: string; } export interface AuthLoginResponse { user: UserPublic; /** * Company * @description Company from user */ company: CompanyPublic; /** * Access Token * @description Jwt access token with user encoded * @default */ access_token: string; /** * Expiration * @description Timestamp until token is valid */ expiration: number; /** * Scopes * @description Scopes from user */ scopes: string[]; } export interface GenerateTokenRequest { /** * App Id * @description Application id */ app_id: string; /** * App Secret * @description Application secret */ app_secret: string; /** * Scopes * @description Scopes from user */ scopes: string[]; } export interface GenerateTokenResponse { user: UserDocument; /** * Company * @description Company from user */ company: CompanyPublic; /** * Access Token * @description Jwt access token with user encoded * @default */ access_token: string; /** * Expiration * @description Timestamp until token is valid */ expiration: number; /** * Scopes * @description Scopes from user */ scopes: string[]; }