import toughCookie from "tough-cookie"; import { RegistrationInfo, RegistrationToken, SkypeToken } from "../interfaces/api/context"; import * as io from "../interfaces/http-io"; /** * Get the registration token used to subscribe to resources. * * @param io Cookies and HTTP library to use. * @param cookies Cookie jar to use. * @param skypeToken The Skype to use for authentication. * @param messagesHostname Hostname of the messages server. * @param retries Number of request retries before emitting an error. Example: if `retries` is `1`, this function * will send 1 or 2 requests. * @param proxy proxy to use * @return Registration token * @throws [[EndpointRegistrationError]] */ export declare function registerEndpoint(io: io.HttpIo, cookies: toughCookie.Store, skypeToken: SkypeToken, messagesHostname: string, retries?: number, proxy?: string): Promise; export declare function updateRegistrationInfo(io: io.HttpIo, cookies: toughCookie.Store, skypeToken: SkypeToken, registrationToken: RegistrationToken, proxy?: string): Promise; /** * Parse the `Set-Registrationtoken` header of an endpoint registration response. * * This header has the following shape: "registrationToken=someString; expires=someNumber; endpointId={someString}" * * @param hostname Name of the hostname for this registration token. * @param header String value of the `Set-Registration` header. * @return Parsed registration token */ export declare function readSetRegistrationTokenHeader(hostname: string, header: string): RegistrationToken;