UNPKG

@novo-learning/novo-sdk

Version:

SDK for the Novolanguage Speech Analysis API

83 lines (82 loc) 4.4 kB
import { Configuration } from './configuration'; import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { RequestArgs, BaseAPI } from './base'; export interface AuthenticateSsoRequestDtoV1 { 'publisherId': string; 'userData': UserDataDtoV1; 'publisherToken': string; } export interface AuthenticationDataDtoV1 { 'user': UserDataDtoV1; 'payload': AuthenticationPayloadDtoV1; } export interface AuthenticationPayloadDtoV1 { 'type': string; 'token': string; 'refresh_token'?: string; 'access_token_expires_in': number; 'refresh_token_expires_in': number; } export interface AuthenticationResponseDtoV1 { 'status': string; 'data': AuthenticationDataDtoV1; } export declare const PermissionType: { readonly attempt_read_result: "attempt_read_result"; readonly attempt_read_audio: "attempt_read_audio"; readonly attempt_read_group_result: "attempt_read_group_result"; readonly attempt_read_group_audio: "attempt_read_group_audio"; readonly attempt_edit: "attempt_edit"; readonly attempt_delete: "attempt_delete"; readonly attempt_maintenance: "attempt_maintenance"; readonly exercise_edit: "exercise_edit"; readonly exercise_delete: "exercise_delete"; readonly exercise_maintenance: "exercise_maintenance"; readonly publisher_edit: "publisher_edit"; readonly publisher_read: "publisher_read"; readonly publisher_maintenance: "publisher_maintenance"; readonly publisher_configuration_read: "publisher_configuration_read"; readonly publisher_configuration_edit: "publisher_configuration_edit"; readonly pronunciation_edit: "pronunciation_edit"; }; export declare type PermissionType = typeof PermissionType[keyof typeof PermissionType]; export interface RefreshRequestDtoV1 { 'refresh_token': string; } export declare const RetentionType: { readonly all: "all"; readonly attempt: "attempt"; readonly none: "none"; }; export declare type RetentionType = typeof RetentionType[keyof typeof RetentionType]; export interface SsoRequestDtoV1 { 'publisherId': string; 'userData': UserDataDtoV1; } export interface UserDataDtoV1 { 'userId': string; 'groupId'?: string; 'permissions'?: Array<PermissionType>; 'retention'?: RetentionType; 'metadata'?: object; } export declare const AuthApiAxiosParamCreator: (configuration?: Configuration) => { refresh: (refreshRequestDtoV1: RefreshRequestDtoV1, options?: AxiosRequestConfig) => Promise<RequestArgs>; sso: (authenticateSsoRequestDtoV1: AuthenticateSsoRequestDtoV1, options?: AxiosRequestConfig) => Promise<RequestArgs>; ssoAnonymous: (ssoRequestDtoV1: SsoRequestDtoV1, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; export declare const AuthApiFp: (configuration?: Configuration) => { refresh(refreshRequestDtoV1: RefreshRequestDtoV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthenticationResponseDtoV1>>; sso(authenticateSsoRequestDtoV1: AuthenticateSsoRequestDtoV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthenticationResponseDtoV1>>; ssoAnonymous(ssoRequestDtoV1: SsoRequestDtoV1, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthenticationResponseDtoV1>>; }; export declare const AuthApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { refresh(refreshRequestDtoV1: RefreshRequestDtoV1, options?: any): AxiosPromise<AuthenticationResponseDtoV1>; sso(authenticateSsoRequestDtoV1: AuthenticateSsoRequestDtoV1, options?: any): AxiosPromise<AuthenticationResponseDtoV1>; ssoAnonymous(ssoRequestDtoV1: SsoRequestDtoV1, options?: any): AxiosPromise<AuthenticationResponseDtoV1>; }; export declare class AuthApi extends BaseAPI { refresh(refreshRequestDtoV1: RefreshRequestDtoV1, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthenticationResponseDtoV1, any, {}>>; sso(authenticateSsoRequestDtoV1: AuthenticateSsoRequestDtoV1, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthenticationResponseDtoV1, any, {}>>; ssoAnonymous(ssoRequestDtoV1: SsoRequestDtoV1, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AuthenticationResponseDtoV1, any, {}>>; }