UNPKG

casdoor-nodejs-sdk

Version:
60 lines (59 loc) 1.78 kB
import { AxiosResponse } from 'axios'; import { Config } from './config'; import Request from './request'; export interface Provider { owner: string; name: string; createdTime: string; displayName: string; category: string; type: string; subType?: string; method?: string; clientId?: string; clientSecret?: string; clientId2?: string; clientSecret2?: string; cert?: string; customAuthUrl?: string; customTokenUrl?: string; customUserInfoUrl?: string; customLogo?: string; scopes?: string; userMapping?: Record<string, string>; host?: string; port?: number; disableSsl?: boolean; title?: string; content?: string; receiver?: string; regionId?: string; signName?: string; templateCode?: string; appId?: string; endpoint?: string; intranetEndpoint?: string; domain?: string; bucket?: string; pathPrefix?: string; metadata?: string; idP?: string; issuerUrl?: string; enableSignAuthnRequest?: boolean; providerUrl?: string; } export declare class ProviderSDK { private config; private readonly request; constructor(config: Config, request: Request); getProviders(): Promise<AxiosResponse<{ data: Provider[]; }, any>>; getProvider(id: string): Promise<AxiosResponse<{ data: Provider; }, any>>; modifyProvider(method: string, provider: Provider): Promise<AxiosResponse<Record<string, unknown>, any>>; addProvider(provider: Provider): Promise<AxiosResponse<Record<string, unknown>, any>>; updateProvider(provider: Provider): Promise<AxiosResponse<Record<string, unknown>, any>>; deleteProvider(provider: Provider): Promise<AxiosResponse<Record<string, unknown>, any>>; }