import { IdInfo, PartnerParams, OptionsParam, TokenRequestParams } from './shared.js'; export declare class WebApi { /** * Creates an instance of WebApi. * @param {string} partner_id - Your Smile Partner ID * @param {string} default_callback - The default callback url to use for all requests. * @param {string} api_key - Your Smile API Key * @param {string|number} sid_server - The server to use for the SID API. 0 for * staging and 1 for production. */ partner_id: string; default_callback: string | null | undefined; api_key: string; url: string; constructor(partner_id: string, default_callback: string | null | undefined, api_key: string, sid_server: string | number); /** * Get the status of an existing job. * @param {{ * user_id: string, * job_id: string, * }} partner_params - the user_id and job_id of the job to check. * @param {{ * return_history: boolean, * return_images: boolean, * }} options - indicates whether to return the history and/or images. * @returns {Promise} A promise that resolves to the job status. * @throws {Error} If any of the required parameters are missing or if the request fails. * @memberof WebApi */ get_job_status(partner_params: PartnerParams, options: OptionsParam): Promise; /** * Get a authorization token for the hosted web integration. * @param {{ * callback_url: string, * user_id: string, * job_id: string, * product: string, * }} requestParams - parameters required to get an authorization token. * @returns {Promise<{ * token: string, * }>} - The authorization token. * @throws {Error} If any of the required parameters are missing or if the request fails. * @memberof WebApi */ get_web_token(requestParams: TokenRequestParams): Promise<{ token: string; }>; /** * Submit a job to Smile. * @param {{ * user_id: string, * job_id: string, * job_type: string|number, * }} partner_params - the user_id, job_id, and job_type of the job to submit. * Can additionally include optional parameters that Smile will return in the * job status. * @param {Array<{ * image_type_id: string|number, * image: string, * }>} image_details - an array of image objects. Each image object must include an image_type_id * and an image. See constants.js for a list of valid image_type_ids. * @param {{ * entered: boolean|string|undefined, * country: string|undefined, * id_type: string|undefined, * id_number: string|undefined, * }} id_info - ID information required to create a job. * @param {{ * optional_callback: string, * return_job_status: boolean, * return_images: boolean, * return_history: boolean, * use_enrolled_image: boolean * }} options - options to control the response. * @returns {Promise} A promise that resolves to the job status. * @throws {Error} If any of the required parameters are missing or if the request fails. * @memberof WebApi */ submit_job(partner_params: PartnerParams, image_details: Array<{ image_type_id: number; image: string; }>, id_info: IdInfo, options?: OptionsParam): Promise; }