UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

45 lines 1.46 kB
export interface DetectedMethod { methodName: string; requestType: string; responseType: string; apiClass: string; endpoint: string; } export type TypeMap = Map<string, DetectedMethod>; export type BodyDtoSet = Set<string>; /** * Auto-detect types and methods from generated OpenAPI code * This reads the generated API files and extracts method names, request/response types */ export declare function detectTypes(): Promise<TypeMap>; /** * Detect all available body DTO types from generated models * Returns a Set of body DTO type names (e.g., "V4TransactionsUpdateTransactionBodyDto") */ export declare function detectBodyDtos(): BodyDtoSet; /** * Detect if a body DTO has a single wrapper property (nested DTO pattern) * * Example nested pattern: * ```typescript * export interface V4TransactionsUpdateTransactionBodyDto { * transaction: V4TransactionsUpdateTransactionBody; * } * ``` * Returns: "transaction" * * Example direct pattern: * ```typescript * export interface V4LeadsUpdateLeadBodyDto { * status?: string; * name?: string; * // ... many properties * } * ``` * Returns: null * * @param bodyTypeName The body DTO type name (e.g., "V4TransactionsUpdateTransactionBodyDto") * @returns The wrapper property name if nested pattern detected, null otherwise */ export declare function detectDtoWrapperProperty(bodyTypeName: string): string | null; //# sourceMappingURL=type-detector.d.ts.map