casdoor-nodejs-sdk
Version:
Node.js client SDK for Casdoor
34 lines (33 loc) • 1.09 kB
TypeScript
import { AxiosResponse } from 'axios';
import { Config } from './config';
import Request from './request';
export interface Cert {
owner: string;
name: string;
createdTime: string;
displayName: string;
scope: string;
type: string;
cryptoAlgorithm: string;
bitSize: number;
expireInYears: number;
certificate?: string;
privateKey?: string;
authorityPublicKey?: string;
authorityRootPublicKey?: string;
}
export declare class CertSDK {
private config;
private readonly request;
constructor(config: Config, request: Request);
getCerts(): Promise<AxiosResponse<{
data: Cert[];
}, any>>;
getCert(id: string): Promise<AxiosResponse<{
data: Cert;
}, any>>;
modifyCert(method: string, cert: Cert): Promise<AxiosResponse<Record<string, unknown>, any>>;
addCert(cert: Cert): Promise<AxiosResponse<Record<string, unknown>, any>>;
updateCert(cert: Cert): Promise<AxiosResponse<Record<string, unknown>, any>>;
deleteCert(cert: Cert): Promise<AxiosResponse<Record<string, unknown>, any>>;
}