UNPKG

sygic-custom-url

Version:
263 lines (262 loc) 7.35 kB
export declare const ACTION_TYPE: { DRIVE: string; SHOW: string; WALK: string; }; export declare const ACTION: { ACTIVATE: string; ADDRESS: string; BACK_BUTTON: string; COORDINATE: string; COORDINATEADDR: string; DEVICECODE: string; GPSLOG: string; LOGIN: string; MYSYGIC: string; MYSYGICBUY: string; MYSYGICPRODUCT: string; RESTORE: string; ROUTE: string; SETTINGSOVERWRITE: string; TRUCKSETTINGS: string; UPDATE: string; URL: string; }; export declare const TRUCK_ROUTING_TYPE: { CAMPER: string; CAR: string; TRUCK: string; VAN: string; }; export interface ITruckSettings { [key: string]: number | string; mxs?: number; wei?: number; axw?: number; len?: number; wid?: number; hei?: number; rou?: string; } export declare const SCHEME: string; export declare const ACTIONS_SEPARATOR: string; export declare const OPTIONS_SEPARATOR: string; export declare const TRUCK_SETTINGS_SEPARATOR: string; /** * Service that creates sygic custom urls */ export declare class CustomUrlService { /** * Get url to show address on map * * @param {string} country Country or iso code. * @param {string} city City. * @param {string} postal Postal code. * @param {string} street Street. * @param {string} houseNumber House number. * * @returns {string} Url; */ showAddress(country: string, city: string, postal: string, street: string, houseNumber: string): string; /** * Get url to drive to an address * * @param {string} country Country or iso code. * @param {string} city City. * @param {string} postal Postal code. * @param {string} street Street. * @param {string} houseNumber House number. * * @returns {string} Url; */ driveAddress(country: string, city: string, postal: string, street: string, houseNumber: string): string; /** * Get url to walk to an address * * @param {string} country Country or iso code. * @param {string} city City. * @param {string} postal Postal code. * @param {string} street Street. * @param {string} houseNumber House number. * * @returns {string} Url; */ walkAddress(country: string, city: string, postal: string, street: string, houseNumber: string): string; /** * Show coordinates on map * @param {number} lon Longitude. * @param {number} lat Latitude * * @returns {string} Url; */ showCoordinates(lon: number, lat: number): string; /** * Drive to coordinates * @param {number} lon Longitude. * @param {number} lat Latitude * * @returns {string} Url; */ driveCoordinates(lon: number, lat: number): string; /** * Walk to coordinates * @param {number} lon Longitude. * @param {number} lat Latitude * * @returns {string} Url; */ walkCoordinates(lon: number, lat: number): string; /** * Drive to coordinates with defining address description * @param {number} lon Longitude. * @param {number} lat Latitude * @param {string} desc Description. * * @returns {string} Url; */ driveCoordinateaddr(lon: number, lat: number, desc: string): string; /** * Loads json itinerary * @param {string} route sif or json * * @returns {string} Url; */ route(route: string): string; /** * opens web page directly in navigation * @param {string} webpage Page to open. * * @returns {string} Url; */ url(webpage: string): string; /** * activate license with product code * @param {string} productCode Product code * * @returns {string} Url; */ activate(productCode: string): string; /** * Start navigation and login with username * * @param {string} user User name. * @param {password} password Password. * * @returns {string} Url; */ login(user: string, password: string): string; /** * Update specific map or all maps. * Note: the call starts downloading maps immediately * but removes old maps with the application restart. * This means that at the certain moment both maps * are present in your filesystem, so your memory limits * can be hit. * @param {string} map Map to update or all. * * @returns {string} Url; */ update(map: string): string; /** * Show sygic products' shop. * * @returns {string} Url; */ mysygic(): string; /** * Show product detail from shop. * * @param productId Product id. * * @returns {string} Url; */ mysygicproduct(productId: string): string; /** * Buy a license for a product * * @param {string} productId Product id. * * @returns {string} Url; */ mysygicbuy(productId: string): string; /** * Restore all purchases * * * @returns {string} Url; */ restore(): string; /** * Play gps nmea log from Res/gpslog * * @param {string} nmeafile * @returns {string} Url; */ gpslog(nmeafile: string): string; /** * Control truck settings * @param {ITruckSettings} truckSettings Truck settings * @returns {string} Url; */ truckSettings(truckSettings: ITruckSettings): string; /** * Define back button behavior * @param {string} applicationIdentifier * @returns {string} Url; */ backButton(applicationIdentifier: string): string; /** * Overwrite app settings. * * @param {string} filePath File path of settings. * @returns {string} Url; */ settingsOverwrite(filePath: string): string; /** * Get device code * * @returns {string} Url; */ deviceCode(): string; multipleActions(actions: [{ action: string; args: any[]; }]): string; /** * Generates a sygic custom url for given action and options. * * @param {action} action Url action * @param {any} args Options for action * * @returns {string} Url; */ private genCustomUrl(action, ...args); /** * Get custom url for path. * @param {string} path Path of URL. * @returns {string} Url; */ private getCustomUrl(path); /** * Prepare multiple actions * * @param {{ACTION, any[]}[]} actions Actions to prepare * @returns {string} Actions prepared for custom url */ private prepareActions(actions); /** * Prepare action for url; * * @param {ACTION} action Url action. * @param {any[]} args Args for custom url. including action. * @returns {string} Args prepared for url. */ private prepareAction(action, ...args); /** * Prepare options for url; * * @param {any[]} args Args for custom url. including action. * @returns {string} Args prepared for url. */ private prepareOptions(args); }