import { Observable } from 'rxjs'; import { MainService } from '../main/main.service'; import { SystemConnection, User, LoginCredentials, CreatedUser, PasswordReset, PasswordResetResponse } from '../models'; import * as i0 from "@angular/core"; /** * user service for drupal * @see BACK_END/admin/structure/services/list/END_POINT/resources for more details */ export declare class UserService extends MainService { entityType: string; /** * implement retrive resource * @param uid user id to retrive * @return user object */ getUserById(uid: number): Observable; /** * implement index resource * @return array of users * Please notice that the user must have the required permission to do this action */ getUsersList(): Observable; /** * implement create resource * @param user user to create * @return created user details */ createUser(user: User): Observable; /** * implement update resource * @param user user object to update * @return updated user object */ updateUser(user: User): Observable; /** * implement delete * @param uid user id to delete * @return array of boolean, if user deleted will be true, otherwise will be false */ deleteUser(uid: number): Observable; /** * implement login resource * @param user credentials to login "username and password" * @return system connection that contains the session details and the user object * notice that the user login version must be of version 1.0 at the resources settions at the back-end */ login(user: LoginCredentials): Observable; /** * implement logout resource * @return new token after logging out */ logout(): Observable; /** * implement request_new_password resource * @param useranme the username of the user to request a new password * @return array of boolean, if the mail sent successfully will be true, otherwhise will be false. * if the server is not a mail server or if there is not mail server configuration this will always return false */ requestNewPassword(useranme: string): Observable; /** * implement user_pass_reset resource * @param passwordReset Object of the sent details to the email that contains the timestamp and the hashed password * @return response of the password reset request * this request will automatically logging the user in for only one time and will be expired after the first use. * the hashed password can be found at the drupal reset password email and you can customize it if you have token module installed */ userPasswordReset(passwordReset: PasswordReset): Observable; /** * implement register resource * @param user object to register new account * some properties is required if it is set at the account settings inside the drupal admin config * @see http://BACKEND/admin/config/people/accounts * @return created user details */ registerAccount(user: User): Observable; /** * implement cancel resource * @param uid the user id to cancel * @return array of boolean, true if canceled, false otherwhise * Please notice the cancelation settings is managed at the backend * @see http://BACKEND/admin/config/people/accounts */ cancelUser(uid: number): Observable; /** * implement password_reset resource * @param uid user id to reset his password * @return array of boolean, true if user password has been resetted, false otherwhise */ passwordReset(uid: number): Observable; /** * implement resend_welcome_email * @param uid user id to send the email for his account * @return array of boolean, if the mail sent successfully will be true, otherwhise will be false. * if the server is not a mail server or if there is not mail server configuration this will always return false */ resendWelcomeEmail(uid: number): Observable; /** * implement token */ token(): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }