mono/packages/search/lib/googlemaps.d.ts
2025-03-11 11:28:14 +01:00

259 lines
8.0 KiB
TypeScript

import * as CLI from 'yargs';
import { z } from 'zod';
import type { GoogleParameters } from "serpapi";
import { IScaleserpSearch } from './types';
import { IOptionsGoogleMaps, IOptionsGoogleMapsEach } from './types-googlemaps';
export declare enum SearchQueriesES {
INJECTION = "inyecci\u00F3n de plastico"
}
export declare const home: () => string;
export declare const locationString: (coords: string, zoom?: number) => string;
export declare const store: (storePath: string, ns?: string) => Promise<any>;
export declare const getStored: (title: string, storePath: string, ns?: string) => Promise<any>;
export declare const zodSchema: () => z.ZodObject<{
api_key: z.ZodOptional<z.ZodString>;
cache: z.ZodDefault<z.ZodBoolean>;
category: z.ZodDefault<z.ZodOptional<z.ZodString>>;
dst: z.ZodDefault<z.ZodString>;
dump: z.ZodOptional<z.ZodString>;
engine: z.ZodDefault<z.ZodString>;
env_key: z.ZodDefault<z.ZodString>;
filterCity: z.ZodOptional<z.ZodString>;
filterCountry: z.ZodOptional<z.ZodString>;
filterType: z.ZodOptional<z.ZodString>;
findEMail: z.ZodDefault<z.ZodBoolean>;
geocode_key: z.ZodOptional<z.ZodString>;
google_domain: z.ZodDefault<z.ZodString>;
headless: z.ZodDefault<z.ZodBoolean>;
language: z.ZodDefault<z.ZodString>;
limit: z.ZodDefault<z.ZodNumber>;
logLevel: z.ZodDefault<z.ZodString>;
meta: z.ZodDefault<z.ZodBoolean>;
searchCache: z.ZodDefault<z.ZodBoolean>;
query: z.ZodDefault<z.ZodString>;
searchCoord: z.ZodOptional<z.ZodString>;
searchFrom: z.ZodOptional<z.ZodString>;
source: z.ZodOptional<z.ZodString>;
type: z.ZodDefault<z.ZodOptional<z.ZodString>>;
zoom: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
index: z.ZodDefault<z.ZodString>;
store: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type?: string;
meta?: boolean;
api_key?: string;
cache?: boolean;
category?: string;
dst?: string;
dump?: string;
engine?: string;
env_key?: string;
filterCity?: string;
filterCountry?: string;
filterType?: string;
findEMail?: boolean;
geocode_key?: string;
google_domain?: string;
headless?: boolean;
language?: string;
limit?: number;
logLevel?: string;
searchCache?: boolean;
query?: string;
searchCoord?: string;
searchFrom?: string;
source?: string;
zoom?: number;
index?: string;
store?: string;
}, {
type?: string;
meta?: boolean;
api_key?: string;
cache?: boolean;
category?: string;
dst?: string;
dump?: string;
engine?: string;
env_key?: string;
filterCity?: string;
filterCountry?: string;
filterType?: string;
findEMail?: boolean;
geocode_key?: string;
google_domain?: string;
headless?: boolean;
language?: string;
limit?: number;
logLevel?: string;
searchCache?: boolean;
query?: string;
searchCoord?: string;
searchFrom?: string;
source?: string;
zoom?: number;
index?: string;
store?: string;
}>;
export declare const zodSchemaEachExtras: () => z.ZodObject<{
logLevel: z.ZodDefault<z.ZodString>;
log: z.ZodOptional<z.ZodString>;
country: z.ZodString;
area: z.ZodString;
list: z.ZodString;
cwd: z.ZodDefault<z.ZodOptional<z.ZodString>>;
env: z.ZodDefault<z.ZodString>;
profile: z.ZodDefault<z.ZodString>;
migrate: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
logLevel?: string;
log?: string;
country?: string;
area?: string;
list?: string;
cwd?: string;
env?: string;
profile?: string;
migrate?: boolean;
}, {
logLevel?: string;
log?: string;
country?: string;
area?: string;
list?: string;
cwd?: string;
env?: string;
profile?: string;
migrate?: boolean;
}>;
export declare const zodSchemaEach: () => z.ZodObject<z.objectUtil.extendShape<{
api_key: z.ZodOptional<z.ZodString>;
cache: z.ZodDefault<z.ZodBoolean>;
category: z.ZodDefault<z.ZodOptional<z.ZodString>>;
dst: z.ZodDefault<z.ZodString>;
dump: z.ZodOptional<z.ZodString>;
engine: z.ZodDefault<z.ZodString>;
env_key: z.ZodDefault<z.ZodString>;
filterCity: z.ZodOptional<z.ZodString>;
filterCountry: z.ZodOptional<z.ZodString>;
filterType: z.ZodOptional<z.ZodString>;
findEMail: z.ZodDefault<z.ZodBoolean>;
geocode_key: z.ZodOptional<z.ZodString>;
google_domain: z.ZodDefault<z.ZodString>;
headless: z.ZodDefault<z.ZodBoolean>;
language: z.ZodDefault<z.ZodString>;
limit: z.ZodDefault<z.ZodNumber>;
logLevel: z.ZodDefault<z.ZodString>;
meta: z.ZodDefault<z.ZodBoolean>;
searchCache: z.ZodDefault<z.ZodBoolean>;
query: z.ZodDefault<z.ZodString>;
searchCoord: z.ZodOptional<z.ZodString>;
searchFrom: z.ZodOptional<z.ZodString>;
source: z.ZodOptional<z.ZodString>;
type: z.ZodDefault<z.ZodOptional<z.ZodString>>;
zoom: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
index: z.ZodDefault<z.ZodString>;
store: z.ZodDefault<z.ZodString>;
}, {
logLevel: z.ZodDefault<z.ZodString>;
log: z.ZodOptional<z.ZodString>;
country: z.ZodString;
area: z.ZodString;
list: z.ZodString;
cwd: z.ZodDefault<z.ZodOptional<z.ZodString>>;
env: z.ZodDefault<z.ZodString>;
profile: z.ZodDefault<z.ZodString>;
migrate: z.ZodDefault<z.ZodBoolean>;
}>, "strip", z.ZodTypeAny, {
type?: string;
meta?: boolean;
api_key?: string;
cache?: boolean;
category?: string;
dst?: string;
dump?: string;
engine?: string;
env_key?: string;
filterCity?: string;
filterCountry?: string;
filterType?: string;
findEMail?: boolean;
geocode_key?: string;
google_domain?: string;
headless?: boolean;
language?: string;
limit?: number;
logLevel?: string;
searchCache?: boolean;
query?: string;
searchCoord?: string;
searchFrom?: string;
source?: string;
zoom?: number;
index?: string;
store?: string;
log?: string;
country?: string;
area?: string;
list?: string;
cwd?: string;
env?: string;
profile?: string;
migrate?: boolean;
}, {
type?: string;
meta?: boolean;
api_key?: string;
cache?: boolean;
category?: string;
dst?: string;
dump?: string;
engine?: string;
env_key?: string;
filterCity?: string;
filterCountry?: string;
filterType?: string;
findEMail?: boolean;
geocode_key?: string;
google_domain?: string;
headless?: boolean;
language?: string;
limit?: number;
logLevel?: string;
searchCache?: boolean;
query?: string;
searchCoord?: string;
searchFrom?: string;
source?: string;
zoom?: number;
index?: string;
store?: string;
log?: string;
country?: string;
area?: string;
list?: string;
cwd?: string;
env?: string;
profile?: string;
migrate?: boolean;
}>;
export declare const yargsOptions: (yargs: CLI.Argv) => CLI.Argv;
export declare const yargsOptionsEach: (yargs: CLI.Argv) => CLI.Argv;
export declare const searchVendor: (name: string, dst: string, opts: IScaleserpSearch) => Promise<import("./types").OrganicResult[]>;
export declare const defaultParamsGoogleES: (query: any, mixin: any) => any;
export declare const defaultSearchParamsMapsES: (query: any, zoom: any, mixin?: {}) => {
engine: string;
type: string;
q: any;
ll: string;
google_domain: string;
hl: string;
};
export declare const searchVendorSA: (query: string, location: string, key: string, opts: GoogleParameters) => Promise<import("serpapi").BaseResponse<GoogleParameters>>;
export declare const searchGoogleMap: (query: string, key: string, opts: any) => Promise<any[]>;
export declare const parse: (argv: any) => any;
export declare const resolvePath: (str: string, query: any, category: any, opts: any) => string;
export declare const googleMaps: (opts: IOptionsGoogleMaps) => Promise<any[][]>;
export declare const migrate: (opts: IOptionsGoogleMapsEach) => Promise<void[]>;
export declare const each: (opts: IOptionsGoogleMapsEach) => Promise<any[]>;