UNPKG

@limitly/limitly-js

Version:

Official Node.js SDK for Limitly - API Key management, plans, users and request validation

44 lines 1.52 kB
import { HttpClient } from '../client'; import { Plan, CreatePlanRequest, UpdatePlanRequest, PlanUsage, PlanUsersResponse, PlanKeysResponse, ApiResponse, PaginatedResponse, RequestOptions } from '../types'; /** * Module for managing Plans */ export declare class PlansModule { private client; constructor(client: HttpClient); /** * Lists all plans for the client */ list(options?: RequestOptions): Promise<PaginatedResponse<Plan>>; /** * Creates a new plan */ create(data: CreatePlanRequest, options?: RequestOptions): Promise<ApiResponse<Plan>>; /** * Gets a specific plan by ID */ get(planId: string, options?: RequestOptions): Promise<ApiResponse<Plan>>; /** * Updates an existing plan */ update(planId: string, data: UpdatePlanRequest, options?: RequestOptions): Promise<ApiResponse<Plan>>; /** * Deletes a plan */ delete(planId: string, options?: RequestOptions): Promise<ApiResponse<{ message: string; }>>; /** * Gets usage statistics for a plan */ getUsage(planId: string, options?: RequestOptions): Promise<ApiResponse<PlanUsage>>; /** * Gets all users assigned to a plan */ getUsers(planId: string, options?: RequestOptions): Promise<ApiResponse<PlanUsersResponse>>; /** * Gets all API Keys directly assigned to a plan */ getKeys(planId: string, options?: RequestOptions): Promise<ApiResponse<PlanKeysResponse>>; } //# sourceMappingURL=plans.d.ts.map