casdoor-nodejs-sdk
Version:
Node.js client SDK for Casdoor
32 lines (31 loc) • 1.02 kB
TypeScript
import { AxiosResponse } from 'axios';
import { Config } from './config';
import Request from './request';
export interface Plan {
owner: string;
name: string;
createdTime: string;
displayName: string;
description: string;
pricePerMonth?: number;
pricePerYear?: number;
currency?: string;
isEnabled?: boolean;
role?: string;
options?: string[];
}
export declare class PlanSDK {
private config;
private readonly request;
constructor(config: Config, request: Request);
getPlans(): Promise<AxiosResponse<{
data: Plan[];
}, any>>;
getPlan(id: string): Promise<AxiosResponse<{
data: Plan;
}, any>>;
modifyPlan(method: string, plan: Plan): Promise<AxiosResponse<Record<string, unknown>, any>>;
addPlan(plan: Plan): Promise<AxiosResponse<Record<string, unknown>, any>>;
updatePlan(plan: Plan): Promise<AxiosResponse<Record<string, unknown>, any>>;
deletePlan(plan: Plan): Promise<AxiosResponse<Record<string, unknown>, any>>;
}