renew-ip
Version:
A module for renewing 4G/LTE IP addresses on tethered Android phones from Node JS.
24 lines • 1.41 kB
TypeScript
/// <reference types="node" />
import EventEmitter from "events";
import { z } from "zod";
import { AutomatePayloadSchema, EnvSchema, IpDataConfigSchema, IpDataFieldsSchema, IpDataResponseSchema, IpHistorySchema, PartialRouterConfigSchema, RenewalPrioritySchema, RouterConfigSchema } from "./schemas";
export declare type RouterEnv = z.infer<typeof EnvSchema>;
export declare type RenewalPriority = z.infer<typeof RenewalPrioritySchema>;
export declare type AutomatePayload = z.infer<typeof AutomatePayloadSchema>;
export declare type RouterConfig = z.infer<typeof RouterConfigSchema>;
export declare type IpHistory = z.infer<typeof IpHistorySchema>;
export declare type IpDataConfig = z.infer<typeof IpDataConfigSchema>;
export declare type IpDataFields = z.infer<typeof IpDataFieldsSchema>;
export declare type IpDataResponse = z.infer<typeof IpDataResponseSchema>;
export declare type PartialRouterConfig = z.input<typeof PartialRouterConfigSchema>;
export declare type RenewIp = (config: PartialRouterConfig) => Promise<boolean>;
export interface RenewableRouter extends EventEmitter {
readonly ip: string | undefined;
readonly lastCachedIp: string | undefined;
readonly attempts: number;
readonly history: IpHistory[];
init(): Promise<void>;
renew(): Promise<boolean>;
validateIp(ip: IpHistory | undefined): boolean;
}
//# sourceMappingURL=types.d.ts.map