siputzx-api
Version:
Module Wrapper For Siputzx API
31 lines • 1.1 kB
TypeScript
import { APIEndpoint } from '../types';
/**
* Helper class for API utilities
*/
export declare class ApiHelper {
/**
* Extract example parameters from an endpoint's example string
* @param example Example string from API (e.g., "param1=value1¶m2=value2")
* @returns Object containing the parameters
*/
static parseExampleParams(example: any): Record<string, any>;
/**
* Create a camelCase function name from an endpoint title
* @param name The endpoint name
* @returns Camelcase function name
*/
static createFunctionName(name: string): string;
/**
* Generate TypeScript interface from example parameters
* @param endpoint API endpoint data
* @returns TypeScript interface definition as string
*/
static generateTypeInterface(endpoint: APIEndpoint): string;
/**
* Create query string from parameters
* @param params Object containing query parameters
* @returns URL query string
*/
static createQueryString(params: Record<string, any>): string;
}
//# sourceMappingURL=api.d.ts.map