import { Service } from '../../services/service'; export declare const SUBSCRIBE_SVC = "SubscribeService"; export declare class SubscribeService extends Service { private logger; private contactService; private errorHelperService; private settingsService; private authService; static getInstance(): SubscribeService; static build(): SubscribeService; private constructor(); /** * Sends subscribe email (API request to https://api.openrainbow.org/enduser/#api-notifications_emails-sendSelfRegisterEmail Rainbow End User portal - notifications emails - Self-register email) * Method sends a self-register email to a user. A temporary user token is generated and send in the email body. This token is required in the self register validation workflow * @param email - Email of the user requesting a self-register email with a temporary token * Size range: 3..255 * Allowed values: "/^[a-zA-Z0-9_\+-]+(\.[a-zA-Z0-9_\+-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.([a-zA-Z]{2,4})$/" * @returns A promise that resolves when subscribe is done */ sendSubscribeEmail(email: string): Promise; /** * Sends subscribe email (API request to https://api.openrainbow.org/enduser/#api-users-registerMyself Rainbow End User portal - users - Self register a user) * Method allows a user to self register a user account in Rainbow application. * @param loginEmail - User email address (used for login). Must be unique (409 error is returned if a user already exists with the same email address). * @param newPassword - User password. Rules: more than 8 characters, at least 1 capital letter, 1 number, 1 special character. Size range: 8..64 * @param temporaryToken - User temporary token (obtained from sendSubscribeEmail) (do not use if invitationId, joinCompanyInvitationId, joinCompanyLinkId or openInviteId is specified). * @param invitationId - User invitation unique identifier (like 569ce8c8f9336c471b98eda4) (obtained from POST /api/rainbow/enduser/v1.0/users/:userId/invitations API) (do not use if temporaryToken, joinCompanyInvitationId, joinCompanyLinkId or openInviteId is specified). * @param joinCompanyInvitationId - Join company invitation unique identifier (like 5819ed7c9547b313509237d6) (obtained from POST /api/rainbow/admin/v1.0/companies/:companyId/join-companies/invitations API) * (do not use if temporaryToken, invitationId, joinCompanyLinkId or openInviteId is specified). * @param joinRoomConfId - deprecated * @param openInviteId - A Rainbow user is sharing with co-workers an unique URL to join a meeting. * This URL is used by somebody not yet a Rainbow user (doesn't have a Rainbow account). * * Some explanations about this use case: * * Each user has a personal UUID. * In the api documentation, this UUID is called openInviteId. It can be generated on demand. * The public URL is based on this openInviteId (ex: https://web.openrainbow.com/#/invite?invitationId=0fc06e0ce4a849fcbe214ae5e1107417&scenario=public-url) * Refer to /api/rainbow/enduser/v1.0/users/:userId/open-invites/xxxx API(s) to manage the openInviteId * @param visibility - User visibility * Define if the user can be searched by users being in other company and if the user can search users being in other companies. * Visibility can be: * same_than_company: The same visibility than the user's company's is applied to the user. When this user visibility is used, if the visibility of the company is * changed the user's visibility will use this company new visibility. * public: User can be searched by external users / can search external users. User can invite external users / can be invited by external users * private: User can't be searched by external users / can search external users. User can invite external users / can be invited by external users * closed: User can't be searched by external users / can't search external users. User can invite external users / can be invited by external users * isolated: User can't be searched by external users / can't search external users. User can't invite external users / can't be invited by external users * none: Default value reserved for guest. User can't be searched by any users (even within the same company) / can search external users. * User can invite external users / can be invited by external users External users mean 'public user not being in user's company nor user's organisation nor a company visible by user's company. * @returns A promise that resolves when subscribe is done */ subscribe(loginEmail: string, newPassword: string, temporaryToken?: string, invitationId?: string, joinCompanyInvitationId?: string, joinRoomConfId?: string, openInviteId?: string, visibility?: string): Promise; /** * Sends subscribe email (API request to https://api.openrainbow.org/enduser/#api-notifications_emails-sendResetPasswordEmail Rainbow End User portal - notifications emails - Reset-password email) * Method allows to send a reset-password email to a user. * A temporary user token is generated and sent in the email body. This token is required in the reset password validation workflow (see documentation of related API: PUT /api/rainbow/enduser/v1.0/users/reset-password for more information). * Note: A rainbow user with the role guest can't reset his password. * @param email - Email of the user requesting a reset-password email with a temporary token * Size range: 3..255 * Allowed values: "/^[a-zA-Z0-9_\+-]+(\.[a-zA-Z0-9_\+-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.([a-zA-Z]{2,4})$/" * @returns A promise that resolves when reset is done */ sendResetPasswordEmail(email: string): Promise; /** * Sends new password (API request to {@link https://api.openrainbow.org/enduser/#api-password-resetPassword} Rainbow End User portal - password - Reset user password) * Method allow user to reset his password (i.e. change his password when he does not remember his current password). * This API requires a temporary user token to validate that this is well the user who reset his password. * Clients have to first call POST /api/rainbow/enduser/v1.0/notifications/emails/reset-password so that user receive an email with a temporary token. * User enters this token and his new password, and Clients have to call PUT /api/rainbow/enduser/v1.0/users/:userId/reset-password with this code and the new password. * Note than when user password is reset, all user's previously generated JWT are revoked and jid_password of its jid_im and jid_tel is updated with a new password. All connected jid_im and jid_tel resources are also disconnected. * Therefore, clients have to login again with this user in order to retrieve a new valid JWT and its new jid_password. * @param loginEmail - User login email address. Size range: 3..255 * @param newPassword - New user password. Size range: 8..64 * @param temporaryToken - User temporary token (obtained from POST /api/rainbow/enduser/v1.0/notifications/emails/reset-password API). Size range: 6 * @returns A promise that resolves when reset is done */ sendNewPassword(loginEmail: string, newPassword: string, temporaryToken: string): Promise; /** * Creates a user invitation (API request to https://api.openrainbow.org/enduser/#api-invitations-createUserInvitation Rainbow End User portal - invitations - Create a user invitation) * Method allow logged in user to invite another user. * @param email - Invited user email address. Size range: 3..255 * @returns A promise that resolves when invite is done */ inviteUserByEmail(email: string): Promise; } //# sourceMappingURL=subscribe.service.d.ts.map