From 300b9a9b9874e3932bd9f517178d3364dbd2f472 Mon Sep 17 00:00:00 2001 From: Rukayat Zakariyau Date: Wed, 19 Feb 2025 04:41:19 -0800 Subject: [PATCH 1/3] Update on compodoc and swagger documentation --- documentation/classes/CreateUserDto-1.html | 773 +++++++++++ documentation/classes/CreateUserDto.html | 763 +++++++++++ documentation/classes/EditUserDto.html | 324 +++++ documentation/classes/GetuserParamDto.html | 318 +++++ documentation/classes/GoogleTokenDto.html | 311 +++++ .../classes/MatchPasswordsConstraint-1.html | 559 ++++++++ .../classes/MatchPasswordsConstraint.html | 575 ++++++++ documentation/classes/RefreshTokenDto.html | 314 +++++ documentation/classes/SignInDto.html | 366 +++++ documentation/controllers/AppController.html | 16 +- documentation/controllers/AuthController.html | 513 +++++++ .../controllers/ChatRoomsController.html | 521 +++++++ .../GoogleAuthenticationController.html | 388 ++++++ .../controllers/MessagesController.html | 435 ++++++ documentation/controllers/UserController.html | 776 +++++++++++ documentation/coverage.html | 480 ++++++- documentation/dependencies.html | 6 + documentation/entities/ChatRoom.html | 508 +++++++ documentation/entities/Message.html | 505 +++++++ documentation/entities/User.html | 744 ++++++++++ documentation/graph/dependencies.svg | 342 ++++- documentation/guards/AccessTokenGuard.html | 564 ++++++++ documentation/guards/AuthGuardGuard.html | 494 +++++++ .../images/coverage-badge-documentation.svg | 6 +- documentation/injectables/AppService.html | 18 +- documentation/injectables/AuthService.html | 511 +++++++ documentation/injectables/BcryptProvider.html | 438 ++++++ .../injectables/ChatRoomsService.html | 705 ++++++++++ .../injectables/CreateGoogleUserProvider.html | 442 ++++++ .../injectables/CreateUserProvider.html | 510 +++++++ documentation/injectables/FindOneByEmail.html | 436 ++++++ .../FindOneByGoogleIdProvider.html | 398 ++++++ .../injectables/GenerateTokensProvider.html | 612 +++++++++ .../GoogleAuthenticationService.html | 618 +++++++++ .../injectables/HashingProvider.html | 423 ++++++ .../injectables/MessagesService.html | 495 +++++++ .../injectables/RefreshTokensProvider.html | 464 +++++++ documentation/injectables/SignInProvider.html | 453 +++++++ documentation/injectables/UserService.html | 1205 +++++++++++++++++ documentation/interfaces/ActiveUserData.html | 345 +++++ documentation/interfaces/GoogleInterface.html | 432 ++++++ documentation/js/menu-wc.js | 348 ++++- documentation/js/menu-wc_es5.js | 2 +- documentation/js/search/search_index.js | 4 +- documentation/miscellaneous/enumerations.html | 299 ++++ documentation/miscellaneous/functions.html | 9 + documentation/miscellaneous/variables.html | 335 +++++ documentation/modules.html | 85 ++ documentation/modules/AppModule.html | 161 ++- .../modules/AppModule/dependencies.svg | 104 +- documentation/modules/AuthModule.html | 440 ++++++ .../modules/AuthModule/dependencies.svg | 126 ++ documentation/modules/ChatroomsModule.html | 316 +++++ .../modules/ChatroomsModule/dependencies.svg | 50 + .../modules/GoogleAuthticationModule.html | 307 +++++ .../GoogleAuthticationModule/dependencies.svg | 50 + documentation/modules/MessagesModule.html | 316 +++++ .../modules/MessagesModule/dependencies.svg | 50 + documentation/modules/UserModule.html | 409 ++++++ .../modules/UserModule/dependencies.svg | 114 ++ documentation/overview.html | 380 +++++- package-lock.json | 444 +++++- src/app.controller.ts | 3 + src/app.service.ts | 5 +- src/auth/auth.controller.ts | 33 +- src/auth/constants/auth.constant.ts | 4 + src/auth/decorators/activeUser.decorator.ts | 3 + src/auth/decorators/auth.decorator.ts | 1 + src/auth/dtos/refreshTokenDto.ts | 3 + src/auth/dtos/userDto.ts | 3 + src/auth/enums/authTypes.enum.ts | 1 + .../guard/access-token/access-token.guard.ts | 194 ++- src/auth/guard/auth-guard/auth-guard.guard.ts | 133 +- src/auth/interface/activeInterface.ts | 5 + src/auth/providers/auth.service.ts | 11 +- src/auth/providers/bcrypt.ts | 6 +- .../providers/generate-tokens.provider.ts | 47 +- src/auth/providers/hashing.ts | 5 +- src/auth/providers/refresh-tokens.provider.ts | 11 +- src/auth/providers/sign-in.provider.ts | 12 +- src/auth/social/dtos/google-token.dto.ts | 3 + .../google-authentication.controller.ts | 24 +- src/auth/social/interfaces/user.interface.ts | 6 + .../google-authentication.service.ts | 27 +- src/chatrooms/chatroom.controller.ts | 4 + src/chatrooms/chatroom.entity.ts | 8 + src/chatrooms/chatrooms.module.ts | 1 + .../chatrooms/chatrooms.service.spec.ts | 28 +- .../providers/chatrooms/chatrooms.service.ts | 44 +- src/main.ts | 16 +- src/messages/message.entity.ts | 8 + src/messages/messages.controller.ts | 5 + src/messages/messages.module.ts | 1 + .../messages/messages.service.spec.ts | 1 + .../providers/messages/messages.service.ts | 7 +- src/users/DTOs/create-user.dto.ts | 76 +- src/users/DTOs/getUserparamdto.ts | 2 + src/users/DTOs/patch-user.dto.ts | 3 +- src/users/Enums/userRole.enum.ts | 1 + src/users/provider/create-user.provider.ts | 51 +- src/users/provider/find-one-by-email.ts | 20 +- src/users/provider/find-one-by-googleId.ts | 5 + src/users/provider/googleUserProvider.ts | 26 +- src/users/provider/user.service.ts | 72 +- src/users/user.controller.ts | 49 +- src/users/user.entitly.ts | 41 +- 106 files changed, 24082 insertions(+), 382 deletions(-) create mode 100644 documentation/classes/CreateUserDto-1.html create mode 100644 documentation/classes/CreateUserDto.html create mode 100644 documentation/classes/EditUserDto.html create mode 100644 documentation/classes/GetuserParamDto.html create mode 100644 documentation/classes/GoogleTokenDto.html create mode 100644 documentation/classes/MatchPasswordsConstraint-1.html create mode 100644 documentation/classes/MatchPasswordsConstraint.html create mode 100644 documentation/classes/RefreshTokenDto.html create mode 100644 documentation/classes/SignInDto.html create mode 100644 documentation/controllers/AuthController.html create mode 100644 documentation/controllers/ChatRoomsController.html create mode 100644 documentation/controllers/GoogleAuthenticationController.html create mode 100644 documentation/controllers/MessagesController.html create mode 100644 documentation/controllers/UserController.html create mode 100644 documentation/entities/ChatRoom.html create mode 100644 documentation/entities/Message.html create mode 100644 documentation/entities/User.html create mode 100644 documentation/guards/AccessTokenGuard.html create mode 100644 documentation/guards/AuthGuardGuard.html create mode 100644 documentation/injectables/AuthService.html create mode 100644 documentation/injectables/BcryptProvider.html create mode 100644 documentation/injectables/ChatRoomsService.html create mode 100644 documentation/injectables/CreateGoogleUserProvider.html create mode 100644 documentation/injectables/CreateUserProvider.html create mode 100644 documentation/injectables/FindOneByEmail.html create mode 100644 documentation/injectables/FindOneByGoogleIdProvider.html create mode 100644 documentation/injectables/GenerateTokensProvider.html create mode 100644 documentation/injectables/GoogleAuthenticationService.html create mode 100644 documentation/injectables/HashingProvider.html create mode 100644 documentation/injectables/MessagesService.html create mode 100644 documentation/injectables/RefreshTokensProvider.html create mode 100644 documentation/injectables/SignInProvider.html create mode 100644 documentation/injectables/UserService.html create mode 100644 documentation/interfaces/ActiveUserData.html create mode 100644 documentation/interfaces/GoogleInterface.html create mode 100644 documentation/miscellaneous/enumerations.html create mode 100644 documentation/miscellaneous/variables.html create mode 100644 documentation/modules/AuthModule.html create mode 100644 documentation/modules/AuthModule/dependencies.svg create mode 100644 documentation/modules/ChatroomsModule.html create mode 100644 documentation/modules/ChatroomsModule/dependencies.svg create mode 100644 documentation/modules/GoogleAuthticationModule.html create mode 100644 documentation/modules/GoogleAuthticationModule/dependencies.svg create mode 100644 documentation/modules/MessagesModule.html create mode 100644 documentation/modules/MessagesModule/dependencies.svg create mode 100644 documentation/modules/UserModule.html create mode 100644 documentation/modules/UserModule/dependencies.svg diff --git a/documentation/classes/CreateUserDto-1.html b/documentation/classes/CreateUserDto-1.html new file mode 100644 index 0000000..e939885 --- /dev/null +++ b/documentation/classes/CreateUserDto-1.html @@ -0,0 +1,773 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
+
+ + +
+
+ + + + + + + + + + + + + + + + +
+
+

+

File

+

+

+ src/auth/guard/access-token/access-token.guard.ts +

+ + +

+

Description

+

+

+

CreateUserDto class representing the user creation request payload.

+ +

+ + + + +
+

Index

+ + + + + + + + + + + + + + + +
+
Properties
+
+ +
+
+ + +
+ +

+ Properties +

+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + Optional + confirmpassword + + +
+ Type : string + +
+ Decorators : +
+ + @ApiProperty({type: 'string', example: '@Password123', description: 'Password should contain numbers, alphabets, and uppercase and should be the same as the password.'})
@IsString()
@MaxLength(225)
@Validate(MatchPasswordsConstraint)
+
+
+ +
+

Confirm password field, must match the password.

+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + email + + +
+ Type : string + +
+ Decorators : +
+ + @ApiProperty({type: 'string', example: 'fatimaaminu@mail.com', description: 'Email field'})
@IsEmail()
@MaxLength(150)
@Column({unique: true, length: 150})
+
+
+ +
+

Email field (must be unique).

+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + firstName + + +
+ Type : string + +
+ Decorators : +
+ + @ApiProperty({type: 'string', example: 'Fatima', description: 'First name field'})
@IsString()
@IsNotEmpty()
@MaxLength(100)
+
+
+ +
+

First name of the user.

+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + Optional + googleId + + +
+ Type : string + +
+ Decorators : +
+ + @ApiProperty({type: 'string', example: 'poiuytrdspoiuytrewazxcvbnmml;poiuytrdsdcvbnm]', description: 'This is autogenerated from Google when you sign up with Google.'})
@IsString()
@IsOptional()
@MaxLength(225)
+
+
+ +
+

Google ID (used for OAuth authentication).

+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + lastName + + +
+ Type : string + +
+ Decorators : +
+ + @ApiProperty({type: 'string', example: 'Aminu', description: 'Last name field'})
@IsString()
@IsOptional()
@MaxLength(100)
+
+
+ +
+

Last name of the user.

+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + Optional + password + + +
+ Type : string + +
+ Decorators : +
+ + @ApiProperty({type: 'string', example: '@Password123', description: 'Password should contain numbers, alphabets, and uppercase.'})
@IsString()
@MaxLength(225)
@Matches(/^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/, {message: 'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.'})
+
+
+ +
+

Password field with specific validation rules.

+
+
+ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + Optional + userRole + + +
+ Type : userRole + +
+ Decorators : +
+ + @ApiProperty({enum: userRole, example: undefined, description: 'User role (default is USER if not provided).'})
@IsEnum(userRole)
@IsOptional()
@Transform( => )
+
+
+ +
+

User role (default is USER if not provided).

+
+
+
+ + + + + + + +
+ + +
+
import {
+  IsString,
+  IsEmail,
+  IsNotEmpty,
+  IsEnum,
+  IsOptional,
+  Validate,
+  MaxLength,
+  Matches,
+  ValidatorConstraint,
+  ValidatorConstraintInterface,
+  ValidationArguments,
+} from 'class-validator';
+import { ApiProperty } from '@nestjs/swagger';
+import { Column } from 'typeorm';
+import { userRole } from '../Enums/userRole.enum';
+import { Transform } from 'class-transformer';
+
+/**
+ * ValidatorConstraint: Custom validation class to ensure that
+ * the confirmPassword field matches the password field.
+ */
+@ValidatorConstraint({ name: 'MatchPasswords', async: false })
+/**
+ * MatchPasswordsConstraint class that implements ValidatorConstraintInterface
+ */
+
+/**MatchPasswordConstraint implementing ValidatorConstraintInterface */
+class MatchPasswordsConstraint implements ValidatorConstraintInterface {
+  validate(confirmPassword: string, args: ValidationArguments): boolean {
+    const object = args.object as CreateUserDto;
+
+    /** Ensure password is present before checking match */
+    if (!object.password) return false;
+    return confirmPassword === object.password;
+  }
+
+  defaultMessage(args: ValidationArguments): string {
+    return 'Password and confirm password do not match';
+  }
+}
+
+/**
+ * CreateUserDto class representing the user creation request payload.
+ */
+export class CreateUserDto {
+  /**
+   * First name of the user.
+   */
+  @ApiProperty({
+    type: 'string',
+    example: 'Fatima',
+    description: 'First name field',
+  })
+  @IsString()
+  @IsNotEmpty()
+  @MaxLength(100)
+  firstName: string;
+
+  /**
+   * Last name of the user.
+   */
+  @ApiProperty({
+    type: 'string',
+    example: 'Aminu',
+    description: 'Last name field',
+  })
+  @IsString()
+  @IsOptional()
+  @MaxLength(100)
+  lastName: string;
+
+  /**
+   * Email field (must be unique).
+   */
+  @ApiProperty({
+    type: 'string',
+    example: 'fatimaaminu@mail.com',
+    description: 'Email field',
+  })
+  @IsEmail()
+  @MaxLength(150)
+  @Column({ unique: true, length: 150 })
+  email: string;
+
+  /**
+   * Password field with specific validation rules.
+   */
+  @ApiProperty({
+    type: 'string',
+    example: '@Password123',
+    description: 'Password should contain numbers, alphabets, and uppercase.',
+  })
+  @IsString()
+  @MaxLength(225)
+  @Matches(
+    /^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/,
+    {
+      message:
+        'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.',
+    },
+  )
+  password?: string;
+
+  /**
+   * Confirm password field, must match the password.
+   */
+  @ApiProperty({
+    type: 'string',
+    example: '@Password123',
+    description:
+      'Password should contain numbers, alphabets, and uppercase and should be the same as the password.',
+  })
+  @IsString()
+  @MaxLength(225)
+  @Validate(MatchPasswordsConstraint)
+  confirmpassword?: string;
+
+  /**
+   * User role (default is USER if not provided).
+   */
+  @ApiProperty({
+    enum: userRole,
+    example: userRole.USER,
+    description: 'User role (default is USER if not provided).',
+  })
+  @IsEnum(userRole)
+  @IsOptional()
+  @Transform(({ value }) => value ?? userRole.USER)
+  userRole?: userRole;
+
+  /**
+   * Google ID (used for OAuth authentication).
+   */
+  @ApiProperty({
+    type: 'string',
+    example: 'poiuytrdspoiuytrewa\zxcvbnmml;poiuytrdsdcvbnm]',
+    description: 'This is autogenerated from Google when you sign up with Google.',
+  })
+  @IsString()
+  @IsOptional()
+  @MaxLength(225)
+  googleId?: string;
+}
+
+
+
+ + + + + + + + + +
+
+

results matching ""

+
    +
    +
    +

    No results matching ""

    +
    +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/CreateUserDto.html b/documentation/classes/CreateUserDto.html new file mode 100644 index 0000000..95da377 --- /dev/null +++ b/documentation/classes/CreateUserDto.html @@ -0,0 +1,763 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
    +
    + + +
    +
    + + + + + + + + + + + + + + + + +
    +
    +

    +

    File

    +

    +

    + src/users/DTOs/create-user.dto.ts +

    + + +

    +

    Description

    +

    +

    +

    DTO for creating a user.

    + +

    + + + + +
    +

    Index

    + + + + + + + + + + + + + + + +
    +
    Properties
    +
    + +
    +
    + + +
    + +

    + Properties +

    + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + Optional + confirmpassword + + +
    + Type : string + +
    + Decorators : +
    + + @ApiProperty({type: 'string', example: '@Password123', description: 'Must contain numbers, alphabets, uppercase letters, and match the password'})
    @IsString()
    @MaxLength(225)
    @Validate(MatchPasswordsConstraint)
    +
    +
    + +
    +

    Confirm password field, must match the password.

    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + email + + +
    + Type : string + +
    + Decorators : +
    + + @ApiProperty({type: 'string', example: 'fatimaaminu@mail.com', description: 'Email field'})
    @IsEmail()
    @MaxLength(150)
    @Column({unique: true, length: 150})
    +
    +
    + +
    +

    Email field (must be unique).

    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + firstName + + +
    + Type : string + +
    + Decorators : +
    + + @ApiProperty({type: 'string', example: 'Fatima', description: 'First name field'})
    @IsString()
    @IsNotEmpty()
    @MaxLength(100)
    +
    +
    + +
    +

    First name of the user.

    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + Optional + googleId + + +
    + Type : string + +
    + Decorators : +
    + + @ApiProperty({type: 'string', example: 'poiuytrdspoiuytrewazxcvbnmml;poiuytrdsdcvbnm]', description: 'This is auto-generated from Google when you sign up with Google'})
    @IsString()
    @IsOptional()
    @MaxLength(225)
    +
    +
    + +
    +

    Google ID (used for OAuth authentication).

    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + lastName + + +
    + Type : string + +
    + Decorators : +
    + + @ApiProperty({type: 'string', example: 'Aminu', description: 'Last name field'})
    @IsString()
    @IsOptional()
    @MaxLength(100)
    +
    +
    + +
    +

    Last name of the user.

    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + Optional + password + + +
    + Type : string + +
    + Decorators : +
    + + @ApiProperty({type: 'string', example: '@Password123', description: 'Password should contain a number, alphabets, and an uppercase letter'})
    @IsString()
    @MaxLength(225)
    @Matches(/^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/, {message: 'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.'})
    +
    +
    + +
    +

    Password field with specific validation rules.

    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + Optional + userRole + + +
    + Type : userRole + +
    + Decorators : +
    + + @ApiProperty({enum: userRole, description: 'Role of the user'})
    @IsEnum(userRole)
    @IsOptional()
    @Transform( => )
    +
    +
    + +
    +

    User role (default is USER if not provided).

    +
    +
    +
    + + + + + + + +
    + + +
    +
    import {   IsString,   IsEmail,   IsNotEmpty,   IsEnum,   IsOptional,   Validate,   MaxLength,   Matches,   ValidatorConstraint,   ValidatorConstraintInterface,   ValidationArguments, } from 'class-validator';
    +import { ApiProperty } from '@nestjs/swagger';
    +import { Column } from 'typeorm';
    +import { userRole } from '../Enums/userRole.enum';
    +import { Transform } from 'class-transformer';
    +
    +/**
    + * ValidatorConstraint: Custom validation class to ensure that
    + * the confirmPassword field matches the password field.
    + */
    +@ValidatorConstraint({ name: 'MatchPasswords', async: false })
    +export class MatchPasswordsConstraint implements ValidatorConstraintInterface {
    +  /**
    +   * Validates whether the confirmPassword field matches the password field.
    +   * @param confirmPassword - The confirm password input.
    +   * @param args - Validation arguments.
    +   * @returns Boolean indicating if passwords match.
    +   */
    +  validate(confirmPassword: string, args: ValidationArguments): boolean {
    +    const object = args.object as CreateUserDto;
    +    if (!object.password) return false; // Ensure password is present
    +    return confirmPassword === object.password;
    +  }
    +
    +  /**
    +   * Returns the default error message for password mismatch.
    +   * @param args - Validation arguments.
    +   * @returns Error message string.
    +   */
    +  defaultMessage(args: ValidationArguments): string {
    +    return 'Password and confirm password do not match';
    +  }
    +}
    +
    +/**
    + * DTO for creating a user.
    + */
    +export class CreateUserDto {
    +  /**
    +   * First name of the user.
    +   */
    +  @ApiProperty({
    +    type: 'string',
    +    example: 'Fatima',
    +    description: 'First name field',
    +  })
    +  @IsString()
    +  @IsNotEmpty()
    +  @MaxLength(100)
    +  firstName: string;
    +
    +  /**
    +   * Last name of the user.
    +   */
    +  @ApiProperty({
    +    type: 'string',
    +    example: 'Aminu',
    +    description: 'Last name field',
    +  })
    +  @IsString()
    +  @IsOptional()
    +  @MaxLength(100)
    +  lastName: string;
    +
    +  /**
    +   * Email field (must be unique).
    +   */
    +  @ApiProperty({
    +    type: 'string',
    +    example: 'fatimaaminu@mail.com',
    +    description: 'Email field',
    +  })
    +  @IsEmail()
    +  @MaxLength(150)
    +  @Column({ unique: true, length: 150 })
    +  email: string;
    +
    +  /**
    +   * Password field with specific validation rules.
    +   */
    +  @ApiProperty({
    +    type: 'string',
    +    example: '@Password123',
    +    description: 'Password should contain a number, alphabets, and an uppercase letter',
    +  })
    +  @IsString()
    +  @MaxLength(225)
    +  @Matches(
    +    /^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/,
    +    {
    +      message:
    +        'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.',
    +    },
    +  )
    +  password?: string;
    +
    +  /**
    +   * Confirm password field, must match the password.
    +   */
    +  @ApiProperty({
    +    type: 'string',
    +    example: '@Password123',
    +    description: 'Must contain numbers, alphabets, uppercase letters, and match the password',
    +  })
    +  @IsString()
    +  @MaxLength(225)
    +  @Validate(MatchPasswordsConstraint)
    +  confirmpassword?: string;
    +
    +  /**
    +   * User role (default is USER if not provided).
    +   */
    +  @ApiProperty({
    +    enum: userRole,
    +    description: 'Role of the user',
    +  })
    +  @IsEnum(userRole)
    +  @IsOptional()
    +  @Transform(({ value }) => value ?? userRole.USER)
    +  userRole?: userRole;
    +
    +  /**
    +   * Google ID (used for OAuth authentication).
    +   */
    +  @ApiProperty({
    +    type: 'string',
    +    example: 'poiuytrdspoiuytrewa\zxcvbnmml;poiuytrdsdcvbnm]',
    +    description: 'This is auto-generated from Google when you sign up with Google',
    +  })
    +  @IsString()
    +  @IsOptional()
    +  @MaxLength(225)
    +  googleId?: string;
    +}
    +
    +
    +
    + + + + + + + + + +
    +
    +

    results matching ""

    +
      +
      +
      +

      No results matching ""

      +
      +
      +
      + +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/EditUserDto.html b/documentation/classes/EditUserDto.html new file mode 100644 index 0000000..c9e8033 --- /dev/null +++ b/documentation/classes/EditUserDto.html @@ -0,0 +1,324 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
      +
      + + +
      +
      + + + + + + + + + + + + + + + + +
      +
      +

      +

      File

      +

      +

      + src/users/DTOs/patch-user.dto.ts +

      + + +

      +

      Description

      +

      +

      +

      using the patch to edit part of the data, the partialtype makes everything optional

      + +

      + +

      +

      Extends

      +

      +

      + PartialType(CreateUserDto) +

      + + + +
      +

      Index

      + + + + + + + + + + + + + + + +
      +
      Properties
      +
      +
        +
      • + + + id +
      • +
      +
      +
      + + +
      + +

      + Properties +

      + + + + + + + + + + + + + + + + + + + + +
      + + + + + id + + +
      + Type : number + +
      + Decorators : +
      + + @IsInt()
      @IsNotEmpty()
      +
      +
      + +
      +

      unique identifier id

      +
      +
      +
      + + + + + + + +
      + + +
      +
      import { IsEmail, IsInt, IsNotEmpty, IsString } from "class-validator";
      +import { PartialType } from "@nestjs/mapped-types";
      +import { CreateUserDto } from "./create-user.dto";
      +
      + 
      +/**using the patch to edit part of the data, the partialtype makes everything optional */ 
      +export class EditUserDto extends PartialType(CreateUserDto) {
      +    /**unique identifier id */
      +    @IsInt()
      +    @IsNotEmpty()
      +    id: number;
      +}
      +
      +
      +
      +
      + + + + + + + + + +
      +
      +

      results matching ""

      +
        +
        +
        +

        No results matching ""

        +
        +
        +
        + +
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/GetuserParamDto.html b/documentation/classes/GetuserParamDto.html new file mode 100644 index 0000000..083d3c6 --- /dev/null +++ b/documentation/classes/GetuserParamDto.html @@ -0,0 +1,318 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
        +
        + + +
        +
        + + + + + + + + + + + + + + + + +
        +
        +

        +

        File

        +

        +

        + src/users/DTOs/getUserparamdto.ts +

        + + +

        +

        Description

        +

        +

        +

        Get users paramsdto class

        + +

        + + + + +
        +

        Index

        + + + + + + + + + + + + + + + +
        +
        Properties
        +
        +
          +
        • + + + Optional + id +
        • +
        +
        +
        + + +
        + +

        + Properties +

        + + + + + + + + + + + + + + + + + + + + +
        + + + + + Optional + id + + +
        + Type : number + +
        + Decorators : +
        + + @IsInt()
        @Type(undefined)
        +
        +
        + +
        +

        Unique identifier id

        +
        +
        +
        + + + + + + + +
        + + +
        +
        import { IsOptional,IsInt } from "class-validator";
        +import { Type } from 'class-transformer';
        +
        +/**Get users paramsdto class */
        +export class GetuserParamDto {
        +   
        +     /**Unique identifier id */
        +    @IsInt()
        +    @Type (() => Number )
        +    id?:number
        +
        +}
        +
        +
        + + + + + + + + + +
        +
        +

        results matching ""

        +
          +
          +
          +

          No results matching ""

          +
          +
          +
          + +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/GoogleTokenDto.html b/documentation/classes/GoogleTokenDto.html new file mode 100644 index 0000000..6210001 --- /dev/null +++ b/documentation/classes/GoogleTokenDto.html @@ -0,0 +1,311 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
          +
          + + +
          +
          + + + + + + + + + + + + + + + + +
          +
          +

          +

          File

          +

          +

          + src/auth/social/dtos/google-token.dto.ts +

          + + +

          +

          Description

          +

          +

          +

          class for GoogleTokendto

          + +

          + + + + +
          +

          Index

          + + + + + + + + + + + + + + + +
          +
          Properties
          +
          + +
          +
          + + +
          + +

          + Properties +

          + + + + + + + + + + + + + + + + + + + + +
          + + + + token + + +
          + Type : string + +
          + Decorators : +
          + + @IsNotEmpty()
          +
          +
          + +
          +

          The Token of type string

          +
          +
          +
          + + + + + + + +
          + + +
          +
          import {IsNotEmpty} from 'class-validator'
          +
          +/**class for GoogleTokendto */
          +export class GoogleTokenDto {
          +
          +     /**The Token of type string */
          +    @IsNotEmpty()
          +    token: string
          +}
          +
          +
          + + + + + + + + + +
          +
          +

          results matching ""

          +
            +
            +
            +

            No results matching ""

            +
            +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/MatchPasswordsConstraint-1.html b/documentation/classes/MatchPasswordsConstraint-1.html new file mode 100644 index 0000000..9112412 --- /dev/null +++ b/documentation/classes/MatchPasswordsConstraint-1.html @@ -0,0 +1,559 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
            +
            + + +
            +
            + + + + + + + + + + + + + + + + +
            +
            +

            +

            File

            +

            +

            + src/auth/guard/access-token/access-token.guard.ts +

            + + +

            +

            Description

            +

            +

            +

            ValidatorConstraint: Custom validation class to ensure that +the confirmPassword field matches the password field.

            + +

            + + +

            +

            Implements

            +

            +

            + ValidatorConstraintInterface +

            + + +
            +

            Index

            + + + + + + + + + + + + + + + +
            +
            Methods
            +
            + +
            +
            + + + +
            + +

            + Methods +

            + + + + + + + + + + + + + + + + + + + +
            + + + defaultMessage + + +
            +defaultMessage(args: ValidationArguments) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            args + ValidationArguments + + No +
            +
            +
            + Returns : string + +
            +
            + +
            +
            + + + + + + + + + + + + + + + + + + + +
            + + + validate + + +
            +validate(confirmPassword: string, args: ValidationArguments) +
            + +
            + +
            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
            NameTypeOptional
            confirmPassword + string + + No +
            args + ValidationArguments + + No +
            +
            +
            + Returns : boolean + +
            +
            + +
            +
            +
            + + + + + +
            + + +
            +
            import {
            +  IsString,
            +  IsEmail,
            +  IsNotEmpty,
            +  IsEnum,
            +  IsOptional,
            +  Validate,
            +  MaxLength,
            +  Matches,
            +  ValidatorConstraint,
            +  ValidatorConstraintInterface,
            +  ValidationArguments,
            +} from 'class-validator';
            +import { ApiProperty } from '@nestjs/swagger';
            +import { Column } from 'typeorm';
            +import { userRole } from '../Enums/userRole.enum';
            +import { Transform } from 'class-transformer';
            +
            +/**
            + * ValidatorConstraint: Custom validation class to ensure that
            + * the confirmPassword field matches the password field.
            + */
            +@ValidatorConstraint({ name: 'MatchPasswords', async: false })
            +/**
            + * MatchPasswordsConstraint class that implements ValidatorConstraintInterface
            + */
            +
            +/**MatchPasswordConstraint implementing ValidatorConstraintInterface */
            +class MatchPasswordsConstraint implements ValidatorConstraintInterface {
            +  validate(confirmPassword: string, args: ValidationArguments): boolean {
            +    const object = args.object as CreateUserDto;
            +
            +    /** Ensure password is present before checking match */
            +    if (!object.password) return false;
            +    return confirmPassword === object.password;
            +  }
            +
            +  defaultMessage(args: ValidationArguments): string {
            +    return 'Password and confirm password do not match';
            +  }
            +}
            +
            +/**
            + * CreateUserDto class representing the user creation request payload.
            + */
            +export class CreateUserDto {
            +  /**
            +   * First name of the user.
            +   */
            +  @ApiProperty({
            +    type: 'string',
            +    example: 'Fatima',
            +    description: 'First name field',
            +  })
            +  @IsString()
            +  @IsNotEmpty()
            +  @MaxLength(100)
            +  firstName: string;
            +
            +  /**
            +   * Last name of the user.
            +   */
            +  @ApiProperty({
            +    type: 'string',
            +    example: 'Aminu',
            +    description: 'Last name field',
            +  })
            +  @IsString()
            +  @IsOptional()
            +  @MaxLength(100)
            +  lastName: string;
            +
            +  /**
            +   * Email field (must be unique).
            +   */
            +  @ApiProperty({
            +    type: 'string',
            +    example: 'fatimaaminu@mail.com',
            +    description: 'Email field',
            +  })
            +  @IsEmail()
            +  @MaxLength(150)
            +  @Column({ unique: true, length: 150 })
            +  email: string;
            +
            +  /**
            +   * Password field with specific validation rules.
            +   */
            +  @ApiProperty({
            +    type: 'string',
            +    example: '@Password123',
            +    description: 'Password should contain numbers, alphabets, and uppercase.',
            +  })
            +  @IsString()
            +  @MaxLength(225)
            +  @Matches(
            +    /^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/,
            +    {
            +      message:
            +        'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.',
            +    },
            +  )
            +  password?: string;
            +
            +  /**
            +   * Confirm password field, must match the password.
            +   */
            +  @ApiProperty({
            +    type: 'string',
            +    example: '@Password123',
            +    description:
            +      'Password should contain numbers, alphabets, and uppercase and should be the same as the password.',
            +  })
            +  @IsString()
            +  @MaxLength(225)
            +  @Validate(MatchPasswordsConstraint)
            +  confirmpassword?: string;
            +
            +  /**
            +   * User role (default is USER if not provided).
            +   */
            +  @ApiProperty({
            +    enum: userRole,
            +    example: userRole.USER,
            +    description: 'User role (default is USER if not provided).',
            +  })
            +  @IsEnum(userRole)
            +  @IsOptional()
            +  @Transform(({ value }) => value ?? userRole.USER)
            +  userRole?: userRole;
            +
            +  /**
            +   * Google ID (used for OAuth authentication).
            +   */
            +  @ApiProperty({
            +    type: 'string',
            +    example: 'poiuytrdspoiuytrewa\zxcvbnmml;poiuytrdsdcvbnm]',
            +    description: 'This is autogenerated from Google when you sign up with Google.',
            +  })
            +  @IsString()
            +  @IsOptional()
            +  @MaxLength(225)
            +  googleId?: string;
            +}
            +
            +
            +
            + + + + + + + + + +
            +
            +

            results matching ""

            +
              +
              +
              +

              No results matching ""

              +
              +
              +
              + +
              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/MatchPasswordsConstraint.html b/documentation/classes/MatchPasswordsConstraint.html new file mode 100644 index 0000000..fecd27b --- /dev/null +++ b/documentation/classes/MatchPasswordsConstraint.html @@ -0,0 +1,575 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
              +
              + + +
              +
              + + + + + + + + + + + + + + + + +
              +
              +

              +

              File

              +

              +

              + src/users/DTOs/create-user.dto.ts +

              + + +

              +

              Description

              +

              +

              +

              ValidatorConstraint: Custom validation class to ensure that +the confirmPassword field matches the password field.

              + +

              + + +

              +

              Implements

              +

              +

              + ValidatorConstraintInterface +

              + + +
              +

              Index

              + + + + + + + + + + + + + + + +
              +
              Methods
              +
              + +
              +
              + + + +
              + +

              + Methods +

              + + + + + + + + + + + + + + + + + + + +
              + + + defaultMessage + + +
              +defaultMessage(args: ValidationArguments) +
              + +
              +

              Returns the default error message for password mismatch.

              +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
              NameTypeOptionalDescription
              args + ValidationArguments + + No + +
                +
              • Validation arguments.
              • +
              + +
              +
              +
              + Returns : string + +
              +
              +

              Error message string.

              + +
              +
              + + + + + + + + + + + + + + + + + + + +
              + + + validate + + +
              +validate(confirmPassword: string, args: ValidationArguments) +
              + +
              +

              Validates whether the confirmPassword field matches the password field.

              +
              + +
              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              NameTypeOptionalDescription
              confirmPassword + string + + No + +
                +
              • The confirm password input.
              • +
              + +
              args + ValidationArguments + + No + +
                +
              • Validation arguments.
              • +
              + +
              +
              +
              + Returns : boolean + +
              +
              +

              Boolean indicating if passwords match.

              + +
              +
              +
              + + + + + +
              + + +
              +
              import {   IsString,   IsEmail,   IsNotEmpty,   IsEnum,   IsOptional,   Validate,   MaxLength,   Matches,   ValidatorConstraint,   ValidatorConstraintInterface,   ValidationArguments, } from 'class-validator';
              +import { ApiProperty } from '@nestjs/swagger';
              +import { Column } from 'typeorm';
              +import { userRole } from '../Enums/userRole.enum';
              +import { Transform } from 'class-transformer';
              +
              +/**
              + * ValidatorConstraint: Custom validation class to ensure that
              + * the confirmPassword field matches the password field.
              + */
              +@ValidatorConstraint({ name: 'MatchPasswords', async: false })
              +export class MatchPasswordsConstraint implements ValidatorConstraintInterface {
              +  /**
              +   * Validates whether the confirmPassword field matches the password field.
              +   * @param confirmPassword - The confirm password input.
              +   * @param args - Validation arguments.
              +   * @returns Boolean indicating if passwords match.
              +   */
              +  validate(confirmPassword: string, args: ValidationArguments): boolean {
              +    const object = args.object as CreateUserDto;
              +    if (!object.password) return false; // Ensure password is present
              +    return confirmPassword === object.password;
              +  }
              +
              +  /**
              +   * Returns the default error message for password mismatch.
              +   * @param args - Validation arguments.
              +   * @returns Error message string.
              +   */
              +  defaultMessage(args: ValidationArguments): string {
              +    return 'Password and confirm password do not match';
              +  }
              +}
              +
              +/**
              + * DTO for creating a user.
              + */
              +export class CreateUserDto {
              +  /**
              +   * First name of the user.
              +   */
              +  @ApiProperty({
              +    type: 'string',
              +    example: 'Fatima',
              +    description: 'First name field',
              +  })
              +  @IsString()
              +  @IsNotEmpty()
              +  @MaxLength(100)
              +  firstName: string;
              +
              +  /**
              +   * Last name of the user.
              +   */
              +  @ApiProperty({
              +    type: 'string',
              +    example: 'Aminu',
              +    description: 'Last name field',
              +  })
              +  @IsString()
              +  @IsOptional()
              +  @MaxLength(100)
              +  lastName: string;
              +
              +  /**
              +   * Email field (must be unique).
              +   */
              +  @ApiProperty({
              +    type: 'string',
              +    example: 'fatimaaminu@mail.com',
              +    description: 'Email field',
              +  })
              +  @IsEmail()
              +  @MaxLength(150)
              +  @Column({ unique: true, length: 150 })
              +  email: string;
              +
              +  /**
              +   * Password field with specific validation rules.
              +   */
              +  @ApiProperty({
              +    type: 'string',
              +    example: '@Password123',
              +    description: 'Password should contain a number, alphabets, and an uppercase letter',
              +  })
              +  @IsString()
              +  @MaxLength(225)
              +  @Matches(
              +    /^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/,
              +    {
              +      message:
              +        'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.',
              +    },
              +  )
              +  password?: string;
              +
              +  /**
              +   * Confirm password field, must match the password.
              +   */
              +  @ApiProperty({
              +    type: 'string',
              +    example: '@Password123',
              +    description: 'Must contain numbers, alphabets, uppercase letters, and match the password',
              +  })
              +  @IsString()
              +  @MaxLength(225)
              +  @Validate(MatchPasswordsConstraint)
              +  confirmpassword?: string;
              +
              +  /**
              +   * User role (default is USER if not provided).
              +   */
              +  @ApiProperty({
              +    enum: userRole,
              +    description: 'Role of the user',
              +  })
              +  @IsEnum(userRole)
              +  @IsOptional()
              +  @Transform(({ value }) => value ?? userRole.USER)
              +  userRole?: userRole;
              +
              +  /**
              +   * Google ID (used for OAuth authentication).
              +   */
              +  @ApiProperty({
              +    type: 'string',
              +    example: 'poiuytrdspoiuytrewa\zxcvbnmml;poiuytrdsdcvbnm]',
              +    description: 'This is auto-generated from Google when you sign up with Google',
              +  })
              +  @IsString()
              +  @IsOptional()
              +  @MaxLength(225)
              +  googleId?: string;
              +}
              +
              +
              +
              + + + + + + + + + +
              +
              +

              results matching ""

              +
                +
                +
                +

                No results matching ""

                +
                +
                +
                + +
                +
                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/RefreshTokenDto.html b/documentation/classes/RefreshTokenDto.html new file mode 100644 index 0000000..c450b39 --- /dev/null +++ b/documentation/classes/RefreshTokenDto.html @@ -0,0 +1,314 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                +
                + + +
                +
                + + + + + + + + + + + + + + + + +
                +
                +

                +

                File

                +

                +

                + src/auth/dtos/refreshTokenDto.ts +

                + + +

                +

                Description

                +

                +

                +

                refresh tokendto class

                + +

                + + + + +
                +

                Index

                + + + + + + + + + + + + + + + +
                +
                Properties
                +
                + +
                +
                + + +
                + +

                + Properties +

                + + + + + + + + + + + + + + + + + + + + +
                + + + + + refreshToken + + +
                + Type : string + +
                + Decorators : +
                + + @IsString()
                @IsNotEmpty()
                +
                +
                + +
                +

                refreshToken of type string

                +
                +
                +
                + + + + + + + +
                + + +
                +
                import { IsNotEmpty, IsString, } from "class-validator";
                +
                +/**refresh tokendto class */
                +export class RefreshTokenDto {
                +
                +    /**refreshToken of type string */
                +    @IsString()
                +    @IsNotEmpty()
                +    refreshToken: string
                +}
                +
                +
                + + + + + + + + + +
                +
                +

                results matching ""

                +
                  +
                  +
                  +

                  No results matching ""

                  +
                  +
                  +
                  + +
                  +
                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/SignInDto.html b/documentation/classes/SignInDto.html new file mode 100644 index 0000000..0d0da42 --- /dev/null +++ b/documentation/classes/SignInDto.html @@ -0,0 +1,366 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                  +
                  + + +
                  +
                  + + + + + + + + + + + + + + + + +
                  +
                  +

                  +

                  File

                  +

                  +

                  + src/auth/dtos/userDto.ts +

                  + + +

                  +

                  Description

                  +

                  +

                  +

                  signinDto class

                  + +

                  + + + + +
                  +

                  Index

                  + + + + + + + + + + + + + + + +
                  +
                  Properties
                  +
                  + +
                  +
                  + + +
                  + +

                  + Properties +

                  + + + + + + + + + + + + + + + + + + + + +
                  + + + + + email + + +
                  + Type : string + +
                  + Decorators : +
                  + + @IsEmail()
                  @IsNotEmpty()
                  +
                  +
                  + +
                  +

                  A unique email address of the user example:Rukky@gmail.com

                  +
                  +
                  + + + + + + + + + + + + + + + + + + + + +
                  + + + + + password + + +
                  + Type : string + +
                  + Decorators : +
                  + + @IsString()
                  @IsNotEmpty()
                  +
                  +
                  + +
                  +

                  password of the user

                  +
                  +
                  +
                  + + + + + + + +
                  + + +
                  +
                  import { IsEmail, IsNotEmpty, IsString } from "class-validator";
                  +
                  +/**signinDto class */
                  +export class SignInDto {
                  +  /**A unique email address of the user example:Rukky@gmail.com */
                  +  @IsEmail()
                  +  @IsNotEmpty()
                  +  email: string;
                  +
                  +  /**password of the user */
                  +  @IsString()
                  +  @IsNotEmpty()
                  +  password: string;
                  +}
                  +
                  +
                  + + + + + + + + + +
                  +
                  +

                  results matching ""

                  +
                    +
                    +
                    +

                    No results matching ""

                    +
                    +
                    +
                    + +
                    +
                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/controllers/AppController.html b/documentation/controllers/AppController.html index 559ef6c..df99a7e 100644 --- a/documentation/controllers/AppController.html +++ b/documentation/controllers/AppController.html @@ -124,6 +124,13 @@

                    File

                    +

                    +

                    Description

                    +

                    +

                    +

                    App controller class

                    + +

                    @@ -191,14 +198,16 @@

                    - + +

                    get method

                    +
                    Returns : string @@ -215,10 +224,13 @@

                    import { Controller, Get } from '@nestjs/common';
                     import { AppService } from './app.service';
                     
                    +/**App controller class */
                     @Controller()
                     export class AppController {
                    +    /**constructor for the app service */
                       constructor(private readonly appService: AppService) {}
                     
                    +  /**get method */
                       @Get()
                       getHello(): string {
                         return this.appService.getHello();
                    diff --git a/documentation/controllers/AuthController.html b/documentation/controllers/AuthController.html
                    new file mode 100644
                    index 0000000..f892a77
                    --- /dev/null
                    +++ b/documentation/controllers/AuthController.html
                    @@ -0,0 +1,513 @@
                    +
                    +
                    +    
                    +        
                    +        
                    +        real-time-chat-api documentation
                    +        
                    +        
                    +
                    +        
                    +	   
                    +        
                    +    
                    +    
                    +          
                    +
                    +        
                    +
                    +        
                    +
                    +        
                    +
                    + + +
                    +
                    + + + + + + + + + +
                    +
                    +

                    +

                    File

                    +

                    +

                    + src/auth/auth.controller.ts +

                    + +

                    +

                    Prefix

                    +

                    +

                    + auth +

                    + + +

                    +

                    Description

                    +

                    +

                    +

                    Auth controller class

                    + +

                    + + + + +
                    +

                    Index

                    + + + + + + + + + + + + + + + +
                    +
                    Methods
                    +
                    + +
                    +
                    + +
                    + +

                    + Methods +

                    + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + + + Public + RefreshToken + + +
                    + + RefreshToken(refreshToken: RefreshTokenDto) +
                    + Decorators : +
                    + @Post('/refreshToken')
                    @ApiOperation({summary: 'Refresh authentication token'})
                    @ApiResponse({status: undefined, description: 'Token refreshed successfully'})
                    @ApiResponse({status: undefined, description: 'Invalid refresh token'})
                    @ApiBody({type: RefreshTokenDto})
                    +
                    + +
                    +

                    Refresh token method

                    +
                    + +
                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                    NameTypeOptionalDescription
                    refreshToken + RefreshTokenDto + + No + +
                      +
                    • Refresh token object
                    • +
                    + +
                    +
                    +
                    + Returns : any + +
                    +
                    +

                    New access token

                    + +
                    +
                    + + + + + + + + + + + + + + + + + + + + + + +
                    + + + + + + + + + + + Public + Async + SignIn + + +
                    + + SignIn(signInDto: SignInDto) +
                    + Decorators : +
                    + @Post('/signIn')
                    @Auth(authTypes.None)
                    @HttpCode(HttpStatus.OK)
                    @UseInterceptors(ClassSerializerInterceptor)
                    @ApiOperation({summary: 'User sign-in'})
                    @ApiResponse({status: undefined, description: 'User signed in successfully'})
                    @ApiResponse({status: undefined, description: 'Invalid credentials'})
                    @ApiBody({type: SignInDto})
                    +
                    + +
                    +

                    Sign in method

                    +
                    + +
                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                    NameTypeOptionalDescription
                    signInDto + SignInDto + + No + +
                      +
                    • User credentials
                    • +
                    + +
                    +
                    +
                    + Returns : unknown + +
                    +
                    +

                    Access token and user details

                    + +
                    +
                    +
                    + + +
                    +
                    import { Body, ClassSerializerInterceptor, Controller, HttpCode, HttpStatus, Post, UseInterceptors } from '@nestjs/common';
                    +import { AuthService } from './providers/auth.service';
                    +import { SignInDto } from './dtos/userDto';
                    +import { authTypes } from './enums/authTypes.enum';
                    +import { RefreshTokenDto } from './dtos/refreshTokenDto';
                    +import { Auth } from './decorators/auth.decorator';
                    +import { ApiTags, ApiOperation, ApiResponse, ApiBody } from '@nestjs/swagger';
                    +
                    +/**
                    + * Auth controller class
                    + */
                    +@ApiTags('Authentication')
                    +@Controller('auth')
                    +export class AuthController {
                    +    constructor(
                    +        /** Injecting auth service*/ 
                    +        private readonly authservice: AuthService,
                    +    ) {}
                    +
                    +    /**
                    +     * Sign in method
                    +     * @param signInDto - User credentials
                    +     * @returns Access token and user details
                    +     */
                    +    @Post('/signIn')
                    +    @Auth(authTypes.None)
                    +    @HttpCode(HttpStatus.OK)
                    +    @UseInterceptors(ClassSerializerInterceptor)
                    +    @ApiOperation({ summary: 'User sign-in' })
                    +    @ApiResponse({ status: HttpStatus.OK, description: 'User signed in successfully' })
                    +    @ApiResponse({ status: HttpStatus.UNAUTHORIZED, description: 'Invalid credentials' })
                    +    @ApiBody({ type: SignInDto })
                    +    public async SignIn(@Body() signInDto: SignInDto) {
                    +       return await this.authservice.SignIn(signInDto);
                    +    }
                    +
                    +    /**
                    +     * Refresh token method
                    +     * @param refreshToken - Refresh token object
                    +     * @returns New access token
                    +     */
                    +    @Post('/refreshToken')
                    +    @ApiOperation({ summary: 'Refresh authentication token' })
                    +    @ApiResponse({ status: HttpStatus.OK, description: 'Token refreshed successfully' })
                    +    @ApiResponse({ status: HttpStatus.UNAUTHORIZED, description: 'Invalid refresh token' })
                    +    @ApiBody({ type: RefreshTokenDto })
                    +    public RefreshToken(@Body() refreshToken: RefreshTokenDto) {
                    +        return this.authservice.refreshToken(refreshToken);
                    +    }
                    +}
                    +
                    +
                    +
                    + + + + + + + + + + + + + + + + +
                    +
                    +

                    results matching ""

                    +
                      +
                      +
                      +

                      No results matching ""

                      +
                      +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/controllers/ChatRoomsController.html b/documentation/controllers/ChatRoomsController.html new file mode 100644 index 0000000..f1ba3b0 --- /dev/null +++ b/documentation/controllers/ChatRoomsController.html @@ -0,0 +1,521 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                      +
                      + + +
                      +
                      + + + + + + + + + +
                      +
                      +

                      +

                      File

                      +

                      +

                      + src/chatrooms/chatroom.controller.ts +

                      + +

                      +

                      Prefix

                      +

                      +

                      + chatroom +

                      + + +

                      +

                      Description

                      +

                      +

                      +

                      chat room Controller

                      + +

                      + + + + +
                      +

                      Index

                      + + + + + + + + + + + + + + + +
                      +
                      Methods
                      +
                      + +
                      +
                      + +
                      + +

                      + Methods +

                      + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + create + + +
                      + + create(undefined) +
                      + Decorators : +
                      + @Post()
                      +
                      + +
                      +

                      chat room to create a post

                      +
                      + +
                      + Parameters : + + + + + + + + + + + + + + + + +
                      NameOptional
                      + No +
                      +
                      +
                      + Returns : any + +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + delete + + +
                      + + delete(id: string) +
                      + Decorators : +
                      + @Delete(':id')
                      +
                      + +
                      +

                      chat room to delete a post

                      +
                      + +
                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                      NameTypeOptional
                      id + string + + No +
                      +
                      +
                      + Returns : any + +
                      +
                      + +
                      +
                      + + + + + + + + + + + + + + + + + + + + + + +
                      + + + + findAll + + +
                      + + findAll(userId: string) +
                      + Decorators : +
                      + @Get(':userId')
                      +
                      + +
                      +

                      chat room to get a single post by id

                      +
                      + +
                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                      NameTypeOptional
                      userId + string + + No +
                      +
                      +
                      + Returns : any + +
                      +
                      + +
                      +
                      +
                      + + +
                      +
                      import { Controller, Post, Get, Delete, Body, Param } from '@nestjs/common';
                      +import { ChatRoomsService } from './providers/chatrooms/chatrooms.service';
                      +
                      +/**chat room Controller */
                      +@Controller('chatroom')
                      +export class ChatRoomsController {
                      +  constructor(private readonly chatRoomService: ChatRoomsService) {}
                      +
                      +    /**chat room to create a post */
                      +  @Post()
                      +  create(@Body() { name, userIds, type }) {
                      +    return this.chatRoomService.create(name, userIds, type);
                      +  }
                      +
                      +    /**chat room to get a  single post by id */
                      +  @Get(':userId')
                      +  findAll(@Param('userId') userId: string) {
                      +    return this.chatRoomService.findAll(userId);
                      +  }
                      +
                      +  /**chat room to delete a post */
                      +  @Delete(':id')
                      +  delete(@Param('id') id: string) {
                      +    return this.chatRoomService.delete(id);
                      +  }
                      +}
                      +
                      +
                      + + + + + + + + + + + + + + + + +
                      +
                      +

                      results matching ""

                      +
                        +
                        +
                        +

                        No results matching ""

                        +
                        +
                        +
                        + +
                        +
                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/controllers/GoogleAuthenticationController.html b/documentation/controllers/GoogleAuthenticationController.html new file mode 100644 index 0000000..6631c89 --- /dev/null +++ b/documentation/controllers/GoogleAuthenticationController.html @@ -0,0 +1,388 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                        +
                        + + +
                        +
                        + + + + + + + + + +
                        +
                        +

                        +

                        File

                        +

                        +

                        + src/auth/social/google-authentication.controller.ts +

                        + +

                        +

                        Prefix

                        +

                        +

                        + auth/google-authentication +

                        + + +

                        +

                        Description

                        +

                        +

                        +

                        Google authentication controller

                        + +

                        + + + + +
                        +

                        Index

                        + + + + + + + + + + + + + + + +
                        +
                        Methods
                        +
                        + +
                        +
                        + +
                        + +

                        + Methods +

                        + + + + + + + + + + + + + + + + + + + + + + +
                        + + + + + + + Public + authenticate + + +
                        + + authenticate(googleTokenDto: GoogleTokenDto) +
                        + Decorators : +
                        + @ApiOperation({summary: 'Authenticate user with Google token'})
                        @ApiResponse({status: 200, description: 'Successfully authenticated user'})
                        @ApiResponse({status: 400, description: 'Invalid Google token'})
                        @Post()
                        +
                        + +
                        +

                        Authenticates a user using Google authentication.

                        +
                        + +
                        + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                        NameTypeOptionalDescription
                        googleTokenDto + GoogleTokenDto + + No + +
                          +
                        • The Google authentication token.
                        • +
                        + +
                        +
                        +
                        + Returns : any + +
                        +
                        +

                        Authentication response.

                        + +
                        +
                        +
                        + + +
                        +
                        import { Body, Controller, Post } from '@nestjs/common';
                        +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
                        +import { GoogleAuthenticationService } from './providers/google-authentication.service';
                        +import { Auth } from '../decorators/auth.decorator';
                        +import { authTypes } from '../enums/authTypes.enum';
                        +import { GoogleTokenDto } from './dtos/google-token.dto';
                        +
                        +/**
                        + * Google authentication controller
                        + */
                        +@ApiTags('Google Authentication')
                        +@Auth(authTypes.None)
                        +@Controller('auth/google-authentication')
                        +export class GoogleAuthenticationController {
                        +    /**
                        +     * Constructor for GoogleAuthenticationController
                        +     * @param googleAuthenticationService - Injects GoogleAuthenticationService
                        +     */
                        +    constructor(
                        +        private readonly googleAuthenticationService: GoogleAuthenticationService
                        +    ) {}
                        +
                        +    /**
                        +     * Authenticates a user using Google authentication.
                        +     * @param googleTokenDto - The Google authentication token.
                        +     * @returns Authentication response.
                        +     */
                        +    @ApiOperation({ summary: 'Authenticate user with Google token' })
                        +    @ApiResponse({ status: 200, description: 'Successfully authenticated user' })
                        +    @ApiResponse({ status: 400, description: 'Invalid Google token' })
                        +    @Post()
                        +    public authenticate(@Body() googleTokenDto: GoogleTokenDto) {
                        +        return this.googleAuthenticationService.authenticate(googleTokenDto);
                        +    }
                        +}
                        +
                        +
                        +
                        + + + + + + + + + + + + + + + + +
                        +
                        +

                        results matching ""

                        +
                          +
                          +
                          +

                          No results matching ""

                          +
                          +
                          +
                          + +
                          +
                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/controllers/MessagesController.html b/documentation/controllers/MessagesController.html new file mode 100644 index 0000000..0e3bccc --- /dev/null +++ b/documentation/controllers/MessagesController.html @@ -0,0 +1,435 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                          +
                          + + +
                          +
                          + + + + + + + + + +
                          +
                          +

                          +

                          File

                          +

                          +

                          + src/messages/messages.controller.ts +

                          + +

                          +

                          Prefix

                          +

                          +

                          + messages +

                          + + +

                          +

                          Description

                          +

                          +

                          +

                          Controller for managing messages-related operations.

                          + +

                          + + + + +
                          +

                          Index

                          + + + + + + + + + + + + + + + +
                          +
                          Methods
                          +
                          + +
                          +
                          + +
                          + +

                          + Methods +

                          + + + + + + + + + + + + + + + + + + + + + + +
                          + + + + getMessages + + +
                          + + getMessages(chatRoomId: string) +
                          + Decorators : +
                          + @Get(':chatRoomId')
                          +
                          + +
                          +

                          Get messages method based on chat id

                          +
                          + +
                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                          NameTypeOptional
                          chatRoomId + string + + No +
                          +
                          +
                          + Returns : any + +
                          +
                          + +
                          +
                          + + + + + + + + + + + + + + + + + + + + + + +
                          + + + + sendMessage + + +
                          + + sendMessage(undefined) +
                          + Decorators : +
                          + @Post()
                          +
                          + +
                          +

                          Send message method

                          +
                          + +
                          + Parameters : + + + + + + + + + + + + + + + + +
                          NameOptional
                          + No +
                          +
                          +
                          + Returns : any + +
                          +
                          + +
                          +
                          +
                          + + +
                          +
                          import { Controller, Post, Get, Body, Param } from '@nestjs/common';
                          +import { MessagesService } from './providers/messages/messages.service';
                          +
                          +/**
                          +  Controller for managing messages-related operations.
                          + */
                          +@Controller('messages')
                          +export class MessagesController {
                          +  constructor(private readonly messageService: MessagesService) {}
                          +
                          +   /**Send message method */
                          +  @Post()
                          +  sendMessage(@Body() { chatRoomId, senderId, text }) {
                          +    return this.messageService.sendMessage(chatRoomId, senderId, text);
                          +  }
                          +
                          +    /**Get messages method based on chat id */
                          +  @Get(':chatRoomId')
                          +  getMessages(@Param('chatRoomId') chatRoomId: string) {
                          +    return this.messageService.getMessages(chatRoomId);
                          +  }
                          +}
                          +
                          +
                          + + + + + + + + + + + + + + + + +
                          +
                          +

                          results matching ""

                          +
                            +
                            +
                            +

                            No results matching ""

                            +
                            +
                            +
                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/controllers/UserController.html b/documentation/controllers/UserController.html new file mode 100644 index 0000000..7f6e85e --- /dev/null +++ b/documentation/controllers/UserController.html @@ -0,0 +1,776 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                            +
                            + + +
                            +
                            + + + + + + + + + +
                            +
                            +

                            +

                            File

                            +

                            +

                            + src/users/user.controller.ts +

                            + +

                            +

                            Prefix

                            +

                            +

                            + users +

                            + + +

                            +

                            Description

                            +

                            +

                            +

                            Controller for managing user-related operations.

                            + +

                            + + + + +
                            +

                            Index

                            + + + + + + + + + + + + + + + +
                            +
                            Methods
                            +
                            + +
                            +
                            + +
                            + +

                            + Methods +

                            + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + + Public + createUsers + + +
                            + + createUsers(createUserDto: CreateUserDto) +
                            + Decorators : +
                            + @ApiOperation({summary: 'Create a new user'})
                            @ApiBody({type: CreateUserDto, description: 'User data'})
                            @ApiResponse({status: 201, description: 'User successfully created'})
                            @Post()
                            +
                            + +
                            +

                            Creates a new user.

                            +
                            + +
                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                            NameTypeOptionalDescription
                            createUserDto + CreateUserDto + + No + +
                              +
                            • User data transfer object.
                            • +
                            + +
                            +
                            +
                            + Returns : any + +
                            +
                            +

                            The newly created user.

                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + + Public + deleteUser + + +
                            + + deleteUser(id: number) +
                            + Decorators : +
                            + @ApiOperation({summary: 'Delete a user by ID'})
                            @ApiQuery({name: 'id', required: true, description: 'User ID', example: 1})
                            @ApiResponse({status: 200, description: 'User successfully deleted'})
                            @Delete()
                            +
                            + +
                            +

                            Deletes a user by ID.

                            +
                            + +
                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                            NameTypeOptionalDescription
                            id + number + + No + +
                              +
                            • The ID of the user to delete.
                            • +
                            + +
                            +
                            +
                            + Returns : any + +
                            +
                            +

                            A confirmation message.

                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + + Public + editedPost + + +
                            + + editedPost(edituserDto: EditUserDto) +
                            + Decorators : +
                            + @ApiOperation({summary: 'Update user details'})
                            @ApiBody({type: EditUserDto, description: 'Updated user data'})
                            @ApiResponse({status: 200, description: 'User successfully updated'})
                            @Patch()
                            +
                            + +
                            +

                            Updates user details.

                            +
                            + +
                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                            NameTypeOptionalDescription
                            edituserDto + EditUserDto + + No + +
                              +
                            • Updated user data.
                            • +
                            + +
                            +
                            +
                            + Returns : any + +
                            +
                            +

                            The updated user details.

                            + +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + + + + + Public + getUsers + + +
                            + + getUsers(getuserParamDto: GetuserParamDto, limit: number, page: number) +
                            + Decorators : +
                            + @ApiOperation({summary: 'Retrieve users or a single user by ID'})
                            @ApiParam({name: 'id', required: false, description: 'User ID (optional)'})
                            @ApiQuery({name: 'limit', required: false, description: 'Number of users per page', example: 20})
                            @ApiQuery({name: 'page', required: false, description: 'Page number for pagination', example: 1})
                            @ApiResponse({status: 200, description: 'Successful retrieval of users'})
                            @Get('/:id?')
                            @Get('/:id?')
                            +
                            + +
                            +

                            Retrieves a list of users or a single user if an ID is provided.

                            +
                            + +
                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            NameTypeOptionalDescription
                            getuserParamDto + GetuserParamDto + + No + +
                              +
                            • Optional user ID parameter.
                            • +
                            + +
                            limit + number + + No + +
                              +
                            • The number of users per page (default: 20).
                            • +
                            + +
                            page + number + + No + +
                              +
                            • The page number for pagination (default: 1).
                            • +
                            + +
                            +
                            +
                            + Returns : any + +
                            +
                            +

                            A list of users or a specific user if ID is provided.

                            + +
                            +
                            +
                            + + +
                            +
                            import { Body, Controller, DefaultValuePipe, Delete, Get, Param, ParseIntPipe, Patch, Post, Query } from "@nestjs/common";
                            +import { UserService } from "./provider/user.service";
                            +import { CreateUserDto } from "./DTOs/create-user.dto";
                            +import { EditUserDto } from "./DTOs/patch-user.dto";
                            +import { GetuserParamDto } from "./DTOs/getUserparamdto";
                            +import { ApiTags, ApiOperation, ApiQuery, ApiParam, ApiBody, ApiResponse } from "@nestjs/swagger";
                            +
                            +/**
                            +  Controller for managing user-related operations.
                            + */
                            +@Controller('users')
                            +export class UserController {
                            +    /**constructor for injecting user service */
                            +    constructor(private readonly userService:UserService) {}
                            +
                            +    /**
                            +      Retrieves a list of users or a single user if an ID is provided.
                            +      @param {GetuserParamDto} getuserParamDto - Optional user ID parameter.
                            +      @param {number} limit - The number of users per page (default: 20).
                            +      @param {number} page - The page number for pagination (default: 1).
                            +      @returns {Promise<any>} A list of users or a specific user if ID is provided.
                            +     */
                            +      @ApiOperation({ summary: 'Retrieve users or a single user by ID' })
                            +      @ApiParam({ name: 'id', required: false, description: 'User ID (optional)' })
                            +      @ApiQuery({ name: 'limit', required: false, description: 'Number of users per page', example: 20 })
                            +      @ApiQuery({ name: 'page', required: false, description: 'Page number for pagination', example: 1 })
                            +      @ApiResponse({ status: 200, description: 'Successful retrieval of users' })
                            +      @Get('/:id?')
                            +  
                            +      /**Get user method */
                            +    @Get('/:id?')
                            +  public getUsers(
                            +    @Param() getuserParamDto: GetuserParamDto,
                            +    @Query('limit', new DefaultValuePipe(20), ParseIntPipe) limit: number,
                            +    @Query('page', new DefaultValuePipe(1), ParseIntPipe) page: number,
                            +  ) {
                            +    console.log(getuserParamDto);
                            +    return this.userService.findAll(getuserParamDto, limit, page);
                            +  }
                            +
                            +  /**
                            +    Creates a new user.
                            +      @param {CreateUserDto} createUserDto - User data transfer object.
                            +      @returns {Promise<any>} The newly created user.
                            +     */
                            +      @ApiOperation({ summary: 'Create a new user' })
                            +      @ApiBody({ type: CreateUserDto, description: 'User data' })
                            +      @ApiResponse({ status: 201, description: 'User successfully created' })
                            +  /**Create a user method */
                            +@Post()
                            +  public createUsers(@Body() createUserDto: CreateUserDto) {
                            +    return this.userService.createUsers(createUserDto);
                            +  }
                            +  
                            +  /**
                            +     Deletes a user by ID.
                            +      @param {number} id - The ID of the user to delete.
                            +      @returns {Promise<any>} A confirmation message.
                            +     */
                            +      @ApiOperation({ summary: 'Delete a user by ID' })
                            +      @ApiQuery({ name: 'id', required: true, description: 'User ID', example: 1 })
                            +      @ApiResponse({ status: 200, description: 'User successfully deleted' })
                            +
                            +  /**Delete a user method */
                            +  @Delete()
                            +  public deleteUser(@Query('id', ParseIntPipe) id:number)  {
                            +      return this.userService.deleteUser(id)
                            +
                            +  }
                            +
                            +  /**
                            +      Updates user details.
                            +      @param {EditUserDto} edituserDto - Updated user data.
                            +      @returns {Promise<any>} The updated user details.
                            +     */
                            +      @ApiOperation({ summary: 'Update user details' })
                            +      @ApiBody({ type: EditUserDto, description: 'Updated user data' })
                            +      @ApiResponse({ status: 200, description: 'User successfully updated' })
                            +  
                            +
                            +  /**Update or edit  a user method */
                            +  @Patch()
                            +  public editedPost(@Body() edituserDto: EditUserDto) {
                            +    return this.userService.editUser(edituserDto);
                            +  }
                            +
                            +
                            +}
                            +
                            +
                            + + + + + + + + + + + + + + + + +
                            +
                            +

                            results matching ""

                            +
                              +
                              +
                              +

                              No results matching ""

                              +
                              +
                              +
                              + +
                              +
                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/coverage.html b/documentation/coverage.html index 1ba332d..a831098 100644 --- a/documentation/coverage.html +++ b/documentation/coverage.html @@ -125,40 +125,496 @@ - + src/app.controller.ts controller AppController - - 0 % - (0/2) + + 100 % + (2/2) - + src/app.service.ts injectable AppService - - 0 % - (0/2) + + 100 % + (2/2) - + + + + src/auth/auth.controller.ts + + controller + AuthController + + 100 % + (3/3) + + + + + + src/auth/constants/auth.constant.ts + + variable + AUTH_TYPE_KEY + + 100 % + (1/1) + + + + + + src/auth/constants/auth.constant.ts + + variable + REQUEST_USER_KEY + + 100 % + (1/1) + + + + + + src/auth/decorators/activeUser.decorator.ts + + variable + ActiveUser + + 100 % + (1/1) + + + + + + src/auth/decorators/auth.decorator.ts + + variable + Auth + + 100 % + (1/1) + + + + + + src/auth/dtos/refreshTokenDto.ts + + class + RefreshTokenDto + + 100 % + (2/2) + + + + + + src/auth/dtos/userDto.ts + + class + SignInDto + + 100 % + (3/3) + + + + + + src/auth/guard/access-token/access-token.guard.ts + + class + CreateUserDto + + 100 % + (8/8) + + + + + + src/auth/guard/access-token/access-token.guard.ts + + class + MatchPasswordsConstraint + + 33 % + (1/3) + + + + + + src/auth/guard/auth-guard/auth-guard.guard.ts + + guard + AuthGuardGuard + + 80 % + (4/5) + + + + + + src/auth/interface/activeInterface.ts + + interface + ActiveUserData + + 100 % + (3/3) + + + + + + src/auth/providers/auth.service.ts + + injectable + AuthService + + 75 % + (3/4) + + + + + + src/auth/providers/bcrypt.ts + + injectable + BcryptProvider + + 100 % + (3/3) + + + + + + src/auth/providers/generate-tokens.provider.ts + + injectable + GenerateTokensProvider + + 75 % + (3/4) + + + + + + src/auth/providers/hashing.ts + + injectable + HashingProvider + + 100 % + (3/3) + + + + + + src/auth/providers/refresh-tokens.provider.ts + + injectable + RefreshTokensProvider + + 66 % + (2/3) + + + + + + src/auth/providers/sign-in.provider.ts + + injectable + SignInProvider + + 66 % + (2/3) + + + + + + src/auth/social/dtos/google-token.dto.ts + + class + GoogleTokenDto + + 100 % + (2/2) + + + + + + src/auth/social/google-authentication.controller.ts + + controller + GoogleAuthenticationController + + 100 % + (2/2) + + + + + + src/auth/social/interfaces/user.interface.ts + + interface + GoogleInterface + + 100 % + (5/5) + + + + + + src/auth/social/providers/google-authentication.service.ts + + injectable + GoogleAuthenticationService + + 80 % + (4/5) + + + + + + src/chatrooms/chatroom.controller.ts + + controller + ChatRoomsController + + 100 % + (4/4) + + + + + + src/chatrooms/chatroom.entity.ts + + entity + ChatRoom + + 100 % + (1/1) + + + + + + src/chatrooms/providers/chatrooms/chatrooms.service.ts + + injectable + ChatRoomsService + + 80 % + (4/5) + + + src/main.ts function bootstrap - - 0 % - (0/1) + + 100 % + (1/1) + + + + + + src/messages/message.entity.ts + + entity + Message + + 100 % + (1/1) + + + + + + src/messages/messages.controller.ts + + controller + MessagesController + + 100 % + (3/3) + + + + + + src/messages/providers/messages/messages.service.ts + + injectable + MessagesService + + 75 % + (3/4) + + + + + + src/users/DTOs/create-user.dto.ts + + class + CreateUserDto + + 100 % + (8/8) + + + + + + src/users/DTOs/create-user.dto.ts + + class + MatchPasswordsConstraint + + 100 % + (3/3) + + + + + + src/users/DTOs/getUserparamdto.ts + + class + GetuserParamDto + + 100 % + (2/2) + + + + + + src/users/DTOs/patch-user.dto.ts + + class + EditUserDto + + 100 % + (2/2) + + + + + + src/users/provider/create-user.provider.ts + + injectable + CreateUserProvider + + 100 % + (3/3) + + + + + + src/users/provider/find-one-by-email.ts + + injectable + FindOneByEmail + + 100 % + (3/3) + + + + + + src/users/provider/find-one-by-googleId.ts + + injectable + FindOneByGoogleIdProvider + + 66 % + (2/3) + + + + + + src/users/provider/googleUserProvider.ts + + injectable + CreateGoogleUserProvider + + 66 % + (2/3) + + + + + + src/users/provider/user.service.ts + + injectable + UserService + + 90 % + (9/10) + + + + + + src/users/user.controller.ts + + controller + UserController + + 100 % + (5/5) + + + + + + src/users/user.entitly.ts + + entity + User + + 100 % + (1/1) diff --git a/documentation/dependencies.html b/documentation/dependencies.html index 1068480..c438620 100644 --- a/documentation/dependencies.html +++ b/documentation/dependencies.html @@ -121,10 +121,16 @@ @nestjs/swagger : ^7.3.0
                            • @nestjs/typeorm : ^11.0.0
                            • +
                            • + @types/bcrypt : ^5.0.2
                            • +
                            • + bcrypt : ^5.1.1
                            • class-transformer : ^0.5.1
                            • class-validator : ^0.14.1
                            • +
                            • + google-auth-library : ^9.15.1
                            • pg : ^8.13.1
                            • diff --git a/documentation/entities/ChatRoom.html b/documentation/entities/ChatRoom.html new file mode 100644 index 0000000..4085bba --- /dev/null +++ b/documentation/entities/ChatRoom.html @@ -0,0 +1,508 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                              +
                              + + +
                              +
                              + + + + + + + + + + +
                              +
                              +

                              +

                              File

                              +

                              +

                              + src/chatrooms/chatroom.entity.ts +

                              + + +

                              +

                              Description

                              +

                              +

                              +

                              chat room entity

                              + +

                              + + +
                              +

                              Index

                              + + + + + + + + + + + + + + + +
                              +
                              Properties
                              +
                              + +
                              +
                              + +
                              + +

                              + Properties +

                              + + + + + + + + + + + + + + + + + + + + +
                              + + + + createdAt + + +
                              + Type : Date + +
                              + Decorators : +
                              + + @CreateDateColumn()
                              +
                              +
                              + +
                              +

                              The date the chat was created

                              +
                              +
                              + + + + + + + + + + + + + + + + + + + + +
                              + + + + id + + +
                              + Type : string + +
                              + Decorators : +
                              + + @PrimaryGeneratedColumn('uuid')
                              +
                              +
                              + +
                              +

                              Unique identifier

                              +
                              +
                              + + + + + + + + + + + + + + + + + + + + +
                              + + + + name + + +
                              + Type : string + +
                              + Decorators : +
                              + + @Column()
                              +
                              +
                              + +
                              +

                              name of the user.

                              +
                              +
                              + + + + + + + + + + + + + + + + + + + + +
                              + + + + type + + +
                              + Type : chatroom + +
                              + Decorators : +
                              + + @Column({default: 'GROUP'})
                              +
                              +
                              + +
                              +

                              Type of the chat room Private or group

                              +
                              +
                              + + + + + + + + + + + + + + + + + + + + +
                              + + + + + users + + +
                              + Type : User[] + +
                              + Decorators : +
                              + + @ManyToMany(undefined, user => user.chatRooms)
                              @JoinTable()
                              +
                              +
                              + +
                              +

                              Many-many relationship between the user and the chat room

                              +
                              +
                              +
                              +
                              + + +
                              +
                              import { User } from 'src/users/user.entitly';
                              +import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, CreateDateColumn, JoinTable } from 'typeorm';
                              +import { chatroom } from './enums/chatroomType';
                              +
                              +/**chat room entity */
                              +@Entity()
                              +export class ChatRoom {
                              +  /**Unique identifier */
                              +  @PrimaryGeneratedColumn('uuid')
                              +  id: string;
                              +
                              +  /**
                              +    name of the user.
                              +   */
                              +  @Column()
                              +  name: string;
                              +
                              +    /**Type of the chat room Private or group */
                              +  @Column({ default: 'GROUP' }) // 'private' or 'group'
                              +  type: chatroom;
                              +
                              +    /**Many-many relationship between the user and the chat room */
                              +  @ManyToMany(() => User, (user) => user.chatRooms)
                              +  @JoinTable()
                              +  users: User[];
                              +
                              +  /**The date the chat was created */
                              +  @CreateDateColumn()
                              +  createdAt: Date;
                              +}
                              +
                              +
                              + + + + + + + + + + + + + + + +
                              +
                              +

                              results matching ""

                              +
                                +
                                +
                                +

                                No results matching ""

                                +
                                +
                                +
                                + +
                                +
                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/entities/Message.html b/documentation/entities/Message.html new file mode 100644 index 0000000..6c06412 --- /dev/null +++ b/documentation/entities/Message.html @@ -0,0 +1,505 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                +
                                + + +
                                +
                                + + + + + + + + + + +
                                +
                                +

                                +

                                File

                                +

                                +

                                + src/messages/message.entity.ts +

                                + + +

                                +

                                Description

                                +

                                +

                                +

                                Message entity representing the user table in the database.

                                + +

                                + + +
                                +

                                Index

                                + + + + + + + + + + + + + + + +
                                +
                                Properties
                                +
                                + +
                                +
                                + +
                                + +

                                + Properties +

                                + + + + + + + + + + + + + + + + + + + + +
                                + + + + chatRoom + + +
                                + Type : ChatRoom + +
                                + Decorators : +
                                + + @ManyToOne(undefined, chatRoom => chatRoom.id)
                                +
                                +
                                + +
                                +

                                Many-to-one relationship between chatroom and messages

                                +
                                +
                                + + + + + + + + + + + + + + + + + + + + +
                                + + + + id + + +
                                + Type : string + +
                                + Decorators : +
                                + + @PrimaryGeneratedColumn()
                                +
                                +
                                + +
                                +

                                unique identifier

                                +
                                +
                                + + + + + + + + + + + + + + + + + + + + +
                                + + + + sender + + +
                                + Type : User + +
                                + Decorators : +
                                + + @ManyToOne(undefined, user => user.id)
                                +
                                +
                                + +
                                +

                                Many-to-one relationship between users and messages

                                +
                                +
                                + + + + + + + + + + + + + + + + + + + + +
                                + + + + text + + +
                                + Type : string + +
                                + Decorators : +
                                + + @Column()
                                +
                                +
                                + +
                                +

                                The text entered by the user

                                +
                                +
                                + + + + + + + + + + + + + + + + + + + + +
                                + + + + timestamp + + +
                                + Type : Date + +
                                + Decorators : +
                                + + @CreateDateColumn()
                                +
                                +
                                + +
                                +

                                time stamp of the user.

                                +
                                +
                                +
                                +
                                + + +
                                +
                                import { ChatRoom } from 'src/chatrooms/chatroom.entity';
                                +import { User } from 'src/users/user.entitly';
                                +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, CreateDateColumn } from 'typeorm';
                                +
                                +/**
                                +  Message entity representing the user table in the database.
                                + */
                                +@Entity()
                                +export class Message {
                                +  /**unique identifier */
                                +  @PrimaryGeneratedColumn()
                                +  id: string;
                                +
                                +    /**Many-to-one relationship between chatroom and messages */
                                +  @ManyToOne(() => ChatRoom, (chatRoom) => chatRoom.id)
                                +  chatRoom: ChatRoom;
                                +
                                +    /**Many-to-one relationship between users and messages */
                                +  @ManyToOne(() => User, (user) => user.id)
                                +  sender: User;
                                +
                                +    /**The text entered by the user */
                                +  @Column()
                                +  text: string;
                                +
                                +  /** time stamp of the user.*/
                                +  @CreateDateColumn()
                                +  timestamp: Date;
                                +}
                                +
                                +
                                + + + + + + + + + + + + + + + +
                                +
                                +

                                results matching ""

                                +
                                  +
                                  +
                                  +

                                  No results matching ""

                                  +
                                  +
                                  +
                                  + +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/entities/User.html b/documentation/entities/User.html new file mode 100644 index 0000000..db29321 --- /dev/null +++ b/documentation/entities/User.html @@ -0,0 +1,744 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                  +
                                  + + +
                                  +
                                  + + + + + + + + + + +
                                  +
                                  +

                                  +

                                  File

                                  +

                                  +

                                  + src/users/user.entitly.ts +

                                  + + +

                                  +

                                  Description

                                  +

                                  +

                                  +

                                  User entity representing the user table in the database.

                                  + +

                                  + + +
                                  +

                                  Index

                                  + + + + + + + + + + + + + + + +
                                  +
                                  Properties
                                  +
                                  + +
                                  +
                                  + +
                                  + +

                                  + Properties +

                                  + + + + + + + + + + + + + + + + + + + + +
                                  + + + + + chatRooms + + +
                                  + Type : ChatRoom[] + +
                                  + Decorators : +
                                  + + @ManyToMany(undefined, chatRoom => chatRoom.users)
                                  @JoinTable()
                                  +
                                  +
                                  + +
                                  +

                                  Many-to-Many relationship between users and chat rooms. +This allows a user to be part of multiple chat rooms.

                                  +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + +
                                  + + + + email + + +
                                  + Type : string + +
                                  + Decorators : +
                                  + + @Column('varchar', {unique: true, nullable: false})
                                  +
                                  +
                                  + +
                                  +

                                  Unique email address of the user.

                                  +Example :
                                  +
                                  + + + + + + + + + + + + + + + + + + + + +
                                  + + + + firstName + + +
                                  + Type : string + +
                                  + Decorators : +
                                  + + @Column('varchar', {length: 100, nullable: false})
                                  +
                                  +
                                  + +
                                  +

                                  First name of the user.

                                  +Example :
                                  +
                                  + + + + + + + + + + + + + + + + + + + + +
                                  + + + + Optional + googleId + + +
                                  + Type : string + +
                                  + Decorators : +
                                  + + @Column('varchar', {length: 225, nullable: true})
                                  +
                                  +
                                  + +
                                  +
                                  Example :
                                  +
                                  + + + + + + + + + + + + + + + + + + + + +
                                  + + + + id + + +
                                  + Type : number + +
                                  + Decorators : +
                                  + + @PrimaryGeneratedColumn()
                                  +
                                  +
                                  + +
                                  +

                                  Unique identifier for the user.

                                  +Example :
                                  +
                                  + + + + + + + + + + + + + + + + + + + + +
                                  + + + + lastName + + +
                                  + Type : string + +
                                  + Decorators : +
                                  + + @Column('varchar', {length: 100})
                                  +
                                  +
                                  + +
                                  +

                                  Last name of the user.

                                  +Example :
                                  +
                                  + + + + + + + + + + + + + + + + + + + + +
                                  + + + + messages + + +
                                  + Type : Message[] + +
                                  + Decorators : +
                                  + + @OneToMany(undefined, message => message.sender)
                                  +
                                  +
                                  + +
                                  +

                                  One-to-Many relationship between users and messages. +A user can send multiple messages.

                                  +
                                  +
                                  + + + + + + + + + + + + + + + + + + + + +
                                  + + + + Optional + password + + +
                                  + Type : string + +
                                  + Decorators : +
                                  + + @Column('varchar', {nullable: true})
                                  +
                                  +
                                  + +
                                  +
                                  Example :
                                  +
                                  + + + + + + + + + + + + + + + + + + + + +
                                  + + + + Optional + userRole + + +
                                  + Type : userRole + +
                                  + Decorators : +
                                  + + @Column({type: 'enum', enum: userRole, default: undefined})
                                  +
                                  +
                                  + +
                                  +
                                  Example :
                                  +
                                  +
                                  +
                                  + + +
                                  +
                                  // import { Exclude } from 'class-transformer';
                                  +import { Entity, Column, PrimaryGeneratedColumn, ManyToMany, JoinTable, OneToMany } from 'typeorm';
                                  +import { userRole } from './Enums/userRole.enum';
                                  +import { ChatRoom } from 'src/chatrooms/chatroom.entity';
                                  +import { Message } from 'src/messages/message.entity';
                                  +
                                  +/**
                                  +  User entity representing the user table in the database.
                                  + */
                                  +@Entity()
                                  +export class User {
                                  +  /**
                                  +    Unique identifier for the user.
                                  +    @example 1
                                  +   */
                                  +  @PrimaryGeneratedColumn()
                                  +  id: number;
                                  +
                                  +  /**
                                  +    First name of the user.
                                  +    @example "John"
                                  +   */
                                  +  @Column('varchar', { length: 100, nullable: false })
                                  +  firstName: string;
                                  +
                                  +  /**
                                  +     Last name of the user.
                                  +    @example "Doe"
                                  +   */
                                  +  @Column('varchar', { length: 100 })
                                  +  lastName: string;
                                  +
                                  +  /**
                                  +   Unique email address of the user.
                                  +    @example "johndoe@example.com"
                                  +   */
                                  +  @Column('varchar', { unique: true, nullable: false })
                                  +  email: string;
                                  +
                                  +  /**
                                  +    @description Encrypted password of the user. Can be null if the user signs up via Google.
                                  +    @example "hashedpassword123"
                                  +   */
                                  +  // @Exclude()
                                  +  @Column('varchar', { nullable: true })
                                  +  password?: string;
                                  +
                                  +  /**
                                  +    @description Role of the user in the application. Default is `USER`.
                                  +   @example "USER"
                                  +   */
                                  +  @Column({ type: 'enum', enum: userRole, default: userRole.USER })
                                  +  userRole?: userRole;
                                  +
                                  +  /**
                                  +    @description Google ID for authentication when the user signs up with Google.
                                  +    @example "123456789-google-id"
                                  +   */
                                  +  @Column('varchar', { length: 225, nullable: true })
                                  +  googleId?: string;
                                  +
                                  +  /**
                                  +    Many-to-Many relationship between users and chat rooms.
                                  +    This allows a user to be part of multiple chat rooms.
                                  +   */
                                  +  @ManyToMany(() => ChatRoom, (chatRoom) => chatRoom.users)
                                  +  @JoinTable() // This creates a junction table to link users and chat rooms
                                  +  chatRooms: ChatRoom[];
                                  +
                                  +  /**
                                  +   One-to-Many relationship between users and messages.
                                  +   A user can send multiple messages.
                                  +   */
                                  +  @OneToMany(() => Message, (message) => message.sender)
                                  +  messages: Message[];
                                  +}
                                  +
                                  +
                                  +
                                  + + + + + + + + + + + + + + + +
                                  +
                                  +

                                  results matching ""

                                  +
                                    +
                                    +
                                    +

                                    No results matching ""

                                    +
                                    +
                                    +
                                    + +
                                    +
                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/graph/dependencies.svg b/documentation/graph/dependencies.svg index 39f442f..efd7560 100644 --- a/documentation/graph/dependencies.svg +++ b/documentation/graph/dependencies.svg @@ -4,47 +4,335 @@ - - + + dependencies - -Legend - -  Declarations - -  Module - -  Bootstrap - -  Providers - -  Exports + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports cluster_AppModule - + + + +cluster_AppModule_imports + cluster_AppModule_providers - + - + +cluster_AuthModule + + + +cluster_AuthModule_exports + + + +cluster_AuthModule_providers + + + +cluster_ChatroomsModule + + + +cluster_ChatroomsModule_providers + + + +cluster_GoogleAuthticationModule + + + +cluster_MessagesModule + + + +cluster_MessagesModule_providers + + + +cluster_UserModule + + + +cluster_UserModule_exports + + + +cluster_UserModule_providers + + + -AppService - -AppService +AuthModule + +AuthModule - + AppModule - -AppModule + +AppModule - + +AuthModule->AppModule + + + + + +AuthService + +AuthService + + + +AuthModule->AuthService + + + + + +HashingProvider + +HashingProvider + + + +AuthModule->HashingProvider + + + + + +ChatroomsModule + +ChatroomsModule + + + +ChatroomsModule->AppModule + + + + + +MessagesModule + +MessagesModule + + + +MessagesModule->AppModule + + + + + +UserModule + +UserModule + + + +UserModule->AppModule + + + + + +UserService + +UserService + + + +UserModule->UserService + + + + + +AppService + +AppService + + + AppService->AppModule - - + + + + + +AuthService + +AuthService + + + +AuthService->AuthModule + + + + + +GenerateTokensProvider + +GenerateTokensProvider + + + +GenerateTokensProvider->AuthModule + + + + + +GoogleAuthenticationService + +GoogleAuthenticationService + + + +GoogleAuthenticationService->AuthModule + + + + + +GoogleAuthticationModule + +GoogleAuthticationModule + + + +GoogleAuthenticationService->GoogleAuthticationModule + + + + + +RefreshTokensProvider + +RefreshTokensProvider + + + +RefreshTokensProvider->AuthModule + + + + + +SignInProvider + +SignInProvider + + + +SignInProvider->AuthModule + + + + + +ChatRoomsService + +ChatRoomsService + + + +ChatRoomsService->ChatroomsModule + + + + + +MessagesService + +MessagesService + + + +MessagesService->MessagesModule + + + + + +CreateGoogleUserProvider + +CreateGoogleUserProvider + + + +CreateGoogleUserProvider->UserModule + + + + + +CreateUserProvider + +CreateUserProvider + + + +CreateUserProvider->UserModule + + + + + +FindOneByEmail + +FindOneByEmail + + + +FindOneByEmail->UserModule + + + + + +FindOneByGoogleIdProvider + +FindOneByGoogleIdProvider + + + +FindOneByGoogleIdProvider->UserModule + + + + + +UserService + +UserService + + + +UserService->UserModule + + diff --git a/documentation/guards/AccessTokenGuard.html b/documentation/guards/AccessTokenGuard.html new file mode 100644 index 0000000..8130056 --- /dev/null +++ b/documentation/guards/AccessTokenGuard.html @@ -0,0 +1,564 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                    +
                                    + + +
                                    +
                                    + + + + + + + + + + + + + + +
                                    +
                                    +

                                    +

                                    File

                                    +

                                    +

                                    + src/auth/guard/access-token/access-token.guard.ts +

                                    + + +

                                    +

                                    Description

                                    +

                                    +

                                    +

                                    Access Token Guard to protect routes by verifying JWT tokens.

                                    + +

                                    + + + + +
                                    +

                                    Index

                                    + + + + + + + + + + + + + + + +
                                    +
                                    Methods
                                    +
                                    + +
                                    +
                                    + +
                                    +

                                    Constructor

                                    + + + + + + + + + + + + + +
                                    +constructor(jwtService: JwtService, jwtConfiguration: ConfigType<>) +
                                    + +
                                    +

                                    Constructor to inject dependencies.

                                    +
                                    +
                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                    NameTypeOptionalDescription
                                    jwtService + JwtService + + No + +
                                      +
                                    • The JWT service for token operations.
                                    • +
                                    + +
                                    jwtConfiguration + ConfigType<> + + No + +
                                      +
                                    • The JWT configuration settings.
                                    • +
                                    + +
                                    +
                                    +
                                    +
                                    + +
                                    + +

                                    + Methods +

                                    + + + + + + + + + + + + + + + + + + + +
                                    + + + Async + canActivate + + +
                                    + + canActivate(context: ExecutionContext) +
                                    + +
                                    +

                                    Determines whether a request has access based on the JWT token.

                                    +
                                    + +
                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                    NameTypeOptionalDescription
                                    context + ExecutionContext + + No + +
                                      +
                                    • The execution context containing request details.
                                    • +
                                    + +
                                    +
                                    +
                                    + Returns : Promise<boolean> + +
                                    +
                                    +

                                    A boolean indicating if the request is authorized.

                                    + +
                                    +
                                    + + + + + + + + + + + + + + + + + + + +
                                    + + + Private + extractTokenFromHeader + + +
                                    + + extractTokenFromHeader(request: Request) +
                                    + +
                                    +

                                    Extracts the JWT token from the request header.

                                    +
                                    + +
                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                    NameTypeOptionalDescription
                                    request + Request + + No + +
                                      +
                                    • The incoming HTTP request.
                                    • +
                                    + +
                                    +
                                    +
                                    + Returns : string | undefined + +
                                    +
                                    +

                                    The extracted token or undefined if not found.

                                    + +
                                    +
                                    +
                                    +
                                    + + +
                                    +
                                    import { 
                                    +  CanActivate,
                                    +  ExecutionContext,
                                    +  Inject,
                                    +  Injectable,
                                    +  UnauthorizedException,
                                    +} from '@nestjs/common';
                                    +import { ApiBearerAuth, ApiTags } from '@nestjs/swagger';
                                    +import { ConfigType } from '@nestjs/config';
                                    +import { JwtService } from '@nestjs/jwt';
                                    +import { Request } from 'express';
                                    +import { Observable } from 'rxjs';
                                    +import jwtConfig from 'src/auth/authConfig/jwt.config';
                                    +import { REQUEST_USER_KEY } from 'src/auth/constants/auth.constant';
                                    +
                                    +/**
                                    + * Access Token Guard to protect routes by verifying JWT tokens.
                                    + */
                                    +@ApiBearerAuth()
                                    +@ApiTags('Auth')
                                    +@Injectable()
                                    +export class AccessTokenGuard implements CanActivate {
                                    +  /**
                                    +   * Constructor to inject dependencies.
                                    +   * @param jwtService - The JWT service for token operations.
                                    +   * @param jwtConfiguration - The JWT configuration settings.
                                    +   */
                                    +  constructor(
                                    +    private readonly jwtService: JwtService,
                                    +    @Inject(jwtConfig.KEY)
                                    +    private readonly jwtConfiguration: ConfigType<typeof jwtConfig>,
                                    +  ) {}
                                    +
                                    +  /**
                                    +   * Determines whether a request has access based on the JWT token.
                                    +   * @param context - The execution context containing request details.
                                    +   * @returns A boolean indicating if the request is authorized.
                                    +   */
                                    +  async canActivate(context: ExecutionContext): Promise<boolean> {
                                    +    // Extract the request from the execution context
                                    +    const request = context.switchToHttp().getRequest<Request>();
                                    +    
                                    +    // Extract the token from the header
                                    +    const token = this.extractTokenFromHeader(request);
                                    +    
                                    +    // Validate the token
                                    +    if (!token) {
                                    +      throw new UnauthorizedException('Token not found');
                                    +    }
                                    +    
                                    +    try {
                                    +      const payload = await this.jwtService.verifyAsync(token, this.jwtConfiguration);
                                    +      request[REQUEST_USER_KEY] = payload;
                                    +      console.log(payload);
                                    +    } catch (error) {
                                    +      throw new UnauthorizedException('Invalid or expired token');
                                    +    }
                                    +    
                                    +    return true;
                                    +  }
                                    +
                                    +  /**
                                    +   * Extracts the JWT token from the request header.
                                    +   * @param request - The incoming HTTP request.
                                    +   * @returns The extracted token or undefined if not found.
                                    +   */
                                    +  private extractTokenFromHeader(request: Request): string | undefined {
                                    +    const authHeader = request.headers.authorization;
                                    +    if (!authHeader) return undefined;
                                    +    const [, token] = authHeader.split(' ');
                                    +    return token;
                                    +  }
                                    +}
                                    +
                                    +
                                    +
                                    + + + + + + + + + + + +
                                    +
                                    +

                                    results matching ""

                                    +
                                      +
                                      +
                                      +

                                      No results matching ""

                                      +
                                      +
                                      +
                                      + +
                                      +
                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/guards/AuthGuardGuard.html b/documentation/guards/AuthGuardGuard.html new file mode 100644 index 0000000..3c08402 --- /dev/null +++ b/documentation/guards/AuthGuardGuard.html @@ -0,0 +1,494 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                      +
                                      + + +
                                      +
                                      + + + + + + + + + + + + + + +
                                      +
                                      +

                                      +

                                      File

                                      +

                                      +

                                      + src/auth/guard/auth-guard/auth-guard.guard.ts +

                                      + + +

                                      +

                                      Description

                                      +

                                      +

                                      +

                                      AuthGuard class implementing CanActivate

                                      + +

                                      + + + + +
                                      +

                                      Index

                                      + + + + + + + + + + + + + + + + + + + + + +
                                      +
                                      Properties
                                      +
                                      + +
                                      +
                                      Methods
                                      +
                                      + +
                                      +
                                      + +
                                      +

                                      Constructor

                                      + + + + + + + + + + + + + +
                                      +constructor(reflector: Reflector, accessTokenGuard: AccessTokenGuard) +
                                      + +
                                      +
                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                      NameTypeOptional
                                      reflector + Reflector + + No +
                                      accessTokenGuard + AccessTokenGuard + + No +
                                      +
                                      +
                                      +
                                      + +
                                      + +

                                      + Methods +

                                      + + + + + + + + + + + + + + + + + + + +
                                      + + + Async + canActivate + + +
                                      + + canActivate(context: ExecutionContext) +
                                      + +
                                      +

                                      CanActivate method to get authTypes from the reflector

                                      +
                                      + +
                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                      NameTypeOptionalDescription
                                      context + ExecutionContext + + No + +
                                        +
                                      • Execution context
                                      • +
                                      + +
                                      +
                                      +
                                      + Returns : Promise<boolean> + +
                                      +
                                      +

                                      A boolean indicating whether the request is authorized

                                      + +
                                      +
                                      +
                                      +
                                      + + +
                                      +
                                      import {
                                      +  CanActivate,
                                      +  ExecutionContext,
                                      +  Injectable,
                                      +  UnauthorizedException,
                                      +} from '@nestjs/common';
                                      +import { Reflector } from '@nestjs/core';
                                      +import { Observable } from 'rxjs';
                                      +import { AccessTokenGuard } from '../access-token/access-token.guard';
                                      +import { authTypes } from 'src/auth/enums/authTypes.enum';
                                      +import { AUTH_TYPE_KEY } from 'src/auth/constants/auth.constant';
                                      +import { ApiTags } from '@nestjs/swagger';
                                      +
                                      +/**
                                      + * AuthGuard class implementing CanActivate
                                      + */
                                      +@ApiTags('Auth')
                                      +@Injectable()
                                      +export class AuthGuardGuard implements CanActivate {
                                      +  /**
                                      +   * Injecting default AuthType
                                      +   */
                                      +  private static readonly defaultAuthType = authTypes.Bearer;
                                      +
                                      +  /**
                                      +   * Injecting default AuthTypeGuardMap
                                      +   */
                                      +  private readonly authTypeGuardMap: Record<
                                      +    authTypes,
                                      +    CanActivate | CanActivate[]
                                      +  > = {
                                      +    [authTypes.Bearer]: this.accessTokenGuard,
                                      +    [authTypes.None]: { canActivate: () => true },
                                      +  };
                                      +
                                      +  constructor(
                                      +    /**
                                      +     * Injecting reflector
                                      +     */
                                      +    private readonly reflector: Reflector,
                                      +
                                      +    /**
                                      +     * Injecting Access Token Guard
                                      +     */
                                      +    private readonly accessTokenGuard: AccessTokenGuard,
                                      +  ) {}
                                      +
                                      +  /**
                                      +   * CanActivate method to get authTypes from the reflector
                                      +   * @param context - Execution context
                                      +   * @returns A boolean indicating whether the request is authorized
                                      +   * @throws UnauthorizedException if access is denied
                                      +   */
                                      +  async canActivate(context: ExecutionContext): Promise<boolean> {
                                      +    // Get authTypes from the reflector
                                      +    const authTypes =
                                      +      this.reflector.getAllAndOverride(AUTH_TYPE_KEY, [
                                      +        context.getHandler(),
                                      +        context.getClass(),
                                      +      ]) ?? [AuthGuardGuard.defaultAuthType];
                                      +
                                      +    // Get array of guards
                                      +    const guards = authTypes.map((type) => this.authTypeGuardMap[type]);
                                      +
                                      +    // Loop through the guards and execute the canActivate method
                                      +    for (const instance of guards) {
                                      +      const canActivate = await Promise.resolve(
                                      +        instance.canActivate(context),
                                      +      ).catch((err) => {
                                      +        error: err;
                                      +      });
                                      +
                                      +      if (canActivate) {
                                      +        return true;
                                      +      }
                                      +    }
                                      +    throw new UnauthorizedException();
                                      +  }
                                      +}
                                      +
                                      +
                                      +
                                      + + + + + + + + + + + +
                                      +
                                      +

                                      results matching ""

                                      +
                                        +
                                        +
                                        +

                                        No results matching ""

                                        +
                                        +
                                        +
                                        + +
                                        +
                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/images/coverage-badge-documentation.svg b/documentation/images/coverage-badge-documentation.svg index fe6ebd6..7b1afb8 100644 --- a/documentation/images/coverage-badge-documentation.svg +++ b/documentation/images/coverage-badge-documentation.svg @@ -1,9 +1,9 @@ - - + + documentation - 0% + 91% diff --git a/documentation/injectables/AppService.html b/documentation/injectables/AppService.html index cf8bb0c..1b04152 100644 --- a/documentation/injectables/AppService.html +++ b/documentation/injectables/AppService.html @@ -126,6 +126,13 @@

                                        File

                                        +

                                        +

                                        Description

                                        +

                                        +

                                        +

                                        AppService class

                                        + +

                                        @@ -183,14 +190,16 @@

                                        - + +

                                        Get hello method

                                        +
                                        Returns : string @@ -207,9 +216,12 @@

                                        import { Injectable } from '@nestjs/common';
                                        -
                                        +/**AppService  class*/
                                         @Injectable()
                                        +
                                         export class AppService {
                                        +  
                                        +   /**Get  hello method */
                                           getHello(): string {
                                             return 'Hello';
                                           }
                                        diff --git a/documentation/injectables/AuthService.html b/documentation/injectables/AuthService.html
                                        new file mode 100644
                                        index 0000000..347ab8f
                                        --- /dev/null
                                        +++ b/documentation/injectables/AuthService.html
                                        @@ -0,0 +1,511 @@
                                        +
                                        +
                                        +    
                                        +        
                                        +        
                                        +        real-time-chat-api documentation
                                        +        
                                        +        
                                        +
                                        +        
                                        +	   
                                        +        
                                        +    
                                        +    
                                        +          
                                        +
                                        +        
                                        +
                                        +        
                                        +
                                        +        
                                        +
                                        + + +
                                        +
                                        + + + + + + + + + + + + +
                                        +
                                        +

                                        +

                                        File

                                        +

                                        +

                                        + src/auth/providers/auth.service.ts +

                                        + + +

                                        +

                                        Description

                                        +

                                        +

                                        +

                                        Auth service class

                                        + +

                                        + + + +
                                        +

                                        Index

                                        + + + + + + + + + + + + + + + +
                                        +
                                        Methods
                                        +
                                        + +
                                        +
                                        + +
                                        +

                                        Constructor

                                        + + + + + + + + + + + + + +
                                        +constructor(userService: UserService, signInProvider: SignInProvider, refreshTokensProvider: RefreshTokensProvider) +
                                        + +
                                        +
                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                        NameTypeOptional
                                        userService + UserService + + No +
                                        signInProvider + SignInProvider + + No +
                                        refreshTokensProvider + RefreshTokensProvider + + No +
                                        +
                                        +
                                        +
                                        + +
                                        + +

                                        + Methods +

                                        + + + + + + + + + + + + + + + + + + + +
                                        + + + Public + refreshToken + + +
                                        + + refreshToken(refreshTokenDto: RefreshTokenDto) +
                                        + +
                                        +

                                        method for the refresh token

                                        +
                                        + +
                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                        NameTypeOptional
                                        refreshTokenDto + RefreshTokenDto + + No +
                                        +
                                        +
                                        + Returns : any + +
                                        +
                                        + +
                                        +
                                        + + + + + + + + + + + + + + + + + + + +
                                        + + + Public + Async + SignIn + + +
                                        + + SignIn(signInDto: SignInDto) +
                                        + +
                                        +

                                        signin method taking signinDto

                                        +
                                        + +
                                        + Parameters : + + + + + + + + + + + + + + + + + + + +
                                        NameTypeOptional
                                        signInDto + SignInDto + + No +
                                        +
                                        +
                                        + Returns : unknown + +
                                        +
                                        + +
                                        +
                                        +
                                        + +
                                        + + +
                                        +
                                        import { forwardRef, Inject, Injectable } from '@nestjs/common';
                                        +import { SignInDto } from '../dtos/userDto';
                                        +import { RefreshTokenDto } from '../dtos/refreshTokenDto';
                                        +import { UserService } from 'src/users/provider/user.service';
                                        +import { SignInProvider } from './sign-in.provider';
                                        +import { RefreshTokensProvider } from './refresh-tokens.provider';
                                        +
                                        +/**Auth service class */
                                        +@Injectable()
                                        +export class AuthService {
                                        +    constructor(
                                        +        /* 
                                        +          injecting user service
                                        +         */
                                        +        @Inject(forwardRef(() => UserService))
                                        +        private readonly userService: UserService,
                                        +
                                        +        /*inject signInProvider*/
                                        +        private readonly signInProvider: SignInProvider,
                                        +
                                        +        /* 
                                        +         inject refreshTokenProvider
                                        +         */
                                        +         private readonly refreshTokensProvider: RefreshTokensProvider
                                        +    ) {}
                                        +
                                        +        /**signin method taking signinDto */
                                        +    public async SignIn(signInDto: SignInDto) {
                                        +        return await this.signInProvider.SignIn(signInDto)
                                        +    }
                                        +
                                        +        /**method for the refresh token */
                                        +    public refreshToken(refreshTokenDto: RefreshTokenDto) {
                                        +        return this.refreshTokensProvider.refreshTokens(refreshTokenDto)
                                        +    }    
                                        +
                                        +}
                                        +
                                        + +
                                        + + + + + + + + + + + + + +
                                        +
                                        +

                                        results matching ""

                                        +
                                          +
                                          +
                                          +

                                          No results matching ""

                                          +
                                          +
                                          +
                                          + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/BcryptProvider.html b/documentation/injectables/BcryptProvider.html new file mode 100644 index 0000000..1ee6cc3 --- /dev/null +++ b/documentation/injectables/BcryptProvider.html @@ -0,0 +1,438 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                          +
                                          + + +
                                          +
                                          + + + + + + + + + + + + +
                                          +
                                          +

                                          +

                                          File

                                          +

                                          +

                                          + src/auth/providers/bcrypt.ts +

                                          + + +

                                          +

                                          Description

                                          +

                                          +

                                          +

                                          injectable decorator

                                          + +

                                          + + + +
                                          +

                                          Index

                                          + + + + + + + + + + + + + + + +
                                          +
                                          Methods
                                          +
                                          + +
                                          +
                                          + + +
                                          + +

                                          + Methods +

                                          + + + + + + + + + + + + + + + + + + + +
                                          + + + Public + Async + comparePasswords + + +
                                          + + comparePasswords(password: string, encryPassword: string) +
                                          + +
                                          +

                                          Comparing password method

                                          +
                                          + +
                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                          NameTypeOptional
                                          password + string + + No +
                                          encryPassword + string + + No +
                                          +
                                          +
                                          + Returns : Promise<boolean> + +
                                          +
                                          + +
                                          +
                                          + + + + + + + + + + + + + + + + + + + +
                                          + + + Public + Async + hashPassword + + +
                                          + + hashPassword(inpPassword: string | Buffer) +
                                          + +
                                          +

                                          Hasshing password method

                                          +
                                          + +
                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                          NameTypeOptional
                                          inpPassword + string | Buffer + + No +
                                          +
                                          +
                                          + Returns : Promise<string> + +
                                          +
                                          + +
                                          +
                                          +
                                          + +
                                          + + +
                                          +
                                          import { Injectable } from '@nestjs/common';
                                          +import { HashingProvider } from './hashing';
                                          +import * as bcrypt from 'bcrypt';
                                          +
                                          +/**injectable decorator */
                                          +@Injectable()
                                          +/**BcryptProvider class that implements Hashing provider */
                                          +export class BcryptProvider implements HashingProvider {
                                          +        /**Hasshing  password method*/
                                          +    public async hashPassword(inpPassword: string | Buffer): Promise<string> {
                                          +        const saltRounds = 10
                                          +        const salt = await bcrypt.genSalt(saltRounds)
                                          +        
                                          +        return await bcrypt.hash(inpPassword, salt) 
                                          +    }
                                          +
                                          +    /**Comparing password method */ 
                                          +    public async comparePasswords(password: string, encryPassword: string): Promise<boolean> {
                                          +        return await bcrypt.compare(password, encryPassword)
                                          +    }
                                          +}
                                          +
                                          +
                                          + +
                                          + + + + + + + + + + + + + +
                                          +
                                          +

                                          results matching ""

                                          +
                                            +
                                            +
                                            +

                                            No results matching ""

                                            +
                                            +
                                            +
                                            + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/ChatRoomsService.html b/documentation/injectables/ChatRoomsService.html new file mode 100644 index 0000000..d0f68bd --- /dev/null +++ b/documentation/injectables/ChatRoomsService.html @@ -0,0 +1,705 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                            +
                                            + + +
                                            +
                                            + + + + + + + + + + + + +
                                            +
                                            +

                                            +

                                            File

                                            +

                                            +

                                            + src/chatrooms/providers/chatrooms/chatrooms.service.ts +

                                            + + +

                                            +

                                            Description

                                            +

                                            +

                                            +

                                            Chatroom service class

                                            + +

                                            + + + +
                                            +

                                            Index

                                            + + + + + + + + + + + + + + + +
                                            +
                                            Methods
                                            +
                                            + +
                                            +
                                            + +
                                            +

                                            Constructor

                                            + + + + + + + + + + + + + +
                                            +constructor(chatRoomRepository: Repository<ChatRoom>, userRepository: Repository<User>) +
                                            + +
                                            +
                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                            NameTypeOptional
                                            chatRoomRepository + Repository<ChatRoom> + + No +
                                            userRepository + Repository<User> + + No +
                                            +
                                            +
                                            +
                                            + +
                                            + +

                                            + Methods +

                                            + + + + + + + + + + + + + + + + + + + + + + +
                                            + + + + + + Async + create + + +
                                            + + create(name: string, userIds: string[], type: "private" | "group") +
                                            + Decorators : +
                                            + @ApiOperation({summary: 'Create a chatroom'})
                                            @ApiResponse({status: 201, description: 'Chatroom created successfully'})
                                            @ApiResponse({status: 400, description: 'Invalid input'})
                                            +
                                            + +
                                            +

                                            Create method that takes in name, userIds, and type (private or group)

                                            +
                                            + +
                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                            NameTypeOptionalDescription
                                            name + string + + No + +
                                              +
                                            • Name of the chatroom
                                            • +
                                            + +
                                            userIds + string[] + + No + +
                                              +
                                            • List of user IDs
                                            • +
                                            + +
                                            type + "private" | "group" + + No + +
                                              +
                                            • Type of chatroom (private or group)
                                            • +
                                            + +
                                            +
                                            +
                                            + Returns : any + +
                                            +
                                            +

                                            Created chatroom object

                                            + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + +
                                            + + + + + + Async + delete + + +
                                            + + delete(id: string) +
                                            + Decorators : +
                                            + @ApiOperation({summary: 'Delete a chatroom'})
                                            @ApiResponse({status: 200, description: 'Chatroom deleted successfully'})
                                            @ApiResponse({status: 404, description: 'Chatroom not found'})
                                            +
                                            + +
                                            +

                                            Delete chatroom by ID

                                            +
                                            + +
                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                            NameTypeOptionalDescription
                                            id + string + + No + +
                                              +
                                            • Chatroom ID
                                            • +
                                            + +
                                            +
                                            +
                                            + Returns : unknown + +
                                            +
                                            +

                                            Deletion result

                                            + +
                                            +
                                            + + + + + + + + + + + + + + + + + + + + + + +
                                            + + + + + Async + findAll + + +
                                            + + findAll(userId: string) +
                                            + Decorators : +
                                            + @ApiOperation({summary: 'Get all chatrooms for a user'})
                                            @ApiResponse({status: 200, description: 'List of chatrooms retrieved successfully'})
                                            +
                                            + +
                                            +

                                            Find all chatrooms associated with a user

                                            +
                                            + +
                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                            NameTypeOptionalDescription
                                            userId + string + + No + +
                                              +
                                            • User ID
                                            • +
                                            + +
                                            +
                                            +
                                            + Returns : unknown + +
                                            +
                                            +

                                            List of chatrooms

                                            + +
                                            +
                                            +
                                            + +
                                            + + +
                                            +
                                            import { Injectable } from '@nestjs/common';
                                            +import { InjectRepository } from '@nestjs/typeorm';
                                            +import { ChatRoom } from 'src/chatrooms/chatroom.entity';
                                            +import { User } from 'src/users/user.entitly';
                                            +import { Repository } from 'typeorm';
                                            +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
                                            +
                                            +/**
                                            + * Chatroom service class
                                            + */
                                            +@Injectable()
                                            +@ApiTags('Chat Rooms')
                                            +/**
                                            + * Chatroom service class
                                            + */
                                            +export class ChatRoomsService {
                                            +  constructor(
                                            +    /** Injecting chatroom repository */
                                            +    @InjectRepository(ChatRoom)
                                            +    private chatRoomRepository: Repository<ChatRoom>,
                                            +
                                            +    /** Injecting user repository */
                                            +    @InjectRepository(User)
                                            +    private userRepository: Repository<User>,
                                            +  ) {}
                                            +
                                            +  /**
                                            +   * Create method that takes in name, userIds, and type (private or group)
                                            +   * @param name - Name of the chatroom
                                            +   * @param userIds - List of user IDs
                                            +   * @param type - Type of chatroom (private or group)
                                            +   * @returns Created chatroom object
                                            +   */
                                            +  @ApiOperation({ summary: 'Create a chatroom' })
                                            +  @ApiResponse({ status: 201, description: 'Chatroom created successfully' })
                                            +  @ApiResponse({ status: 400, description: 'Invalid input' })
                                            +
                                            +  /**create method */
                                            +  async create(name: string, userIds: string[], type: 'private' | 'group') {
                                            +    // const users = await this.userRepository.findByIds(userIds);
                                            +    // const chatRoom = this.chatRoomRepository.create({ name, users, type });
                                            +    // return this.chatRoomRepository.save(chatRoom);
                                            +  }
                                            +
                                            +  /**
                                            +   * Find all chatrooms associated with a user
                                            +   * @param userId - User ID
                                            +   * @returns List of chatrooms
                                            +   */
                                            +  @ApiOperation({ summary: 'Get all chatrooms for a user' })
                                            +  @ApiResponse({ status: 200, description: 'List of chatrooms retrieved successfully' })
                                            +  /**Find all */
                                            +  async findAll(userId: string) {
                                            +    return this.chatRoomRepository
                                            +      .createQueryBuilder('room')
                                            +      .innerJoinAndSelect('room.users', 'user')
                                            +      .where('user.id = :userId', { userId })
                                            +      .getMany();
                                            +  }
                                            +
                                            +  /**
                                            +   * Delete chatroom by ID
                                            +   * @param id - Chatroom ID
                                            +   * @returns Deletion result
                                            +   */
                                            +  @ApiOperation({ summary: 'Delete a chatroom' })
                                            +  @ApiResponse({ status: 200, description: 'Chatroom deleted successfully' })
                                            +  @ApiResponse({ status: 404, description: 'Chatroom not found' })
                                            +  async delete(id: string) {
                                            +    return this.chatRoomRepository.delete(id);
                                            +  }
                                            +}
                                            +
                                            +
                                            + +
                                            + + + + + + + + + + + + + +
                                            +
                                            +

                                            results matching ""

                                            +
                                              +
                                              +
                                              +

                                              No results matching ""

                                              +
                                              +
                                              +
                                              + +
                                              +
                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/CreateGoogleUserProvider.html b/documentation/injectables/CreateGoogleUserProvider.html new file mode 100644 index 0000000..ddaa0ce --- /dev/null +++ b/documentation/injectables/CreateGoogleUserProvider.html @@ -0,0 +1,442 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                              +
                                              + + +
                                              +
                                              + + + + + + + + + + + + +
                                              +
                                              +

                                              +

                                              File

                                              +

                                              +

                                              + src/users/provider/googleUserProvider.ts +

                                              + + +

                                              +

                                              Description

                                              +

                                              +

                                              +

                                              Service responsible for creating users authenticated via Google.

                                              + +

                                              + + + +
                                              +

                                              Index

                                              + + + + + + + + + + + + + + + +
                                              +
                                              Methods
                                              +
                                              + +
                                              +
                                              + +
                                              +

                                              Constructor

                                              + + + + + + + + + + + + + +
                                              +constructor(userRepository: Repository<User>) +
                                              + +
                                              +
                                              + Parameters : + + + + + + + + + + + + + + + + + + +
                                              NameTypeOptional
                                              userRepository + Repository<User> + + No +
                                              +
                                              +
                                              +
                                              + +
                                              + +

                                              + Methods +

                                              + + + + + + + + + + + + + + + + + + + + + + +
                                              + + + + + + Public + Async + createGoogleUser + + +
                                              + + createGoogleUser(googleUser: GoogleInterface) +
                                              + Decorators : +
                                              + @ApiOperation({summary: 'Create a Google-authenticated user'})
                                              @ApiResponse({status: 201, description: 'User successfully created.'})
                                              @ApiResponse({status: 409, description: 'Could not create a new user.'})
                                              +
                                              + +
                                              +

                                              Creates a new user using Google authentication.

                                              +
                                              + +
                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                              NameTypeOptionalDescription
                                              googleUser + GoogleInterface + + No + +
                                                +
                                              • The Google user data.
                                              • +
                                              + +
                                              +
                                              +
                                              + Returns : Promise<User> + +
                                              +
                                              +

                                              The created user entity.

                                              + +
                                              +
                                              +
                                              + +
                                              + + +
                                              +
                                              import { ConflictException, Injectable } from '@nestjs/common';
                                              +import { GoogleInterface } from '../../auth/social/interfaces/user.interface';
                                              +import { Repository } from 'typeorm';
                                              +import { User } from 'src/users/user.entitly';
                                              +import { InjectRepository } from '@nestjs/typeorm';
                                              +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
                                              +
                                              +/**
                                              + * Service responsible for creating users authenticated via Google.
                                              + */
                                              +@ApiTags('Users')
                                              +@Injectable()
                                              +
                                              +/**Create Google User Provider class */
                                              +export class CreateGoogleUserProvider {
                                              +  constructor(
                                              +    /**
                                              +     * Injects the user repository.
                                              +     */
                                              +    @InjectRepository(User)
                                              +    private readonly userRepository: Repository<User>,
                                              +  ) {}
                                              +
                                              +  /**
                                              +   * Creates a new user using Google authentication.
                                              +   * @param googleUser - The Google user data.
                                              +   * @returns The created user entity.
                                              +   * @throws ConflictException if user creation fails.
                                              +   */
                                              +  @ApiOperation({ summary: 'Create a Google-authenticated user' })
                                              +  @ApiResponse({ status: 201, description: 'User successfully created.' })
                                              +  @ApiResponse({ status: 409, description: 'Could not create a new user.' })
                                              +
                                              +  /**Method to create GoogleUser */
                                              +  public async createGoogleUser(googleUser: GoogleInterface): Promise<User> {
                                              +    try {
                                              +      const user = this.userRepository.create(googleUser);
                                              +      return await this.userRepository.save(user);
                                              +    } catch (error) {
                                              +      throw new ConflictException(error, {
                                              +        description: 'Could not create a new user',
                                              +      });
                                              +    }
                                              +  }
                                              +}
                                              +
                                              +
                                              + +
                                              + + + + + + + + + + + + + +
                                              +
                                              +

                                              results matching ""

                                              +
                                                +
                                                +
                                                +

                                                No results matching ""

                                                +
                                                +
                                                +
                                                + +
                                                +
                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/CreateUserProvider.html b/documentation/injectables/CreateUserProvider.html new file mode 100644 index 0000000..d634c77 --- /dev/null +++ b/documentation/injectables/CreateUserProvider.html @@ -0,0 +1,510 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                +
                                                + + +
                                                +
                                                + + + + + + + + + + + + +
                                                +
                                                +

                                                +

                                                File

                                                +

                                                +

                                                + src/users/provider/create-user.provider.ts +

                                                + + +

                                                +

                                                Description

                                                +

                                                +

                                                +

                                                Service responsible for handling user creation

                                                + +

                                                + + + +
                                                +

                                                Index

                                                + + + + + + + + + + + + + + + +
                                                +
                                                Methods
                                                +
                                                + +
                                                +
                                                + +
                                                +

                                                Constructor

                                                + + + + + + + + + + + + + +
                                                +constructor(userRepository: Repository<User>, hashingProvider: HashingProvider) +
                                                + +
                                                +

                                                Constructor to inject dependencies.

                                                +
                                                +
                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                NameTypeOptionalDescription
                                                userRepository + Repository<User> + + No + +
                                                  +
                                                • Repository for User entity
                                                • +
                                                + +
                                                hashingProvider + HashingProvider + + No + +
                                                  +
                                                • Service for password hashing
                                                • +
                                                + +
                                                +
                                                +
                                                +
                                                + +
                                                + +

                                                + Methods +

                                                + + + + + + + + + + + + + + + + + + + + + + +
                                                + + + + + + + Public + Async + createUsers + + +
                                                + + createUsers(createUserDto: CreateUserDto) +
                                                + Decorators : +
                                                + @ApiOperation({summary: 'Create a new user'})
                                                @ApiResponse({status: 201, description: 'User successfully created.', type: User})
                                                @ApiResponse({status: 400, description: 'User already exists.'})
                                                @ApiResponse({status: 408, description: 'Database connection issue.'})
                                                +
                                                + +
                                                +

                                                Creates a new user in the system

                                                +
                                                + +
                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                NameTypeOptionalDescription
                                                createUserDto + CreateUserDto + + No + +
                                                  +
                                                • DTO containing user data.
                                                • +
                                                + +
                                                +
                                                +
                                                + Returns : Promise<User> + +
                                                +
                                                +

                                                The newly created user.

                                                + +
                                                +
                                                +
                                                + +
                                                + + +
                                                +
                                                import {   BadRequestException,   forwardRef,   Inject,   Injectable,   RequestTimeoutException, } from '@nestjs/common';
                                                +import { Repository } from 'typeorm';
                                                +import { User } from '../user.entitly';
                                                +import { InjectRepository } from '@nestjs/typeorm';
                                                +import { CreateUserDto } from '../DTOs/create-user.dto';
                                                +import { HashingProvider } from 'src/auth/providers/hashing';
                                                +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';
                                                +
                                                +/**
                                                + * Service responsible for handling user creation
                                                + */
                                                +@ApiTags('Users')
                                                +@Injectable()
                                                +export class CreateUserProvider {
                                                +  /**
                                                +   * Constructor to inject dependencies.
                                                +   * @param userRepository - Repository for User entity
                                                +   * @param hashingProvider - Service for password hashing
                                                +   */
                                                +  constructor(
                                                +    /** Inject userRepository */
                                                +    @InjectRepository(User) private userRepository: Repository<User>,
                                                +
                                                +    /** Inject hashingProvider */
                                                +    @Inject(forwardRef(() => HashingProvider))
                                                +    private readonly hashingProvider: HashingProvider,
                                                +  ) {}
                                                +
                                                +  /**
                                                +   * Creates a new user in the system
                                                +   * @param createUserDto - DTO containing user data.
                                                +   * @returns The newly created user.
                                                +   * @throws BadRequestException If the user already exists.
                                                +   * @throws RequestTimeoutException If there is an issue connecting to the database.
                                                +   */
                                                +  @ApiOperation({ summary: 'Create a new user' })
                                                +  @ApiResponse({ status: 201, description: 'User successfully created.', type: User })
                                                +  @ApiResponse({ status: 400, description: 'User already exists.' })
                                                +  @ApiResponse({ status: 408, description: 'Database connection issue.' })
                                                +  public async createUsers(createUserDto: CreateUserDto): Promise<User> {
                                                +    let existingUser = undefined;
                                                +
                                                +    try {
                                                +      existingUser = await this.userRepository.findOne({
                                                +        where: { email: createUserDto.email },
                                                +      });
                                                +    } catch (error) {
                                                +      throw new RequestTimeoutException(
                                                +        'Unable to process your request at the moment, Please try later',
                                                +        {
                                                +          description: 'Error connecting to your database',
                                                +          cause: 'The user is having network issues',
                                                +        },
                                                +      );
                                                +    }
                                                +
                                                +    if (existingUser) {
                                                +      throw new BadRequestException('User already exists');
                                                +    }
                                                +
                                                +    const hashedPassword = await this.hashingProvider.hashPassword(
                                                +      createUserDto.password,
                                                +    );
                                                +
                                                +    const newUser = this.userRepository.create({
                                                +      ...createUserDto,
                                                +      password: hashedPassword,
                                                +    });
                                                +
                                                +    try {
                                                +      await this.userRepository.save(newUser);
                                                +    } catch (error) {
                                                +      throw new RequestTimeoutException(
                                                +        'Unable to process your request at the moment, Please try later',
                                                +        {
                                                +          description: 'Error connecting to your database',
                                                +          cause: 'The user is having network issues',
                                                +        },
                                                +      );
                                                +    }
                                                +
                                                +    return newUser;
                                                +  }
                                                +}
                                                +
                                                +
                                                + +
                                                + + + + + + + + + + + + + +
                                                +
                                                +

                                                results matching ""

                                                +
                                                  +
                                                  +
                                                  +

                                                  No results matching ""

                                                  +
                                                  +
                                                  +
                                                  + +
                                                  +
                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/FindOneByEmail.html b/documentation/injectables/FindOneByEmail.html new file mode 100644 index 0000000..00d3efb --- /dev/null +++ b/documentation/injectables/FindOneByEmail.html @@ -0,0 +1,436 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                  +
                                                  + + +
                                                  +
                                                  + + + + + + + + + + + + +
                                                  +
                                                  +

                                                  +

                                                  File

                                                  +

                                                  +

                                                  + src/users/provider/find-one-by-email.ts +

                                                  + + +

                                                  +

                                                  Description

                                                  +

                                                  +

                                                  +

                                                  Service responsible for finding a user by email.

                                                  + +

                                                  + + + +
                                                  +

                                                  Index

                                                  + + + + + + + + + + + + + + + +
                                                  +
                                                  Methods
                                                  +
                                                  + +
                                                  +
                                                  + +
                                                  +

                                                  Constructor

                                                  + + + + + + + + + + + + + +
                                                  +constructor(userRepository: Repository<User>) +
                                                  + +
                                                  +

                                                  Injects the User repository for database operations.

                                                  +
                                                  +
                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + +
                                                  NameTypeOptionalDescription
                                                  userRepository + Repository<User> + + No + +
                                                    +
                                                  • Repository to interact with the User entity.
                                                  • +
                                                  + +
                                                  +
                                                  +
                                                  +
                                                  + +
                                                  + +

                                                  + Methods +

                                                  + + + + + + + + + + + + + + + + + + + +
                                                  + + + Public + Async + findOneByEmail + + +
                                                  + + findOneByEmail(email: string) +
                                                  + +
                                                  +

                                                  Method to find a user by email.

                                                  +
                                                  + +
                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                  NameTypeOptionalDescription
                                                  email + string + + No + +
                                                    +
                                                  • The email of the user to find.
                                                  • +
                                                  + +
                                                  +
                                                  +
                                                  + Returns : Promise<User> + +
                                                  +
                                                  +

                                                  The found user.

                                                  + +
                                                  +
                                                  +
                                                  + +
                                                  + + +
                                                  +
                                                  import { Injectable, RequestTimeoutException, UnauthorizedException } from '@nestjs/common';
                                                  +import { InjectRepository } from '@nestjs/typeorm';
                                                  +import { Repository } from 'typeorm';
                                                  +import { User } from '../user.entitly';
                                                  +
                                                  +/**
                                                  +   Service responsible for finding a user by email.
                                                  + */
                                                  +@Injectable()
                                                  +export class FindOneByEmail {
                                                  +     /**
                                                  +       Injects the User repository for database operations.
                                                  +      @param {Repository<User>} userRepository - Repository to interact with the User entity.
                                                  +     */
                                                  +    constructor(
                                                  +        @InjectRepository(User) private userRepository: Repository<User>) {}
                                                  +
                                                  +        
                                                  +    /**
                                                  +     
                                                  +      @param {string} email - The email of the user to find.
                                                  +      @returns {Promise<User>} The found user.
                                                  +      @throws {RequestTimeoutException} If there is an issue connecting to the database.
                                                  +      @throws {UnauthorizedException} If the user does not exist.
                                                  +     */
                                                  +     /** Method to find a user by email. */
                                                  +    public async findOneByEmail(email: string): Promise<User> {
                                                  +        let user: User | undefined;
                                                  +
                                                  +        try {
                                                  +            user = await this.userRepository.findOneBy({ email });
                                                  +        } catch (error) {
                                                  +            throw new RequestTimeoutException('Could not fetch user', {
                                                  +                description: 'Error connecting to database',
                                                  +            });
                                                  +        }
                                                  +
                                                  +        if (!user) {
                                                  +            throw new UnauthorizedException('User does not exist');
                                                  +        }
                                                  +
                                                  +        return user; 
                                                  +    }
                                                  +}
                                                  +
                                                  + +
                                                  + + + + + + + + + + + + + +
                                                  +
                                                  +

                                                  results matching ""

                                                  +
                                                    +
                                                    +
                                                    +

                                                    No results matching ""

                                                    +
                                                    +
                                                    +
                                                    + +
                                                    +
                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/FindOneByGoogleIdProvider.html b/documentation/injectables/FindOneByGoogleIdProvider.html new file mode 100644 index 0000000..24423ee --- /dev/null +++ b/documentation/injectables/FindOneByGoogleIdProvider.html @@ -0,0 +1,398 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                    +
                                                    + + +
                                                    +
                                                    + + + + + + + + + + + + +
                                                    +
                                                    +

                                                    +

                                                    File

                                                    +

                                                    +

                                                    + src/users/provider/find-one-by-googleId.ts +

                                                    + + +

                                                    +

                                                    Description

                                                    +

                                                    +

                                                    +

                                                    Service responsible for finding a user by Google ID.

                                                    + +

                                                    + + + +
                                                    +

                                                    Index

                                                    + + + + + + + + + + + + + + + +
                                                    +
                                                    Methods
                                                    +
                                                    + +
                                                    +
                                                    + +
                                                    +

                                                    Constructor

                                                    + + + + + + + + + + + + + +
                                                    +constructor(userRepository: Repository<User>) +
                                                    + +
                                                    +
                                                    + Parameters : + + + + + + + + + + + + + + + + + + +
                                                    NameTypeOptional
                                                    userRepository + Repository<User> + + No +
                                                    +
                                                    +
                                                    +
                                                    + +
                                                    + +

                                                    + Methods +

                                                    + + + + + + + + + + + + + + + + + + + +
                                                    + + + Public + Async + findOneByGoogleId + + +
                                                    + + findOneByGoogleId(googleId: string) +
                                                    + +
                                                    +

                                                    Method to find a user by their Google ID.

                                                    +
                                                    + +
                                                    + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                    NameTypeOptional
                                                    googleId + string + + No +
                                                    +
                                                    +
                                                    + Returns : unknown + +
                                                    +
                                                    + +
                                                    +
                                                    +
                                                    + +
                                                    + + +
                                                    +
                                                    import { Injectable } from '@nestjs/common';
                                                    +import { InjectRepository } from '@nestjs/typeorm';
                                                    +import { Repository } from 'typeorm';
                                                    +import { User } from '../user.entitly';
                                                    +
                                                    +/**
                                                    +  Service responsible for finding a user by Google ID.
                                                    + */
                                                    +@Injectable()
                                                    +export class FindOneByGoogleIdProvider {
                                                    +  constructor(
                                                    +    /*
                                                    +     *inject userRepository
                                                    +     */
                                                    +    @InjectRepository(User)
                                                    +    private userRepository: Repository<User>,
                                                    +  ) {}
                                                    +
                                                    +   /** Method to find a user by their Google ID. */
                                                    +  public async findOneByGoogleId(googleId: string) {
                                                    +    return await this.userRepository.findOneBy({ googleId })
                                                    +  }
                                                    +}
                                                    +
                                                    + +
                                                    + + + + + + + + + + + + + +
                                                    +
                                                    +

                                                    results matching ""

                                                    +
                                                      +
                                                      +
                                                      +

                                                      No results matching ""

                                                      +
                                                      +
                                                      +
                                                      + +
                                                      +
                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/GenerateTokensProvider.html b/documentation/injectables/GenerateTokensProvider.html new file mode 100644 index 0000000..f50c009 --- /dev/null +++ b/documentation/injectables/GenerateTokensProvider.html @@ -0,0 +1,612 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                      +
                                                      + + +
                                                      +
                                                      + + + + + + + + + + + + +
                                                      +
                                                      +

                                                      +

                                                      File

                                                      +

                                                      +

                                                      + src/auth/providers/generate-tokens.provider.ts +

                                                      + + +

                                                      +

                                                      Description

                                                      +

                                                      +

                                                      +

                                                      Injectable service for generating tokens.

                                                      + +

                                                      + + + +
                                                      +

                                                      Index

                                                      + + + + + + + + + + + + + + + +
                                                      +
                                                      Methods
                                                      +
                                                      + +
                                                      +
                                                      + +
                                                      +

                                                      Constructor

                                                      + + + + + + + + + + + + + +
                                                      +constructor(userService: UserService, jwtService: JwtService, jwtConfiguration: ConfigType<>) +
                                                      + +
                                                      +
                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                      NameTypeOptional
                                                      userService + UserService + + No +
                                                      jwtService + JwtService + + No +
                                                      jwtConfiguration + ConfigType<> + + No +
                                                      +
                                                      +
                                                      +
                                                      + +
                                                      + +

                                                      + Methods +

                                                      + + + + + + + + + + + + + + + + + + + +
                                                      + + + Public + Async + generateTokens + + +
                                                      + + generateTokens(user: User) +
                                                      + +
                                                      +

                                                      Generates access and refresh tokens for a given user.

                                                      +
                                                      + +
                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                      NameTypeOptionalDescription
                                                      user + User + + No + +
                                                        +
                                                      • The user entity for whom tokens are generated.
                                                      • +
                                                      + +
                                                      +
                                                      +
                                                      + Returns : unknown + +
                                                      +
                                                      +

                                                      An object containing access token, refresh token, and user details.

                                                      + +
                                                      +
                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                      + + + Public + Async + signToken + + +
                                                      + + signToken(userId: number, expiresIn: number, payload?: T) +
                                                      + +
                                                      + Type parameters : +
                                                        +
                                                      • T
                                                      • +
                                                      +
                                                      +

                                                      Signs a token with a given user ID, expiration time, and optional payload.

                                                      +
                                                      + +
                                                      + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                      NameTypeOptionalDescription
                                                      userId + number + + No + +
                                                        +
                                                      • The ID of the user.
                                                      • +
                                                      + +
                                                      expiresIn + number + + No + +
                                                        +
                                                      • The expiration time for the token.
                                                      • +
                                                      + +
                                                      payload + T + + Yes + +
                                                        +
                                                      • Additional data to include in the token.
                                                      • +
                                                      + +
                                                      +
                                                      +
                                                      + Returns : unknown + +
                                                      +
                                                      +

                                                      A signed JWT token.

                                                      + +
                                                      +
                                                      +
                                                      + +
                                                      + + +
                                                      +
                                                      import { forwardRef, Inject, Injectable } from '@nestjs/common';
                                                      +import { JwtService } from '@nestjs/jwt';
                                                      +import jwtConfig from '../authConfig/jwt.config';
                                                      +import { ConfigType } from '@nestjs/config';
                                                      +import { ActiveUserData } from '../interface/activeInterface';
                                                      +import { UserService } from 'src/users/provider/user.service';
                                                      +import { User } from 'src/users/user.entitly';
                                                      +
                                                      +/**
                                                      + * Injectable service for generating tokens.
                                                      + */
                                                      +@Injectable()
                                                      +export class GenerateTokensProvider {
                                                      +  constructor(
                                                      +    /**
                                                      +     * Injecting userService repository.
                                                      +     */
                                                      +    @Inject(forwardRef(() => UserService))
                                                      +    private readonly userService: UserService,
                                                      +
                                                      +    /**
                                                      +     * Injecting JwtService.
                                                      +     */
                                                      +    private readonly jwtService: JwtService,
                                                      +
                                                      +    /**
                                                      +     * Injecting jwtConfig.
                                                      +     */
                                                      +    @Inject(jwtConfig.KEY)
                                                      +    private readonly jwtConfiguration: ConfigType<typeof jwtConfig>,
                                                      +  ) {}
                                                      +
                                                      +  /**
                                                      +   * Signs a token with a given user ID, expiration time, and optional payload.
                                                      +   * @param userId - The ID of the user.
                                                      +   * @param expiresIn - The expiration time for the token.
                                                      +   * @param payload - Additional data to include in the token.
                                                      +   * @returns A signed JWT token.
                                                      +   */
                                                      +  public async signToken<T>(userId: number, expiresIn: number, payload?: T) {
                                                      +    return await this.jwtService.signAsync(
                                                      +      {
                                                      +        sub: userId,
                                                      +        ...payload,
                                                      +      } as ActiveUserData,
                                                      +      {
                                                      +        secret: this.jwtConfiguration.secret,
                                                      +        audience: this.jwtConfiguration.audience,
                                                      +        issuer: this.jwtConfiguration.issuer,
                                                      +        expiresIn,
                                                      +      },
                                                      +    );
                                                      +  }
                                                      +
                                                      +  /**
                                                      +   * Generates access and refresh tokens for a given user.
                                                      +   * @param user - The user entity for whom tokens are generated.
                                                      +   * @returns An object containing access token, refresh token, and user details.
                                                      +   */
                                                      +  public async generateTokens(user: User) {
                                                      +    const [accessToken, refreshToken] = await Promise.all([
                                                      +      /**
                                                      +       * Generate access token.
                                                      +       */
                                                      +      this.signToken(user.id, this.jwtConfiguration.ttl, { email: user.email }),
                                                      +
                                                      +      /**
                                                      +       * Generate refresh token.
                                                      +       */
                                                      +      this.signToken(user.id, this.jwtConfiguration.ttl),
                                                      +    ]);
                                                      +
                                                      +    return { accessToken, refreshToken, user };
                                                      +  }
                                                      +}
                                                      +
                                                      +
                                                      + +
                                                      + + + + + + + + + + + + + +
                                                      +
                                                      +

                                                      results matching ""

                                                      +
                                                        +
                                                        +
                                                        +

                                                        No results matching ""

                                                        +
                                                        +
                                                        +
                                                        + +
                                                        +
                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/GoogleAuthenticationService.html b/documentation/injectables/GoogleAuthenticationService.html new file mode 100644 index 0000000..5530737 --- /dev/null +++ b/documentation/injectables/GoogleAuthenticationService.html @@ -0,0 +1,618 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                        +
                                                        + + +
                                                        +
                                                        + + + + + + + + + + + + +
                                                        +
                                                        +

                                                        +

                                                        File

                                                        +

                                                        +

                                                        + src/auth/social/providers/google-authentication.service.ts +

                                                        + + +

                                                        +

                                                        Description

                                                        +

                                                        +

                                                        +

                                                        Google Authentication Service +Handles authentication using Google OAuth tokens.

                                                        + +

                                                        + + + +
                                                        +

                                                        Index

                                                        + + + + + + + + + + + + + + + + + + + + + +
                                                        +
                                                        Properties
                                                        +
                                                        + +
                                                        +
                                                        Methods
                                                        +
                                                        + +
                                                        +
                                                        + +
                                                        +

                                                        Constructor

                                                        + + + + + + + + + + + + + +
                                                        +constructor(userService: UserService, jwtConfigurattion: ConfigType<>, generateTokensProvider: GenerateTokensProvider) +
                                                        + +
                                                        +

                                                        Constructor to inject dependencies.

                                                        +
                                                        +
                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                        NameTypeOptionalDescription
                                                        userService + UserService + + No + +
                                                          +
                                                        • Service to handle user-related operations
                                                        • +
                                                        + +
                                                        jwtConfigurattion + ConfigType<> + + No + +
                                                          +
                                                        • Configuration object for JWT
                                                        • +
                                                        + +
                                                        generateTokensProvider + GenerateTokensProvider + + No + +
                                                          +
                                                        • Service to generate authentication tokens
                                                        • +
                                                        + +
                                                        +
                                                        +
                                                        +
                                                        + +
                                                        + +

                                                        + Methods +

                                                        + + + + + + + + + + + + + + + + + + + +
                                                        + + + Public + Async + authenticate + + +
                                                        + + authenticate(googleTokenDto: GoogleTokenDto) +
                                                        + +
                                                        +

                                                        Authenticate method

                                                        +
                                                        + +
                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                        NameTypeOptionalDescription
                                                        googleTokenDto + GoogleTokenDto + + No + +
                                                          +
                                                        • DTO containing the Google ID token
                                                        • +
                                                        + +
                                                        +
                                                        +
                                                        + Returns : unknown + +
                                                        +
                                                        +

                                                        The generated authentication tokens for the user

                                                        + +
                                                        +
                                                        + + + + + + + + + + + + + + + + + + + +
                                                        + + + onModuleInit + + +
                                                        +onModuleInit() +
                                                        + +
                                                        + +
                                                        + Returns : void + +
                                                        +
                                                        +
                                                        +
                                                        + +

                                                        + Properties +

                                                        + + + + + + + + + + + + + + + + + +
                                                        + + + Private + oAuthClient + + +
                                                        + Type : OAuth2Client + +
                                                        + +
                                                        +

                                                        inject oAuthClient

                                                        +
                                                        +
                                                        +
                                                        + +
                                                        + + +
                                                        +
                                                        import { forwardRef, Inject, Injectable, OnModuleInit, UnauthorizedException } from '@nestjs/common';
                                                        +import { ConfigType } from '@nestjs/config';
                                                        +import { OAuth2Client } from 'google-auth-library';
                                                        +import jwtConfig from 'src/auth/authConfig/jwt.config';
                                                        +import { GenerateTokensProvider } from 'src/auth/providers/generate-tokens.provider';
                                                        +import { UserService } from 'src/users/provider/user.service';
                                                        +import { GoogleTokenDto } from '../dtos/google-token.dto';
                                                        +
                                                        +/**
                                                        + Google Authentication Service
                                                        +  Handles authentication using Google OAuth tokens.
                                                        + */
                                                        +@Injectable()
                                                        +/** OAuth2 client for handling Google authentication */
                                                        +export class GoogleAuthenticationService implements OnModuleInit {
                                                        +  /**inject oAuthClient */
                                                        +  private oAuthClient: OAuth2Client;
                                                        +  /**
                                                        +   Constructor to inject dependencies.
                                                        +    @param userService - Service to handle user-related operations
                                                        +    @param jwtConfigurattion - Configuration object for JWT
                                                        +   @param generateTokensProvider - Service to generate authentication tokens
                                                        +   */
                                                        +  constructor(
                                                        +    /**
                                                        +     * inject userService
                                                        +     */
                                                        +    @Inject(forwardRef(() => UserService))
                                                        +    private readonly userService: UserService,
                                                        +
                                                        +       /** Inject JWT configuration */
                                                        +    @Inject(jwtConfig.KEY)
                                                        +    private readonly jwtConfigurattion: ConfigType<typeof jwtConfig>,
                                                        +    /**
                                                        +      inject generateTokensProvider
                                                        +     */
                                                        +    private readonly generateTokensProvider: GenerateTokensProvider,
                                                        +  ) {}
                                                        +
                                                        +  onModuleInit() {
                                                        +    const client_id = this.jwtConfigurattion.googleClient_id;
                                                        +    const client_secret = this.jwtConfigurattion.googleClient_secret;
                                                        +
                                                        +    this.oAuthClient = new OAuth2Client(client_id, client_secret);
                                                        +  }
                                                        +
                                                        +  /**
                                                        +    Authenticates a user using a Google token.
                                                        +    @param googleTokenDto - DTO containing the Google ID token
                                                        +    @returns The generated authentication tokens for the user
                                                        +    @throws UnauthorizedException if authentication fails
                                                        +   */
                                                        +
                                                        +    /**Authenticate method */
                                                        +  public async authenticate(googleTokenDto: GoogleTokenDto) {
                                                        +    try {
                                                        +      console.log("Received Token:", googleTokenDto.token);
                                                        +
                                                        +      // verify the google token sent by user
                                                        +      const loginTicket = await this.oAuthClient.verifyIdToken({
                                                        +        idToken: googleTokenDto.token,
                                                        +      });
                                                        +
                                                        +      console.log("Google Token Payload:", loginTicket.getPayload());
                                                        +
                                                        +      // extract the payload from google jwt token
                                                        +      const {
                                                        +        email,
                                                        +        sub: googleId,
                                                        +        given_name: firstName,
                                                        +        family_name: lastName,
                                                        +      } = loginTicket.getPayload();
                                                        +
                                                        +      // find the user in the database using googleid
                                                        +      const user = await this.userService.findOneByGoogleId(googleId);
                                                        +
                                                        +      // if user exist, generate token
                                                        +      if (user) {
                                                        +        return this.generateTokensProvider.generateTokens(user);
                                                        +      }
                                                        +      // else generate the user and create the token
                                                        +      const newUser = await this.userService.createGoogleUser({
                                                        +        email: email,
                                                        +        firstName: firstName,
                                                        +        lastName: lastName,
                                                        +        googleId: googleId,
                                                        +      });
                                                        +      return this.generateTokensProvider.generateTokens(newUser);
                                                        +    } catch (error) {
                                                        +      console.error("Google Auth Error:", error);
                                                        +      throw new UnauthorizedException('failed to authenticate with google');
                                                        +    }
                                                        +    // if any of the step fails, send an unauthorised exception
                                                        +  }
                                                        +}
                                                        +
                                                        + +
                                                        + + + + + + + + + + + + + +
                                                        +
                                                        +

                                                        results matching ""

                                                        +
                                                          +
                                                          +
                                                          +

                                                          No results matching ""

                                                          +
                                                          +
                                                          +
                                                          + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/HashingProvider.html b/documentation/injectables/HashingProvider.html new file mode 100644 index 0000000..8864e5d --- /dev/null +++ b/documentation/injectables/HashingProvider.html @@ -0,0 +1,423 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                          +
                                                          + + +
                                                          +
                                                          + + + + + + + + + + + + +
                                                          +
                                                          +

                                                          +

                                                          File

                                                          +

                                                          +

                                                          + src/auth/providers/hashing.ts +

                                                          + + +

                                                          +

                                                          Description

                                                          +

                                                          +

                                                          +

                                                          Hasing provider abstract class

                                                          + +

                                                          + + + +
                                                          +

                                                          Index

                                                          + + + + + + + + + + + + + + + +
                                                          +
                                                          Methods
                                                          +
                                                          + +
                                                          +
                                                          + + +
                                                          + +

                                                          + Methods +

                                                          + + + + + + + + + + + + + + + + + + + +
                                                          + + + Abstract + comparePasswords + + +
                                                          + + comparePasswords(password: string, encryPassword: string) +
                                                          + +
                                                          +

                                                          comparison during signIn

                                                          +
                                                          + +
                                                          + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                          NameTypeOptional
                                                          password + string + + No +
                                                          encryPassword + string + + No +
                                                          +
                                                          +
                                                          + Returns : Promise<boolean> + +
                                                          +
                                                          + +
                                                          +
                                                          + + + + + + + + + + + + + + + + + + + +
                                                          + + + Abstract + hashPassword + + +
                                                          + + hashPassword(inpPassword: string | Buffer) +
                                                          + +
                                                          +

                                                          hashing during signUp

                                                          +
                                                          + +
                                                          + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                          NameTypeOptional
                                                          inpPassword + string | Buffer + + No +
                                                          +
                                                          +
                                                          + Returns : Promise<string> + +
                                                          +
                                                          + +
                                                          +
                                                          +
                                                          + +
                                                          + + +
                                                          +
                                                          import { Injectable } from '@nestjs/common';
                                                          +
                                                          +/**Hasing provider abstract class */
                                                          +@Injectable()
                                                          +export abstract class HashingProvider {
                                                          +     /**hashing during signUp */ 
                                                          +    abstract hashPassword(inpPassword: string | Buffer): Promise<string>
                                                          +
                                                          + /**comparison during signIn */ 
                                                          +    abstract comparePasswords(password: string, encryPassword: string): Promise<boolean>
                                                          +}
                                                          +
                                                          + +
                                                          + + + + + + + + + + + + + +
                                                          +
                                                          +

                                                          results matching ""

                                                          +
                                                            +
                                                            +
                                                            +

                                                            No results matching ""

                                                            +
                                                            +
                                                            +
                                                            + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/MessagesService.html b/documentation/injectables/MessagesService.html new file mode 100644 index 0000000..8e7d65b --- /dev/null +++ b/documentation/injectables/MessagesService.html @@ -0,0 +1,495 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                            +
                                                            + + +
                                                            +
                                                            + + + + + + + + + + + + +
                                                            +
                                                            +

                                                            +

                                                            File

                                                            +

                                                            +

                                                            + src/messages/providers/messages/messages.service.ts +

                                                            + + +

                                                            +

                                                            Description

                                                            +

                                                            +

                                                            +

                                                            Message service class

                                                            + +

                                                            + + + +
                                                            +

                                                            Index

                                                            + + + + + + + + + + + + + + + +
                                                            +
                                                            Methods
                                                            +
                                                            + +
                                                            +
                                                            + +
                                                            +

                                                            Constructor

                                                            + + + + + + + + + + + + + +
                                                            +constructor(messageRepo: Repository<Message>) +
                                                            + +
                                                            +
                                                            + Parameters : + + + + + + + + + + + + + + + + + + +
                                                            NameTypeOptional
                                                            messageRepo + Repository<Message> + + No +
                                                            +
                                                            +
                                                            +
                                                            + +
                                                            + +

                                                            + Methods +

                                                            + + + + + + + + + + + + + + + + + + + +
                                                            + + + Async + getMessages + + +
                                                            + + getMessages(chatRoomId: string) +
                                                            + +
                                                            +

                                                            get messages method

                                                            +
                                                            + +
                                                            + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                            NameTypeOptional
                                                            chatRoomId + string + + No +
                                                            +
                                                            +
                                                            + Returns : unknown + +
                                                            +
                                                            + +
                                                            +
                                                            + + + + + + + + + + + + + + + + + + + +
                                                            + + + Async + sendMessage + + +
                                                            + + sendMessage(chatRoomId: string, senderId: string, text: string) +
                                                            + +
                                                            +

                                                            method for sending message takes in chatroom id, sender id and text as parameter

                                                            +
                                                            + +
                                                            + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                            NameTypeOptional
                                                            chatRoomId + string + + No +
                                                            senderId + string + + No +
                                                            text + string + + No +
                                                            +
                                                            +
                                                            + Returns : any + +
                                                            +
                                                            + +
                                                            +
                                                            +
                                                            + +
                                                            + + +
                                                            +
                                                            import { Injectable } from '@nestjs/common';
                                                            +import { InjectRepository } from '@nestjs/typeorm';
                                                            +import { Message } from 'src/messages/message.entity';
                                                            +import { Repository } from 'typeorm';
                                                            +
                                                            +/**Message service class */
                                                            +@Injectable()
                                                            +export class MessagesService {
                                                            +  constructor(
                                                            +    /**injecting message repo */
                                                            +    @InjectRepository(Message) private messageRepo: Repository<Message>) {}
                                                            +
                                                            +  /**method for sending message takes in chatroom id, sender id  and text as parameter */
                                                            +  async sendMessage(chatRoomId: string, senderId: string, text: string) {
                                                            +    // const message = this.messageRepo.create({ chatRoom: { id: chatRoomId }, sender: { id: senderId }, text });
                                                            +    // return this.messageRepo.save(message);
                                                            +  }
                                                            +
                                                            +  /**get messages method */
                                                            +  async getMessages(chatRoomId: string) {
                                                            +    return this.messageRepo.find({ where: { chatRoom: { id: chatRoomId } }, relations: ['sender'] });
                                                            +  }
                                                            +}
                                                            +
                                                            + +
                                                            + + + + + + + + + + + + + +
                                                            +
                                                            +

                                                            results matching ""

                                                            +
                                                              +
                                                              +
                                                              +

                                                              No results matching ""

                                                              +
                                                              +
                                                              +
                                                              + +
                                                              +
                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/RefreshTokensProvider.html b/documentation/injectables/RefreshTokensProvider.html new file mode 100644 index 0000000..0074bd3 --- /dev/null +++ b/documentation/injectables/RefreshTokensProvider.html @@ -0,0 +1,464 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                              +
                                                              + + +
                                                              +
                                                              + + + + + + + + + + + + +
                                                              +
                                                              +

                                                              +

                                                              File

                                                              +

                                                              +

                                                              + src/auth/providers/refresh-tokens.provider.ts +

                                                              + + +

                                                              +

                                                              Description

                                                              +

                                                              +

                                                              +

                                                              Refresh token provider class

                                                              + +

                                                              + + + +
                                                              +

                                                              Index

                                                              + + + + + + + + + + + + + + + +
                                                              +
                                                              Methods
                                                              +
                                                              + +
                                                              +
                                                              + +
                                                              +

                                                              Constructor

                                                              + + + + + + + + + + + + + +
                                                              +constructor(userService: UserService, jwtService: JwtService, jwtConfiguration: ConfigType<>, generateTokenProvider: GenerateTokensProvider) +
                                                              + +
                                                              +
                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                              NameTypeOptional
                                                              userService + UserService + + No +
                                                              jwtService + JwtService + + No +
                                                              jwtConfiguration + ConfigType<> + + No +
                                                              generateTokenProvider + GenerateTokensProvider + + No +
                                                              +
                                                              +
                                                              +
                                                              + +
                                                              + +

                                                              + Methods +

                                                              + + + + + + + + + + + + + + + + + + + +
                                                              + + + Public + Async + refreshTokens + + +
                                                              + + refreshTokens(refreshTokenDto: RefreshTokenDto) +
                                                              + +
                                                              +

                                                              A method for validating refresh token

                                                              +
                                                              + +
                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                              NameTypeOptional
                                                              refreshTokenDto + RefreshTokenDto + + No +
                                                              +
                                                              +
                                                              + Returns : unknown + +
                                                              +
                                                              + +
                                                              +
                                                              +
                                                              + +
                                                              + + +
                                                              +
                                                              import { forwardRef, Inject, Injectable } from '@nestjs/common';
                                                              +import { RefreshTokenDto } from '../dtos/refreshTokenDto';
                                                              +import { JwtService } from '@nestjs/jwt';
                                                              +import { ConfigType } from '@nestjs/config';
                                                              +import jwtConfig from '../authConfig/jwt.config';
                                                              +import { GenerateTokensProvider } from './generate-tokens.provider';
                                                              +import { UserService } from 'src/users/provider/user.service';
                                                              +
                                                              +/**Refresh token provider class */
                                                              +@Injectable()
                                                              +export class RefreshTokensProvider {
                                                              +  constructor(
                                                              +    /*
                                                              +      injecting userService repo
                                                              +     */
                                                              +    @Inject(forwardRef(() => UserService))
                                                              +    private readonly userService: UserService,
                                                              +
                                                              +    /*
                                                              +     inject jwtService
                                                              +     */
                                                              +    private readonly jwtService: JwtService,
                                                              +
                                                              +    /*
                                                              +      inject jwtService
                                                              +     */
                                                              +    @Inject(jwtConfig.KEY)
                                                              +    private readonly jwtConfiguration: ConfigType<typeof jwtConfig>,
                                                              +
                                                              +    /* 
                                                              +      inject generateTokenProvider
                                                              +     */
                                                              +    private readonly generateTokenProvider: GenerateTokensProvider
                                                              +  ) {}
                                                              +
                                                              +    /**A method for validating refresh token */
                                                              +  public async refreshTokens(refreshTokenDto: RefreshTokenDto) {
                                                              +    // validate the refresh token using jwt
                                                              +   const { sub } = await this.jwtService.verifyAsync(
                                                              +        refreshTokenDto.refreshToken, 
                                                              +        {
                                                              +        secret: this.jwtConfiguration.secret,
                                                              +        audience: this.jwtConfiguration.audience,
                                                              +        issuer: this.jwtConfiguration.issuer,
                                                              +    })
                                                              +
                                                              +    // grab the user from the database
                                                              +    const user = await this.userService.FindOneById(sub)
                                                              +
                                                              +    // generate the token
                                                              +    return await this.generateTokenProvider.generateTokens(user)
                                                              +  }
                                                              +}
                                                              +
                                                              + +
                                                              + + + + + + + + + + + + + +
                                                              +
                                                              +

                                                              results matching ""

                                                              +
                                                                +
                                                                +
                                                                +

                                                                No results matching ""

                                                                +
                                                                +
                                                                +
                                                                + +
                                                                +
                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/SignInProvider.html b/documentation/injectables/SignInProvider.html new file mode 100644 index 0000000..2823c04 --- /dev/null +++ b/documentation/injectables/SignInProvider.html @@ -0,0 +1,453 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                +
                                                                + + +
                                                                +
                                                                + + + + + + + + + + + + +
                                                                +
                                                                +

                                                                +

                                                                File

                                                                +

                                                                +

                                                                + src/auth/providers/sign-in.provider.ts +

                                                                + + +

                                                                +

                                                                Description

                                                                +

                                                                +

                                                                +

                                                                Sign in provider class

                                                                + +

                                                                + + + +
                                                                +

                                                                Index

                                                                + + + + + + + + + + + + + + + +
                                                                +
                                                                Methods
                                                                +
                                                                +
                                                                  +
                                                                • + Public + Async + SignIn +
                                                                • +
                                                                +
                                                                +
                                                                + +
                                                                +

                                                                Constructor

                                                                + + + + + + + + + + + + + +
                                                                +constructor(userService: UserService, hashingProvider: HashingProvider, generateTokenProvider: GenerateTokensProvider) +
                                                                + +
                                                                +
                                                                + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                NameTypeOptional
                                                                userService + UserService + + No +
                                                                hashingProvider + HashingProvider + + No +
                                                                generateTokenProvider + GenerateTokensProvider + + No +
                                                                +
                                                                +
                                                                +
                                                                + +
                                                                + +

                                                                + Methods +

                                                                + + + + + + + + + + + + + + + + + + + +
                                                                + + + Public + Async + SignIn + + +
                                                                + + SignIn(signInDto: SignInDto) +
                                                                + +
                                                                +

                                                                A method to check if user exist in db

                                                                +
                                                                + +
                                                                + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                NameTypeOptional
                                                                signInDto + SignInDto + + No +
                                                                +
                                                                +
                                                                + Returns : unknown + +
                                                                +
                                                                + +
                                                                +
                                                                +
                                                                + +
                                                                + + +
                                                                +
                                                                import { forwardRef, Inject, Injectable, RequestTimeoutException, UnauthorizedException } from '@nestjs/common';
                                                                +import { SignInDto } from '../dtos/userDto';
                                                                +import { HashingProvider } from './hashing';
                                                                +import { GenerateTokensProvider } from './generate-tokens.provider';
                                                                +import { UserService } from 'src/users/provider/user.service';
                                                                +
                                                                +/**Sign in provider class */
                                                                +@Injectable()
                                                                +export class SignInProvider {
                                                                +    constructor(
                                                                +        /* 
                                                                +          injecting userService repo
                                                                +         */
                                                                +        @Inject(forwardRef(() => UserService))
                                                                +        private readonly userService: UserService,
                                                                +
                                                                +        /* 
                                                                +          injecting hashing dependency
                                                                +         */
                                                                +        private readonly hashingProvider: HashingProvider,
                                                                +        
                                                                +        /* 
                                                                +          injecting generateTokenProvider
                                                                +         */
                                                                +        private readonly generateTokenProvider: GenerateTokensProvider
                                                                +    ){}
                                                                +        /**A method to check if user exist in db */
                                                                +        public async SignIn(signInDto: SignInDto) {
                                                                +        // check if user exist in db
                                                                +        // throw error if user doesnt exist
                                                                +        let user = await this.userService.GetOneByEmail(signInDto.email)
                                                                +
                                                                +        if (!user) {
                                                                +            throw new UnauthorizedException('email or password is incorrect');
                                                                +        }
                                                                +        
                                                                +        /**conpare password */
                                                                +        let isCheckedPassword: boolean = false
                                                                +
                                                                +        try {
                                                                +            isCheckedPassword = await this.hashingProvider.comparePasswords(signInDto.password, user.password)
                                                                +        } catch (error) {
                                                                +            throw new RequestTimeoutException(error, {
                                                                +                description: 'error  connecting to the database'
                                                                +            })
                                                                +        }
                                                                +
                                                                +        if (!isCheckedPassword) {
                                                                +            throw new UnauthorizedException('email or password is incorrect')
                                                                +        }
                                                                +        // login
                                                                +        return await this.generateTokenProvider.generateTokens(user)
                                                                +    }
                                                                +}
                                                                +
                                                                + +
                                                                + + + + + + + + + + + + + +
                                                                +
                                                                +

                                                                results matching ""

                                                                +
                                                                  +
                                                                  +
                                                                  +

                                                                  No results matching ""

                                                                  +
                                                                  +
                                                                  +
                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/UserService.html b/documentation/injectables/UserService.html new file mode 100644 index 0000000..f683a0f --- /dev/null +++ b/documentation/injectables/UserService.html @@ -0,0 +1,1205 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                  +
                                                                  + + +
                                                                  +
                                                                  + + + + + + + + + + + + +
                                                                  +
                                                                  +

                                                                  +

                                                                  File

                                                                  +

                                                                  +

                                                                  + src/users/provider/user.service.ts +

                                                                  + + +

                                                                  +

                                                                  Description

                                                                  +

                                                                  +

                                                                  +

                                                                  Service class for managing user-related operations.

                                                                  + +

                                                                  + + + +
                                                                  +

                                                                  Index

                                                                  + + + + + + + + + + + + + + + +
                                                                  +
                                                                  Methods
                                                                  +
                                                                  + +
                                                                  +
                                                                  + +
                                                                  +

                                                                  Constructor

                                                                  + + + + + + + + + + + + + +
                                                                  +constructor(userRepository: Repository<User>, createUserProvider: CreateUserProvider, findOneByemail: FindOneByEmail, findOneByGoogleIdProvider: FindOneByGoogleIdProvider, createGoogleUserProvider: CreateGoogleUserProvider) +
                                                                  + +
                                                                  +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptional
                                                                  userRepository + Repository<User> + + No +
                                                                  createUserProvider + CreateUserProvider + + No +
                                                                  findOneByemail + FindOneByEmail + + No +
                                                                  findOneByGoogleIdProvider + FindOneByGoogleIdProvider + + No +
                                                                  createGoogleUserProvider + CreateGoogleUserProvider + + No +
                                                                  +
                                                                  +
                                                                  +
                                                                  + +
                                                                  + +

                                                                  + Methods +

                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + + + Public + Async + createGoogleUser + + +
                                                                  + + createGoogleUser(googleUser: GoogleInterface) +
                                                                  + +
                                                                  +

                                                                  Creates a new user via Google authentication.

                                                                  +
                                                                  + +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptionalDescription
                                                                  googleUser + GoogleInterface + + No + +
                                                                    +
                                                                  • Google user data.
                                                                  • +
                                                                  + +
                                                                  +
                                                                  +
                                                                  + Returns : unknown + +
                                                                  +
                                                                  +

                                                                  The created user.

                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + + + Public + Async + createUsers + + +
                                                                  + + createUsers(createUserDto: CreateUserDto) +
                                                                  + +
                                                                  +

                                                                  Method to Creates a new user

                                                                  +
                                                                  + +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptionalDescription
                                                                  createUserDto + CreateUserDto + + No + +
                                                                    +
                                                                  • User data for creation.
                                                                  • +
                                                                  + +
                                                                  +
                                                                  +
                                                                  + Returns : unknown + +
                                                                  +
                                                                  +

                                                                  The created user.

                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + + + Public + Async + deleteUser + + +
                                                                  + + deleteUser(id: number) +
                                                                  + +
                                                                  +

                                                                  A method to Deletes a user by ID.

                                                                  +
                                                                  + +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptionalDescription
                                                                  id + number + + No + +
                                                                    +
                                                                  • User ID.
                                                                  • +
                                                                  + +
                                                                  +
                                                                  +
                                                                  + Returns : unknown + +
                                                                  +
                                                                  +

                                                                  Deletion confirmation.

                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + + + Public + Async + editUser + + +
                                                                  + + editUser(edituserDto: EditUserDto) +
                                                                  + +
                                                                  +

                                                                  A method to Updates user details.

                                                                  +
                                                                  + +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptionalDescription
                                                                  edituserDto + EditUserDto + + No + +
                                                                    +
                                                                  • Data for updating user information.
                                                                  • +
                                                                  + +
                                                                  +
                                                                  +
                                                                  + Returns : unknown + +
                                                                  +
                                                                  +

                                                                  The updated user.

                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + + + Public + findAll + + +
                                                                  + + findAll(getUserParamDto: GetuserParamDto, limit: number, page: number) +
                                                                  + +
                                                                  +

                                                                  Method to Retrieves all users.

                                                                  +
                                                                  + +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptionalDescription
                                                                  getUserParamDto + GetuserParamDto + + No + +
                                                                    +
                                                                  • Parameters for filtering users.
                                                                  • +
                                                                  + +
                                                                  limit + number + + No + +
                                                                    +
                                                                  • Number of users to return.
                                                                  • +
                                                                  + +
                                                                  page + number + + No + +
                                                                    +
                                                                  • Page number for pagination.
                                                                  • +
                                                                  + +
                                                                  +
                                                                  +
                                                                  + Returns : Promise<User[]> + +
                                                                  +
                                                                  +

                                                                  List of users.

                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + + + Public + Async + findOneByGoogleId + + +
                                                                  + + findOneByGoogleId(googleId: string) +
                                                                  + +
                                                                  +

                                                                  A method to Finds a user by Google ID.

                                                                  +
                                                                  + +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptionalDescription
                                                                  googleId + string + + No + +
                                                                    +
                                                                  • Google ID of the user.
                                                                  • +
                                                                  + +
                                                                  +
                                                                  +
                                                                  + Returns : unknown + +
                                                                  +
                                                                  +

                                                                  The user associated with the given Google ID.

                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + + + Public + FindOneById + + +
                                                                  + + FindOneById(id: number) +
                                                                  + +
                                                                  +

                                                                  A method to Finds a user by ID.

                                                                  +
                                                                  + +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptionalDescription
                                                                  id + number + + No + +
                                                                    +
                                                                  • User ID.
                                                                  • +
                                                                  + +
                                                                  +
                                                                  +
                                                                  + Returns : Promise<User | null> + +
                                                                  +
                                                                  +

                                                                  The found user or null.

                                                                  + +
                                                                  +
                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                  + + + Public + Async + GetOneByEmail + + +
                                                                  + + GetOneByEmail(email: string) +
                                                                  + +
                                                                  +

                                                                  A method to Retrieves a user by email.

                                                                  +
                                                                  + +
                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + +
                                                                  NameTypeOptionalDescription
                                                                  email + string + + No + +
                                                                    +
                                                                  • User email.
                                                                  • +
                                                                  + +
                                                                  +
                                                                  +
                                                                  + Returns : unknown + +
                                                                  +
                                                                  +

                                                                  The user matching the email.

                                                                  + +
                                                                  +
                                                                  +
                                                                  + +
                                                                  + + +
                                                                  +
                                                                  import { Injectable } from '@nestjs/common';
                                                                  +import { InjectRepository } from '@nestjs/typeorm';
                                                                  +import { User } from '../user.entitly';
                                                                  +import { Repository } from 'typeorm';
                                                                  +import { CreateUserProvider } from './create-user.provider';
                                                                  +import { CreateUserDto } from '../DTOs/create-user.dto';
                                                                  +import { FindOneByEmail } from './find-one-by-email';
                                                                  +import { EditUserDto } from '../DTOs/patch-user.dto';
                                                                  +import { GetuserParamDto } from '../DTOs/getUserparamdto';
                                                                  +import { FindOneByGoogleIdProvider } from './find-one-by-googleId';
                                                                  +import { CreateGoogleUserProvider } from './googleUserProvider';
                                                                  +import { GoogleInterface } from 'src/auth/social/interfaces/user.interface';
                                                                  +
                                                                  +
                                                                  +/**
                                                                  +   Service class for managing user-related operations.
                                                                  + */
                                                                  +@Injectable()
                                                                  +export class UserService {
                                                                  +  constructor(
                                                                  +    /*
                                                                  +     *inject User entity*/
                                                                  +     /**
                                                                  +    Injects dependencies for user management.
                                                                  +    @param {Repository<User>} userRepository - Repository to interact with the User entity.
                                                                  +    @param {CreateUserProvider} createUserProvider - Provider to handle user creation.
                                                                  +    @param {FindOneByEmail} findOneByemail - Service to find a user by email.
                                                                  +    @param {FindOneByGoogleIdProvider} findOneByGoogleIdProvider - Service to find a user by Google ID.
                                                                  +    @param {CreateGoogleUserProvider} createGoogleUserProvider - Service to create a user via Google authentication.
                                                                  +   */
                                                                  +    @InjectRepository(User)
                                                                  +    private userRepository: Repository<User>,
                                                                  +
                                                                  +    private readonly createUserProvider: CreateUserProvider,
                                                                  +
                                                                  +    private readonly findOneByemail: FindOneByEmail,
                                                                  +
                                                                  +    private readonly findOneByGoogleIdProvider: FindOneByGoogleIdProvider,
                                                                  +
                                                                  +    private readonly createGoogleUserProvider: CreateGoogleUserProvider,
                                                                  +  ) {}
                                                                  +
                                                                  +  /**
                                                                  +    Retrieves all users.
                                                                  +    @param {GetuserParamDto} getUserParamDto - Parameters for filtering users.
                                                                  +    @param {number} limit - Number of users to return.
                                                                  +    @param {number} page - Page number for pagination.
                                                                  +    @returns {Promise<User[]>} List of users.
                                                                  +   */
                                                                  +
                                                                  +  /**Method to Retrieves all users. */
                                                                  +  public findAll(
                                                                  +    getUserParamDto: GetuserParamDto,
                                                                  +    limit: number,
                                                                  +    page: number,
                                                                  +  ): Promise<User[]> {
                                                                  +    return this.userRepository.find();
                                                                  +  }
                                                                  +
                                                                  +  /**
                                                                  +     Creates a new user.
                                                                  +    @param {CreateUserDto} createUserDto - User data for creation.
                                                                  +    @returns {Promise<User>} The created user.
                                                                  +   */
                                                                  +
                                                                  +  /**Method to Creates a new user */
                                                                  +  public async createUsers(createUserDto: CreateUserDto) {
                                                                  +    return this.createUserProvider.createUsers(createUserDto);
                                                                  +  }
                                                                  +
                                                                  +  /**
                                                                  +   
                                                                  +    @param {number} id - User ID.
                                                                  +    @returns {Promise<User | null>} The found user or null.
                                                                  +   */
                                                                  +
                                                                  +  /**A method to Finds a user by ID. */
                                                                  +  public FindOneById(id: number): Promise<User | null> {
                                                                  +    return this.userRepository.findOneBy({ id });
                                                                  +  }
                                                                  +
                                                                  +  /**
                                                                  +    
                                                                  +    @param {string} email - User email.
                                                                  +    @returns {Promise<User>} The user matching the email.
                                                                  +   */
                                                                  +
                                                                  +  /**A method to Retrieves a user by email. */
                                                                  +  public async GetOneByEmail(email: string) {
                                                                  +    return await this.findOneByemail.findOneByEmail(email);
                                                                  +  }
                                                                  +
                                                                  +  /**
                                                                  +     
                                                                  +    @param {number} id - User ID.
                                                                  +    @returns {Promise<{deleted: boolean, id: number}>} Deletion confirmation.
                                                                  +   */
                                                                  +
                                                                  +  /**A method to Deletes a user by ID. */
                                                                  +  public async deleteUser(id: number) {
                                                                  +    await this.userRepository.delete(id);
                                                                  +
                                                                  +    return { deleted: true, id };
                                                                  +  }
                                                                  +
                                                                  +  /**
                                                                  +    
                                                                  +    @param {EditUserDto} edituserDto - Data for updating user information.
                                                                  +    @returns {Promise<User>} The updated user.
                                                                  +   */
                                                                  +
                                                                  +  /**A method to Updates user details. */
                                                                  +  public async editUser(edituserDto: EditUserDto) {
                                                                  +    let edit = await this.userRepository.findOneBy({
                                                                  +      id: edituserDto.id,
                                                                  +    });
                                                                  +
                                                                  +    edit.firstName = edituserDto.firstName ?? edit.firstName;
                                                                  +    edit.lastName = edituserDto.lastName ?? edit.lastName;
                                                                  +    edit.password = edituserDto.password ?? edit.password;
                                                                  +    edit.email = edituserDto.email ?? edit.email;
                                                                  +
                                                                  +    return this.userRepository.save(edit);
                                                                  +  }
                                                                  +
                                                                  +  /**
                                                                  +   
                                                                  +    @param {string} googleId - Google ID of the user.
                                                                  +    @returns {Promise<User>} The user associated with the given Google ID.
                                                                  +   */
                                                                  +
                                                                  +  /**A method to Finds a user by Google ID. */
                                                                  +  public async findOneByGoogleId(googleId: string) {
                                                                  +    return this.findOneByGoogleIdProvider.findOneByGoogleId(googleId);
                                                                  +  }
                                                                  +
                                                                  +  /**
                                                                  +    @param {GoogleInterface} googleUser - Google user data.
                                                                  +    @returns {Promise<User>} The created user.
                                                                  +   */
                                                                  +  
                                                                  +  /** Creates a new user via Google authentication. */
                                                                  +  public async createGoogleUser(googleUser: GoogleInterface) {
                                                                  +    return this.createGoogleUserProvider.createGoogleUser(googleUser);
                                                                  +  }
                                                                  +}
                                                                  +
                                                                  +
                                                                  + +
                                                                  + + + + + + + + + + + + + +
                                                                  +
                                                                  +

                                                                  results matching ""

                                                                  +
                                                                    +
                                                                    +
                                                                    +

                                                                    No results matching ""

                                                                    +
                                                                    +
                                                                    +
                                                                    + +
                                                                    +
                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/ActiveUserData.html b/documentation/interfaces/ActiveUserData.html new file mode 100644 index 0000000..a9b4429 --- /dev/null +++ b/documentation/interfaces/ActiveUserData.html @@ -0,0 +1,345 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                    +
                                                                    + + +
                                                                    +
                                                                    + + + + + + + + + + + + + + + + + +
                                                                    +
                                                                    +

                                                                    +

                                                                    File

                                                                    +

                                                                    +

                                                                    + src/auth/interface/activeInterface.ts +

                                                                    + + +

                                                                    +

                                                                    Description

                                                                    +

                                                                    +

                                                                    +

                                                                    Active user data interface

                                                                    + +

                                                                    + + +
                                                                    +

                                                                    Index

                                                                    + + + + + + + + + +
                                                                    +
                                                                    Properties
                                                                    +
                                                                    + +
                                                                    +
                                                                    + + + +
                                                                    +

                                                                    Properties

                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                    + + email + + + + +
                                                                    + email: string + +
                                                                    + Type : string + +
                                                                    + Optional +
                                                                    +

                                                                    email of type:string

                                                                    +
                                                                    +
                                                                    + + + + + + + + + + + + + + + + + + + + + + +
                                                                    + + sub + + + + +
                                                                    + sub: number + +
                                                                    + Type : number + +
                                                                    +

                                                                    sub of type:string

                                                                    +
                                                                    +
                                                                    +
                                                                    +
                                                                    + + +
                                                                    +
                                                                    export interface ActiveUserData {
                                                                    +    
                                                                    +    /**sub of type:string */
                                                                    +    sub: number,
                                                                    +
                                                                    +    /**email of type:string */
                                                                    +    email?: string
                                                                    +}
                                                                    +
                                                                    +
                                                                    + + + + + + + + +
                                                                    +
                                                                    +

                                                                    results matching ""

                                                                    +
                                                                      +
                                                                      +
                                                                      +

                                                                      No results matching ""

                                                                      +
                                                                      +
                                                                      +
                                                                      + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/interfaces/GoogleInterface.html b/documentation/interfaces/GoogleInterface.html new file mode 100644 index 0000000..051729b --- /dev/null +++ b/documentation/interfaces/GoogleInterface.html @@ -0,0 +1,432 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                      +
                                                                      + + +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + +
                                                                      +
                                                                      +

                                                                      +

                                                                      File

                                                                      +

                                                                      +

                                                                      + src/auth/social/interfaces/user.interface.ts +

                                                                      + + +

                                                                      +

                                                                      Description

                                                                      +

                                                                      +

                                                                      +

                                                                      Google interface

                                                                      + +

                                                                      + + +
                                                                      +

                                                                      Index

                                                                      + + + + + + + + + +
                                                                      +
                                                                      Properties
                                                                      +
                                                                      + +
                                                                      +
                                                                      + + + +
                                                                      +

                                                                      Properties

                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                      + + email + + + + +
                                                                      + email: string + +
                                                                      + Type : string + +
                                                                      +

                                                                      email as string

                                                                      +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                      + + firstName + + + + +
                                                                      + firstName: string + +
                                                                      + Type : string + +
                                                                      +

                                                                      first name as string

                                                                      +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                      + + googleId + + + + +
                                                                      + googleId: string + +
                                                                      + Type : string + +
                                                                      +

                                                                      Google id as string

                                                                      +
                                                                      +
                                                                      + + + + + + + + + + + + + + + + + + + + + + +
                                                                      + + lastName + + + + +
                                                                      + lastName: string + +
                                                                      + Type : string + +
                                                                      +

                                                                      last name as strig

                                                                      +
                                                                      +
                                                                      +
                                                                      +
                                                                      + + +
                                                                      +
                                                                      export interface GoogleInterface {
                                                                      +    /**email as string */
                                                                      +    email: string
                                                                      +
                                                                      +    /**first name as string */
                                                                      +    firstName: string
                                                                      +    /**last name as strig */
                                                                      +    lastName: string
                                                                      +    /**Google id as string */
                                                                      +    googleId: string
                                                                      +}
                                                                      +
                                                                      +
                                                                      + + + + + + + + +
                                                                      +
                                                                      +

                                                                      results matching ""

                                                                      +
                                                                        +
                                                                        +
                                                                        +

                                                                        No results matching ""

                                                                        +
                                                                        +
                                                                        +
                                                                        + +
                                                                        +
                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/js/menu-wc.js b/documentation/js/menu-wc.js index d9415dc..15de552 100644 --- a/documentation/js/menu-wc.js +++ b/documentation/js/menu-wc.js @@ -59,33 +59,221 @@ customElements.define('compodoc-menu', class extends HTMLElement { AppModule
                                                                      • - +
                                                                      • +
                                                                      • + +
                                                                      • +
                                                                      • + + +
                                                                      • + + + + + + + + + + + + + +

                                                                      • +
                                                                      • + + +
                                                                      • +
                                                                      • + + +
                                                                      • diff --git a/documentation/js/menu-wc_es5.js b/documentation/js/menu-wc_es5.js index 56710b9..255b965 100644 --- a/documentation/js/menu-wc_es5.js +++ b/documentation/js/menu-wc_es5.js @@ -33,7 +33,7 @@ customElements.define('compodoc-menu', /*#__PURE__*/function (_HTMLElement) { }, { key: "render", value: function render(isNormalMode) { - var tp = lithtml.html("\n \n ")); + var tp = lithtml.html("\n \n ")); this.innerHTML = tp.strings; } }]); diff --git a/documentation/js/search/search_index.js b/documentation/js/search/search_index.js index 00a551b..6e2430c 100644 --- a/documentation/js/search/search_index.js +++ b/documentation/js/search/search_index.js @@ -1,4 +1,4 @@ var COMPODOC_SEARCH_INDEX = { - "index": {"version":"2.3.9","fields":["title","body"],"fieldVectors":[["title/controllers/AppController.html",[0,0.744,1,0.959]],["body/controllers/AppController.html",[0,0.959,1,1.237,2,1.495,3,1.156,4,0.902,5,0.902,6,1.495,7,0.902,8,2.05,9,2.517,10,2.011,11,0.094,12,1.495,13,2.011,14,1.495,15,2.05,16,1.585,17,0.902,18,0.831,19,1.495,20,1.156,21,0.7,22,2.011,23,2.011,24,1.495,25,2.011,26,0.064,27,0.064]],["title/modules/AppModule.html",[28,0.959,29,0.959]],["body/modules/AppModule.html",[1,1.103,2,1.5,3,0.753,4,0.588,5,0.588,11,0.092,16,1.887,17,0.588,18,0.832,19,0.974,20,0.753,21,0.456,26,0.047,27,0.047,28,1.103,29,1.413,30,0.753,31,0.456,32,0.974,33,0.974,34,0.588,35,1.829,36,0.974,37,0.974,38,0.974,39,1.5,40,0.974,41,0.974,42,1.31,43,1.31,44,2.017,45,2.762,46,0.753,47,1.5,48,1.31,49,2.017,50,1.31,51,1.31,52,0.753,53,2.017,54,1.31,55,1.31,56,1.31,57,1.31,58,1.31,59,1.31,60,1.31,61,1.31,62,1.31,63,0.974,64,1.31,65,1.31,66,1.31,67,1.31,68,1.31,69,1.31,70,1.31,71,1.31,72,1.31,73,0.974,74,1.31,75,1.31,76,1.31,77,1.31,78,1.31,79,1.31,80,1.31]],["title/injectables/AppService.html",[18,0.565,81,0.959]],["body/injectables/AppService.html",[3,1.274,4,0.995,5,0.995,7,0.995,8,2.19,9,2.62,11,0.092,12,1.649,14,1.649,15,2.19,16,1.274,17,0.995,18,0.778,20,1.274,21,0.771,24,1.649,26,0.069,27,0.069,81,1.321,82,2.218,83,1.649,84,2.218,85,2.218]],["title/coverage.html",[86,2.137]],["body/coverage.html",[0,0.821,1,1.058,5,1.058,6,1.754,11,0.087,18,0.623,26,0.072,27,0.072,34,1.058,63,1.754,81,1.058,83,1.754,86,1.754,87,1.754,88,2.359,89,2.359,90,3.408,91,3.067,92,1.754,93,2.359,94,2.359,95,1.754,96,2.359,97,2.359]],["title/dependencies.html",[31,0.89,98,1.344]],["body/dependencies.html",[11,0.095,17,0.916,21,0.969,26,0.065,27,0.065,31,0.711,46,1.174,52,1.174,99,2.043,100,2.043,101,3.172,102,2.043,103,2.043,104,2.043,105,2.043,106,2.043,107,2.043,108,2.043,109,1.519,110,2.043,111,1.519,112,2.043,113,2.043,114,2.043,115,2.043,116,2.043,117,2.043,118,2.043,119,2.043,120,1.519,121,2.043]],["title/miscellaneous/functions.html",[122,1.344,123,1.903]],["body/miscellaneous/functions.html",[7,1.28,11,0.081,26,0.081,27,0.081,34,1.668,92,2.121,122,2.121,123,2.121,124,2.852]],["title/index.html",[7,0.811,125,1.344,126,1.344]],["body/index.html",[0,0.382,4,0.493,11,0.08,21,0.611,26,0.041,27,0.041,28,0.493,31,0.382,46,0.631,47,0.817,52,0.631,73,0.817,87,0.817,95,0.817,109,0.817,111,0.817,120,1.306,125,0.817,126,0.817,127,1.757,128,1.757,129,2.743,130,1.099,131,1.099,132,1.099,133,1.099,134,1.099,135,1.099,136,1.099,137,1.099,138,2.926,139,1.099,140,1.757,141,1.099,142,1.757,143,1.099,144,1.099,145,1.099,146,1.099,147,1.099,148,2.195,149,1.757,150,1.099,151,1.099,152,2.743,153,1.099,154,1.099,155,1.099,156,1.099,157,1.099,158,1.099,159,1.099,160,1.099,161,1.099,162,1.099,163,1.099,164,1.099,165,1.099,166,1.099,167,1.099,168,1.099,169,1.099,170,1.099,171,1.757,172,1.099,173,1.099,174,1.099,175,1.099,176,1.099,177,1.099,178,1.099,179,1.099,180,1.757,181,1.099,182,1.099,183,1.099,184,1.099,185,1.757,186,1.757,187,1.099,188,1.099,189,1.099,190,1.099,191,1.099,192,1.099,193,1.099,194,1.099,195,1.099,196,1.757,197,1.757,198,2.195,199,1.099,200,1.099,201,1.099,202,1.099,203,1.099,204,1.099,205,1.099,206,1.099,207,1.099,208,1.757,209,1.099,210,1.099,211,1.099,212,1.099,213,1.099,214,1.099,215,1.757,216,1.099,217,1.099,218,1.306,219,1.099,220,1.099,221,1.099]],["title/modules.html",[30,1.652]],["body/modules.html",[11,0.082,26,0.082,27,0.082,29,1.308,30,1.676,222,2.916,223,2.916,224,2.916,225,2.916]],["title/overview.html",[226,2.137]],["body/overview.html",[0,0.813,11,0.079,18,0.896,26,0.071,27,0.071,28,1.368,29,1.613,31,0.813,32,1.738,33,1.738,34,1.049,35,1.738,36,1.738,37,1.738,38,1.738,39,2.267,40,1.738,41,1.738,81,1.049,226,1.738,227,3.393]],["title/properties.html",[98,1.344,228,1.903]],["body/properties.html",[11,0.093,26,0.079,27,0.079,218,2.053,228,2.053,229,2.761,230,2.761,231,2.761,232,2.761,233,2.761]]],"invertedIndex":[["",{"_index":11,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"coverage.html":{},"dependencies.html":{},"miscellaneous/functions.html":{},"index.html":{},"modules.html":{},"overview.html":{},"properties.html":{}}}],["0",{"_index":90,"title":{},"body":{"coverage.html":{}}}],["0.0.1",{"_index":230,"title":{},"body":{"properties.html":{}}}],["0.14.1",{"_index":112,"title":{},"body":{"dependencies.html":{}}}],["0.2.0",{"_index":117,"title":{},"body":{"dependencies.html":{}}}],["0.3.20",{"_index":121,"title":{},"body":{"dependencies.html":{}}}],["0.5.1",{"_index":110,"title":{},"body":{"dependencies.html":{}}}],["0/1",{"_index":94,"title":{},"body":{"coverage.html":{}}}],["0/2",{"_index":91,"title":{},"body":{"coverage.html":{}}}],["1",{"_index":227,"title":{},"body":{"overview.html":{}}}],["1.1.23",{"_index":100,"title":{},"body":{"dependencies.html":{}}}],["10.0.0",{"_index":101,"title":{},"body":{"dependencies.html":{}}}],["11.0.0",{"_index":108,"title":{},"body":{"dependencies.html":{}}}],["4.0.0",{"_index":102,"title":{},"body":{"dependencies.html":{}}}],["7.3.0",{"_index":107,"title":{},"body":{"dependencies.html":{}}}],["7.8.1",{"_index":119,"title":{},"body":{"dependencies.html":{}}}],["8.13.1",{"_index":114,"title":{},"body":{"dependencies.html":{}}}],["alt",{"_index":209,"title":{},"body":{"index.html":{}}}],["always",{"_index":186,"title":{},"body":{"index.html":{}}}],["app.controller",{"_index":43,"title":{},"body":{"modules/AppModule.html":{}}}],["app.controller.ts",{"_index":170,"title":{},"body":{"index.html":{}}}],["app.module.ts",{"_index":163,"title":{},"body":{"index.html":{}}}],["app.service",{"_index":19,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{}}}],["app.service.ts",{"_index":172,"title":{},"body":{"index.html":{}}}],["appconfig",{"_index":47,"title":{},"body":{"modules/AppModule.html":{},"index.html":{}}}],["appcontroller",{"_index":1,"title":{"controllers/AppController.html":{}},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"coverage.html":{}}}],["application",{"_index":148,"title":{},"body":{"index.html":{}}}],["appmodule",{"_index":29,"title":{"modules/AppModule.html":{}},"body":{"modules/AppModule.html":{},"modules.html":{},"overview.html":{}}}],["appservice",{"_index":18,"title":{"injectables/AppService.html":{}},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"coverage.html":{},"overview.html":{}}}],["author",{"_index":233,"title":{},"body":{"properties.html":{}}}],["autoloadentities",{"_index":79,"title":{},"body":{"modules/AppModule.html":{}}}],["before",{"_index":193,"title":{},"body":{"index.html":{}}}],["blog",{"_index":75,"title":{},"body":{"modules/AppModule.html":{}}}],["bootstrap",{"_index":34,"title":{},"body":{"modules/AppModule.html":{},"coverage.html":{},"miscellaneous/functions.html":{},"overview.html":{}}}],["bootstrapped",{"_index":130,"title":{},"body":{"index.html":{}}}],["branch",{"_index":185,"title":{},"body":{"index.html":{}}}],["browse",{"_index":225,"title":{},"body":{"modules.html":{}}}],["browser",{"_index":222,"title":{},"body":{"modules.html":{}}}],["build",{"_index":215,"title":{},"body":{"index.html":{}}}],["cd",{"_index":146,"title":{},"body":{"index.html":{}}}],["changes",{"_index":188,"title":{},"body":{"index.html":{}}}],["class",{"_index":21,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"dependencies.html":{},"index.html":{}}}],["cli",{"_index":133,"title":{},"body":{"index.html":{}}}],["clone",{"_index":140,"title":{},"body":{"index.html":{}}}],["cluster_appmodule",{"_index":37,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["cluster_appmodule_providers",{"_index":38,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["code",{"_index":159,"title":{},"body":{"index.html":{}}}],["commands",{"_index":214,"title":{},"body":{"index.html":{}}}],["comment",{"_index":198,"title":{},"body":{"index.html":{}}}],["commenting",{"_index":207,"title":{},"body":{"index.html":{}}}],["compodoc/compodoc",{"_index":99,"title":{},"body":{"dependencies.html":{}}}],["config",{"_index":166,"title":{},"body":{"index.html":{}}}],["config/app.config",{"_index":48,"title":{},"body":{"modules/AppModule.html":{}}}],["config/database.config",{"_index":50,"title":{},"body":{"modules/AppModule.html":{}}}],["configmodule",{"_index":44,"title":{},"body":{"modules/AppModule.html":{}}}],["configmodule.forroot",{"_index":54,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice",{"_index":45,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.autoload",{"_index":80,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.blog",{"_index":76,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.host",{"_index":66,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.name",{"_index":74,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.password",{"_index":72,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.port",{"_index":68,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.synchronize",{"_index":78,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.user",{"_index":70,"title":{},"body":{"modules/AppModule.html":{}}}],["configuration",{"_index":176,"title":{},"body":{"index.html":{}}}],["configurations",{"_index":169,"title":{},"body":{"index.html":{}}}],["connection",{"_index":165,"title":{},"body":{"index.html":{}}}],["constructor(private",{"_index":22,"title":{},"body":{"controllers/AppController.html":{}}}],["contains",{"_index":168,"title":{},"body":{"index.html":{}}}],["controller",{"_index":0,"title":{"controllers/AppController.html":{}},"body":{"controllers/AppController.html":{},"coverage.html":{},"index.html":{},"overview.html":{}}}],["controllers",{"_index":2,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{}}}],["coverage",{"_index":86,"title":{"coverage.html":{}},"body":{"coverage.html":{}}}],["create",{"_index":187,"title":{},"body":{"index.html":{}}}],["database",{"_index":73,"title":{},"body":{"modules/AppModule.html":{},"index.html":{}}}],["databaseconfig",{"_index":49,"title":{},"body":{"modules/AppModule.html":{}}}],["declarations",{"_index":33,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["decorators",{"_index":10,"title":{},"body":{"controllers/AppController.html":{}}}],["default",{"_index":171,"title":{},"body":{"index.html":{}}}],["defined",{"_index":12,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{}}}],["dependencies",{"_index":31,"title":{"dependencies.html":{}},"body":{"modules/AppModule.html":{},"dependencies.html":{},"index.html":{},"overview.html":{}}}],["description",{"_index":231,"title":{},"body":{"properties.html":{}}}],["development",{"_index":150,"title":{},"body":{"index.html":{}}}],["directly",{"_index":184,"title":{},"body":{"index.html":{}}}],["documentation",{"_index":87,"title":{},"body":{"coverage.html":{},"index.html":{}}}],["double",{"_index":202,"title":{},"body":{"index.html":{}}}],["enforced",{"_index":137,"title":{},"body":{"index.html":{}}}],["entry",{"_index":161,"title":{},"body":{"index.html":{}}}],["env.development",{"_index":58,"title":{},"body":{"modules/AppModule.html":{}}}],["envfilepath",{"_index":57,"title":{},"body":{"modules/AppModule.html":{}}}],["example",{"_index":143,"title":{},"body":{"index.html":{}}}],["export",{"_index":20,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{}}}],["exports",{"_index":36,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["express",{"_index":105,"title":{},"body":{"dependencies.html":{}}}],["file",{"_index":5,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"coverage.html":{}}}],["folder",{"_index":167,"title":{},"body":{"index.html":{}}}],["function",{"_index":93,"title":{},"body":{"coverage.html":{}}}],["functions",{"_index":123,"title":{"miscellaneous/functions.html":{}},"body":{"miscellaneous/functions.html":{}}}],["gethello",{"_index":9,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{}}}],["getting",{"_index":125,"title":{"index.html":{}},"body":{"index.html":{}}}],["git",{"_index":144,"title":{},"body":{"index.html":{}}}],["hello",{"_index":85,"title":{},"body":{"injectables/AppService.html":{}}}],["host",{"_index":65,"title":{},"body":{"modules/AppModule.html":{}}}],["hot",{"_index":153,"title":{},"body":{"index.html":{}}}],["https://github.com/phertyameen/realtimechat.git",{"_index":145,"title":{},"body":{"index.html":{}}}],["i.e",{"_index":199,"title":{},"body":{"index.html":{}}}],["identifier",{"_index":88,"title":{},"body":{"coverage.html":{}}}],["import",{"_index":16,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{}}}],["imports",{"_index":53,"title":{},"body":{"modules/AppModule.html":{}}}],["index",{"_index":7,"title":{"index.html":{}},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{},"miscellaneous/functions.html":{}}}],["info",{"_index":3,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{}}}],["inject",{"_index":61,"title":{},"body":{"modules/AppModule.html":{}}}],["injectable",{"_index":81,"title":{"injectables/AppService.html":{}},"body":{"injectables/AppService.html":{},"coverage.html":{},"overview.html":{}}}],["injectables",{"_index":82,"title":{},"body":{"injectables/AppService.html":{}}}],["install",{"_index":142,"title":{},"body":{"index.html":{}}}],["installation",{"_index":139,"title":{},"body":{"index.html":{}}}],["installed",{"_index":174,"title":{},"body":{"index.html":{}}}],["instead",{"_index":201,"title":{},"body":{"index.html":{}}}],["integration",{"_index":178,"title":{},"body":{"index.html":{}}}],["isglobal",{"_index":55,"title":{},"body":{"modules/AppModule.html":{}}}],["keyboard",{"_index":205,"title":{},"body":{"index.html":{}}}],["legend",{"_index":32,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["license",{"_index":218,"title":{},"body":{"index.html":{},"properties.html":{}}}],["licensed",{"_index":219,"title":{},"body":{"index.html":{}}}],["line",{"_index":197,"title":{},"body":{"index.html":{}}}],["load",{"_index":59,"title":{},"body":{"modules/AppModule.html":{}}}],["lts",{"_index":136,"title":{},"body":{"index.html":{}}}],["mac",{"_index":212,"title":{},"body":{"index.html":{}}}],["main",{"_index":158,"title":{},"body":{"index.html":{}}}],["main.ts",{"_index":160,"title":{},"body":{"index.html":{}}}],["management",{"_index":177,"title":{},"body":{"index.html":{}}}],["matching",{"_index":27,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"coverage.html":{},"dependencies.html":{},"miscellaneous/functions.html":{},"index.html":{},"modules.html":{},"overview.html":{},"properties.html":{}}}],["merging",{"_index":194,"title":{},"body":{"index.html":{}}}],["metadata",{"_index":116,"title":{},"body":{"dependencies.html":{}}}],["methods",{"_index":8,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{}}}],["miscellaneous",{"_index":122,"title":{"miscellaneous/functions.html":{}},"body":{"miscellaneous/functions.html":{}}}],["mit",{"_index":221,"title":{},"body":{"index.html":{}}}],["module",{"_index":28,"title":{"modules/AppModule.html":{}},"body":{"modules/AppModule.html":{},"index.html":{},"overview.html":{}}}],["modules",{"_index":30,"title":{"modules.html":{}},"body":{"modules/AppModule.html":{},"modules.html":{}}}],["multi",{"_index":196,"title":{},"body":{"index.html":{}}}],["nest",{"_index":132,"title":{},"body":{"index.html":{}}}],["nestjs",{"_index":128,"title":{},"body":{"index.html":{}}}],["nestjs/common",{"_index":17,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"dependencies.html":{}}}],["nestjs/config",{"_index":46,"title":{},"body":{"modules/AppModule.html":{},"dependencies.html":{},"index.html":{}}}],["nestjs/core",{"_index":103,"title":{},"body":{"dependencies.html":{}}}],["nestjs/platform",{"_index":104,"title":{},"body":{"dependencies.html":{}}}],["nestjs/swagger",{"_index":106,"title":{},"body":{"dependencies.html":{}}}],["nestjs/typeorm",{"_index":52,"title":{},"body":{"modules/AppModule.html":{},"dependencies.html":{},"index.html":{}}}],["new",{"_index":95,"title":{},"body":{"coverage.html":{},"index.html":{}}}],["node.js",{"_index":135,"title":{},"body":{"index.html":{}}}],["npm",{"_index":138,"title":{},"body":{"index.html":{}}}],["open",{"_index":189,"title":{},"body":{"index.html":{}}}],["option",{"_index":211,"title":{},"body":{"index.html":{}}}],["out",{"_index":41,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["overview",{"_index":226,"title":{"overview.html":{}},"body":{"overview.html":{}}}],["package",{"_index":98,"title":{"dependencies.html":{},"properties.html":{}},"body":{}}],["packages",{"_index":175,"title":{},"body":{"index.html":{}}}],["password",{"_index":71,"title":{},"body":{"modules/AppModule.html":{}}}],["pg",{"_index":113,"title":{},"body":{"dependencies.html":{}}}],["point",{"_index":162,"title":{},"body":{"index.html":{}}}],["port",{"_index":67,"title":{},"body":{"modules/AppModule.html":{}}}],["postgres",{"_index":64,"title":{},"body":{"modules/AppModule.html":{}}}],["prerequisites",{"_index":134,"title":{},"body":{"index.html":{}}}],["project",{"_index":129,"title":{},"body":{"index.html":{}}}],["properties",{"_index":228,"title":{"properties.html":{}},"body":{"properties.html":{}}}],["providers",{"_index":35,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["pull",{"_index":190,"title":{},"body":{"index.html":{}}}],["push",{"_index":183,"title":{},"body":{"index.html":{}}}],["readonly",{"_index":23,"title":{},"body":{"controllers/AppController.html":{}}}],["realtimechat",{"_index":127,"title":{},"body":{"index.html":{}}}],["reflect",{"_index":115,"title":{},"body":{"dependencies.html":{}}}],["reload",{"_index":154,"title":{},"body":{"index.html":{}}}],["repository",{"_index":141,"title":{},"body":{"index.html":{}}}],["request",{"_index":191,"title":{},"body":{"index.html":{}}}],["reset",{"_index":40,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["results",{"_index":26,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"coverage.html":{},"dependencies.html":{},"miscellaneous/functions.html":{},"index.html":{},"modules.html":{},"overview.html":{},"properties.html":{}}}],["return",{"_index":24,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{}}}],["returns",{"_index":14,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{}}}],["review",{"_index":192,"title":{},"body":{"index.html":{}}}],["root",{"_index":164,"title":{},"body":{"index.html":{}}}],["rules",{"_index":182,"title":{},"body":{"index.html":{}}}],["run",{"_index":152,"title":{},"body":{"index.html":{}}}],["running",{"_index":147,"title":{},"body":{"index.html":{}}}],["rxjs",{"_index":118,"title":{},"body":{"dependencies.html":{}}}],["server",{"_index":151,"title":{},"body":{"index.html":{}}}],["service",{"_index":173,"title":{},"body":{"index.html":{}}}],["shift",{"_index":208,"title":{},"body":{"index.html":{}}}],["shortcut",{"_index":206,"title":{},"body":{"index.html":{}}}],["slash",{"_index":203,"title":{},"body":{"index.html":{}}}],["source",{"_index":4,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"index.html":{}}}],["src",{"_index":157,"title":{},"body":{"index.html":{}}}],["src/.../main.ts",{"_index":124,"title":{},"body":{"miscellaneous/functions.html":{}}}],["src/app.controller.ts",{"_index":6,"title":{},"body":{"controllers/AppController.html":{},"coverage.html":{}}}],["src/app.controller.ts:9",{"_index":13,"title":{},"body":{"controllers/AppController.html":{}}}],["src/app.module.ts",{"_index":42,"title":{},"body":{"modules/AppModule.html":{}}}],["src/app.service.ts",{"_index":83,"title":{},"body":{"injectables/AppService.html":{},"coverage.html":{}}}],["src/app.service.ts:5",{"_index":84,"title":{},"body":{"injectables/AppService.html":{}}}],["src/main.ts",{"_index":92,"title":{},"body":{"coverage.html":{},"miscellaneous/functions.html":{}}}],["start",{"_index":149,"title":{},"body":{"index.html":{}}}],["start:dev",{"_index":155,"title":{},"body":{"index.html":{}}}],["started",{"_index":126,"title":{"index.html":{}},"body":{"index.html":{}}}],["statements",{"_index":89,"title":{},"body":{"coverage.html":{}}}],["string",{"_index":15,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{}}}],["structure",{"_index":156,"title":{},"body":{"index.html":{}}}],["support",{"_index":223,"title":{},"body":{"modules.html":{}}}],["svg",{"_index":224,"title":{},"body":{"modules.html":{}}}],["synchronize",{"_index":77,"title":{},"body":{"modules/AppModule.html":{}}}],["system",{"_index":200,"title":{},"body":{"index.html":{}}}],["table",{"_index":97,"title":{},"body":{"coverage.html":{}}}],["tablesort(document.getelementbyid('coverage",{"_index":96,"title":{},"body":{"coverage.html":{}}}],["test",{"_index":216,"title":{},"body":{"index.html":{}}}],["tests",{"_index":217,"title":{},"body":{"index.html":{}}}],["this.appservice.gethello",{"_index":25,"title":{},"body":{"controllers/AppController.html":{}}}],["transformation",{"_index":181,"title":{},"body":{"index.html":{}}}],["transformer",{"_index":109,"title":{},"body":{"dependencies.html":{},"index.html":{}}}],["true",{"_index":56,"title":{},"body":{"modules/AppModule.html":{}}}],["type",{"_index":63,"title":{},"body":{"modules/AppModule.html":{},"coverage.html":{}}}],["typeorm",{"_index":120,"title":{},"body":{"dependencies.html":{},"index.html":{}}}],["typeormmodule",{"_index":51,"title":{},"body":{"modules/AppModule.html":{}}}],["typeormmodule.forrootasync",{"_index":60,"title":{},"body":{"modules/AppModule.html":{}}}],["under",{"_index":220,"title":{},"body":{"index.html":{}}}],["unlicensed",{"_index":232,"title":{},"body":{"properties.html":{}}}],["uproper",{"_index":204,"title":{},"body":{"index.html":{}}}],["use",{"_index":195,"title":{},"body":{"index.html":{}}}],["usefactory",{"_index":62,"title":{},"body":{"modules/AppModule.html":{}}}],["useful",{"_index":213,"title":{},"body":{"index.html":{}}}],["username",{"_index":69,"title":{},"body":{"modules/AppModule.html":{}}}],["using",{"_index":131,"title":{},"body":{"index.html":{}}}],["utilities",{"_index":180,"title":{},"body":{"index.html":{}}}],["validation",{"_index":179,"title":{},"body":{"index.html":{}}}],["validator",{"_index":111,"title":{},"body":{"dependencies.html":{},"index.html":{}}}],["version",{"_index":229,"title":{},"body":{"properties.html":{}}}],["windows/linux",{"_index":210,"title":{},"body":{"index.html":{}}}],["zoom",{"_index":39,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}]],"pipeline":["stemmer"]}, - "store": {"controllers/AppController.html":{"url":"controllers/AppController.html","title":"controller - AppController","body":"\n \n\n\n\n\n\n\n Controllers\n AppController\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/app.controller.ts\n \n\n\n\n\n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n getHello\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n getHello\n \n \n \n \n \n \n \n getHello()\n \n \n\n \n \n Decorators : \n \n @Get()\n \n \n\n \n \n Defined in src/app.controller.ts:9\n \n \n\n\n \n \n\n \n Returns : string\n\n \n \n \n \n \n \n\n\n \n import { Controller, Get } from '@nestjs/common';\nimport { AppService } from './app.service';\n\n@Controller()\nexport class AppController {\n constructor(private readonly appService: AppService) {}\n\n @Get()\n getHello(): string {\n return this.appService.getHello();\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"modules/AppModule.html":{"url":"modules/AppModule.html","title":"module - AppModule","body":"\n \n\n\n\n\n Modules\n AppModule\n\n\n\n \n \n\n\n\n\n\ndependencies\n\nLegend\n\n  Declarations\n\n  Module\n\n  Bootstrap\n\n  Providers\n\n  Exports\n\ncluster_AppModule\n\n\n\ncluster_AppModule_providers\n\n\n\n\nAppService\n\nAppService\n\n\n\nAppModule\n\nAppModule\n\nAppModule -->\n\nAppService->AppModule\n\n\n\n\n\n\n \n \n \n Zoom in\n Reset\n Zoom out\n \n\n\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n\n \n File\n \n \n src/app.module.ts\n \n\n\n\n\n\n \n \n \n Providers\n \n \n AppService\n \n \n \n \n Controllers\n \n \n AppController\n \n \n \n \n \n\n\n \n\n\n \n import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\nimport { ConfigModule, ConfigService } from '@nestjs/config';\nimport appConfig from './config/app.config';\nimport databaseConfig from './config/database.config';\nimport { TypeOrmModule } from '@nestjs/typeorm';\n\n@Module({\n imports: [\n ConfigModule.forRoot({\n isGlobal: true,\n envFilePath: ['.env.development'],\n load: [appConfig, databaseConfig],\n }),\n TypeOrmModule.forRootAsync({\n imports: [ConfigModule],\n inject: [ConfigService],\n useFactory: (configService: ConfigService) => ({\n type: 'postgres',\n host: configService.get('database.host'),\n port: +configService.get('database.port'),\n username: configService.get('database.user'),\n password: configService.get('database.password'),\n database: configService.get('database.name'),\n blog: configService.get('database.blog'),\n synchronize: configService.get('database.synchronize'),\n autoLoadEntities: configService.get('database.autoload')\n })\n }),\n ],\n controllers: [AppController],\n providers: [AppService],\n})\nexport class AppModule {}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/AppService.html":{"url":"injectables/AppService.html","title":"injectable - AppService","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n AppService\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/app.service.ts\n \n\n\n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n getHello\n \n \n \n \n\n\n\n\n\n \n \n\n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n getHello\n \n \n \n \n \n \ngetHello()\n \n \n\n\n \n \n Defined in src/app.service.ts:5\n \n \n\n\n \n \n\n \n Returns : string\n\n \n \n \n \n \n\n\n \n\n\n \n import { Injectable } from '@nestjs/common';\n\n@Injectable()\nexport class AppService {\n getHello(): string {\n return 'Hello';\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"coverage.html":{"url":"coverage.html","title":"coverage - coverage","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Documentation coverage\n\n\n\n \n\n\n\n \n \n File\n Type\n Identifier\n Statements\n \n \n \n \n \n \n src/app.controller.ts\n \n controller\n AppController\n \n 0 %\n (0/2)\n \n \n \n \n \n src/app.service.ts\n \n injectable\n AppService\n \n 0 %\n (0/2)\n \n \n \n \n \n src/main.ts\n \n function\n bootstrap\n \n 0 %\n (0/1)\n \n \n \n\n\n\n\n\n new Tablesort(document.getElementById('coverage-table'));\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"dependencies.html":{"url":"dependencies.html","title":"package-dependencies - dependencies","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n Dependencies\n \n \n \n @compodoc/compodoc : ^1.1.23\n \n @nestjs/common : ^10.0.0\n \n @nestjs/config : ^4.0.0\n \n @nestjs/core : ^10.0.0\n \n @nestjs/platform-express : ^10.0.0\n \n @nestjs/swagger : ^7.3.0\n \n @nestjs/typeorm : ^11.0.0\n \n class-transformer : ^0.5.1\n \n class-validator : ^0.14.1\n \n pg : ^8.13.1\n \n reflect-metadata : ^0.2.0\n \n rxjs : ^7.8.1\n \n typeorm : ^0.3.20\n \n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"miscellaneous/functions.html":{"url":"miscellaneous/functions.html","title":"miscellaneous-functions - functions","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Miscellaneous\n Functions\n\n\n\n Index\n \n \n \n \n \n \n bootstrap   (src/.../main.ts)\n \n \n \n \n \n \n\n\n src/main.ts\n \n \n \n \n \n \n \n bootstrap\n \n \n \n \n \n \nbootstrap()\n \n \n\n\n\n\n \n \n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"index.html":{"url":"index.html","title":"getting-started - index","body":"\n \n\nrealTimeChat (NestJS Project)\nThis is a NestJS project bootstrapped using the Nest CLI.\nGetting Started\nPrerequisites\n\nNode.js (LTS enforced)\nnpm\n\nInstallation\nClone the repository and install dependencies:\nExample :git clone https://github.com/phertyameen/realTimeChat.git\ncd realTimeChat\nnpm install\n\n# Running the Application\n\nStart the development server:\n```npm run start\n\nFor hot reload:\n```npm run start:dev\n\n# Project Structure\n\nsrc/ - Main application source code\nmain.ts - Entry point of the application\napp.module.ts - Root module with TypeORM connection\nconfig folder - contains appConfig and database configurations\napp.controller.ts - Default controller\napp.service.ts - Default service\n\n# Installed Packages\n\n@nestjs/config - Configuration management\n@nestjs/typeorm - TypeORM integration\nclass-validator - Validation utilities\nclass-transformer - Transformation utilities\n\n#Rules\n\nDo not push directly to any branch.\nAlways create a new branch for your changes.\nOpen a pull request for review before merging.\nAlways use multi-line comment i.e (/**...*/) comment system instead of the double slash (//) for uproper documentation\n\n#The keyboard shortcut for commenting\nMulti-line comment: Shift + Alt + A (Windows/Linux) or Shift + Option + A (Mac)\n\n#Useful Commands\nnpm run build - Build the project\nnpm run test - Run tests\n\n#License\nThis project is licensed under the MIT License.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"modules.html":{"url":"modules.html","title":"modules - modules","body":"\n \n\n\n\n\n Modules\n\n\n \n \n \n \n AppModule\n \n \n \n \n Your browser does not support SVG\n \n \n \n Browse\n \n \n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"overview.html":{"url":"overview.html","title":"overview - overview","body":"\n \n\n\n\n Overview\n\n \n\n \n \n\n\n\n\n\ndependencies\n\nLegend\n\n  Declarations\n\n  Module\n\n  Bootstrap\n\n  Providers\n\n  Exports\n\ncluster_AppModule\n\n\n\ncluster_AppModule_providers\n\n\n\n\nAppService\n\nAppService\n\n\n\nAppModule\n\nAppModule\n\nAppModule -->\n\nAppService->AppModule\n\n\n\n\n\n\n \n \n \n Zoom in\n Reset\n Zoom out\n \n\n \n\n \n \n \n \n \n \n 1 Module\n \n \n \n \n \n \n \n \n 1 Controller\n \n \n \n \n \n \n \n 1 Injectable\n \n \n \n \n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"properties.html":{"url":"properties.html","title":"package-properties - properties","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n Properties\n \n \n \n Version : 0.0.1\n \n Description : \n \n License : UNLICENSED\n \n Author : \n \n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"}} + "index": {"version":"2.3.9","fields":["title","body"],"fieldVectors":[["title/interfaces/ActiveUserData.html",[0,2.315,1,2.315]],["body/interfaces/ActiveUserData.html",[0,3.892,1,3.892,2,3.855,3,0.288,4,0.255,5,0.255,6,4.336,7,0.393,8,4.336,9,0.859,10,2.588,11,0.357,12,1.989,13,1.042,14,2.578,15,4.939,16,1.403,17,0.566,18,0.02,19,6.873,20,2.813,21,0.288,22,0.017,23,0.017]],["title/controllers/AppController.html",[24,1.316,25,2.522]],["body/controllers/AppController.html",[3,0.279,4,0.247,5,0.247,7,0.38,11,0.345,16,1.277,18,0.02,21,0.279,22,0.016,23,0.016,24,2.447,25,4.154,26,1.863,27,4.194,28,6.515,29,0.051,30,1.277,31,5.816,32,1.355,33,0.567,34,4.899,35,1.849,36,0.985,37,0.424,38,0.783,39,3.821,40,4.194,41,1.505,42,1.765,43,3.381,44,1.672,45,0.931,46,4.899]],["title/modules/AppModule.html",[47,1.316,48,2.522]],["body/modules/AppModule.html",[3,0.192,4,0.17,5,0.17,17,0.311,18,0.021,21,0.192,22,0.013,23,0.013,25,3.742,26,1.789,29,0.026,37,0.508,38,0.538,39,3.752,40,2.883,47,1.953,48,4.921,49,1.615,50,1.281,51,1.839,52,1.839,53,1.615,54,2.961,55,1.839,56,2.883,57,2.883,58,2.883,59,3.752,60,4.053,61,4.053,62,3.752,63,2.569,64,1.839,65,1.839,66,3.368,67,3.435,68,3.435,69,4.126,70,3.368,71,4.027,72,5.87,73,1.839,74,4.027,75,3.368,76,4.705,77,3.368,78,2.883,79,1.433,80,3.368,81,3.368,82,3.368,83,3.368,84,4.027,85,4.705,86,2.325,87,3.247,88,3.368,89,2.563,90,3.368,91,3.581,92,3.368,93,1.975,94,2.563,95,3.368,96,3.368,97,3.368,98,3.368,99,1.615,100,3.368,101,3.368,102,3.368,103,3.368,104,1.615,105,3.368,106,3.368,107,3.368,108,3.368,109,3.368,110,3.368,111,3.368,112,3.368,113,1.433,114,3.368,115,1.615,116,3.368,117,3.368,118,3.368,119,3.368,120,3.368,121,3.368,122,3.368,123,4.027,124,4.027,125,3.368]],["title/injectables/AppService.html",[39,2.143,126,0.484]],["body/injectables/AppService.html",[3,0.292,4,0.259,5,0.259,7,0.398,11,0.362,16,1.315,18,0.02,21,0.292,22,0.017,23,0.017,29,0.052,30,1.315,31,5.911,33,0.595,35,1.903,36,1.033,37,0.362,38,0.822,39,4.05,45,0.977,126,0.821,127,1.664,128,4.398,129,5.139,130,6.652]],["title/controllers/AuthController.html",[24,1.316,67,2.315]],["body/controllers/AuthController.html",[3,0.175,4,0.155,5,0.155,7,0.531,9,1.11,11,0.217,13,0.748,17,0.519,18,0.021,21,0.175,22,0.012,23,0.012,24,1.857,26,1.169,29,0.04,30,0.936,32,1.22,33,0.51,35,1.73,36,1.132,37,0.451,38,0.491,41,0.944,42,1.107,44,1.049,45,0.838,67,2.794,131,2.63,132,1.947,133,3.258,134,2.236,135,4.117,136,1.426,137,3.043,138,3.073,139,3.641,140,3.073,141,4.145,142,1.989,143,2.63,144,3.304,145,3.315,146,4.409,147,3.774,148,4.288,149,3.073,150,3.073,151,1.042,152,0.792,153,2.114,154,1.876,155,4.288,156,2.339,157,3.907,158,3.073,159,3.077,160,3.073,161,3.774,162,3.073,163,3.073,164,5.156,165,1.387,166,3.043,167,1.947,168,3.073,169,3.073,170,3.073,171,1.947,172,3.073,173,3.024,174,2.63,175,2.339,176,1.947,177,2.63,178,2.339,179,2.63,180,1.678,181,3.024,182,3.498,183,4.414,184,1.235,185,3.073,186,3.073,187,1.473,188,0.944,189,1.505,190,3.073,191,2.63,192,3.073,193,3.073,194,2.586,195,3.304,196,4.409,197,2.586,198,4.409,199,3.073,200,1.107,201,3.073,202,3.073,203,3.073,204,3.073]],["title/guards/AuthGuardGuard.html",[87,2.522,205,2.522]],["body/guards/AuthGuardGuard.html",[3,0.177,4,0.157,5,0.157,7,0.345,11,0.219,12,1.007,13,0.754,17,0.41,18,0.021,21,0.177,22,0.012,23,0.012,29,0.04,30,0.944,33,0.515,35,1.594,36,0.894,37,0.452,38,0.497,41,1.366,44,2.128,45,0.591,86,2.147,87,3.07,89,3.951,91,4.884,93,1.824,94,2.367,99,2.132,126,0.59,136,1.436,145,1.491,151,1.051,152,0.799,154,1.324,155,3.951,176,3.797,180,1.699,184,1.251,187,2.716,188,1.915,189,1.062,200,1.12,205,2.147,206,5.993,207,4.443,208,2.662,209,4.448,210,3.385,211,6.93,212,5.191,213,4.448,214,4.448,215,3.11,216,6.779,217,3.11,218,4.448,219,4.849,220,3.11,221,5.665,222,4.448,223,2.272,224,2.608,225,3.385,226,3.385,227,2.608,228,4.448,229,3.583,230,3.11,231,2.662,232,3.11,233,2.367,234,3.11,235,3.11,236,1.699,237,2.007,238,2.662,239,4.448,240,3.11,241,3.11,242,3.11,243,1.971,244,3.11,245,2.04,246,3.11,247,3.11,248,3.11,249,3.11,250,3.11,251,3.11,252,3.11,253,3.11,254,3.11,255,3.11,256,3.11,257,3.11,258,3.11,259,3.11,260,1.589,261,3.11,262,1.824]],["title/modules/AuthModule.html",[47,1.316,59,2.143]],["body/modules/AuthModule.html",[3,0.2,4,0.177,5,0.177,18,0.021,21,0.2,22,0.013,23,0.013,26,1.843,29,0.038,37,0.511,38,0.562,47,1.997,49,1.685,50,1.336,51,1.919,52,1.919,53,1.685,54,3.028,55,3.028,59,4.251,62,2.841,63,2.646,64,1.919,65,1.919,67,3.513,69,2.674,71,3.007,73,1.919,84,3.007,86,2.425,91,2.674,93,2.061,94,2.674,123,3.007,124,3.007,145,1.685,173,4.153,174,3.007,263,3.007,264,3.007,265,3.007,266,3.457,267,3.311,268,3.54,269,3.802,270,3.802,271,3.514,272,3.513,273,2.475,274,3.344,275,3.514,276,3.514,277,3.514,278,3.007,279,3.514,280,2.674,281,2.425,282,3.007,283,3.514,284,3.514,285,3.07,286,3.514,287,3.514,288,3.514,289,3.514,290,2.674,291,3.514,292,3.007,293,3.514,294,3.514,295,3.007,296,3.007,297,3.514,298,3.514,299,3.514]],["title/injectables/AuthService.html",[126,0.484,173,2.143]],["body/injectables/AuthService.html",[3,0.212,4,0.188,5,0.188,7,0.29,9,0.633,11,0.263,13,0.971,17,0.528,18,0.021,21,0.212,22,0.014,23,0.014,29,0.045,30,1.072,33,0.662,35,1.883,36,1.015,37,0.465,38,0.597,41,1.551,42,2.061,44,1.954,45,0.96,104,2.744,126,0.669,127,1.209,133,2.758,134,2.378,135,3.485,136,1.583,137,4.231,139,3.756,141,3.626,145,2.421,151,1.352,152,1.028,156,3.843,157,3.959,159,2.039,165,1.685,173,2.962,175,2.841,178,2.841,187,1.79,188,1.758,200,1.345,269,3.959,270,4.027,273,1.907,278,3.196,285,2.366,300,3.196,301,2.366,302,2.873,303,3.734,304,5.05,305,3.734,306,3.734,307,5.05,308,2.366,309,2.19,310,3.734,311,3.734,312,3.734]],["title/injectables/BcryptProvider.html",[126,0.484,274,2.522]],["body/injectables/BcryptProvider.html",[3,0.23,4,0.203,5,0.203,7,0.313,11,0.285,13,0.902,16,1.5,17,0.491,18,0.02,21,0.23,22,0.014,23,0.014,29,0.041,30,1.129,33,0.616,35,1.943,36,1.069,37,0.42,38,0.645,45,1.012,113,2.798,126,0.839,127,1.307,134,2.432,136,1.868,151,1.257,152,0.956,200,2.143,223,3.231,236,2.906,245,1.916,266,2.718,274,4.107,313,3.455,314,4.554,315,4.554,316,4.554,317,4.554,318,5.415,319,4.037,320,5.321,321,4.554,322,5.094,323,4.037,324,5.321,325,3.455,326,3.672,327,4.554,328,2.368,329,4.037,330,4.037,331,5.321,332,4.037,333,4.037,334,4.037]],["title/entities/ChatRoom.html",[335,1.469,336,1.649]],["body/entities/ChatRoom.html",[3,0.216,4,0.191,5,0.191,7,0.294,9,1.196,11,0.267,12,1.651,16,1.309,17,0.65,18,0.021,21,0.216,22,0.014,23,0.014,29,0.03,32,1.781,33,0.745,37,0.406,152,1.157,188,1.771,237,1.71,335,2.48,336,2.905,337,2.615,338,3.243,339,4.755,340,5.675,341,5.766,342,1.595,343,2.945,344,5.279,345,4.935,346,3.789,347,2.991,348,5.101,349,3.789,350,2.301,351,2.991,352,3.368,353,3.789,354,3.789,355,4.899,356,3.789,357,3.243,358,3.789,359,3.789,360,4.694,361,3.882,362,3.882,363,2.401,364,2.884,365,4.366,366,4.366,367,1.227,368,3.789,369,3.789]],["title/controllers/ChatRoomsController.html",[24,1.316,370,2.522]],["body/controllers/ChatRoomsController.html",[3,0.223,4,0.197,5,0.197,7,0.304,11,0.276,13,0.995,16,1.421,17,0.577,18,0.021,21,0.223,22,0.014,23,0.014,24,2.113,26,1.492,29,0.031,30,1.108,32,1.623,33,0.679,36,1.179,37,0.368,38,0.627,43,2.707,44,1.339,45,1.115,132,2.485,151,1.386,152,1.124,167,2.485,171,4.453,189,1.339,336,1.77,339,4.791,340,5.942,342,1.73,370,3.602,371,3.357,372,2.999,373,4.956,374,3.972,375,3.922,376,3.922,377,3.357,378,5.22,379,3.922,380,3.357,381,5.22,382,3.922,383,4.468,384,3.972,385,3.061,386,3.357,387,3.922,388,3.922,389,3.922,390,4.468,391,3.922,392,3.922,393,3.922,394,3.922,395,3.922]],["title/injectables/ChatRoomsService.html",[126,0.484,385,2.143]],["body/injectables/ChatRoomsService.html",[3,0.14,4,0.124,5,0.124,7,0.524,9,1.088,11,0.174,13,0.859,16,1.403,17,0.617,18,0.021,21,0.14,22,0.01,23,0.01,29,0.039,30,0.796,32,1.254,33,0.586,35,1.392,36,1.152,37,0.404,38,0.394,41,1.151,42,1.633,45,0.862,79,1.05,126,0.497,127,0.799,136,1.74,147,3.209,148,2.853,151,1.196,152,1.171,153,1.797,165,1.691,180,1.347,181,2.97,182,3.363,184,0.992,187,1.797,188,1.932,189,1.859,194,2.659,195,3.194,197,2.97,200,0.889,245,1.35,336,3.229,342,1.699,343,1.915,347,2.97,355,4.536,363,1.563,367,0.799,372,2.857,373,4.364,374,2.853,377,3.209,380,3.209,384,3.854,385,2.198,390,4.908,396,2.112,397,2.467,398,3.016,399,2.659,400,2.467,401,3.749,402,3.749,403,2.872,404,3.749,405,2.587,406,2.853,407,2.853,408,2.467,409,3.209,410,4.364,411,3.749,412,3.854,413,2.853,414,3.749,415,2.853,416,2.467,417,3.209,418,3.749,419,5.256,420,1.703,421,3.749,422,2.467,423,2.872,424,3.209,425,1.347,426,1.878,427,2.467,428,2.112,429,2.467,430,1.447,431,2.467,432,2.467,433,2.467,434,2.467,435,2.467,436,2.467,437,2.467,438,2.467,439,2.467]],["title/modules/ChatroomsModule.html",[47,1.316,60,2.315]],["body/modules/ChatroomsModule.html",[3,0.278,4,0.246,5,0.246,7,0.379,18,0.02,21,0.278,22,0.016,23,0.016,26,2.285,29,0.038,37,0.459,38,0.781,47,2.51,49,2.343,50,1.858,51,2.668,52,2.668,53,2.343,54,3.553,55,2.668,60,4.495,63,3.281,64,2.668,65,2.668,336,2.711,370,4.491,385,4.161,386,4.182,440,4.182,441,4.182,442,4.886,443,4.886]],["title/injectables/CreateGoogleUserProvider.html",[126,0.484,444,2.143]],["body/injectables/CreateGoogleUserProvider.html",[3,0.19,4,0.168,5,0.168,7,0.508,9,1.226,10,2.388,11,0.235,13,0.793,17,0.431,18,0.021,21,0.19,22,0.013,23,0.013,29,0.036,30,0.992,32,0.923,33,0.541,35,1.025,36,0.939,37,0.45,38,0.533,41,1.436,42,1.683,44,1.139,45,0.634,79,1.42,126,0.62,127,1.08,134,1.943,136,1.492,142,2.109,151,1.104,152,0.84,154,2.714,180,1.822,181,2.741,182,3.164,184,1.341,188,1.025,189,1.139,194,1.957,195,2.741,197,2.741,200,1.202,223,2.388,243,2.114,245,1.202,260,1.704,262,1.957,328,1.957,335,1.879,343,2.388,347,3.164,363,2.114,367,1.08,372,3.14,398,2.95,399,2.741,403,2.114,405,3.226,420,2.303,425,1.822,430,1.957,444,2.741,445,2.856,446,3.226,447,3.557,448,5.003,449,3.557,450,2.583,451,4.001,452,2.114,453,3.337,454,4.001,455,3.704,456,3.337,457,4.674,458,3.337,459,2.961,460,2.741,461,4.618,462,4.674,463,3.337,464,2.856,465,2.303,466,2.114,467,2.856,468,2.114,469,3.337,470,3.337,471,2.114,472,3.337]],["title/classes/CreateUserDto.html",[29,0.028,473,1.555]],["body/classes/CreateUserDto.html",[3,0.118,4,0.105,5,0.105,7,0.511,9,1.058,11,0.146,12,1.062,13,0.984,14,2.016,16,1.502,17,0.593,18,0.021,20,1.966,21,0.187,22,0.009,23,0.009,29,0.039,32,1.548,33,0.648,36,0.817,37,0.355,45,0.773,99,1.573,113,2.935,136,0.575,142,1.48,152,1.073,153,0.996,159,1.792,184,0.835,189,1.388,224,1.924,225,1.581,226,1.581,236,1.134,237,1.835,245,0.748,260,1.676,342,0.908,350,1.835,352,1.792,367,0.673,407,1.581,447,2.497,450,1.913,473,1.73,474,0.937,475,4.416,476,1.434,477,2.264,478,3.863,479,2.221,480,1.835,481,2.221,482,3.403,483,4.576,484,3.465,485,3.188,486,3.188,487,2.264,488,3.188,489,3.69,490,2.808,491,3.69,492,2.077,493,2.077,494,3.188,495,4.078,496,2.264,497,1.778,498,2.079,499,2.264,500,2.077,501,2.264,502,2.709,503,1.778,504,2.077,505,1.778,506,2.808,507,2.264,508,1.924,509,2.077,510,2.077,511,2.264,512,2.079,513,2.264,514,2.709,515,1.778,516,2.077,517,2.077,518,2.264,519,2.264,520,2.264,521,2.264,522,2.264,523,2.264,524,1.857,525,2.079,526,2.469,527,3.471,528,2.264,529,2.264,530,2.264,531,2.077,532,2.079,533,3.187,534,2.079,535,1.778,536,2.709,537,2.077,538,2.077,539,2.079,540,2.919,541,1.924,542,1.676,543,1.434,544,3.188,545,1.316,546,1.434,547,3.188,548,2.806,549,2.264,550,2.806,551,0.884,552,4.005,553,1.316,554,2.264,555,1.061,556,1.316,557,2.264,558,1.434,559,1.792,560,1.134,561,1.778,562,2.806,563,2.808,564,1.778,565,1.434,566,1.434,567,2.264,568,1.434,569,1.778,570,1.434,571,2.264,572,1.434,573,2.806,574,1.434,575,1.218,576,1.434,577,1.924,578,1.316,579,1.434]],["title/classes/CreateUserDto-1.html",[29,0.024,473,1.301,580,1.937]],["body/classes/CreateUserDto-1.html",[3,0.12,4,0.106,5,0.106,7,0.512,9,1.108,11,0.148,12,1.072,13,0.988,14,2.025,16,1.499,17,0.595,18,0.021,20,1.409,21,0.12,22,0.009,23,0.009,29,0.045,32,1.555,33,0.651,37,0.357,45,0.779,93,3.417,99,1.588,113,2.923,136,0.581,142,1.494,144,1.233,152,1.077,153,1.008,159,1.808,184,0.845,210,1.6,224,1.233,227,1.942,236,1.808,237,2.098,245,0.757,342,0.916,350,1.849,352,1.808,367,0.68,450,1.924,466,2.098,473,2.152,474,0.948,478,3.491,479,2.238,480,1.849,481,2.238,482,3.417,483,4.599,484,3.569,485,3.209,486,3.209,487,3.209,488,3.209,489,3.491,491,3.209,494,2.828,495,3.965,496,2.285,497,1.799,498,2.098,499,2.285,501,2.285,502,2.727,503,1.799,505,1.799,508,1.942,511,2.285,512,2.098,513,2.285,514,2.727,515,1.799,518,2.285,519,2.285,520,2.285,521,2.285,522,2.285,523,2.285,524,1.331,525,2.098,526,2.479,527,3.209,528,2.285,529,2.285,530,2.285,532,2.098,533,2.596,534,2.098,535,1.799,536,2.727,539,2.596,540,2.934,541,1.942,542,1.691,543,1.451,544,3.209,545,1.332,546,1.451,547,2.828,548,2.828,549,3.209,550,2.828,551,0.894,552,4.021,553,1.332,554,2.285,555,1.074,556,1.332,557,2.285,558,1.451,559,1.808,560,1.808,562,1.451,565,1.451,566,1.451,567,2.285,568,1.451,570,1.451,571,2.285,572,1.451,573,2.828,574,1.451,575,1.233,576,1.451,577,1.942,578,2.098,579,1.451,581,4.434,582,1.6,583,2.285,584,2.285,585,2.834,586,2.102,587,2.102,588,2.102,589,2.102,590,2.834,591,2.102,592,2.102,593,2.102,594,2.102,595,2.102,596,2.102,597,2.102,598,1.799,599,1.6,600,1.799]],["title/injectables/CreateUserProvider.html",[126,0.484,601,2.143]],["body/injectables/CreateUserProvider.html",[3,0.153,4,0.135,5,0.135,7,0.515,9,1.208,10,2.039,11,0.189,13,0.677,14,0.966,17,0.487,18,0.021,21,0.153,22,0.011,23,0.011,29,0.021,30,0.847,32,0.742,33,0.462,36,0.802,37,0.432,38,0.429,41,1.622,42,1.902,44,0.915,45,0.51,50,1.518,79,1.141,104,2.707,113,2.029,115,2.707,126,0.529,127,0.868,134,1.717,136,1.319,144,1.573,151,0.943,152,0.717,154,2.608,180,1.464,181,2.341,182,3.097,184,1.078,188,1.226,189,1.627,194,1.573,195,2.796,197,2.341,200,1.717,223,2.039,227,2.341,243,2.529,245,1.437,260,2.697,262,2.796,266,3.346,273,1.37,309,1.573,326,2.754,335,1.605,347,3.097,367,0.868,372,1.913,398,2.837,399,3.097,403,1.699,405,2.754,406,3.037,420,1.851,425,1.464,430,1.573,446,2.754,452,1.699,459,2.529,464,2.295,466,2.529,468,3.346,471,2.529,473,2.608,477,2.754,601,2.341,602,4.08,603,2.295,604,3.416,605,3.037,606,2.682,607,3.037,608,2.682,609,5.28,610,2.682,611,3.991,612,3.416,613,4.08,614,2.682,615,3.416,616,3.037,617,3.416,618,3.991,619,4.019,620,1.699,621,2.041,622,1.851,623,2.682,624,4.767,625,3.628,626,4.767,627,2.682,628,2.682,629,3.991,630,3.991,631,3.991,632,3.991,633,3.991,634,3.991,635,3.991,636,3.991,637,3.991,638,2.682,639,3.991,640,2.682,641,2.682,642,3.416,643,2.682,644,2.682]],["title/classes/EditUserDto.html",[29,0.028,645,2.315]],["body/classes/EditUserDto.html",[3,0.264,4,0.233,5,0.233,7,0.359,10,2.969,11,0.327,12,1.882,13,0.986,17,0.427,18,0.02,20,2.474,21,0.264,22,0.016,23,0.016,29,0.045,32,1.282,33,0.536,37,0.448,342,1.898,350,2.623,351,3.409,372,2.221,460,3.409,473,1.972,474,2.09,476,3.198,540,2.53,541,2.717,542,2.969,551,1.972,622,3.198,645,3.683,646,4.976,647,4.976,648,4.424,649,4.976,650,6.353,651,5.813,652,5.813,653,5.813,654,5.813,655,4.633,656,4.633,657,4.976,658,4.633,659,4.633]],["title/injectables/FindOneByEmail.html",[126,0.484,660,2.143]],["body/injectables/FindOneByEmail.html",[3,0.202,4,0.179,5,0.179,7,0.466,9,1.248,11,0.251,13,0.828,14,2.481,16,1.275,17,0.45,18,0.021,21,0.202,22,0.013,23,0.013,29,0.028,30,1.037,33,0.565,35,1.5,36,0.982,37,0.423,38,0.568,41,1.5,42,1.759,45,0.676,79,1.513,115,2.88,126,0.647,127,1.151,134,2.01,136,1.544,144,2.085,151,1.154,152,0.878,154,2.079,188,1.092,189,1.667,200,1.281,223,2.85,229,3.371,243,3.095,260,2.495,262,2.865,335,1.964,367,1.151,398,3.302,399,3.272,415,3.717,423,3.806,425,1.942,430,2.085,446,3.371,452,2.253,465,3.371,468,2.253,471,2.253,526,2.375,613,3.043,619,3.717,620,2.253,625,3.717,660,3.523,661,4.247,662,3.043,663,4.181,664,3.556,665,3.095,666,4.181,667,4.885,668,3.556,669,3.717,670,2.706,671,3.556,672,3.556,673,3.556]],["title/injectables/FindOneByGoogleIdProvider.html",[126,0.484,674,2.143]],["body/injectables/FindOneByGoogleIdProvider.html",[3,0.239,4,0.211,5,0.211,7,0.326,9,1.129,11,0.296,13,0.926,16,1.287,17,0.503,18,0.021,21,0.239,22,0.015,23,0.015,29,0.033,30,1.159,33,0.632,35,1.677,36,0.844,37,0.453,38,0.671,41,1.677,42,1.966,45,0.798,79,1.786,104,2.013,126,0.724,127,1.359,134,2.185,136,1.678,151,1.29,152,0.981,165,1.894,188,1.289,200,1.512,342,1.777,367,1.359,398,3.079,399,3.557,423,3.458,425,2.293,430,2.462,446,3.767,450,2.443,452,2.66,480,2.463,526,2.581,620,2.66,661,4.616,663,4.672,670,3.195,674,3.201,675,3.593,676,4.672,677,4.198,678,4.672,679,4.198]],["title/injectables/GenerateTokensProvider.html",[126,0.484,267,1.867]],["body/injectables/GenerateTokensProvider.html",[1,2.583,3,0.157,4,0.139,5,0.139,7,0.376,9,1.195,10,2.083,11,0.195,13,0.969,14,0.994,15,1.905,17,0.494,18,0.021,20,2.545,21,0.157,22,0.011,23,0.011,29,0.022,30,0.865,33,0.561,36,1.076,37,0.436,38,0.441,41,1.252,42,1.469,44,1.655,45,0.775,73,1.507,104,1.323,126,0.71,127,0.894,134,2.154,135,2.814,136,1.654,141,3.62,145,3.308,151,1.265,152,0.871,153,1.955,155,4.348,161,3.49,165,1.84,166,2.814,187,2.325,188,1.489,189,1.828,200,1.469,245,0.994,267,2.083,273,1.41,280,2.101,281,2.814,301,1.749,302,2.703,308,1.749,309,1.619,335,1.639,342,1.481,363,1.749,384,3.69,398,1.323,507,2.814,525,2.583,584,4.27,616,3.103,680,4.076,681,2.101,682,4.078,683,5.119,684,4.078,685,4.078,686,5.436,687,4.15,688,4.076,689,2.76,690,4.078,691,2.76,692,4.078,693,4.584,694,4.078,695,5.714,696,5.356,697,2.76,698,3.49,699,5.356,700,4.584,701,2.76,702,4.078,703,3.103,704,2.362,705,2.76,706,2.101,707,2.76,708,2.362,709,2.362,710,2.362,711,2.362,712,2.362,713,2.362,714,4.078,715,2.76,716,2.814,717,4.078,718,4.078,719,2.76]],["title/classes/GetuserParamDto.html",[29,0.028,720,2.315]],["body/classes/GetuserParamDto.html",[3,0.28,4,0.247,5,0.247,7,0.381,11,0.346,12,1.952,13,1.022,17,0.601,18,0.02,20,2.566,21,0.28,22,0.016,23,0.016,29,0.054,32,1.359,33,0.568,37,0.425,342,1.881,343,3.08,350,2.72,351,3.536,474,2.217,551,2.091,555,2.51,657,4.205,720,3.82,721,4.205,722,6.029,723,4.913,724,4.913,725,4.913,726,4.913]],["title/controllers/GoogleAuthenticationController.html",[24,1.316,272,2.315]],["body/controllers/GoogleAuthenticationController.html",[3,0.209,4,0.185,5,0.185,7,0.51,9,1.081,11,0.259,13,0.624,17,0.339,18,0.021,21,0.209,22,0.014,23,0.014,24,2.046,26,1.4,29,0.029,30,1.061,32,1.018,33,0.426,36,1.005,37,0.463,38,0.588,41,1.536,44,1.256,45,0.7,132,2.331,133,2.01,134,2.046,142,3.195,143,3.15,145,2.922,148,3.806,151,0.869,152,0.661,167,2.331,171,3.168,176,2.331,177,3.15,179,3.15,180,2.01,181,2.933,182,3.331,184,1.479,188,1.13,189,1.707,191,3.15,194,2.158,195,2.933,197,2.933,268,3.48,272,3.599,290,2.801,403,2.331,406,3.806,412,3.806,420,2.54,448,4.28,450,2.668,460,2.933,465,2.54,727,3.806,728,3.15,729,3.68,730,5.217,731,3.15,732,4.261,733,3.68,734,3.68,735,4.28,736,5.001,737,3.15,738,3.15,739,3.15,740,3.68,741,3.68,742,3.68,743,3.68]],["title/injectables/GoogleAuthenticationService.html",[126,0.484,268,1.996]],["body/injectables/GoogleAuthenticationService.html",[3,0.146,4,0.129,5,0.129,7,0.36,9,1.116,11,0.181,12,1.25,13,0.655,14,1.672,15,1.771,17,0.428,18,0.021,21,0.146,22,0.011,23,0.011,29,0.02,30,0.82,33,0.598,35,1.186,36,0.933,37,0.426,38,0.41,41,1.587,42,2.097,44,1.585,45,0.734,50,1.469,73,1.401,104,2.98,115,1.23,126,0.512,127,0.831,133,2.109,134,1.672,136,1.284,142,2.923,145,3.049,151,0.912,152,0.694,153,1.851,154,1.643,165,1.158,188,1.788,189,1.764,200,1.672,229,2.665,236,1.401,243,1.626,245,2.097,260,2.372,262,1.505,267,3.248,268,2.109,273,1.311,281,1.771,282,2.196,285,1.626,301,1.626,302,2.706,308,1.626,309,1.505,342,1.068,372,1.23,423,1.626,450,2.536,460,3.03,467,3.305,468,1.626,471,1.626,477,2.665,479,2.536,480,2.331,481,2.536,507,2.665,512,2.447,584,2.665,604,2.196,616,2.939,642,2.196,665,2.447,669,1.953,680,1.953,683,4.983,688,3.932,703,3.932,706,1.953,716,3.565,730,4.742,731,3.305,732,3.688,735,2.196,738,2.196,739,2.196,744,4.742,745,2.196,746,3.862,747,5.54,748,5.822,749,5.166,750,3.862,751,3.305,752,2.665,753,3.974,754,2.566,755,2.566,756,2.566,757,4.643,758,2.196,759,2.566,760,2.566,761,2.566,762,2.566,763,3.862,764,2.566,765,2.566,766,2.566,767,2.566,768,3.862,769,2.566,770,2.566,771,2.566,772,2.566,773,2.566,774,2.566,775,3.862,776,2.566,777,2.566,778,2.566,779,2.566,780,2.566,781,2.566,782,2.566,783,2.566,784,2.566,785,2.566,786,1.953,787,2.566,788,2.566]],["title/modules/GoogleAuthticationModule.html",[47,1.316,789,2.522]],["body/modules/GoogleAuthticationModule.html",[3,0.28,4,0.248,5,0.248,18,0.02,21,0.28,22,0.016,23,0.016,26,2.297,29,0.038,37,0.46,38,0.788,47,2.352,49,2.362,50,1.874,51,2.69,52,2.69,53,2.362,54,3.566,55,2.69,63,3.298,64,2.69,65,2.69,268,3.882,272,4.138,290,3.749,292,4.217,450,1.874,727,3.749,737,4.217,789,4.907,790,4.217,791,4.926,792,4.926]],["title/interfaces/GoogleInterface.html",[0,2.315,455,2.315]],["body/interfaces/GoogleInterface.html",[0,3.701,2,3.553,3,0.266,4,0.235,5,0.235,7,0.362,11,0.329,12,1.891,14,2.527,16,1.596,17,0.616,18,0.02,21,0.266,22,0.016,23,0.016,152,1.2,342,1.616,450,2.425,455,3.701,479,3.648,480,3.014,481,3.648,502,3.426,514,3.426,793,3.997,794,5.842]],["title/classes/GoogleTokenDto.html",[29,0.028,732,2.315]],["body/classes/GoogleTokenDto.html",[3,0.291,4,0.257,5,0.257,7,0.396,11,0.36,12,1.999,16,1.463,17,0.612,18,0.02,21,0.291,22,0.017,23,0.017,29,0.054,32,1.413,33,0.591,37,0.36,145,3.383,474,2.305,542,3.389,551,2.174,732,4.367,795,5.285,796,4.373,797,5.109]],["title/injectables/HashingProvider.html",[126,0.484,266,1.867]],["body/injectables/HashingProvider.html",[3,0.251,4,0.222,5,0.222,7,0.342,11,0.311,13,0.956,16,1.526,17,0.52,18,0.02,21,0.251,22,0.015,23,0.015,29,0.048,30,1.197,33,0.653,36,1.133,37,0.311,38,0.706,113,1.879,126,0.747,127,1.43,137,3.892,151,1.332,152,1.013,223,3.344,266,2.881,296,6.153,315,4.827,316,4.827,317,4.827,318,5.318,321,4.827,322,5.318,325,3.78,326,3.892,328,3.307,798,3.78,799,5.639,800,4.416,801,5.639,802,6.546,803,4.416,804,5.639]],["title/classes/MatchPasswordsConstraint.html",[29,0.028,560,1.996]],["body/classes/MatchPasswordsConstraint.html",[3,0.137,4,0.121,5,0.121,7,0.494,9,0.963,11,0.17,13,0.624,14,1.608,16,1.481,17,0.562,18,0.021,20,1.566,21,0.209,22,0.01,23,0.01,29,0.044,30,0.781,33,0.426,36,1.141,37,0.38,45,0.849,99,1.154,113,2.952,136,0.666,142,1.086,151,0.869,152,1.062,153,1.154,159,1.315,184,0.968,189,1.524,224,2.932,225,2.8,226,2.8,236,2.009,237,2.015,245,0.867,260,2.554,342,0.666,350,1.66,352,2.009,367,0.779,407,2.8,447,1.832,450,1.698,473,1.566,474,1.086,475,3.399,476,1.661,477,1.661,478,4.206,479,1.315,480,1.086,481,1.315,482,2.932,484,3.102,485,2.539,486,2.539,487,1.661,488,2.539,489,3.082,490,2.06,491,3.718,494,3.451,495,4.26,496,1.661,498,1.525,499,1.661,501,1.661,502,2.158,506,2.06,507,1.661,508,1.412,511,1.661,512,1.525,513,1.661,514,2.158,518,1.661,519,1.661,520,1.661,521,1.661,522,1.661,523,1.661,524,2.166,525,1.525,526,2.128,527,3.082,528,1.661,529,1.661,530,1.661,532,1.525,533,3.744,534,1.525,536,2.158,539,1.525,540,3.102,541,2.158,542,1.879,543,1.661,544,3.451,545,2.829,546,1.661,547,3.92,548,3.451,549,3.082,550,4.078,551,1.024,552,4.206,553,1.525,554,2.539,555,1.23,556,2.331,557,3.082,558,1.661,559,2.009,560,2.009,561,3.149,562,3.92,563,4.28,564,3.149,565,2.539,566,1.661,567,2.539,568,1.661,569,3.149,570,2.539,571,2.539,572,1.661,573,3.082,574,1.661,575,1.412,576,1.661,577,2.158,578,1.525,579,1.661,805,3.149,806,2.407,807,2.407]],["title/classes/MatchPasswordsConstraint-1.html",[29,0.024,560,1.669,580,1.937]],["body/classes/MatchPasswordsConstraint-1.html",[3,0.147,4,0.13,5,0.13,7,0.483,9,1.027,11,0.182,13,0.658,14,1.68,16,1.48,17,0.574,18,0.021,20,1.1,21,0.147,22,0.011,23,0.011,29,0.049,30,0.824,33,0.449,36,0.78,37,0.392,45,0.887,93,2.735,99,1.239,113,2.873,136,0.715,142,1.166,151,0.917,152,1.088,153,1.239,159,1.411,184,1.039,210,1.967,224,2.277,227,1.516,236,2.547,237,1.752,245,0.931,342,0.715,350,1.752,352,2.12,367,0.837,450,1.774,466,1.638,473,1.985,474,1.166,478,3.836,479,1.411,480,1.166,481,1.411,482,3.041,484,3.307,485,2.68,486,2.68,487,2.68,488,2.68,489,3.219,491,3.219,494,2.68,495,4.112,496,1.784,498,1.638,499,1.784,501,1.784,502,2.277,508,1.516,511,1.784,512,1.638,513,1.784,514,2.277,518,1.784,519,1.784,520,1.784,521,1.784,522,1.784,523,1.784,524,1.039,525,1.638,526,2.206,527,2.68,528,1.784,529,1.784,530,1.784,532,1.638,533,2.955,534,1.638,536,2.277,539,2.46,540,3.188,541,2.277,542,1.983,543,1.784,544,3.578,545,2.955,546,1.784,547,3.578,548,3.578,549,3.836,550,4.179,551,1.1,552,4.299,553,1.638,554,2.68,555,1.32,556,2.46,557,3.219,558,1.784,559,2.12,560,2.547,562,3.578,565,2.68,566,1.784,567,2.68,568,1.784,570,2.68,571,2.68,572,1.784,573,3.219,574,1.784,575,1.516,576,1.784,577,2.277,578,2.46,579,1.784,581,3.549,582,1.967,583,1.784,584,1.784,585,2.212,590,2.212,598,2.212,599,1.967,600,2.212,805,3.323,808,2.585,809,2.585]],["title/entities/Message.html",[335,1.469,524,1.469]],["body/entities/Message.html",[3,0.212,4,0.188,5,0.188,7,0.29,9,1.213,11,0.263,12,1.635,16,1.301,17,0.591,18,0.021,21,0.212,22,0.014,23,0.014,29,0.029,32,1.772,33,0.741,37,0.403,115,2.421,335,2.465,336,3.203,337,2.577,342,1.583,343,2.58,344,4.323,345,4.898,350,2.279,351,2.962,352,3.125,360,4.666,361,4.666,362,4.666,363,2.366,364,4.355,367,1.209,426,2.841,524,2.465,526,2.609,583,3.485,700,4.323,810,3.196,811,3.843,812,4.898,813,4.875,814,5.723,815,5.05,816,5.05,817,3.734,818,4.231,819,3.734,820,5.05,821,3.734,822,3.734,823,5.05,824,3.734,825,5.05,826,5.723]],["title/controllers/MessagesController.html",[24,1.316,827,2.522]],["body/controllers/MessagesController.html",[3,0.241,4,0.213,5,0.213,7,0.328,11,0.298,13,0.93,16,1.292,17,0.39,18,0.021,21,0.241,22,0.015,23,0.015,24,2.192,26,1.608,29,0.033,30,1.164,32,1.517,33,0.635,35,1.978,36,1.102,37,0.387,38,0.676,43,2.918,44,1.443,45,1.043,132,2.679,151,1.296,152,0.985,167,2.679,171,3.856,189,1.443,339,3.785,342,1.517,524,2.205,665,3.474,752,3.785,786,4.173,813,4.173,818,4.605,827,3.785,828,3.619,829,4.173,830,4.694,831,4.694,832,3.619,833,5.484,834,4.228,835,5.484,836,5.209,837,4.228,838,4.228,839,3.216,840,3.619,841,4.228,842,4.228,843,4.228,844,4.694,845,4.228,846,4.228,847,4.228]],["title/modules/MessagesModule.html",[47,1.316,61,2.315]],["body/modules/MessagesModule.html",[3,0.278,4,0.246,5,0.246,7,0.379,18,0.02,21,0.278,22,0.016,23,0.016,26,2.285,29,0.038,37,0.459,38,0.781,47,2.51,49,2.343,50,1.858,51,2.668,52,2.668,53,2.343,54,3.553,55,2.668,61,4.495,63,3.281,64,2.668,65,2.668,524,2.416,827,4.491,839,4.161,840,4.182,848,4.182,849,4.182,850,4.886,851,4.886]],["title/injectables/MessagesService.html",[126,0.484,839,2.143]],["body/injectables/MessagesService.html",[3,0.21,4,0.186,5,0.186,7,0.287,11,0.26,13,0.965,16,1.515,17,0.525,18,0.021,21,0.21,22,0.014,23,0.014,29,0.044,30,1.064,33,0.659,35,1.875,36,1.008,37,0.43,38,0.591,41,1.54,42,1.806,45,0.953,79,1.572,126,0.665,127,1.196,136,1.821,151,1.345,152,1.023,165,1.667,187,1.772,188,1.135,245,1.331,336,2.755,342,1.862,367,1.196,398,2.927,409,4.292,425,2.018,524,2.707,812,5.225,813,5.009,818,3.461,830,4.292,831,4.292,832,4.292,836,5.225,839,2.941,844,5.225,852,3.163,853,3.695,854,3.695,855,5.015,856,3.695,857,5.015,858,3.695,859,5.015,860,4.292,861,3.163,862,2.812,863,3.695,864,3.695,865,3.695,866,3.695,867,3.695]],["title/classes/RefreshTokenDto.html",[29,0.028,139,2.143]],["body/classes/RefreshTokenDto.html",[3,0.287,4,0.254,5,0.254,7,0.392,11,0.356,12,1.985,16,1.457,17,0.609,18,0.02,21,0.287,22,0.017,23,0.017,29,0.054,32,1.397,33,0.585,37,0.356,135,4.855,139,3.596,141,3.885,474,2.279,540,3.349,542,3.132,551,2.15,868,4.324,869,6.132,870,4.324,871,5.052]],["title/injectables/RefreshTokensProvider.html",[126,0.484,269,2.143]],["body/injectables/RefreshTokensProvider.html",[3,0.202,4,0.179,5,0.179,7,0.275,9,0.827,11,0.25,13,0.827,15,2.449,17,0.45,18,0.021,21,0.202,22,0.013,23,0.013,29,0.043,30,1.035,33,0.564,35,1.498,36,0.713,37,0.47,38,0.567,41,1.498,44,2.049,45,0.675,73,1.938,104,2.878,115,1.701,126,0.647,127,1.149,134,2.008,136,1.542,139,3.69,141,3.987,145,3.117,151,1.152,152,0.876,165,1.601,178,2.701,187,1.701,188,1.844,200,2.008,245,1.757,267,3.066,269,2.861,273,1.813,280,2.701,281,2.449,285,2.248,301,2.248,302,2.887,308,2.248,309,2.081,328,2.861,460,2.081,545,2.248,681,2.701,686,5.892,687,4.771,688,4.568,703,2.701,704,3.037,706,2.701,708,3.037,709,3.037,710,3.037,711,3.037,712,3.037,713,3.037,716,3.367,862,2.701,872,4.771,873,4.878,874,5.138,875,3.549,876,4.878,877,3.549,878,4.878,879,3.549,880,3.549,881,3.549,882,3.549,883,3.037]],["title/classes/SignInDto.html",[29,0.028,157,2.143]],["body/classes/SignInDto.html",[3,0.271,4,0.239,5,0.239,7,0.369,9,1.14,11,0.335,12,1.913,14,2.491,16,1.427,17,0.545,18,0.02,21,0.271,22,0.016,23,0.016,29,0.052,32,1.635,33,0.684,37,0.335,113,2.943,157,3.944,350,2.666,474,2.146,540,3.227,541,3.466,542,3.284,551,2.024,870,4.071,884,4.071,885,4.756,886,4.756,887,5.058,888,5.909,889,4.756]],["title/injectables/SignInProvider.html",[126,0.484,270,2.143]],["body/injectables/SignInProvider.html",[3,0.199,4,0.176,5,0.176,7,0.374,9,1.097,11,0.246,13,0.818,17,0.445,18,0.021,21,0.199,22,0.013,23,0.013,29,0.043,30,1.024,33,0.558,35,1.482,36,0.702,37,0.441,38,0.558,41,1.482,44,1.887,45,0.664,104,1.675,113,2.353,115,1.675,126,0.64,127,1.131,134,1.991,136,1.529,137,3.33,151,1.14,152,0.867,154,2.353,156,3.672,157,3.67,159,2.635,165,1.576,175,2.658,187,2.65,188,1.698,200,1.991,224,2.049,229,2.411,260,2.824,262,3.497,266,3.388,267,3.046,270,2.83,273,1.784,285,2.213,301,2.213,302,2.876,308,2.213,309,2.049,326,3.33,328,2.83,468,2.213,471,2.213,559,1.908,619,2.658,625,2.658,669,4.538,716,2.411,862,2.658,874,5.104,883,2.99,890,4.732,891,2.99,892,3.493,893,3.493,894,5.528,895,5.528,896,3.493,897,3.493,898,3.493,899,4.825,900,4.825,901,3.493,902,5.528,903,3.493,904,3.493,905,3.493,906,3.493]],["title/entities/User.html",[9,0.62,335,1.469]],["body/entities/User.html",[3,0.143,4,0.126,5,0.126,7,0.396,9,1.216,11,0.177,12,1.228,13,0.978,14,1.975,16,1.367,17,0.594,18,0.021,20,1.614,21,0.143,22,0.01,23,0.01,29,0.03,32,1.747,33,0.731,37,0.386,99,2.766,113,2.172,115,1.818,142,1.13,144,1.469,152,0.917,237,2.065,335,2.052,336,2.603,337,1.729,339,3.784,342,1.517,343,2.801,350,2.603,351,2.224,352,2.071,357,2.144,360,4.39,361,3.884,362,3.884,364,3.483,365,3.246,366,3.246,367,0.811,419,3.917,426,1.906,428,4.693,449,1.906,450,1.941,459,1.587,479,2.499,480,2.065,481,2.499,482,3.619,484,3.701,498,3.655,502,2.224,508,2.224,514,2.224,524,2.319,526,1.614,536,1.469,553,1.587,555,1.28,559,2.787,575,2.993,578,1.587,580,1.587,583,2.617,649,3.246,698,3.246,786,2.886,811,3.483,818,4.135,861,2.144,887,3.246,907,2.144,908,2.505,909,2.505,910,3.792,911,5.103,912,6.439,913,6.17,914,2.505,915,4.368,916,2.505,917,3.792,918,2.505,919,2.505,920,2.505,921,2.505,922,3.792,923,2.505,924,2.505,925,2.505,926,2.505,927,3.792,928,3.792,929,2.505,930,2.505,931,2.505,932,2.505,933,2.144,934,2.505,935,1.906,936,2.505,937,2.505,938,2.505,939,2.505]],["title/controllers/UserController.html",[24,1.316,68,2.315]],["body/controllers/UserController.html",[3,0.114,4,0.101,5,0.101,7,0.542,9,1.251,10,2.692,11,0.142,13,0.937,17,0.486,18,0.02,20,2.882,21,0.114,22,0.009,23,0.009,24,1.433,26,0.764,29,0.016,30,0.678,32,1.254,33,0.525,35,1.393,36,1.153,37,0.371,38,0.321,41,0.617,42,0.724,43,1.387,44,0.686,45,0.862,68,2.025,99,1.532,132,1.273,134,2.266,151,1.071,152,1.03,153,1.532,154,2.243,166,3.415,167,1.273,171,2.025,180,1.098,181,2.902,182,2.902,183,3.406,184,0.808,187,0.964,189,1.958,194,2.659,195,2.659,197,3.091,223,2.316,237,2.046,302,0.855,342,1.908,343,3.213,347,2.333,372,1.908,373,4.205,383,3.881,403,2.873,405,2.206,410,3.451,412,4.011,413,1.529,459,2.025,473,2.577,484,2.878,524,1.285,532,2.025,539,2.873,559,2.878,580,2.873,605,2.432,607,1.529,617,2.736,621,1.529,622,2.206,645,3.837,647,2.736,648,1.529,665,2.025,720,3.634,752,2.206,829,2.432,860,2.736,940,1.72,941,2.736,942,3.196,943,3.979,944,2.01,945,3.196,946,2.01,947,2.01,948,3.196,949,1.72,950,2.01,951,5.735,952,3.196,953,2.01,954,2.01,955,2.736,956,2.736,957,2.01,958,3.979,959,2.01,960,4.73,961,2.01,962,2.01,963,2.736,964,2.01,965,4.73,966,5.601,967,2.736,968,2.01,969,2.01,970,4.534,971,2.01,972,3.881,973,3.196,974,3.196,975,2.01,976,2.01,977,2.736,978,3.979,979,2.01,980,4.534,981,2.01,982,1.72,983,1.72,984,1.72,985,4.534,986,3.196,987,2.01,988,2.01,989,3.196,990,2.01,991,2.01,992,2.01,993,2.01,994,2.01,995,2.01,996,2.01,997,2.01,998,2.01,999,2.01,1000,2.01,1001,2.01,1002,2.01]],["title/modules/UserModule.html",[47,1.316,62,2.143]],["body/modules/UserModule.html",[3,0.226,4,0.2,5,0.2,9,0.673,14,1.428,18,0.021,21,0.226,22,0.014,23,0.014,26,2,29,0.031,37,0.501,38,0.634,47,2.125,49,1.901,50,1.508,51,2.166,52,2.166,53,1.901,54,3.221,55,3.221,59,3.084,62,4.298,63,2.871,64,2.166,65,2.166,68,3.737,69,3.018,78,3.394,79,1.687,273,2.686,302,3.072,444,3.94,480,1.789,526,2.238,601,3.94,620,2.512,660,3.94,674,3.94,982,3.394,1003,3.394,1004,3.394,1005,3.394,1006,3.965,1007,3.965,1008,3.965,1009,3.394,1010,5.258,1011,3.965,1012,3.965,1013,3.965]],["title/injectables/UserService.html",[126,0.484,302,1.555]],["body/injectables/UserService.html",[3,0.1,4,0.088,5,0.088,7,0.437,9,1.239,10,2.53,11,0.124,13,0.956,14,2.089,16,1.157,17,0.52,18,0.021,20,2.831,21,0.1,22,0.008,23,0.011,29,0.028,30,0.608,33,0.653,35,1.922,36,1.29,37,0.427,38,0.28,41,0.879,42,1.663,44,1.43,45,1.103,50,0.667,79,0.746,99,0.841,104,0.841,126,0.38,127,0.568,134,2.457,136,1.811,142,1.637,151,1.403,152,1.013,154,1.965,165,2.235,166,1.976,188,1.418,189,2.165,200,1.307,223,3.095,302,1.219,328,1.028,335,1.151,342,1.865,343,2.881,347,2.457,367,0.568,372,1.373,374,2.762,398,2.375,399,2.128,410,2.179,413,1.335,415,2.179,417,2.451,423,2.654,424,2.451,425,0.958,430,1.028,444,3.307,449,2.762,450,2.305,451,2.451,452,1.111,454,2.451,455,2.925,459,2.925,461,2.451,465,1.21,466,2.299,473,2.224,480,1.637,526,1.219,601,3.307,605,2.179,607,2.179,620,1.111,621,1.335,622,1.976,645,3.311,648,1.335,660,3.307,665,1.814,666,1.501,670,2.179,674,3.307,676,2.451,678,2.451,693,2.451,720,3.454,751,1.501,752,1.976,829,2.179,933,2.451,941,2.451,949,2.451,955,2.451,956,2.451,960,2.451,963,2.451,965,3.586,966,4.24,972,2.451,977,3.952,983,1.501,984,1.501,1009,1.501,1014,1.501,1015,2.864,1016,2.864,1017,2.864,1018,1.754,1019,1.754,1020,1.754,1021,1.754,1022,2.864,1023,1.754,1024,2.864,1025,2.451,1026,1.754,1027,1.754,1028,2.864,1029,1.754,1030,4.189,1031,2.864,1032,1.754,1033,2.864,1034,1.754,1035,1.754,1036,1.754,1037,1.501,1038,1.754,1039,1.754,1040,1.754,1041,1.754,1042,1.754,1043,2.864,1044,1.754,1045,2.864,1046,1.754,1047,2.864,1048,1.754,1049,2.864,1050,1.754,1051,1.754,1052,1.754,1053,1.754]],["title/coverage.html",[1054,4.26]],["body/coverage.html",[0,2.804,1,1.957,5,0.155,6,2.644,9,0.524,17,0.285,18,0.021,22,0.012,23,0.012,24,2.24,25,2.132,27,2.644,29,0.052,39,1.812,53,1.481,67,1.957,68,1.957,87,2.132,89,2.351,93,2.595,126,0.939,128,2.644,131,2.644,133,1.687,139,1.812,154,1.315,157,1.812,173,1.812,205,2.132,207,2.644,208,2.644,233,2.351,266,1.578,267,1.578,268,1.687,269,1.812,270,1.812,272,1.957,274,2.132,300,2.644,302,1.315,313,2.644,335,2.079,336,1.394,338,2.644,351,1.812,370,2.132,371,2.644,385,1.812,396,2.644,444,1.812,445,2.644,455,1.957,473,1.883,475,3.368,476,3.569,524,1.242,526,1.883,560,2.417,581,3.368,582,3.368,601,1.812,602,2.644,603,2.644,645,1.957,646,2.644,660,1.812,661,3.368,662,2.644,674,1.812,675,2.644,680,2.351,681,3.368,720,1.957,721,2.644,727,2.351,728,2.644,732,1.957,744,2.644,745,2.644,793,2.644,795,2.644,796,2.644,798,2.644,810,2.644,811,2.351,827,2.132,828,2.644,839,1.812,852,2.644,868,2.644,872,2.644,884,2.644,890,2.644,891,2.644,907,2.644,915,6.343,940,2.644,1014,2.644,1054,2.644,1055,2.644,1056,3.089,1057,6.405,1058,6.67,1059,3.788,1060,5.647,1061,6.552,1062,2.644,1063,2.644,1064,2.644,1065,2.644,1066,4.426,1067,3.089,1068,3.089,1069,5.171,1070,5.171,1071,5.171,1072,5.171,1073,5.647,1074,5.647,1075,4.426,1076,3.089,1077,2.644,1078,3.089,1079,3.089,1080,3.089,1081,3.089]],["title/dependencies.html",[50,1.671,1082,2.617]],["body/dependencies.html",[18,0.021,22,0.017,23,0.017,29,0.047,38,0.796,50,1.895,73,2.72,79,2.12,86,3.438,133,2.72,184,2.003,231,4.264,327,4.264,367,1.613,450,1.895,551,2.12,555,2.544,758,4.264,1083,4.981,1084,4.981,1085,6.563,1086,4.981,1087,4.981,1088,4.981,1089,4.981,1090,4.981,1091,4.981,1092,4.981,1093,4.981,1094,4.981,1095,4.981,1096,4.981,1097,4.981,1098,4.981,1099,4.981,1100,4.981,1101,4.981,1102,4.981,1103,4.981]],["title/miscellaneous/enumerations.html",[1104,1.793,1105,3.76]],["body/miscellaneous/enumerations.html",[9,1.138,11,0.37,18,0.019,22,0.017,23,0.017,176,4.251,188,1.611,336,2.83,355,3.991,482,3.678,536,3.075,575,3.678,577,3.935,1104,3.075,1105,4.489,1106,5.244,1107,5.244,1108,5.244,1109,5.244,1110,5.244,1111,5.244,1112,5.244,1113,5.244,1114,5.244,1115,6.272,1116,6.272]],["title/miscellaneous/functions.html",[1104,1.793,1117,3.76]],["body/miscellaneous/functions.html",[11,0.388,18,0.018,22,0.018,23,0.018,53,3.283,508,3.227,935,4.911,1077,4.71,1104,3.227,1117,4.71,1118,5.502,1119,4.187,1120,4.71,1121,4.71,1122,5.502,1123,4.71,1124,5.502,1125,5.502,1126,4.71,1127,5.502,1128,4.71]],["title/index.html",[11,0.215,1129,2.617,1130,2.617]],["body/index.html",[4,0.197,18,0.019,22,0.014,23,0.014,24,1.409,29,0.041,42,1.409,47,1.409,50,1.488,73,2.137,74,3.35,79,1.665,115,1.876,154,1.665,227,2.295,237,2.352,295,3.35,367,1.687,372,1.876,398,1.876,460,2.295,484,2.137,533,2.479,534,2.479,551,1.665,555,1.999,599,2.978,612,3.35,615,3.35,753,3.35,935,4.46,1037,3.35,1055,3.35,1119,2.978,1120,3.35,1121,3.35,1123,4.461,1126,3.35,1128,3.35,1129,3.35,1130,3.35,1131,5.212,1132,6.508,1133,3.913,1134,3.913,1135,3.913,1136,3.913,1137,3.913,1138,3.913,1139,3.913,1140,6.693,1141,3.913,1142,5.212,1143,5.212,1144,3.913,1145,3.913,1146,3.913,1147,3.913,1148,5.212,1149,3.913,1150,6.508,1151,3.913,1152,3.913,1153,3.913,1154,3.913,1155,3.913,1156,3.913,1157,3.913,1158,3.913,1159,3.913,1160,3.913,1161,3.913,1162,3.913,1163,3.913,1164,3.913,1165,3.913,1166,3.913,1167,3.913,1168,5.212,1169,3.913,1170,3.913,1171,3.913,1172,5.212,1173,5.212,1174,3.913,1175,3.913,1176,3.913,1177,3.913,1178,3.913,1179,5.212,1180,5.212,1181,5.86,1182,3.913,1183,3.913,1184,3.913,1185,3.913,1186,3.913,1187,3.913,1188,3.913,1189,3.913,1190,5.212,1191,3.913,1192,3.913,1193,3.913,1194,3.913,1195,3.913,1196,3.913,1197,5.212,1198,3.913,1199,3.913,1200,4.461,1201,3.913,1202,3.35,1203,3.913]],["title/modules.html",[49,2.386]],["body/modules.html",[18,0.017,22,0.017,23,0.017,48,3.684,49,2.559,59,3.131,60,3.382,61,3.382,62,3.131,789,3.684,1204,7.244,1205,7.244,1206,7.244,1207,7.244]],["title/overview.html",[1208,4.26]],["body/overview.html",[2,2.884,18,0.02,22,0.014,23,0.014,26,1.441,39,3.381,47,1.365,48,4.947,49,1.817,50,1.441,51,2.069,52,2.069,53,1.817,54,2.069,55,2.069,56,3.243,57,3.243,58,3.243,59,4.273,60,4.079,61,4.079,62,4.253,63,2.785,64,2.069,65,2.069,127,1.227,173,3.974,205,2.615,263,3.243,264,3.243,265,3.243,266,3.151,267,2.945,268,3.368,269,3.381,270,3.381,302,2.883,337,2.615,385,3.381,440,3.243,441,3.243,444,3.381,474,1.71,580,2.401,601,3.381,660,3.381,674,3.381,789,4.257,790,3.243,839,3.381,848,3.243,849,3.243,1003,3.243,1004,3.243,1005,3.243,1208,3.243,1209,5.101,1210,3.789,1211,3.789,1212,3.789,1213,3.789]],["title/properties.html",[12,1.422,1082,2.617]],["body/properties.html",[7,0.44,12,1.838,18,0.02,22,0.018,23,0.018,1200,4.859,1214,5.677,1215,5.677,1216,5.677,1217,5.677]],["title/miscellaneous/variables.html",[1104,1.793,1218,3.76]],["body/miscellaneous/variables.html",[1,3.584,8,4.842,9,1.194,10,2.89,11,0.313,16,1.201,17,0.522,18,0.02,22,0.015,23,0.015,29,0.035,45,0.844,133,3.581,144,2.602,176,3.946,219,3.798,227,3.973,233,4.305,237,2.959,238,3.798,245,2.038,314,3.798,495,3.584,556,2.812,577,3.846,967,4.842,1025,3.798,1059,3.798,1062,5.33,1063,3.798,1064,4.842,1065,3.798,1104,2.602,1119,3.377,1202,3.798,1218,3.798,1219,4.438,1220,4.438,1221,5.657,1222,4.438,1223,4.438,1224,4.438,1225,4.438,1226,4.438,1227,4.438,1228,4.438,1229,4.438,1230,4.438,1231,5.657,1232,5.657]]],"invertedIndex":[["",{"_index":18,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"dependencies.html":{},"miscellaneous/enumerations.html":{},"miscellaneous/functions.html":{},"index.html":{},"modules.html":{},"overview.html":{},"properties.html":{},"miscellaneous/variables.html":{}}}],["0.0.1",{"_index":1215,"title":{},"body":{"properties.html":{}}}],["0.14.1",{"_index":1095,"title":{},"body":{"dependencies.html":{}}}],["0.2.0",{"_index":1101,"title":{},"body":{"dependencies.html":{}}}],["0.3.20",{"_index":1103,"title":{},"body":{"dependencies.html":{}}}],["0.5.1",{"_index":1094,"title":{},"body":{"dependencies.html":{}}}],["1",{"_index":580,"title":{"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{}},"body":{"entities/User.html":{},"controllers/UserController.html":{},"overview.html":{}}}],["1.1.23",{"_index":1084,"title":{},"body":{"dependencies.html":{}}}],["1/1",{"_index":1061,"title":{},"body":{"coverage.html":{}}}],["1/3",{"_index":1068,"title":{},"body":{"coverage.html":{}}}],["10",{"_index":330,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["10.0.0",{"_index":1085,"title":{},"body":{"dependencies.html":{}}}],["100",{"_index":915,"title":{},"body":{"entities/User.html":{},"coverage.html":{}}}],["11.0.0",{"_index":1090,"title":{},"body":{"dependencies.html":{}}}],["123456789",{"_index":936,"title":{},"body":{"entities/User.html":{}}}],["15",{"_index":1211,"title":{},"body":{"overview.html":{}}}],["150",{"_index":499,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["1})@apiresponse({status",{"_index":952,"title":{},"body":{"controllers/UserController.html":{}}}],["2",{"_index":1213,"title":{},"body":{"overview.html":{}}}],["2/2",{"_index":1057,"title":{},"body":{"coverage.html":{}}}],["2/3",{"_index":1074,"title":{},"body":{"coverage.html":{}}}],["20",{"_index":978,"title":{},"body":{"controllers/UserController.html":{}}}],["200",{"_index":412,"title":{},"body":{"injectables/ChatRoomsService.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/UserController.html":{}}}],["201",{"_index":405,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/UserController.html":{}}}],["20})@apiquery({name",{"_index":971,"title":{},"body":{"controllers/UserController.html":{}}}],["225",{"_index":917,"title":{},"body":{"entities/User.html":{}}}],["3",{"_index":1210,"title":{},"body":{"overview.html":{}}}],["3/3",{"_index":1058,"title":{},"body":{"coverage.html":{}}}],["3/4",{"_index":1072,"title":{},"body":{"coverage.html":{}}}],["33",{"_index":1067,"title":{},"body":{"coverage.html":{}}}],["4.0.0",{"_index":1086,"title":{},"body":{"dependencies.html":{}}}],["4/4",{"_index":1076,"title":{},"body":{"coverage.html":{}}}],["4/5",{"_index":1070,"title":{},"body":{"coverage.html":{}}}],["400",{"_index":406,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{}}}],["404",{"_index":414,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["408",{"_index":611,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["409",{"_index":457,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{}}}],["5.0.2",{"_index":1092,"title":{},"body":{"dependencies.html":{}}}],["5.1.1",{"_index":1093,"title":{},"body":{"dependencies.html":{}}}],["5/5",{"_index":1075,"title":{},"body":{"coverage.html":{}}}],["6",{"_index":1209,"title":{},"body":{"overview.html":{}}}],["66",{"_index":1073,"title":{},"body":{"coverage.html":{}}}],["7.3.0",{"_index":1089,"title":{},"body":{"dependencies.html":{}}}],["7.8.1",{"_index":1102,"title":{},"body":{"dependencies.html":{}}}],["75",{"_index":1071,"title":{},"body":{"coverage.html":{}}}],["8.13.1",{"_index":1098,"title":{},"body":{"dependencies.html":{}}}],["8/8",{"_index":1066,"title":{},"body":{"coverage.html":{}}}],["80",{"_index":1069,"title":{},"body":{"coverage.html":{}}}],["9",{"_index":1212,"title":{},"body":{"overview.html":{}}}],["9!@#$%^&*]{8,16",{"_index":523,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["9.15.1",{"_index":1096,"title":{},"body":{"dependencies.html":{}}}],["9/10",{"_index":1080,"title":{},"body":{"coverage.html":{}}}],["90",{"_index":1079,"title":{},"body":{"coverage.html":{}}}],["9])[a",{"_index":520,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["abstract",{"_index":296,"title":{},"body":{"modules/AuthModule.html":{},"injectables/HashingProvider.html":{}}}],["access",{"_index":155,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/GenerateTokensProvider.html":{}}}],["accesstoken",{"_index":714,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["accesstokenguard",{"_index":91,"title":{},"body":{"modules/AppModule.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{}}}],["active",{"_index":8,"title":{},"body":{"interfaces/ActiveUserData.html":{},"miscellaneous/variables.html":{}}}],["activeuser",{"_index":1064,"title":{},"body":{"coverage.html":{},"miscellaneous/variables.html":{}}}],["activeuserdata",{"_index":1,"title":{"interfaces/ActiveUserData.html":{}},"body":{"interfaces/ActiveUserData.html":{},"injectables/GenerateTokensProvider.html":{},"coverage.html":{},"miscellaneous/variables.html":{}}}],["additional",{"_index":702,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["address",{"_index":887,"title":{},"body":{"classes/SignInDto.html":{},"entities/User.html":{}}}],["admin",{"_index":1115,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["allows",{"_index":910,"title":{},"body":{"entities/User.html":{}}}],["alphabets",{"_index":488,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["already",{"_index":609,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["alt",{"_index":1191,"title":{},"body":{"index.html":{}}}],["always",{"_index":1173,"title":{},"body":{"index.html":{}}}],["aminu",{"_index":513,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["apibody",{"_index":183,"title":{},"body":{"controllers/AuthController.html":{},"controllers/UserController.html":{}}}],["apioperation",{"_index":181,"title":{},"body":{"controllers/AuthController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/UserController.html":{}}}],["apioperation({summary",{"_index":403,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/UserController.html":{}}}],["apiparam",{"_index":986,"title":{},"body":{"controllers/UserController.html":{}}}],["apiproperty",{"_index":552,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["apiproperty({enum",{"_index":535,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{}}}],["apiproperty({type",{"_index":483,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{}}}],["apiquery",{"_index":985,"title":{},"body":{"controllers/UserController.html":{}}}],["apiresponse",{"_index":182,"title":{},"body":{"controllers/AuthController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/UserController.html":{}}}],["apitags",{"_index":180,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/UserController.html":{}}}],["apitags('auth",{"_index":235,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["apitags('authentication",{"_index":185,"title":{},"body":{"controllers/AuthController.html":{}}}],["apitags('chat",{"_index":427,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["apitags('google",{"_index":740,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{}}}],["apitags('users",{"_index":464,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{}}}],["app",{"_index":28,"title":{},"body":{"controllers/AppController.html":{}}}],["app.controller",{"_index":70,"title":{},"body":{"modules/AppModule.html":{}}}],["app.controller.ts",{"_index":1163,"title":{},"body":{"index.html":{}}}],["app.module.ts",{"_index":1158,"title":{},"body":{"index.html":{}}}],["app.service",{"_index":40,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{}}}],["app.service.ts",{"_index":1164,"title":{},"body":{"index.html":{}}}],["app_guard",{"_index":84,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{}}}],["app_interceptor",{"_index":85,"title":{},"body":{"modules/AppModule.html":{}}}],["appconfig",{"_index":74,"title":{},"body":{"modules/AppModule.html":{},"index.html":{}}}],["appcontroller",{"_index":25,"title":{"controllers/AppController.html":{}},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"coverage.html":{}}}],["application",{"_index":935,"title":{},"body":{"entities/User.html":{},"miscellaneous/functions.html":{},"index.html":{}}}],["appmodule",{"_index":48,"title":{"modules/AppModule.html":{}},"body":{"modules/AppModule.html":{},"modules.html":{},"overview.html":{}}}],["appservice",{"_index":39,"title":{"injectables/AppService.html":{}},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"coverage.html":{},"overview.html":{}}}],["args",{"_index":562,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["args.object",{"_index":566,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["arguments",{"_index":563,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["array",{"_index":250,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["associated",{"_index":424,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/UserService.html":{}}}],["async",{"_index":136,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"injectables/UserService.html":{}}}],["audience",{"_index":710,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["auth",{"_index":133,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"coverage.html":{},"dependencies.html":{},"miscellaneous/variables.html":{}}}],["auth(authtypes.none",{"_index":191,"title":{},"body":{"controllers/AuthController.html":{},"controllers/GoogleAuthenticationController.html":{}}}],["auth.controller",{"_index":288,"title":{},"body":{"modules/AuthModule.html":{}}}],["auth/auth.controller",{"_index":82,"title":{},"body":{"modules/AppModule.html":{}}}],["auth/auth.module",{"_index":81,"title":{},"body":{"modules/AppModule.html":{}}}],["auth/google",{"_index":729,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{}}}],["auth/guard/access",{"_index":92,"title":{},"body":{"modules/AppModule.html":{}}}],["auth/guard/auth",{"_index":88,"title":{},"body":{"modules/AppModule.html":{}}}],["auth/social/interfaces/user.interface",{"_index":463,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{}}}],["auth_type_key",{"_index":233,"title":{},"body":{"guards/AuthGuardGuard.html":{},"coverage.html":{},"miscellaneous/variables.html":{}}}],["authconfig/jwt.config",{"_index":704,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["authcontroller",{"_index":67,"title":{"controllers/AuthController.html":{}},"body":{"modules/AppModule.html":{},"controllers/AuthController.html":{},"modules/AuthModule.html":{},"coverage.html":{}}}],["authenticate",{"_index":730,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["authenticate(@body",{"_index":742,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{}}}],["authenticate(googletokendto",{"_index":731,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["authenticated",{"_index":448,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{}}}],["authenticates",{"_index":735,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["authentication",{"_index":142,"title":{},"body":{"controllers/AuthController.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"injectables/UserService.html":{}}}],["authentication.controller",{"_index":292,"title":{},"body":{"modules/AuthModule.html":{},"modules/GoogleAuthticationModule.html":{}}}],["authentication.controller.ts",{"_index":728,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{},"coverage.html":{}}}],["authentication.controller.ts:32",{"_index":734,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{}}}],["authentication.service",{"_index":290,"title":{},"body":{"modules/AuthModule.html":{},"controllers/GoogleAuthenticationController.html":{},"modules/GoogleAuthticationModule.html":{}}}],["authentication.service.ts",{"_index":745,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{},"coverage.html":{}}}],["authentication.service.ts:17",{"_index":750,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["authentication.service.ts:40",{"_index":755,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["authentication.service.ts:55",{"_index":754,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["authguard",{"_index":209,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["authguardguard",{"_index":87,"title":{"guards/AuthGuardGuard.html":{}},"body":{"modules/AppModule.html":{},"guards/AuthGuardGuard.html":{},"coverage.html":{}}}],["authguardguard.defaultauthtype",{"_index":249,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["authmodule",{"_index":59,"title":{"modules/AuthModule.html":{}},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/UserModule.html":{},"modules.html":{},"overview.html":{}}}],["author",{"_index":1217,"title":{},"body":{"properties.html":{}}}],["authorized",{"_index":228,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["authservice",{"_index":173,"title":{"injectables/AuthService.html":{}},"body":{"controllers/AuthController.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"coverage.html":{},"overview.html":{}}}],["authtication.module.ts",{"_index":792,"title":{},"body":{"modules/GoogleAuthticationModule.html":{}}}],["authtype",{"_index":238,"title":{},"body":{"guards/AuthGuardGuard.html":{},"miscellaneous/variables.html":{}}}],["authtypeguardmap",{"_index":212,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["authtypes",{"_index":176,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"controllers/GoogleAuthenticationController.html":{},"miscellaneous/enumerations.html":{},"miscellaneous/variables.html":{}}}],["authtypes.bearer",{"_index":239,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["authtypes.map((type",{"_index":251,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["authtypes.none",{"_index":242,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["auto",{"_index":506,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["autogenerated",{"_index":590,"title":{},"body":{"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["autoloadentities",{"_index":121,"title":{},"body":{"modules/AppModule.html":{}}}],["await",{"_index":200,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"injectables/UserService.html":{}}}],["badrequestexception",{"_index":618,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["badrequestexception('user",{"_index":638,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["based",{"_index":835,"title":{},"body":{"controllers/MessagesController.html":{}}}],["bcrypt",{"_index":327,"title":{},"body":{"injectables/BcryptProvider.html":{},"dependencies.html":{}}}],["bcrypt.compare(password",{"_index":334,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["bcrypt.gensalt(saltrounds",{"_index":332,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["bcrypt.hash(inppassword",{"_index":333,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["bcryptprovider",{"_index":274,"title":{"injectables/BcryptProvider.html":{}},"body":{"modules/AuthModule.html":{},"injectables/BcryptProvider.html":{},"coverage.html":{}}}],["bearer",{"_index":1111,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["before",{"_index":599,"title":{},"body":{"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{},"index.html":{}}}],["between",{"_index":362,"title":{},"body":{"entities/ChatRoom.html":{},"entities/Message.html":{},"entities/User.html":{}}}],["bind",{"_index":297,"title":{},"body":{"modules/AuthModule.html":{}}}],["blog",{"_index":117,"title":{},"body":{"modules/AppModule.html":{}}}],["body",{"_index":167,"title":{},"body":{"controllers/AuthController.html":{},"controllers/ChatRoomsController.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/MessagesController.html":{},"controllers/UserController.html":{}}}],["boolean",{"_index":224,"title":{},"body":{"guards/AuthGuardGuard.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"injectables/SignInProvider.html":{}}}],["bootstrap",{"_index":53,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"coverage.html":{},"miscellaneous/functions.html":{},"overview.html":{}}}],["bootstrapped",{"_index":1133,"title":{},"body":{"index.html":{}}}],["branch",{"_index":1172,"title":{},"body":{"index.html":{}}}],["browse",{"_index":1207,"title":{},"body":{"modules.html":{}}}],["browser",{"_index":1204,"title":{},"body":{"modules.html":{}}}],["buffer",{"_index":322,"title":{},"body":{"injectables/BcryptProvider.html":{},"injectables/HashingProvider.html":{}}}],["build",{"_index":1197,"title":{},"body":{"index.html":{}}}],["canactivate",{"_index":211,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["canactivate(context",{"_index":218,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["catch",{"_index":471,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/SignInProvider.html":{}}}],["catch((err",{"_index":259,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["cause",{"_index":634,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["cd",{"_index":1146,"title":{},"body":{"index.html":{}}}],["changes",{"_index":1174,"title":{},"body":{"index.html":{}}}],["character",{"_index":530,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["chat",{"_index":339,"title":{},"body":{"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"controllers/MessagesController.html":{},"entities/User.html":{}}}],["chatroom",{"_index":336,"title":{"entities/ChatRoom.html":{}},"body":{"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"entities/Message.html":{},"injectables/MessagesService.html":{},"entities/User.html":{},"coverage.html":{},"miscellaneous/enumerations.html":{}}}],["chatroom'})@apiresponse({status",{"_index":404,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["chatroom.controller",{"_index":443,"title":{},"body":{"modules/ChatroomsModule.html":{}}}],["chatroom.id",{"_index":816,"title":{},"body":{"entities/Message.html":{}}}],["chatroom.users",{"_index":937,"title":{},"body":{"entities/User.html":{}}}],["chatroom.users)@jointable",{"_index":908,"title":{},"body":{"entities/User.html":{}}}],["chatroomid",{"_index":836,"title":{},"body":{"controllers/MessagesController.html":{},"injectables/MessagesService.html":{}}}],["chatroomrepository",{"_index":401,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["chatrooms",{"_index":419,"title":{},"body":{"injectables/ChatRoomsService.html":{},"entities/User.html":{}}}],["chatrooms/chatrooms.module",{"_index":96,"title":{},"body":{"modules/AppModule.html":{}}}],["chatroomscontroller",{"_index":370,"title":{"controllers/ChatRoomsController.html":{}},"body":{"controllers/ChatRoomsController.html":{},"modules/ChatroomsModule.html":{},"coverage.html":{}}}],["chatroomservice",{"_index":388,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["chatroomsmodule",{"_index":60,"title":{"modules/ChatroomsModule.html":{}},"body":{"modules/AppModule.html":{},"modules/ChatroomsModule.html":{},"modules.html":{},"overview.html":{}}}],["chatroomsservice",{"_index":385,"title":{"injectables/ChatRoomsService.html":{}},"body":{"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"coverage.html":{},"overview.html":{}}}],["check",{"_index":894,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["checking",{"_index":600,"title":{},"body":{"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["class",{"_index":29,"title":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"classes/GetuserParamDto.html":{},"classes/GoogleTokenDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"classes/RefreshTokenDto.html":{},"classes/SignInDto.html":{}},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"dependencies.html":{},"index.html":{},"miscellaneous/variables.html":{}}}],["classes",{"_index":474,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"classes/GetuserParamDto.html":{},"classes/GoogleTokenDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"classes/RefreshTokenDto.html":{},"classes/SignInDto.html":{},"overview.html":{}}}],["classserializerinterceptor",{"_index":168,"title":{},"body":{"controllers/AuthController.html":{}}}],["cli",{"_index":1135,"title":{},"body":{"index.html":{}}}],["client",{"_index":760,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["client_id",{"_index":761,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["client_secret",{"_index":763,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["clone",{"_index":1142,"title":{},"body":{"index.html":{}}}],["cluster_appmodule",{"_index":56,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["cluster_appmodule_imports",{"_index":57,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["cluster_appmodule_providers",{"_index":58,"title":{},"body":{"modules/AppModule.html":{},"overview.html":{}}}],["cluster_authmodule",{"_index":263,"title":{},"body":{"modules/AuthModule.html":{},"overview.html":{}}}],["cluster_authmodule_exports",{"_index":265,"title":{},"body":{"modules/AuthModule.html":{},"overview.html":{}}}],["cluster_authmodule_providers",{"_index":264,"title":{},"body":{"modules/AuthModule.html":{},"overview.html":{}}}],["cluster_chatroomsmodule",{"_index":440,"title":{},"body":{"modules/ChatroomsModule.html":{},"overview.html":{}}}],["cluster_chatroomsmodule_providers",{"_index":441,"title":{},"body":{"modules/ChatroomsModule.html":{},"overview.html":{}}}],["cluster_googleauthticationmodule",{"_index":790,"title":{},"body":{"modules/GoogleAuthticationModule.html":{},"overview.html":{}}}],["cluster_googleauthticationmodule_providers",{"_index":791,"title":{},"body":{"modules/GoogleAuthticationModule.html":{}}}],["cluster_messagesmodule",{"_index":848,"title":{},"body":{"modules/MessagesModule.html":{},"overview.html":{}}}],["cluster_messagesmodule_providers",{"_index":849,"title":{},"body":{"modules/MessagesModule.html":{},"overview.html":{}}}],["cluster_usermodule",{"_index":1003,"title":{},"body":{"modules/UserModule.html":{},"overview.html":{}}}],["cluster_usermodule_exports",{"_index":1005,"title":{},"body":{"modules/UserModule.html":{},"overview.html":{}}}],["cluster_usermodule_providers",{"_index":1004,"title":{},"body":{"modules/UserModule.html":{},"overview.html":{}}}],["code",{"_index":1156,"title":{},"body":{"index.html":{}}}],["column",{"_index":352,"title":{},"body":{"entities/ChatRoom.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"entities/User.html":{}}}],["column('varchar",{"_index":912,"title":{},"body":{"entities/User.html":{}}}],["column({default",{"_index":354,"title":{},"body":{"entities/ChatRoom.html":{}}}],["column({type",{"_index":925,"title":{},"body":{"entities/User.html":{}}}],["commands",{"_index":1196,"title":{},"body":{"index.html":{}}}],["comment",{"_index":1181,"title":{},"body":{"index.html":{}}}],["commenting",{"_index":1189,"title":{},"body":{"index.html":{}}}],["comparepasswords",{"_index":315,"title":{},"body":{"injectables/BcryptProvider.html":{},"injectables/HashingProvider.html":{}}}],["comparepasswords(password",{"_index":317,"title":{},"body":{"injectables/BcryptProvider.html":{},"injectables/HashingProvider.html":{}}}],["comparing",{"_index":320,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["comparison",{"_index":801,"title":{},"body":{"injectables/HashingProvider.html":{}}}],["compodoc/compodoc",{"_index":1083,"title":{},"body":{"dependencies.html":{}}}],["concrete",{"_index":298,"title":{},"body":{"modules/AuthModule.html":{}}}],["config",{"_index":1160,"title":{},"body":{"index.html":{}}}],["config/app.config",{"_index":75,"title":{},"body":{"modules/AppModule.html":{}}}],["config/database.config",{"_index":77,"title":{},"body":{"modules/AppModule.html":{}}}],["configmodule",{"_index":71,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{}}}],["configmodule.forfeature(jwtconfig",{"_index":293,"title":{},"body":{"modules/AuthModule.html":{}}}],["configmodule.forroot",{"_index":97,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice",{"_index":72,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.autoload",{"_index":122,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.blog",{"_index":118,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.host",{"_index":108,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.name",{"_index":116,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.password",{"_index":114,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.port",{"_index":110,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.synchronize",{"_index":120,"title":{},"body":{"modules/AppModule.html":{}}}],["configservice.get('database.user",{"_index":112,"title":{},"body":{"modules/AppModule.html":{}}}],["configtype",{"_index":688,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{}}}],["configuration",{"_index":753,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{},"index.html":{}}}],["configurations",{"_index":1126,"title":{},"body":{"miscellaneous/functions.html":{},"index.html":{}}}],["confirm",{"_index":494,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["confirmation",{"_index":956,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["confirmpassword",{"_index":478,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["conflictexception",{"_index":462,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{}}}],["conflictexception(error",{"_index":472,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{}}}],["connecting",{"_index":625,"title":{},"body":{"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/SignInProvider.html":{}}}],["connection",{"_index":612,"title":{},"body":{"injectables/CreateUserProvider.html":{},"index.html":{}}}],["conpare",{"_index":901,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["console.error(\"google",{"_index":783,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["console.log(\"google",{"_index":774,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["console.log(\"received",{"_index":767,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["console.log(getuserparamdto",{"_index":994,"title":{},"body":{"controllers/UserController.html":{}}}],["const",{"_index":245,"title":{},"body":{"guards/AuthGuardGuard.html":{},"injectables/BcryptProvider.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"miscellaneous/variables.html":{}}}],["constructor",{"_index":41,"title":{},"body":{"controllers/AppController.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["constructor(chatroomrepository",{"_index":397,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["constructor(messagerepo",{"_index":853,"title":{},"body":{"injectables/MessagesService.html":{}}}],["constructor(private",{"_index":43,"title":{},"body":{"controllers/AppController.html":{},"controllers/ChatRoomsController.html":{},"controllers/MessagesController.html":{},"controllers/UserController.html":{}}}],["constructor(reflector",{"_index":215,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["constructor(userrepository",{"_index":452,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/UserService.html":{}}}],["constructor(userservice",{"_index":301,"title":{},"body":{"injectables/AuthService.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{}}}],["contain",{"_index":486,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["containing",{"_index":616,"title":{},"body":{"injectables/CreateUserProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["contains",{"_index":1162,"title":{},"body":{"index.html":{}}}],["context",{"_index":221,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["context.getclass",{"_index":248,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["context.gethandler",{"_index":247,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["controller",{"_index":24,"title":{"controllers/AppController.html":{},"controllers/AuthController.html":{},"controllers/ChatRoomsController.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/MessagesController.html":{},"controllers/UserController.html":{}},"body":{"controllers/AppController.html":{},"controllers/AuthController.html":{},"controllers/ChatRoomsController.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/MessagesController.html":{},"controllers/UserController.html":{},"coverage.html":{},"index.html":{}}}],["controller('auth",{"_index":186,"title":{},"body":{"controllers/AuthController.html":{}}}],["controller('auth/google",{"_index":741,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{}}}],["controller('chatroom",{"_index":387,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["controller('messages",{"_index":841,"title":{},"body":{"controllers/MessagesController.html":{}}}],["controller('users",{"_index":987,"title":{},"body":{"controllers/UserController.html":{}}}],["controllers",{"_index":26,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"controllers/AuthController.html":{},"modules/AuthModule.html":{},"controllers/ChatRoomsController.html":{},"modules/ChatroomsModule.html":{},"controllers/GoogleAuthenticationController.html":{},"modules/GoogleAuthticationModule.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"overview.html":{}}}],["coverage",{"_index":1054,"title":{"coverage.html":{}},"body":{"coverage.html":{}}}],["create",{"_index":372,"title":{},"body":{"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/GoogleAuthenticationService.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"index.html":{}}}],["create(@body",{"_index":389,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["create(name",{"_index":402,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["create(undefined",{"_index":375,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["created",{"_index":347,"title":{},"body":{"entities/ChatRoom.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["created'})@post",{"_index":946,"title":{},"body":{"controllers/UserController.html":{}}}],["created.'})@apiresponse({status",{"_index":456,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{}}}],["createdat",{"_index":341,"title":{},"body":{"entities/ChatRoom.html":{}}}],["createdatecolumn",{"_index":345,"title":{},"body":{"entities/ChatRoom.html":{},"entities/Message.html":{}}}],["creategoogleuser",{"_index":451,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/UserService.html":{}}}],["creategoogleuser(googleuser",{"_index":454,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/UserService.html":{}}}],["creategoogleuserprovider",{"_index":444,"title":{"injectables/CreateGoogleUserProvider.html":{}},"body":{"injectables/CreateGoogleUserProvider.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"overview.html":{}}}],["createparamdecorator",{"_index":1222,"title":{},"body":{"miscellaneous/variables.html":{}}}],["createquerybuilder('room",{"_index":435,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["creates",{"_index":459,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["createuserdto",{"_index":473,"title":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{}},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"coverage.html":{}}}],["createuserdto.email",{"_index":628,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["createuserdto.password",{"_index":641,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["createuserprovider",{"_index":601,"title":{"injectables/CreateUserProvider.html":{}},"body":{"injectables/CreateUserProvider.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"overview.html":{}}}],["createusers",{"_index":605,"title":{},"body":{"injectables/CreateUserProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["createusers(@body",{"_index":996,"title":{},"body":{"controllers/UserController.html":{}}}],["createusers(createuserdto",{"_index":607,"title":{},"body":{"injectables/CreateUserProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["creating",{"_index":447,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["creation",{"_index":466,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/MatchPasswordsConstraint-1.html":{},"injectables/UserService.html":{}}}],["credentials",{"_index":164,"title":{},"body":{"controllers/AuthController.html":{}}}],["credentials'})@apibody({type",{"_index":162,"title":{},"body":{"controllers/AuthController.html":{}}}],["ctx",{"_index":1224,"title":{},"body":{"miscellaneous/variables.html":{}}}],["ctx.switchtohttp().getrequest",{"_index":1225,"title":{},"body":{"miscellaneous/variables.html":{}}}],["custom",{"_index":556,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"miscellaneous/variables.html":{}}}],["data",{"_index":10,"title":{},"body":{"interfaces/ActiveUserData.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"miscellaneous/variables.html":{}}}],["data'})@apiresponse({status",{"_index":945,"title":{},"body":{"controllers/UserController.html":{}}}],["database",{"_index":115,"title":{},"body":{"modules/AppModule.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{},"entities/Message.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"index.html":{}}}],["databaseconfig",{"_index":76,"title":{},"body":{"modules/AppModule.html":{}}}],["dataresponseinterceptor",{"_index":125,"title":{},"body":{"modules/AppModule.html":{}}}],["date",{"_index":344,"title":{},"body":{"entities/ChatRoom.html":{},"entities/Message.html":{}}}],["db",{"_index":895,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["declarations",{"_index":52,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"overview.html":{}}}],["decorator",{"_index":314,"title":{},"body":{"injectables/BcryptProvider.html":{},"miscellaneous/variables.html":{}}}],["decorators",{"_index":32,"title":{},"body":{"controllers/AppController.html":{},"controllers/AuthController.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"classes/GoogleTokenDto.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"classes/RefreshTokenDto.html":{},"classes/SignInDto.html":{},"entities/User.html":{},"controllers/UserController.html":{}}}],["decorators/auth.decorator",{"_index":179,"title":{},"body":{"controllers/AuthController.html":{},"controllers/GoogleAuthenticationController.html":{}}}],["default",{"_index":237,"title":{},"body":{"guards/AuthGuardGuard.html":{},"entities/ChatRoom.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"controllers/UserController.html":{},"index.html":{},"miscellaneous/variables.html":{}}}],["defaultauthtype",{"_index":214,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["defaultmessage",{"_index":805,"title":{},"body":{"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["defaultmessage(args",{"_index":570,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["defaultvaluepipe",{"_index":979,"title":{},"body":{"controllers/UserController.html":{}}}],["defaultvaluepipe(1",{"_index":993,"title":{},"body":{"controllers/UserController.html":{}}}],["defaultvaluepipe(20",{"_index":991,"title":{},"body":{"controllers/UserController.html":{}}}],["define",{"_index":1110,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["defined",{"_index":33,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["defining",{"_index":1231,"title":{},"body":{"miscellaneous/variables.html":{}}}],["delete",{"_index":373,"title":{},"body":{"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"controllers/UserController.html":{}}}],["delete(':id",{"_index":378,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["delete(@param('id",{"_index":394,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["delete(id",{"_index":377,"title":{},"body":{"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{}}}],["deleted",{"_index":413,"title":{},"body":{"injectables/ChatRoomsService.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["deleted'})@delete",{"_index":953,"title":{},"body":{"controllers/UserController.html":{}}}],["deletes",{"_index":955,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["deleteuser",{"_index":941,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["deleteuser(@query('id",{"_index":998,"title":{},"body":{"controllers/UserController.html":{}}}],["deleteuser(id",{"_index":949,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["deletion",{"_index":417,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/UserService.html":{}}}],["denied",{"_index":244,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["dependencies",{"_index":50,"title":{"dependencies.html":{}},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateUserProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"dependencies.html":{},"index.html":{},"overview.html":{}}}],["dependency",{"_index":896,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["description",{"_index":7,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"properties.html":{}}}],["details",{"_index":166,"title":{},"body":{"controllers/AuthController.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["details'})@apibody({type",{"_index":959,"title":{},"body":{"controllers/UserController.html":{}}}],["development",{"_index":1149,"title":{},"body":{"index.html":{}}}],["directly",{"_index":1171,"title":{},"body":{"index.html":{}}}],["documentation",{"_index":1055,"title":{},"body":{"coverage.html":{},"index.html":{}}}],["doe",{"_index":930,"title":{},"body":{"entities/User.html":{}}}],["doesnt",{"_index":897,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["double",{"_index":1184,"title":{},"body":{"index.html":{}}}],["dto",{"_index":477,"title":{},"body":{"classes/CreateUserDto.html":{},"injectables/CreateUserProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["dtos/create",{"_index":621,"title":{},"body":{"injectables/CreateUserProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["dtos/getuserparamdto",{"_index":984,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["dtos/google",{"_index":738,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["dtos/patch",{"_index":983,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["dtos/refreshtokendto",{"_index":178,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"injectables/RefreshTokensProvider.html":{}}}],["dtos/userdto",{"_index":175,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"injectables/SignInProvider.html":{}}}],["during",{"_index":802,"title":{},"body":{"injectables/HashingProvider.html":{}}}],["edit",{"_index":648,"title":{},"body":{"classes/EditUserDto.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["edit.email",{"_index":1049,"title":{},"body":{"injectables/UserService.html":{}}}],["edit.firstname",{"_index":1043,"title":{},"body":{"injectables/UserService.html":{}}}],["edit.lastname",{"_index":1045,"title":{},"body":{"injectables/UserService.html":{}}}],["edit.password",{"_index":1047,"title":{},"body":{"injectables/UserService.html":{}}}],["editedpost",{"_index":942,"title":{},"body":{"controllers/UserController.html":{}}}],["editedpost(@body",{"_index":1001,"title":{},"body":{"controllers/UserController.html":{}}}],["editedpost(edituserdto",{"_index":957,"title":{},"body":{"controllers/UserController.html":{}}}],["edituser",{"_index":1015,"title":{},"body":{"injectables/UserService.html":{}}}],["edituser(edituserdto",{"_index":1022,"title":{},"body":{"injectables/UserService.html":{}}}],["edituserdto",{"_index":645,"title":{"classes/EditUserDto.html":{}},"body":{"classes/EditUserDto.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"coverage.html":{}}}],["edituserdto.email",{"_index":1050,"title":{},"body":{"injectables/UserService.html":{}}}],["edituserdto.firstname",{"_index":1044,"title":{},"body":{"injectables/UserService.html":{}}}],["edituserdto.id",{"_index":1042,"title":{},"body":{"injectables/UserService.html":{}}}],["edituserdto.lastname",{"_index":1046,"title":{},"body":{"injectables/UserService.html":{}}}],["edituserdto.password",{"_index":1048,"title":{},"body":{"injectables/UserService.html":{}}}],["email",{"_index":14,"title":{},"body":{"interfaces/ActiveUserData.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"classes/SignInDto.html":{},"entities/User.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{}}}],["email.ts",{"_index":662,"title":{},"body":{"injectables/FindOneByEmail.html":{},"coverage.html":{}}}],["email.ts:10",{"_index":664,"title":{},"body":{"injectables/FindOneByEmail.html":{}}}],["email.ts:27",{"_index":668,"title":{},"body":{"injectables/FindOneByEmail.html":{}}}],["encrypassword",{"_index":318,"title":{},"body":{"injectables/BcryptProvider.html":{},"injectables/HashingProvider.html":{}}}],["encrypted",{"_index":932,"title":{},"body":{"entities/User.html":{}}}],["enforced",{"_index":1139,"title":{},"body":{"index.html":{}}}],["ensure",{"_index":557,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["entered",{"_index":823,"title":{},"body":{"entities/Message.html":{}}}],["entities",{"_index":337,"title":{},"body":{"entities/ChatRoom.html":{},"entities/Message.html":{},"entities/User.html":{},"overview.html":{}}}],["entity",{"_index":335,"title":{"entities/ChatRoom.html":{},"entities/Message.html":{},"entities/User.html":{}},"body":{"entities/ChatRoom.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GenerateTokensProvider.html":{},"entities/Message.html":{},"entities/User.html":{},"injectables/UserService.html":{},"coverage.html":{}}}],["entry",{"_index":1120,"title":{},"body":{"miscellaneous/functions.html":{},"index.html":{}}}],["enum",{"_index":575,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"miscellaneous/enumerations.html":{}}}],["enumerations",{"_index":1105,"title":{"miscellaneous/enumerations.html":{}},"body":{"miscellaneous/enumerations.html":{}}}],["enums/authtypes.enum",{"_index":177,"title":{},"body":{"controllers/AuthController.html":{},"controllers/GoogleAuthenticationController.html":{}}}],["enums/chatroomtype",{"_index":368,"title":{},"body":{"entities/ChatRoom.html":{}}}],["enums/userrole.enum",{"_index":553,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{}}}],["env.development",{"_index":101,"title":{},"body":{"modules/AppModule.html":{}}}],["envfilepath",{"_index":100,"title":{},"body":{"modules/AppModule.html":{}}}],["err",{"_index":261,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["error",{"_index":260,"title":{},"body":{"guards/AuthGuardGuard.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"injectables/SignInProvider.html":{}}}],["everything",{"_index":652,"title":{},"body":{"classes/EditUserDto.html":{}}}],["example",{"_index":484,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"controllers/UserController.html":{},"index.html":{}}}],["example:rukky@gmail.com",{"_index":888,"title":{},"body":{"classes/SignInDto.html":{}}}],["exception",{"_index":788,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["exclude",{"_index":927,"title":{},"body":{"entities/User.html":{}}}],["execute",{"_index":255,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["execution",{"_index":222,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["executioncontext",{"_index":219,"title":{},"body":{"guards/AuthGuardGuard.html":{},"miscellaneous/variables.html":{}}}],["exist",{"_index":669,"title":{},"body":{"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/SignInProvider.html":{}}}],["existinguser",{"_index":626,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["exists",{"_index":624,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["exists.'})@apiresponse({status",{"_index":610,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["expiration",{"_index":699,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["expiresin",{"_index":695,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["export",{"_index":21,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{}}}],["exports",{"_index":55,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"overview.html":{}}}],["express",{"_index":1088,"title":{},"body":{"dependencies.html":{}}}],["extends",{"_index":653,"title":{},"body":{"classes/EditUserDto.html":{}}}],["extract",{"_index":776,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["extracts",{"_index":1228,"title":{},"body":{"miscellaneous/variables.html":{}}}],["fails",{"_index":467,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["false",{"_index":559,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{}}}],["family_name",{"_index":778,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["fatima",{"_index":501,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["fatimaaminu@mail.com",{"_index":496,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["fetch",{"_index":672,"title":{},"body":{"injectables/FindOneByEmail.html":{}}}],["field",{"_index":495,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"miscellaneous/variables.html":{}}}],["field'})@isemail()@maxlength(150)@column({unique",{"_index":497,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{}}}],["field'})@isstring()@isnotempty()@maxlength(100",{"_index":503,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{}}}],["field'})@isstring()@isoptional()@maxlength(100",{"_index":515,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{}}}],["file",{"_index":5,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{}}}],["filtering",{"_index":1028,"title":{},"body":{"injectables/UserService.html":{}}}],["find",{"_index":423,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/UserService.html":{}}}],["findall",{"_index":374,"title":{},"body":{"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/UserService.html":{}}}],["findall(@param('userid",{"_index":392,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["findall(getuserparamdto",{"_index":1026,"title":{},"body":{"injectables/UserService.html":{}}}],["findall(userid",{"_index":380,"title":{},"body":{"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{}}}],["finding",{"_index":663,"title":{},"body":{"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{}}}],["findonebyemail",{"_index":660,"title":{"injectables/FindOneByEmail.html":{}},"body":{"injectables/FindOneByEmail.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"overview.html":{}}}],["findonebyemail(email",{"_index":667,"title":{},"body":{"injectables/FindOneByEmail.html":{}}}],["findonebygoogleid",{"_index":676,"title":{},"body":{"injectables/FindOneByGoogleIdProvider.html":{},"injectables/UserService.html":{}}}],["findonebygoogleid(googleid",{"_index":678,"title":{},"body":{"injectables/FindOneByGoogleIdProvider.html":{},"injectables/UserService.html":{}}}],["findonebygoogleidprovider",{"_index":674,"title":{"injectables/FindOneByGoogleIdProvider.html":{}},"body":{"injectables/FindOneByGoogleIdProvider.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"overview.html":{}}}],["findonebyid",{"_index":1016,"title":{},"body":{"injectables/UserService.html":{}}}],["findonebyid(id",{"_index":1031,"title":{},"body":{"injectables/UserService.html":{}}}],["finds",{"_index":1030,"title":{},"body":{"injectables/UserService.html":{}}}],["first",{"_index":502,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"interfaces/GoogleInterface.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{}}}],["firstname",{"_index":479,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{}}}],["folder",{"_index":1161,"title":{},"body":{"index.html":{}}}],["forwardref",{"_index":273,"title":{},"body":{"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/CreateUserProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"modules/UserModule.html":{}}}],["found",{"_index":415,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/FindOneByEmail.html":{},"injectables/UserService.html":{}}}],["function",{"_index":1078,"title":{},"body":{"coverage.html":{}}}],["functions",{"_index":1117,"title":{"miscellaneous/functions.html":{}},"body":{"miscellaneous/functions.html":{}}}],["generate",{"_index":716,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{}}}],["generated",{"_index":507,"title":{},"body":{"classes/CreateUserDto.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["generates",{"_index":692,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["generatetokenprovider",{"_index":874,"title":{},"body":{"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{}}}],["generatetokens",{"_index":684,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["generatetokens(user",{"_index":690,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["generatetokensprovider",{"_index":267,"title":{"injectables/GenerateTokensProvider.html":{}},"body":{"modules/AuthModule.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"coverage.html":{},"overview.html":{}}}],["generating",{"_index":682,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["get('/:id",{"_index":989,"title":{},"body":{"controllers/UserController.html":{}}}],["get(':chatroomid",{"_index":833,"title":{},"body":{"controllers/MessagesController.html":{}}}],["get(':userid",{"_index":381,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["gethello",{"_index":31,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{}}}],["getmany",{"_index":438,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["getmessages",{"_index":830,"title":{},"body":{"controllers/MessagesController.html":{},"injectables/MessagesService.html":{}}}],["getmessages(@param('chatroomid",{"_index":846,"title":{},"body":{"controllers/MessagesController.html":{}}}],["getmessages(chatroomid",{"_index":832,"title":{},"body":{"controllers/MessagesController.html":{},"injectables/MessagesService.html":{}}}],["getonebyemail",{"_index":1017,"title":{},"body":{"injectables/UserService.html":{}}}],["getonebyemail(email",{"_index":1033,"title":{},"body":{"injectables/UserService.html":{}}}],["getting",{"_index":1129,"title":{"index.html":{}},"body":{"index.html":{}}}],["getuserparamdto",{"_index":720,"title":{"classes/GetuserParamDto.html":{}},"body":{"classes/GetuserParamDto.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"coverage.html":{}}}],["getusers",{"_index":943,"title":{},"body":{"controllers/UserController.html":{}}}],["getusers(getuserparamdto",{"_index":964,"title":{},"body":{"controllers/UserController.html":{}}}],["git",{"_index":1144,"title":{},"body":{"index.html":{}}}],["given",{"_index":693,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/UserService.html":{}}}],["given_name",{"_index":777,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["global",{"_index":1125,"title":{},"body":{"miscellaneous/functions.html":{}}}],["google",{"_index":450,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"interfaces/GoogleInterface.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"injectables/UserService.html":{},"dependencies.html":{}}}],["google'})@isstring()@isoptional()@maxlength(225",{"_index":509,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["google.'})@isstring()@isoptional()@maxlength(225",{"_index":591,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["googleauthenticationcontroller",{"_index":272,"title":{"controllers/GoogleAuthenticationController.html":{}},"body":{"modules/AuthModule.html":{},"controllers/GoogleAuthenticationController.html":{},"modules/GoogleAuthticationModule.html":{},"coverage.html":{}}}],["googleauthenticationservice",{"_index":268,"title":{"injectables/GoogleAuthenticationService.html":{}},"body":{"modules/AuthModule.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"coverage.html":{},"overview.html":{}}}],["googleauthticationmodule",{"_index":789,"title":{"modules/GoogleAuthticationModule.html":{}},"body":{"modules/GoogleAuthticationModule.html":{},"modules.html":{},"overview.html":{}}}],["googleid",{"_index":480,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{}}}],["googleid.ts",{"_index":675,"title":{},"body":{"injectables/FindOneByGoogleIdProvider.html":{},"coverage.html":{}}}],["googleid.ts:10",{"_index":677,"title":{},"body":{"injectables/FindOneByGoogleIdProvider.html":{}}}],["googleid.ts:20",{"_index":679,"title":{},"body":{"injectables/FindOneByGoogleIdProvider.html":{}}}],["googleinterface",{"_index":455,"title":{"interfaces/GoogleInterface.html":{}},"body":{"injectables/CreateGoogleUserProvider.html":{},"interfaces/GoogleInterface.html":{},"injectables/UserService.html":{},"coverage.html":{}}}],["googletokendto",{"_index":732,"title":{"classes/GoogleTokenDto.html":{}},"body":{"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/GoogleTokenDto.html":{},"coverage.html":{}}}],["googletokendto.token",{"_index":768,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["googleuser",{"_index":461,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/UserService.html":{}}}],["googleuserprovider",{"_index":1035,"title":{},"body":{"injectables/UserService.html":{}}}],["grab",{"_index":881,"title":{},"body":{"injectables/RefreshTokensProvider.html":{}}}],["group",{"_index":355,"title":{},"body":{"entities/ChatRoom.html":{},"injectables/ChatRoomsService.html":{},"miscellaneous/enumerations.html":{}}}],["guard",{"_index":205,"title":{"guards/AuthGuardGuard.html":{}},"body":{"guards/AuthGuardGuard.html":{},"coverage.html":{},"overview.html":{}}}],["guard.guard",{"_index":90,"title":{},"body":{"modules/AppModule.html":{}}}],["guard.guard.ts",{"_index":208,"title":{},"body":{"guards/AuthGuardGuard.html":{},"coverage.html":{}}}],["guard.guard.ts:34",{"_index":217,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["guard.guard.ts:54",{"_index":220,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["guard/access",{"_index":283,"title":{},"body":{"modules/AuthModule.html":{}}}],["guard/auth",{"_index":89,"title":{},"body":{"modules/AppModule.html":{},"guards/AuthGuardGuard.html":{},"coverage.html":{}}}],["guards",{"_index":206,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["handle",{"_index":751,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{},"injectables/UserService.html":{}}}],["handles",{"_index":746,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["handling",{"_index":604,"title":{},"body":{"injectables/CreateUserProvider.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["hashedpassword",{"_index":639,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["hashedpassword123",{"_index":934,"title":{},"body":{"entities/User.html":{}}}],["hashing",{"_index":326,"title":{},"body":{"injectables/BcryptProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/HashingProvider.html":{},"injectables/SignInProvider.html":{}}}],["hashingprovider",{"_index":266,"title":{"injectables/HashingProvider.html":{}},"body":{"modules/AuthModule.html":{},"injectables/BcryptProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/HashingProvider.html":{},"injectables/SignInProvider.html":{},"coverage.html":{},"overview.html":{}}}],["hashpassword",{"_index":316,"title":{},"body":{"injectables/BcryptProvider.html":{},"injectables/HashingProvider.html":{}}}],["hashpassword(inppassword",{"_index":321,"title":{},"body":{"injectables/BcryptProvider.html":{},"injectables/HashingProvider.html":{}}}],["hasing",{"_index":799,"title":{},"body":{"injectables/HashingProvider.html":{}}}],["hasshing",{"_index":324,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["having",{"_index":635,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["hello",{"_index":130,"title":{},"body":{"injectables/AppService.html":{}}}],["host",{"_index":107,"title":{},"body":{"modules/AppModule.html":{}}}],["hot",{"_index":1151,"title":{},"body":{"index.html":{}}}],["httpcode",{"_index":169,"title":{},"body":{"controllers/AuthController.html":{}}}],["httpcode(httpstatus.ok",{"_index":192,"title":{},"body":{"controllers/AuthController.html":{}}}],["https://github.com/phertyameen/realtimechat.git",{"_index":1145,"title":{},"body":{"index.html":{}}}],["httpstatus",{"_index":170,"title":{},"body":{"controllers/AuthController.html":{}}}],["httpstatus.ok",{"_index":196,"title":{},"body":{"controllers/AuthController.html":{}}}],["httpstatus.unauthorized",{"_index":198,"title":{},"body":{"controllers/AuthController.html":{}}}],["i.e",{"_index":1182,"title":{},"body":{"index.html":{}}}],["id",{"_index":342,"title":{},"body":{"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["id'})@apiparam({name",{"_index":968,"title":{},"body":{"controllers/UserController.html":{}}}],["id'})@apiquery({name",{"_index":950,"title":{},"body":{"controllers/UserController.html":{}}}],["id:number",{"_index":999,"title":{},"body":{"controllers/UserController.html":{}}}],["id?:number",{"_index":726,"title":{},"body":{"classes/GetuserParamDto.html":{}}}],["identifier",{"_index":351,"title":{},"body":{"entities/ChatRoom.html":{},"classes/EditUserDto.html":{},"classes/GetuserParamDto.html":{},"entities/Message.html":{},"entities/User.html":{},"coverage.html":{}}}],["ids",{"_index":411,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["idtoken",{"_index":773,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["implementation",{"_index":299,"title":{},"body":{"modules/AuthModule.html":{}}}],["implementing",{"_index":210,"title":{},"body":{"guards/AuthGuardGuard.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["implements",{"_index":236,"title":{},"body":{"guards/AuthGuardGuard.html":{},"injectables/BcryptProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["import",{"_index":37,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{}}}],["imports",{"_index":69,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/UserModule.html":{}}}],["in'})@apiresponse({status",{"_index":160,"title":{},"body":{"controllers/AuthController.html":{}}}],["in.provider",{"_index":278,"title":{},"body":{"modules/AuthModule.html":{},"injectables/AuthService.html":{}}}],["in.provider.ts",{"_index":891,"title":{},"body":{"injectables/SignInProvider.html":{},"coverage.html":{}}}],["in.provider.ts:28",{"_index":893,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["in.provider.ts:9",{"_index":892,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["include",{"_index":525,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/GenerateTokensProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["incorrect",{"_index":900,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["index",{"_index":11,"title":{"index.html":{}},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"miscellaneous/enumerations.html":{},"miscellaneous/functions.html":{},"miscellaneous/variables.html":{}}}],["indicating",{"_index":225,"title":{},"body":{"guards/AuthGuardGuard.html":{},"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["info",{"_index":3,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{}}}],["information",{"_index":1025,"title":{},"body":{"injectables/UserService.html":{},"miscellaneous/variables.html":{}}}],["initializes",{"_index":1122,"title":{},"body":{"miscellaneous/functions.html":{}}}],["inject",{"_index":104,"title":{},"body":{"modules/AppModule.html":{},"injectables/AuthService.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"injectables/UserService.html":{}}}],["inject(forwardref",{"_index":309,"title":{},"body":{"injectables/AuthService.html":{},"injectables/CreateUserProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{}}}],["inject(jwtconfig.key",{"_index":706,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{}}}],["injectable",{"_index":126,"title":{"injectables/AppService.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/HashingProvider.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"injectables/UserService.html":{}},"body":{"injectables/AppService.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/HashingProvider.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"injectables/UserService.html":{},"coverage.html":{}}}],["injectables",{"_index":127,"title":{},"body":{"injectables/AppService.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/HashingProvider.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"injectables/UserService.html":{},"overview.html":{}}}],["injecting",{"_index":187,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/ChatRoomsService.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{}}}],["injectrepository",{"_index":425,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/MessagesService.html":{},"injectables/UserService.html":{}}}],["injectrepository(chatroom",{"_index":429,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["injectrepository(message",{"_index":863,"title":{},"body":{"injectables/MessagesService.html":{}}}],["injectrepository(user",{"_index":430,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/UserService.html":{}}}],["injects",{"_index":465,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/FindOneByEmail.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/UserService.html":{}}}],["innerjoinandselect('room.users",{"_index":436,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["inppassword",{"_index":325,"title":{},"body":{"injectables/BcryptProvider.html":{},"injectables/HashingProvider.html":{}}}],["input",{"_index":407,"title":{},"body":{"injectables/ChatRoomsService.html":{},"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["install",{"_index":1143,"title":{},"body":{"index.html":{}}}],["installation",{"_index":1141,"title":{},"body":{"index.html":{}}}],["installed",{"_index":1165,"title":{},"body":{"index.html":{}}}],["instance",{"_index":256,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["instance.canactivate(context",{"_index":258,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["instead",{"_index":1183,"title":{},"body":{"index.html":{}}}],["integration",{"_index":1167,"title":{},"body":{"index.html":{}}}],["interact",{"_index":666,"title":{},"body":{"injectables/FindOneByEmail.html":{},"injectables/UserService.html":{}}}],["interface",{"_index":0,"title":{"interfaces/ActiveUserData.html":{},"interfaces/GoogleInterface.html":{}},"body":{"interfaces/ActiveUserData.html":{},"interfaces/GoogleInterface.html":{},"coverage.html":{}}}],["interface/activeinterface",{"_index":705,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["interfaces",{"_index":2,"title":{},"body":{"interfaces/ActiveUserData.html":{},"interfaces/GoogleInterface.html":{},"overview.html":{}}}],["invalid",{"_index":148,"title":{},"body":{"controllers/AuthController.html":{},"injectables/ChatRoomsService.html":{},"controllers/GoogleAuthenticationController.html":{}}}],["ischeckedpassword",{"_index":902,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["isemail",{"_index":541,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"classes/SignInDto.html":{}}}],["isemail()@isnotempty",{"_index":885,"title":{},"body":{"classes/SignInDto.html":{}}}],["isenum",{"_index":543,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["isenum(userrole",{"_index":576,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["isglobal",{"_index":98,"title":{},"body":{"modules/AppModule.html":{}}}],["isint",{"_index":657,"title":{},"body":{"classes/EditUserDto.html":{},"classes/GetuserParamDto.html":{}}}],["isint()@isnotempty",{"_index":655,"title":{},"body":{"classes/EditUserDto.html":{}}}],["isint()@type(undefined",{"_index":723,"title":{},"body":{"classes/GetuserParamDto.html":{}}}],["isnotempty",{"_index":542,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"classes/GoogleTokenDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"classes/RefreshTokenDto.html":{},"classes/SignInDto.html":{}}}],["isoptional",{"_index":544,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["isoptional,isint",{"_index":725,"title":{},"body":{"classes/GetuserParamDto.html":{}}}],["isstring",{"_index":540,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"classes/RefreshTokenDto.html":{},"classes/SignInDto.html":{}}}],["isstring()@isnotempty",{"_index":870,"title":{},"body":{"classes/RefreshTokenDto.html":{},"classes/SignInDto.html":{}}}],["issue",{"_index":613,"title":{},"body":{"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{}}}],["issuer",{"_index":712,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["issues",{"_index":637,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["john",{"_index":929,"title":{},"body":{"entities/User.html":{}}}],["johndoe@example.com",{"_index":931,"title":{},"body":{"entities/User.html":{}}}],["jointable",{"_index":366,"title":{},"body":{"entities/ChatRoom.html":{},"entities/User.html":{}}}],["junction",{"_index":938,"title":{},"body":{"entities/User.html":{}}}],["jwt",{"_index":703,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{}}}],["jwtconfig",{"_index":281,"title":{},"body":{"modules/AuthModule.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{}}}],["jwtconfiguration",{"_index":687,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["jwtconfigurattion",{"_index":749,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["jwtmodule",{"_index":279,"title":{},"body":{"modules/AuthModule.html":{}}}],["jwtmodule.registerasync(jwtconfig.asprovider",{"_index":294,"title":{},"body":{"modules/AuthModule.html":{}}}],["jwtservice",{"_index":686,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["key",{"_index":1232,"title":{},"body":{"miscellaneous/variables.html":{}}}],["keyboard",{"_index":1187,"title":{},"body":{"index.html":{}}}],["keyof",{"_index":1223,"title":{},"body":{"miscellaneous/variables.html":{}}}],["last",{"_index":514,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"interfaces/GoogleInterface.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{}}}],["lastname",{"_index":481,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{}}}],["later",{"_index":633,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["legend",{"_index":51,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"overview.html":{}}}],["length",{"_index":498,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{}}}],["letter",{"_index":527,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["letter'})@isstring()@maxlength(225)@matches(/^(?=.*[!@#$%^&])(?=.*[a",{"_index":517,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["letters",{"_index":490,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["library",{"_index":758,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{},"dependencies.html":{}}}],["license",{"_index":1200,"title":{},"body":{"index.html":{},"properties.html":{}}}],["licensed",{"_index":1201,"title":{},"body":{"index.html":{}}}],["limit",{"_index":965,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["line",{"_index":1180,"title":{},"body":{"index.html":{}}}],["link",{"_index":939,"title":{},"body":{"entities/User.html":{}}}],["list",{"_index":410,"title":{},"body":{"injectables/ChatRoomsService.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["load",{"_index":102,"title":{},"body":{"modules/AppModule.html":{}}}],["login",{"_index":906,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["loginticket",{"_index":771,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["loginticket.getpayload",{"_index":775,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["loop",{"_index":253,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["lowercase",{"_index":528,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["lts",{"_index":1138,"title":{},"body":{"index.html":{}}}],["mac",{"_index":1194,"title":{},"body":{"index.html":{}}}],["main",{"_index":1119,"title":{},"body":{"miscellaneous/functions.html":{},"index.html":{},"miscellaneous/variables.html":{}}}],["main.ts",{"_index":1157,"title":{},"body":{"index.html":{}}}],["makes",{"_index":651,"title":{},"body":{"classes/EditUserDto.html":{}}}],["management",{"_index":1037,"title":{},"body":{"injectables/UserService.html":{},"index.html":{}}}],["managing",{"_index":829,"title":{},"body":{"controllers/MessagesController.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["many",{"_index":360,"title":{},"body":{"entities/ChatRoom.html":{},"entities/Message.html":{},"entities/User.html":{}}}],["manytomany",{"_index":365,"title":{},"body":{"entities/ChatRoom.html":{},"entities/User.html":{}}}],["manytomany(undefined",{"_index":357,"title":{},"body":{"entities/ChatRoom.html":{},"entities/User.html":{}}}],["manytoone",{"_index":826,"title":{},"body":{"entities/Message.html":{}}}],["manytoone(undefined",{"_index":815,"title":{},"body":{"entities/Message.html":{}}}],["match",{"_index":491,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["matches",{"_index":547,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["matching",{"_index":23,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"dependencies.html":{},"miscellaneous/enumerations.html":{},"miscellaneous/functions.html":{},"index.html":{},"modules.html":{},"overview.html":{},"properties.html":{},"miscellaneous/variables.html":{}}}],["matchpasswordconstraint",{"_index":598,"title":{},"body":{"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["matchpasswords",{"_index":558,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["matchpasswordsconstraint",{"_index":560,"title":{"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"coverage.html":{}}}],["maxlength",{"_index":546,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["maxlength(100",{"_index":571,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["maxlength(150",{"_index":572,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["maxlength(225",{"_index":573,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["merging",{"_index":1178,"title":{},"body":{"index.html":{}}}],["message",{"_index":524,"title":{"entities/Message.html":{}},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"entities/User.html":{},"controllers/UserController.html":{},"coverage.html":{}}}],["message.sender",{"_index":922,"title":{},"body":{"entities/User.html":{}}}],["messagerepo",{"_index":855,"title":{},"body":{"injectables/MessagesService.html":{}}}],["messages",{"_index":818,"title":{},"body":{"entities/Message.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"entities/User.html":{}}}],["messages.controller",{"_index":851,"title":{},"body":{"modules/MessagesModule.html":{}}}],["messages/messages.module",{"_index":95,"title":{},"body":{"modules/AppModule.html":{}}}],["messagescontroller",{"_index":827,"title":{"controllers/MessagesController.html":{}},"body":{"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"coverage.html":{}}}],["messageservice",{"_index":842,"title":{},"body":{"controllers/MessagesController.html":{}}}],["messagesmodule",{"_index":61,"title":{"modules/MessagesModule.html":{}},"body":{"modules/AppModule.html":{},"modules/MessagesModule.html":{},"modules.html":{},"overview.html":{}}}],["messagesservice",{"_index":839,"title":{"injectables/MessagesService.html":{}},"body":{"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"coverage.html":{},"overview.html":{}}}],["metadata",{"_index":1100,"title":{},"body":{"dependencies.html":{}}}],["method",{"_index":35,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["methods",{"_index":30,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["miscellaneous",{"_index":1104,"title":{"miscellaneous/enumerations.html":{},"miscellaneous/functions.html":{},"miscellaneous/variables.html":{}},"body":{"miscellaneous/enumerations.html":{},"miscellaneous/functions.html":{},"miscellaneous/variables.html":{}}}],["mismatch",{"_index":569,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["mit",{"_index":1203,"title":{},"body":{"index.html":{}}}],["moderator",{"_index":1116,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["module",{"_index":47,"title":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{}},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"index.html":{},"overview.html":{}}}],["modules",{"_index":49,"title":{"modules.html":{}},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"modules.html":{},"overview.html":{}}}],["moment",{"_index":631,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["multi",{"_index":1179,"title":{},"body":{"index.html":{}}}],["multiple",{"_index":911,"title":{},"body":{"entities/User.html":{}}}],["name",{"_index":152,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["nest",{"_index":1134,"title":{},"body":{"index.html":{}}}],["nestjs",{"_index":1123,"title":{},"body":{"miscellaneous/functions.html":{},"index.html":{}}}],["nestjs/common",{"_index":38,"title":{},"body":{"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"injectables/HashingProvider.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"dependencies.html":{}}}],["nestjs/config",{"_index":73,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"dependencies.html":{},"index.html":{}}}],["nestjs/core",{"_index":86,"title":{},"body":{"modules/AppModule.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"dependencies.html":{}}}],["nestjs/jwt",{"_index":280,"title":{},"body":{"modules/AuthModule.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["nestjs/mapped",{"_index":658,"title":{},"body":{"classes/EditUserDto.html":{}}}],["nestjs/platform",{"_index":1087,"title":{},"body":{"dependencies.html":{}}}],["nestjs/swagger",{"_index":184,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/UserController.html":{},"dependencies.html":{}}}],["nestjs/typeorm",{"_index":79,"title":{},"body":{"modules/AppModule.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/MessagesService.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"dependencies.html":{},"index.html":{}}}],["network",{"_index":636,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["new",{"_index":154,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"coverage.html":{},"index.html":{}}}],["newly",{"_index":617,"title":{},"body":{"injectables/CreateUserProvider.html":{},"controllers/UserController.html":{}}}],["newuser",{"_index":642,"title":{},"body":{"injectables/CreateUserProvider.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["node.js",{"_index":1137,"title":{},"body":{"index.html":{}}}],["none",{"_index":1112,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["npm",{"_index":1140,"title":{},"body":{"index.html":{}}}],["null",{"_index":933,"title":{},"body":{"entities/User.html":{},"injectables/UserService.html":{}}}],["nullable",{"_index":913,"title":{},"body":{"entities/User.html":{}}}],["number",{"_index":20,"title":{},"body":{"interfaces/ActiveUserData.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["numbers",{"_index":487,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["oauth",{"_index":512,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["oauth2",{"_index":759,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["oauth2client",{"_index":757,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["oauth2client(client_id",{"_index":766,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["oauthclient",{"_index":747,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["object",{"_index":153,"title":{},"body":{"controllers/AuthController.html":{},"injectables/ChatRoomsService.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/UserController.html":{}}}],["object.password",{"_index":567,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["observable",{"_index":230,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["one",{"_index":526,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"entities/User.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{}}}],["onetomany",{"_index":928,"title":{},"body":{"entities/User.html":{}}}],["onetomany(undefined",{"_index":921,"title":{},"body":{"entities/User.html":{}}}],["onmoduleinit",{"_index":748,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["open",{"_index":1175,"title":{},"body":{"index.html":{}}}],["operations",{"_index":665,"title":{},"body":{"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{},"controllers/MessagesController.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["option",{"_index":1193,"title":{},"body":{"index.html":{}}}],["optional",{"_index":13,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["optional)'})@apiquery({name",{"_index":969,"title":{},"body":{"controllers/UserController.html":{}}}],["out",{"_index":65,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"overview.html":{}}}],["overview",{"_index":1208,"title":{"overview.html":{}},"body":{"overview.html":{}}}],["package",{"_index":1082,"title":{"dependencies.html":{},"properties.html":{}},"body":{}}],["packages",{"_index":1166,"title":{},"body":{"index.html":{}}}],["page",{"_index":966,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["pagination",{"_index":972,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["param",{"_index":189,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"controllers/MessagesController.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["parameter",{"_index":860,"title":{},"body":{"injectables/MessagesService.html":{},"controllers/UserController.html":{}}}],["parameters",{"_index":151,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["paramsdto",{"_index":722,"title":{},"body":{"classes/GetuserParamDto.html":{}}}],["parseintpipe",{"_index":980,"title":{},"body":{"controllers/UserController.html":{}}}],["part",{"_index":649,"title":{},"body":{"classes/EditUserDto.html":{},"entities/User.html":{}}}],["partialtype",{"_index":650,"title":{},"body":{"classes/EditUserDto.html":{}}}],["partialtype(createuserdto",{"_index":654,"title":{},"body":{"classes/EditUserDto.html":{}}}],["password",{"_index":113,"title":{},"body":{"modules/AppModule.html":{},"injectables/BcryptProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{}}}],["password'})@isstring()@maxlength(225)@validate(matchpasswordsconstraint",{"_index":492,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["password.'})@isstring()@maxlength(225)@validate(matchpasswordsconstraint",{"_index":586,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["password123",{"_index":485,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["passwords",{"_index":564,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["patch",{"_index":647,"title":{},"body":{"classes/EditUserDto.html":{},"controllers/UserController.html":{}}}],["payload",{"_index":584,"title":{},"body":{"classes/CreateUserDto-1.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["per",{"_index":970,"title":{},"body":{"controllers/UserController.html":{}}}],["pg",{"_index":1097,"title":{},"body":{"dependencies.html":{}}}],["please",{"_index":632,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["point",{"_index":1121,"title":{},"body":{"miscellaneous/functions.html":{},"index.html":{}}}],["poiuytrdspoiuytrewa\\zxcvbnmml;poiuytrdsdcvbnm",{"_index":579,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["poiuytrdspoiuytrewazxcvbnmml;poiuytrdsdcvbnm",{"_index":505,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{}}}],["port",{"_index":109,"title":{},"body":{"modules/AppModule.html":{}}}],["post",{"_index":171,"title":{},"body":{"controllers/AuthController.html":{},"controllers/ChatRoomsController.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/MessagesController.html":{},"controllers/UserController.html":{}}}],["post('/refreshtoken",{"_index":202,"title":{},"body":{"controllers/AuthController.html":{}}}],["post('/refreshtoken')@apioperation({summary",{"_index":140,"title":{},"body":{"controllers/AuthController.html":{}}}],["post('/signin",{"_index":190,"title":{},"body":{"controllers/AuthController.html":{}}}],["post('/signin')@auth(authtypes.none)@httpcode(httpstatus.ok)@useinterceptors(classserializerinterceptor)@apioperation({summary",{"_index":158,"title":{},"body":{"controllers/AuthController.html":{}}}],["postgres",{"_index":106,"title":{},"body":{"modules/AppModule.html":{}}}],["prefix",{"_index":132,"title":{},"body":{"controllers/AuthController.html":{},"controllers/ChatRoomsController.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/MessagesController.html":{},"controllers/UserController.html":{}}}],["prerequisites",{"_index":1136,"title":{},"body":{"index.html":{}}}],["present",{"_index":568,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["primarygeneratedcolumn",{"_index":364,"title":{},"body":{"entities/ChatRoom.html":{},"entities/Message.html":{},"entities/User.html":{}}}],["primarygeneratedcolumn('uuid",{"_index":348,"title":{},"body":{"entities/ChatRoom.html":{}}}],["private",{"_index":188,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"entities/ChatRoom.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"injectables/UserService.html":{},"miscellaneous/enumerations.html":{}}}],["process",{"_index":630,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["project",{"_index":1132,"title":{},"body":{"index.html":{}}}],["promise",{"_index":223,"title":{},"body":{"guards/AuthGuardGuard.html":{},"injectables/BcryptProvider.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/HashingProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["promise.all",{"_index":715,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["promise.resolve",{"_index":257,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["properties",{"_index":12,"title":{"properties.html":{}},"body":{"interfaces/ActiveUserData.html":{},"guards/AuthGuardGuard.html":{},"entities/ChatRoom.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"classes/GetuserParamDto.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"entities/Message.html":{},"classes/RefreshTokenDto.html":{},"classes/SignInDto.html":{},"entities/User.html":{},"properties.html":{}}}],["provide",{"_index":123,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{}}}],["provided",{"_index":539,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/UserController.html":{}}}],["provided).'})@isenum(userrole)@isoptional()@transform",{"_index":596,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["provider",{"_index":328,"title":{},"body":{"injectables/BcryptProvider.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/HashingProvider.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"injectables/UserService.html":{}}}],["provider/create",{"_index":1008,"title":{},"body":{"modules/UserModule.html":{}}}],["provider/find",{"_index":1010,"title":{},"body":{"modules/UserModule.html":{}}}],["provider/googleuserprovider",{"_index":1011,"title":{},"body":{"modules/UserModule.html":{}}}],["provider/user.service",{"_index":982,"title":{},"body":{"controllers/UserController.html":{},"modules/UserModule.html":{}}}],["providers",{"_index":54,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"overview.html":{}}}],["providers/auth.service",{"_index":174,"title":{},"body":{"controllers/AuthController.html":{},"modules/AuthModule.html":{}}}],["providers/bcrypt",{"_index":275,"title":{},"body":{"modules/AuthModule.html":{}}}],["providers/chatrooms/chatrooms.service",{"_index":386,"title":{},"body":{"controllers/ChatRoomsController.html":{},"modules/ChatroomsModule.html":{}}}],["providers/generate",{"_index":284,"title":{},"body":{"modules/AuthModule.html":{}}}],["providers/google",{"_index":737,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{},"modules/GoogleAuthticationModule.html":{}}}],["providers/hashing",{"_index":276,"title":{},"body":{"modules/AuthModule.html":{}}}],["providers/messages/messages.service",{"_index":840,"title":{},"body":{"controllers/MessagesController.html":{},"modules/MessagesModule.html":{}}}],["providers/refresh",{"_index":286,"title":{},"body":{"modules/AuthModule.html":{}}}],["providers/sign",{"_index":277,"title":{},"body":{"modules/AuthModule.html":{}}}],["public",{"_index":134,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["pull",{"_index":1176,"title":{},"body":{"index.html":{}}}],["push",{"_index":1170,"title":{},"body":{"index.html":{}}}],["query",{"_index":981,"title":{},"body":{"controllers/UserController.html":{}}}],["query('limit",{"_index":990,"title":{},"body":{"controllers/UserController.html":{}}}],["query('page",{"_index":992,"title":{},"body":{"controllers/UserController.html":{}}}],["readonly",{"_index":44,"title":{},"body":{"controllers/AppController.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"controllers/ChatRoomsController.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"controllers/MessagesController.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["realtimechat",{"_index":1131,"title":{},"body":{"index.html":{}}}],["record",{"_index":240,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["reflect",{"_index":1099,"title":{},"body":{"dependencies.html":{}}}],["reflector",{"_index":216,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["refresh",{"_index":141,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"injectables/GenerateTokensProvider.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{}}}],["refreshed",{"_index":146,"title":{},"body":{"controllers/AuthController.html":{}}}],["refreshtoken",{"_index":135,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"injectables/GenerateTokensProvider.html":{},"classes/RefreshTokenDto.html":{}}}],["refreshtoken(@body",{"_index":203,"title":{},"body":{"controllers/AuthController.html":{}}}],["refreshtoken(refreshtoken",{"_index":138,"title":{},"body":{"controllers/AuthController.html":{}}}],["refreshtoken(refreshtokendto",{"_index":304,"title":{},"body":{"injectables/AuthService.html":{}}}],["refreshtokendto",{"_index":139,"title":{"classes/RefreshTokenDto.html":{}},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"coverage.html":{}}}],["refreshtokendto.refreshtoken",{"_index":880,"title":{},"body":{"injectables/RefreshTokensProvider.html":{}}}],["refreshtokenprovider",{"_index":310,"title":{},"body":{"injectables/AuthService.html":{}}}],["refreshtokens",{"_index":873,"title":{},"body":{"injectables/RefreshTokensProvider.html":{}}}],["refreshtokens(refreshtokendto",{"_index":876,"title":{},"body":{"injectables/RefreshTokensProvider.html":{}}}],["refreshtokensprovider",{"_index":269,"title":{"injectables/RefreshTokensProvider.html":{}},"body":{"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/RefreshTokensProvider.html":{},"coverage.html":{},"overview.html":{}}}],["related",{"_index":752,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{},"controllers/MessagesController.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["relations",{"_index":867,"title":{},"body":{"injectables/MessagesService.html":{}}}],["relationship",{"_index":361,"title":{},"body":{"entities/ChatRoom.html":{},"entities/Message.html":{},"entities/User.html":{}}}],["reload",{"_index":1152,"title":{},"body":{"index.html":{}}}],["repo",{"_index":862,"title":{},"body":{"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{}}}],["repository",{"_index":398,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/MessagesService.html":{},"injectables/UserService.html":{},"index.html":{}}}],["representing",{"_index":583,"title":{},"body":{"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"entities/User.html":{}}}],["request",{"_index":227,"title":{},"body":{"guards/AuthGuardGuard.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/MatchPasswordsConstraint-1.html":{},"index.html":{},"miscellaneous/variables.html":{}}}],["request[request_user_key",{"_index":1226,"title":{},"body":{"miscellaneous/variables.html":{}}}],["request_user_key",{"_index":1062,"title":{},"body":{"coverage.html":{},"miscellaneous/variables.html":{}}}],["requesttimeoutexception",{"_index":619,"title":{},"body":{"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/SignInProvider.html":{}}}],["requesttimeoutexception('could",{"_index":671,"title":{},"body":{"injectables/FindOneByEmail.html":{}}}],["requesttimeoutexception(error",{"_index":905,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["required",{"_index":951,"title":{},"body":{"controllers/UserController.html":{}}}],["reset",{"_index":64,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"overview.html":{}}}],["response",{"_index":736,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{}}}],["responsible",{"_index":446,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{}}}],["result",{"_index":418,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["results",{"_index":22,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"dependencies.html":{},"miscellaneous/enumerations.html":{},"miscellaneous/functions.html":{},"index.html":{},"modules.html":{},"overview.html":{},"properties.html":{},"miscellaneous/variables.html":{}}}],["retrieval",{"_index":974,"title":{},"body":{"controllers/UserController.html":{}}}],["retrieve",{"_index":967,"title":{},"body":{"controllers/UserController.html":{},"miscellaneous/variables.html":{}}}],["retrieved",{"_index":421,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["retrieves",{"_index":977,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["return",{"_index":45,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"miscellaneous/variables.html":{}}}],["returns",{"_index":36,"title":{},"body":{"controllers/AppController.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["review",{"_index":1177,"title":{},"body":{"index.html":{}}}],["role",{"_index":536,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"miscellaneous/enumerations.html":{}}}],["room",{"_index":340,"title":{},"body":{"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{}}}],["rooms",{"_index":428,"title":{},"body":{"injectables/ChatRoomsService.html":{},"entities/User.html":{}}}],["root",{"_index":1159,"title":{},"body":{"index.html":{}}}],["rules",{"_index":534,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"index.html":{}}}],["run",{"_index":1150,"title":{},"body":{"index.html":{}}}],["running",{"_index":1147,"title":{},"body":{"index.html":{}}}],["rxjs",{"_index":231,"title":{},"body":{"guards/AuthGuardGuard.html":{},"dependencies.html":{}}}],["salt",{"_index":331,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["saltrounds",{"_index":329,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["same",{"_index":585,"title":{},"body":{"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["secret",{"_index":708,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["send",{"_index":786,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{},"controllers/MessagesController.html":{},"entities/User.html":{}}}],["sender",{"_index":812,"title":{},"body":{"entities/Message.html":{},"injectables/MessagesService.html":{}}}],["senderid",{"_index":844,"title":{},"body":{"controllers/MessagesController.html":{},"injectables/MessagesService.html":{}}}],["sending",{"_index":859,"title":{},"body":{"injectables/MessagesService.html":{}}}],["sendmessage",{"_index":831,"title":{},"body":{"controllers/MessagesController.html":{},"injectables/MessagesService.html":{}}}],["sendmessage(@body",{"_index":843,"title":{},"body":{"controllers/MessagesController.html":{}}}],["sendmessage(chatroomid",{"_index":857,"title":{},"body":{"injectables/MessagesService.html":{}}}],["sendmessage(undefined",{"_index":837,"title":{},"body":{"controllers/MessagesController.html":{}}}],["sent",{"_index":770,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["server",{"_index":1128,"title":{},"body":{"miscellaneous/functions.html":{},"index.html":{}}}],["service",{"_index":42,"title":{},"body":{"controllers/AppController.html":{},"controllers/AuthController.html":{},"injectables/AuthService.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/MessagesService.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"index.html":{}}}],["setmetadata(auth_type_key",{"_index":1230,"title":{},"body":{"miscellaneous/variables.html":{}}}],["sets",{"_index":1124,"title":{},"body":{"miscellaneous/functions.html":{}}}],["shift",{"_index":1190,"title":{},"body":{"index.html":{}}}],["shortcut",{"_index":1188,"title":{},"body":{"index.html":{}}}],["sign",{"_index":159,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"injectables/SignInProvider.html":{}}}],["signed",{"_index":161,"title":{},"body":{"controllers/AuthController.html":{},"injectables/GenerateTokensProvider.html":{}}}],["signin",{"_index":137,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"injectables/HashingProvider.html":{},"injectables/SignInProvider.html":{}}}],["signin(@body",{"_index":199,"title":{},"body":{"controllers/AuthController.html":{}}}],["signin(signindto",{"_index":156,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"injectables/SignInProvider.html":{}}}],["signindto",{"_index":157,"title":{"classes/SignInDto.html":{}},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"coverage.html":{}}}],["signinprovider",{"_index":270,"title":{"injectables/SignInProvider.html":{}},"body":{"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/SignInProvider.html":{},"coverage.html":{},"overview.html":{}}}],["signs",{"_index":698,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"entities/User.html":{}}}],["signtoken",{"_index":685,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["signtoken(userid",{"_index":694,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["signup",{"_index":804,"title":{},"body":{"injectables/HashingProvider.html":{}}}],["single",{"_index":383,"title":{},"body":{"controllers/ChatRoomsController.html":{},"controllers/UserController.html":{}}}],["slash",{"_index":1185,"title":{},"body":{"index.html":{}}}],["social/google",{"_index":291,"title":{},"body":{"modules/AuthModule.html":{}}}],["social/providers/google",{"_index":289,"title":{},"body":{"modules/AuthModule.html":{}}}],["source",{"_index":4,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"modules/AppModule.html":{},"injectables/AppService.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"modules/ChatroomsModule.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"modules/GoogleAuthticationModule.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"modules/MessagesModule.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"index.html":{}}}],["special",{"_index":529,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["specific",{"_index":532,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"controllers/UserController.html":{}}}],["src",{"_index":1155,"title":{},"body":{"index.html":{}}}],["src/.../activeuser.decorator.ts",{"_index":1219,"title":{},"body":{"miscellaneous/variables.html":{}}}],["src/.../auth.constant.ts",{"_index":1221,"title":{},"body":{"miscellaneous/variables.html":{}}}],["src/.../auth.decorator.ts",{"_index":1220,"title":{},"body":{"miscellaneous/variables.html":{}}}],["src/.../authtypes.enum.ts",{"_index":1106,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["src/.../chatroomtype.ts",{"_index":1107,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["src/.../main.ts",{"_index":1118,"title":{},"body":{"miscellaneous/functions.html":{}}}],["src/.../userrole.enum.ts",{"_index":1108,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["src/app.controller.ts",{"_index":27,"title":{},"body":{"controllers/AppController.html":{},"coverage.html":{}}}],["src/app.controller.ts:12",{"_index":34,"title":{},"body":{"controllers/AppController.html":{}}}],["src/app.module.ts",{"_index":66,"title":{},"body":{"modules/AppModule.html":{}}}],["src/app.service.ts",{"_index":128,"title":{},"body":{"injectables/AppService.html":{},"coverage.html":{}}}],["src/app.service.ts:8",{"_index":129,"title":{},"body":{"injectables/AppService.html":{}}}],["src/auth/auth.controller.ts",{"_index":131,"title":{},"body":{"controllers/AuthController.html":{},"coverage.html":{}}}],["src/auth/auth.controller.ts:33",{"_index":163,"title":{},"body":{"controllers/AuthController.html":{}}}],["src/auth/auth.controller.ts:47",{"_index":150,"title":{},"body":{"controllers/AuthController.html":{}}}],["src/auth/auth.module",{"_index":1012,"title":{},"body":{"modules/UserModule.html":{}}}],["src/auth/auth.module.ts",{"_index":271,"title":{},"body":{"modules/AuthModule.html":{}}}],["src/auth/authconfig/jwt.config",{"_index":282,"title":{},"body":{"modules/AuthModule.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["src/auth/constants/auth.constant",{"_index":234,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["src/auth/constants/auth.constant.ts",{"_index":1059,"title":{},"body":{"coverage.html":{},"miscellaneous/variables.html":{}}}],["src/auth/decorators/activeuser.decorator.ts",{"_index":1063,"title":{},"body":{"coverage.html":{},"miscellaneous/variables.html":{}}}],["src/auth/decorators/auth.decorator.ts",{"_index":1065,"title":{},"body":{"coverage.html":{},"miscellaneous/variables.html":{}}}],["src/auth/dtos/refreshtokendto.ts",{"_index":868,"title":{},"body":{"classes/RefreshTokenDto.html":{},"coverage.html":{}}}],["src/auth/dtos/refreshtokendto.ts:9",{"_index":871,"title":{},"body":{"classes/RefreshTokenDto.html":{}}}],["src/auth/dtos/userdto.ts",{"_index":884,"title":{},"body":{"classes/SignInDto.html":{},"coverage.html":{}}}],["src/auth/dtos/userdto.ts:13",{"_index":889,"title":{},"body":{"classes/SignInDto.html":{}}}],["src/auth/dtos/userdto.ts:8",{"_index":886,"title":{},"body":{"classes/SignInDto.html":{}}}],["src/auth/enums/authtypes.enum",{"_index":232,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["src/auth/enums/authtypes.enum.ts",{"_index":1109,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["src/auth/guard/access",{"_index":581,"title":{},"body":{"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{},"coverage.html":{}}}],["src/auth/guard/auth",{"_index":207,"title":{},"body":{"guards/AuthGuardGuard.html":{},"coverage.html":{}}}],["src/auth/interface/activeinterface.ts",{"_index":6,"title":{},"body":{"interfaces/ActiveUserData.html":{},"coverage.html":{}}}],["src/auth/providers/auth.service.ts",{"_index":300,"title":{},"body":{"injectables/AuthService.html":{},"coverage.html":{}}}],["src/auth/providers/auth.service.ts:10",{"_index":303,"title":{},"body":{"injectables/AuthService.html":{}}}],["src/auth/providers/auth.service.ts:28",{"_index":306,"title":{},"body":{"injectables/AuthService.html":{}}}],["src/auth/providers/auth.service.ts:33",{"_index":305,"title":{},"body":{"injectables/AuthService.html":{}}}],["src/auth/providers/bcrypt.ts",{"_index":313,"title":{},"body":{"injectables/BcryptProvider.html":{},"coverage.html":{}}}],["src/auth/providers/bcrypt.ts:10",{"_index":323,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["src/auth/providers/bcrypt.ts:18",{"_index":319,"title":{},"body":{"injectables/BcryptProvider.html":{}}}],["src/auth/providers/generate",{"_index":680,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"coverage.html":{}}}],["src/auth/providers/hashing",{"_index":623,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["src/auth/providers/hashing.ts",{"_index":798,"title":{},"body":{"injectables/HashingProvider.html":{},"coverage.html":{}}}],["src/auth/providers/hashing.ts:10",{"_index":800,"title":{},"body":{"injectables/HashingProvider.html":{}}}],["src/auth/providers/hashing.ts:7",{"_index":803,"title":{},"body":{"injectables/HashingProvider.html":{}}}],["src/auth/providers/refresh",{"_index":872,"title":{},"body":{"injectables/RefreshTokensProvider.html":{},"coverage.html":{}}}],["src/auth/providers/sign",{"_index":890,"title":{},"body":{"injectables/SignInProvider.html":{},"coverage.html":{}}}],["src/auth/social/dtos/google",{"_index":795,"title":{},"body":{"classes/GoogleTokenDto.html":{},"coverage.html":{}}}],["src/auth/social/google",{"_index":727,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{},"modules/GoogleAuthticationModule.html":{},"coverage.html":{}}}],["src/auth/social/interfaces/user.interface",{"_index":1036,"title":{},"body":{"injectables/UserService.html":{}}}],["src/auth/social/interfaces/user.interface.ts",{"_index":793,"title":{},"body":{"interfaces/GoogleInterface.html":{},"coverage.html":{}}}],["src/auth/social/providers/google",{"_index":744,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{},"coverage.html":{}}}],["src/chatrooms/chatroom.controller.ts",{"_index":371,"title":{},"body":{"controllers/ChatRoomsController.html":{},"coverage.html":{}}}],["src/chatrooms/chatroom.controller.ts:11",{"_index":376,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["src/chatrooms/chatroom.controller.ts:17",{"_index":382,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["src/chatrooms/chatroom.controller.ts:23",{"_index":379,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["src/chatrooms/chatroom.entity",{"_index":426,"title":{},"body":{"injectables/ChatRoomsService.html":{},"entities/Message.html":{},"entities/User.html":{}}}],["src/chatrooms/chatroom.entity.ts",{"_index":338,"title":{},"body":{"entities/ChatRoom.html":{},"coverage.html":{}}}],["src/chatrooms/chatroom.entity.ts:10",{"_index":349,"title":{},"body":{"entities/ChatRoom.html":{}}}],["src/chatrooms/chatroom.entity.ts:16",{"_index":353,"title":{},"body":{"entities/ChatRoom.html":{}}}],["src/chatrooms/chatroom.entity.ts:20",{"_index":356,"title":{},"body":{"entities/ChatRoom.html":{}}}],["src/chatrooms/chatroom.entity.ts:25",{"_index":359,"title":{},"body":{"entities/ChatRoom.html":{}}}],["src/chatrooms/chatroom.entity.ts:29",{"_index":346,"title":{},"body":{"entities/ChatRoom.html":{}}}],["src/chatrooms/chatrooms.module.ts",{"_index":442,"title":{},"body":{"modules/ChatroomsModule.html":{}}}],["src/chatrooms/enums/chatroomtype.ts",{"_index":1113,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["src/chatrooms/providers/chatrooms/chatrooms.service.ts",{"_index":396,"title":{},"body":{"injectables/ChatRoomsService.html":{},"coverage.html":{}}}],["src/chatrooms/providers/chatrooms/chatrooms.service.ts:16",{"_index":400,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["src/chatrooms/providers/chatrooms/chatrooms.service.ts:39",{"_index":408,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["src/chatrooms/providers/chatrooms/chatrooms.service.ts:53",{"_index":422,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["src/chatrooms/providers/chatrooms/chatrooms.service.ts:69",{"_index":416,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["src/main.ts",{"_index":1077,"title":{},"body":{"coverage.html":{},"miscellaneous/functions.html":{}}}],["src/messages/message.entity",{"_index":861,"title":{},"body":{"injectables/MessagesService.html":{},"entities/User.html":{}}}],["src/messages/message.entity.ts",{"_index":810,"title":{},"body":{"entities/Message.html":{},"coverage.html":{}}}],["src/messages/message.entity.ts:12",{"_index":819,"title":{},"body":{"entities/Message.html":{}}}],["src/messages/message.entity.ts:16",{"_index":817,"title":{},"body":{"entities/Message.html":{}}}],["src/messages/message.entity.ts:20",{"_index":821,"title":{},"body":{"entities/Message.html":{}}}],["src/messages/message.entity.ts:24",{"_index":822,"title":{},"body":{"entities/Message.html":{}}}],["src/messages/message.entity.ts:28",{"_index":824,"title":{},"body":{"entities/Message.html":{}}}],["src/messages/messages.controller.ts",{"_index":828,"title":{},"body":{"controllers/MessagesController.html":{},"coverage.html":{}}}],["src/messages/messages.controller.ts:13",{"_index":838,"title":{},"body":{"controllers/MessagesController.html":{}}}],["src/messages/messages.controller.ts:19",{"_index":834,"title":{},"body":{"controllers/MessagesController.html":{}}}],["src/messages/messages.module.ts",{"_index":850,"title":{},"body":{"modules/MessagesModule.html":{}}}],["src/messages/providers/messages/messages.service.ts",{"_index":852,"title":{},"body":{"injectables/MessagesService.html":{},"coverage.html":{}}}],["src/messages/providers/messages/messages.service.ts:14",{"_index":858,"title":{},"body":{"injectables/MessagesService.html":{}}}],["src/messages/providers/messages/messages.service.ts:20",{"_index":856,"title":{},"body":{"injectables/MessagesService.html":{}}}],["src/messages/providers/messages/messages.service.ts:8",{"_index":854,"title":{},"body":{"injectables/MessagesService.html":{}}}],["src/users/dtos/create",{"_index":475,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{},"coverage.html":{}}}],["src/users/dtos/getuserparamdto.ts",{"_index":721,"title":{},"body":{"classes/GetuserParamDto.html":{},"coverage.html":{}}}],["src/users/dtos/getuserparamdto.ts:10",{"_index":724,"title":{},"body":{"classes/GetuserParamDto.html":{}}}],["src/users/dtos/patch",{"_index":646,"title":{},"body":{"classes/EditUserDto.html":{},"coverage.html":{}}}],["src/users/enums/userrole.enum.ts",{"_index":1114,"title":{},"body":{"miscellaneous/enumerations.html":{}}}],["src/users/provider/create",{"_index":602,"title":{},"body":{"injectables/CreateUserProvider.html":{},"coverage.html":{}}}],["src/users/provider/find",{"_index":661,"title":{},"body":{"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"coverage.html":{}}}],["src/users/provider/googleuserprovider.ts",{"_index":445,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"coverage.html":{}}}],["src/users/provider/googleuserprovider.ts:15",{"_index":453,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{}}}],["src/users/provider/googleuserprovider.ts:35",{"_index":458,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{}}}],["src/users/provider/user.service",{"_index":308,"title":{},"body":{"injectables/AuthService.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{}}}],["src/users/provider/user.service.ts",{"_index":1014,"title":{},"body":{"injectables/UserService.html":{},"coverage.html":{}}}],["src/users/provider/user.service.ts:100",{"_index":1021,"title":{},"body":{"injectables/UserService.html":{}}}],["src/users/provider/user.service.ts:113",{"_index":1023,"title":{},"body":{"injectables/UserService.html":{}}}],["src/users/provider/user.service.ts:133",{"_index":1029,"title":{},"body":{"injectables/UserService.html":{}}}],["src/users/provider/user.service.ts:143",{"_index":1019,"title":{},"body":{"injectables/UserService.html":{}}}],["src/users/provider/user.service.ts:19",{"_index":1018,"title":{},"body":{"injectables/UserService.html":{}}}],["src/users/provider/user.service.ts:52",{"_index":1027,"title":{},"body":{"injectables/UserService.html":{}}}],["src/users/provider/user.service.ts:67",{"_index":1020,"title":{},"body":{"injectables/UserService.html":{}}}],["src/users/provider/user.service.ts:78",{"_index":1032,"title":{},"body":{"injectables/UserService.html":{}}}],["src/users/provider/user.service.ts:89",{"_index":1034,"title":{},"body":{"injectables/UserService.html":{}}}],["src/users/user.controller.ts",{"_index":940,"title":{},"body":{"controllers/UserController.html":{},"coverage.html":{}}}],["src/users/user.controller.ts:32",{"_index":976,"title":{},"body":{"controllers/UserController.html":{}}}],["src/users/user.controller.ts:51",{"_index":947,"title":{},"body":{"controllers/UserController.html":{}}}],["src/users/user.controller.ts:66",{"_index":954,"title":{},"body":{"controllers/UserController.html":{}}}],["src/users/user.controller.ts:83",{"_index":962,"title":{},"body":{"controllers/UserController.html":{}}}],["src/users/user.entitly",{"_index":363,"title":{},"body":{"entities/ChatRoom.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/GenerateTokensProvider.html":{},"entities/Message.html":{}}}],["src/users/user.entitly.ts",{"_index":907,"title":{},"body":{"entities/User.html":{},"coverage.html":{}}}],["src/users/user.entitly.ts:17",{"_index":919,"title":{},"body":{"entities/User.html":{}}}],["src/users/user.entitly.ts:24",{"_index":916,"title":{},"body":{"entities/User.html":{}}}],["src/users/user.entitly.ts:31",{"_index":920,"title":{},"body":{"entities/User.html":{}}}],["src/users/user.entitly.ts:38",{"_index":914,"title":{},"body":{"entities/User.html":{}}}],["src/users/user.entitly.ts:46",{"_index":924,"title":{},"body":{"entities/User.html":{}}}],["src/users/user.entitly.ts:53",{"_index":926,"title":{},"body":{"entities/User.html":{}}}],["src/users/user.entitly.ts:60",{"_index":918,"title":{},"body":{"entities/User.html":{}}}],["src/users/user.entitly.ts:68",{"_index":909,"title":{},"body":{"entities/User.html":{}}}],["src/users/user.entitly.ts:75",{"_index":923,"title":{},"body":{"entities/User.html":{}}}],["src/users/user.module",{"_index":287,"title":{},"body":{"modules/AuthModule.html":{}}}],["src/users/user.module.ts",{"_index":1006,"title":{},"body":{"modules/UserModule.html":{}}}],["stamp",{"_index":825,"title":{},"body":{"entities/Message.html":{}}}],["start",{"_index":1148,"title":{},"body":{"index.html":{}}}],["start:dev",{"_index":1153,"title":{},"body":{"index.html":{}}}],["started",{"_index":1130,"title":{"index.html":{}},"body":{"index.html":{}}}],["starts",{"_index":1127,"title":{},"body":{"miscellaneous/functions.html":{}}}],["statements",{"_index":1056,"title":{},"body":{"coverage.html":{}}}],["static",{"_index":213,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["status",{"_index":195,"title":{},"body":{"controllers/AuthController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/UserController.html":{}}}],["step",{"_index":785,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["stored",{"_index":1229,"title":{},"body":{"miscellaneous/variables.html":{}}}],["strig",{"_index":794,"title":{},"body":{"interfaces/GoogleInterface.html":{}}}],["string",{"_index":16,"title":{},"body":{"interfaces/ActiveUserData.html":{},"controllers/AppController.html":{},"injectables/AppService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"classes/SignInDto.html":{},"entities/User.html":{},"injectables/UserService.html":{},"miscellaneous/variables.html":{}}}],["structure",{"_index":1154,"title":{},"body":{"index.html":{}}}],["sub",{"_index":15,"title":{},"body":{"interfaces/ActiveUserData.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{}}}],["successful",{"_index":973,"title":{},"body":{"controllers/UserController.html":{}}}],["successfully",{"_index":197,"title":{},"body":{"controllers/AuthController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/UserController.html":{}}}],["successfully'})@apiresponse({status",{"_index":147,"title":{},"body":{"controllers/AuthController.html":{},"injectables/ChatRoomsService.html":{}}}],["summary",{"_index":194,"title":{},"body":{"controllers/AuthController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"controllers/UserController.html":{}}}],["support",{"_index":1205,"title":{},"body":{"modules.html":{}}}],["svg",{"_index":1206,"title":{},"body":{"modules.html":{}}}],["synchronize",{"_index":119,"title":{},"body":{"modules/AppModule.html":{}}}],["system",{"_index":615,"title":{},"body":{"injectables/CreateUserProvider.html":{},"index.html":{}}}],["t",{"_index":696,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["table",{"_index":811,"title":{},"body":{"entities/Message.html":{},"entities/User.html":{},"coverage.html":{}}}],["tablesort(document.getelementbyid('coverage",{"_index":1081,"title":{},"body":{"coverage.html":{}}}],["takes",{"_index":409,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/MessagesService.html":{}}}],["taking",{"_index":307,"title":{},"body":{"injectables/AuthService.html":{}}}],["test",{"_index":1198,"title":{},"body":{"index.html":{}}}],["tests",{"_index":1199,"title":{},"body":{"index.html":{}}}],["text",{"_index":813,"title":{},"body":{"entities/Message.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{}}}],["this.accesstokenguard",{"_index":241,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["this.appservice.gethello",{"_index":46,"title":{},"body":{"controllers/AppController.html":{}}}],["this.authservice.refreshtoken(refreshtoken",{"_index":204,"title":{},"body":{"controllers/AuthController.html":{}}}],["this.authservice.signin(signindto",{"_index":201,"title":{},"body":{"controllers/AuthController.html":{}}}],["this.authtypeguardmap[type",{"_index":252,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["this.chatroomrepository",{"_index":434,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["this.chatroomrepository.create",{"_index":432,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["this.chatroomrepository.delete(id",{"_index":439,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["this.chatroomrepository.save(chatroom",{"_index":433,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["this.chatroomservice.create(name",{"_index":391,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["this.chatroomservice.delete(id",{"_index":395,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["this.chatroomservice.findall(userid",{"_index":393,"title":{},"body":{"controllers/ChatRoomsController.html":{}}}],["this.creategoogleuserprovider.creategoogleuser(googleuser",{"_index":1053,"title":{},"body":{"injectables/UserService.html":{}}}],["this.createuserprovider.createusers(createuserdto",{"_index":1039,"title":{},"body":{"injectables/UserService.html":{}}}],["this.findonebyemail.findonebyemail(email",{"_index":1040,"title":{},"body":{"injectables/UserService.html":{}}}],["this.findonebygoogleidprovider.findonebygoogleid(googleid",{"_index":1052,"title":{},"body":{"injectables/UserService.html":{}}}],["this.generatetokenprovider.generatetokens(user",{"_index":883,"title":{},"body":{"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{}}}],["this.generatetokensprovider.generatetokens(newuser",{"_index":782,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["this.generatetokensprovider.generatetokens(user",{"_index":780,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["this.googleauthenticationservice.authenticate(googletokendto",{"_index":743,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{}}}],["this.hashingprovider.comparepasswords(signindto.password",{"_index":903,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["this.hashingprovider.hashpassword",{"_index":640,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["this.jwtconfiguration.audience",{"_index":711,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["this.jwtconfiguration.issuer",{"_index":713,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["this.jwtconfiguration.secret",{"_index":709,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{}}}],["this.jwtconfiguration.ttl",{"_index":718,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["this.jwtconfigurattion.googleclient_id",{"_index":762,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["this.jwtconfigurattion.googleclient_secret",{"_index":764,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["this.jwtservice.signasync",{"_index":707,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["this.jwtservice.verifyasync",{"_index":879,"title":{},"body":{"injectables/RefreshTokensProvider.html":{}}}],["this.messagerepo.create",{"_index":864,"title":{},"body":{"injectables/MessagesService.html":{}}}],["this.messagerepo.find",{"_index":866,"title":{},"body":{"injectables/MessagesService.html":{}}}],["this.messagerepo.save(message",{"_index":865,"title":{},"body":{"injectables/MessagesService.html":{}}}],["this.messageservice.getmessages(chatroomid",{"_index":847,"title":{},"body":{"controllers/MessagesController.html":{}}}],["this.messageservice.sendmessage(chatroomid",{"_index":845,"title":{},"body":{"controllers/MessagesController.html":{}}}],["this.oauthclient",{"_index":765,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["this.oauthclient.verifyidtoken",{"_index":772,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["this.reflector.getallandoverride(auth_type_key",{"_index":246,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["this.refreshtokensprovider.refreshtokens(refreshtokendto",{"_index":312,"title":{},"body":{"injectables/AuthService.html":{}}}],["this.signinprovider.signin(signindto",{"_index":311,"title":{},"body":{"injectables/AuthService.html":{}}}],["this.signtoken(user.id",{"_index":717,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["this.userrepository.create",{"_index":643,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["this.userrepository.create(googleuser",{"_index":469,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{}}}],["this.userrepository.delete(id",{"_index":1041,"title":{},"body":{"injectables/UserService.html":{}}}],["this.userrepository.find",{"_index":1038,"title":{},"body":{"injectables/UserService.html":{}}}],["this.userrepository.findbyids(userids",{"_index":431,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["this.userrepository.findone",{"_index":627,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["this.userrepository.findoneby",{"_index":670,"title":{},"body":{"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/UserService.html":{}}}],["this.userrepository.save(edit",{"_index":1051,"title":{},"body":{"injectables/UserService.html":{}}}],["this.userrepository.save(newuser",{"_index":644,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["this.userrepository.save(user",{"_index":470,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{}}}],["this.userservice.creategoogleuser",{"_index":781,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["this.userservice.createusers(createuserdto",{"_index":997,"title":{},"body":{"controllers/UserController.html":{}}}],["this.userservice.deleteuser(id",{"_index":1000,"title":{},"body":{"controllers/UserController.html":{}}}],["this.userservice.edituser(edituserdto",{"_index":1002,"title":{},"body":{"controllers/UserController.html":{}}}],["this.userservice.findall(getuserparamdto",{"_index":995,"title":{},"body":{"controllers/UserController.html":{}}}],["this.userservice.findonebygoogleid(googleid",{"_index":779,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["this.userservice.findonebyid(sub",{"_index":882,"title":{},"body":{"injectables/RefreshTokensProvider.html":{}}}],["this.userservice.getonebyemail(signindto.email",{"_index":898,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["through",{"_index":254,"title":{},"body":{"guards/AuthGuardGuard.html":{}}}],["throw",{"_index":262,"title":{},"body":{"guards/AuthGuardGuard.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/SignInProvider.html":{}}}],["throws",{"_index":243,"title":{},"body":{"guards/AuthGuardGuard.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["time",{"_index":700,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"entities/Message.html":{}}}],["timestamp",{"_index":814,"title":{},"body":{"entities/Message.html":{}}}],["token",{"_index":145,"title":{},"body":{"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/GoogleTokenDto.html":{},"injectables/RefreshTokensProvider.html":{}}}],["token'})@apibody({type",{"_index":149,"title":{},"body":{"controllers/AuthController.html":{}}}],["token'})@apiresponse({status",{"_index":143,"title":{},"body":{"controllers/AuthController.html":{},"controllers/GoogleAuthenticationController.html":{}}}],["token'})@post",{"_index":733,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{}}}],["token.dto",{"_index":739,"title":{},"body":{"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["token.dto.ts",{"_index":796,"title":{},"body":{"classes/GoogleTokenDto.html":{},"coverage.html":{}}}],["token.dto.ts:8",{"_index":797,"title":{},"body":{"classes/GoogleTokenDto.html":{}}}],["token.guard",{"_index":94,"title":{},"body":{"modules/AppModule.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{}}}],["token.guard.ts",{"_index":582,"title":{},"body":{"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{},"coverage.html":{}}}],["token.guard.ts:103",{"_index":595,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["token.guard.ts:117",{"_index":587,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["token.guard.ts:130",{"_index":597,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["token.guard.ts:143",{"_index":592,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["token.guard.ts:30",{"_index":809,"title":{},"body":{"classes/MatchPasswordsConstraint-1.html":{}}}],["token.guard.ts:38",{"_index":808,"title":{},"body":{"classes/MatchPasswordsConstraint-1.html":{}}}],["token.guard.ts:58",{"_index":589,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["token.guard.ts:71",{"_index":593,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["token.guard.ts:84",{"_index":588,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["token/access",{"_index":93,"title":{},"body":{"modules/AppModule.html":{},"guards/AuthGuardGuard.html":{},"modules/AuthModule.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint-1.html":{},"coverage.html":{}}}],["tokendto",{"_index":869,"title":{},"body":{"classes/RefreshTokenDto.html":{}}}],["tokens",{"_index":683,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{}}}],["tokens.provider",{"_index":285,"title":{},"body":{"modules/AuthModule.html":{},"injectables/AuthService.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{}}}],["tokens.provider.ts",{"_index":681,"title":{},"body":{"injectables/GenerateTokensProvider.html":{},"injectables/RefreshTokensProvider.html":{},"coverage.html":{}}}],["tokens.provider.ts:11",{"_index":875,"title":{},"body":{"injectables/RefreshTokensProvider.html":{}}}],["tokens.provider.ts:13",{"_index":689,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["tokens.provider.ts:37",{"_index":877,"title":{},"body":{"injectables/RefreshTokensProvider.html":{}}}],["tokens.provider.ts:40",{"_index":697,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["tokens.provider.ts:60",{"_index":691,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["transfer",{"_index":948,"title":{},"body":{"controllers/UserController.html":{}}}],["transform",{"_index":554,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["transformation",{"_index":1169,"title":{},"body":{"index.html":{}}}],["transformer",{"_index":555,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/GetuserParamDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"dependencies.html":{},"index.html":{}}}],["true",{"_index":99,"title":{},"body":{"modules/AppModule.html":{},"guards/AuthGuardGuard.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["try",{"_index":468,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/SignInProvider.html":{}}}],["type",{"_index":17,"title":{},"body":{"interfaces/ActiveUserData.html":{},"modules/AppModule.html":{},"controllers/AuthController.html":{},"guards/AuthGuardGuard.html":{},"injectables/AuthService.html":{},"injectables/BcryptProvider.html":{},"entities/ChatRoom.html":{},"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"classes/GetuserParamDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"interfaces/GoogleInterface.html":{},"classes/GoogleTokenDto.html":{},"injectables/HashingProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"controllers/MessagesController.html":{},"injectables/MessagesService.html":{},"classes/RefreshTokenDto.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{},"coverage.html":{},"miscellaneous/variables.html":{}}}],["type:string",{"_index":19,"title":{},"body":{"interfaces/ActiveUserData.html":{}}}],["typeorm",{"_index":367,"title":{},"body":{"entities/ChatRoom.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"injectables/MessagesService.html":{},"entities/User.html":{},"injectables/UserService.html":{},"dependencies.html":{},"index.html":{}}}],["typeormmodule",{"_index":78,"title":{},"body":{"modules/AppModule.html":{},"modules/UserModule.html":{}}}],["typeormmodule.forfeature([user",{"_index":1013,"title":{},"body":{"modules/UserModule.html":{}}}],["typeormmodule.forrootasync",{"_index":103,"title":{},"body":{"modules/AppModule.html":{}}}],["types",{"_index":659,"title":{},"body":{"classes/EditUserDto.html":{}}}],["types/bcrypt",{"_index":1091,"title":{},"body":{"dependencies.html":{}}}],["unable",{"_index":629,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["unauthorised",{"_index":787,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["unauthorizedexception",{"_index":229,"title":{},"body":{"guards/AuthGuardGuard.html":{},"injectables/FindOneByEmail.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/SignInProvider.html":{}}}],["unauthorizedexception('email",{"_index":899,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["unauthorizedexception('failed",{"_index":784,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["unauthorizedexception('user",{"_index":673,"title":{},"body":{"injectables/FindOneByEmail.html":{}}}],["undefined",{"_index":144,"title":{},"body":{"controllers/AuthController.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"entities/User.html":{},"miscellaneous/variables.html":{}}}],["under",{"_index":1202,"title":{},"body":{"index.html":{},"miscellaneous/variables.html":{}}}],["unique",{"_index":350,"title":{},"body":{"entities/ChatRoom.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"classes/GetuserParamDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"classes/SignInDto.html":{},"entities/User.html":{}}}],["unknown",{"_index":165,"title":{},"body":{"controllers/AuthController.html":{},"injectables/AuthService.html":{},"injectables/ChatRoomsService.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/MessagesService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"injectables/UserService.html":{}}}],["unlicensed",{"_index":1216,"title":{},"body":{"properties.html":{}}}],["up",{"_index":508,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"miscellaneous/functions.html":{}}}],["update",{"_index":958,"title":{},"body":{"controllers/UserController.html":{}}}],["updated",{"_index":960,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["updated'})@patch",{"_index":961,"title":{},"body":{"controllers/UserController.html":{}}}],["updates",{"_index":963,"title":{},"body":{"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["updating",{"_index":1024,"title":{},"body":{"injectables/UserService.html":{}}}],["uppercase",{"_index":489,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["uppercase.'})@isstring()@maxlength(225)@matches(/^(?=.*[!@#$%^&])(?=.*[a",{"_index":594,"title":{},"body":{"classes/CreateUserDto-1.html":{}}}],["uproper",{"_index":1186,"title":{},"body":{"index.html":{}}}],["use",{"_index":295,"title":{},"body":{"modules/AuthModule.html":{},"index.html":{}}}],["useclass",{"_index":124,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{}}}],["used",{"_index":511,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["usefactory",{"_index":105,"title":{},"body":{"modules/AppModule.html":{}}}],["useful",{"_index":1195,"title":{},"body":{"index.html":{}}}],["useinterceptors",{"_index":172,"title":{},"body":{"controllers/AuthController.html":{}}}],["useinterceptors(classserializerinterceptor",{"_index":193,"title":{},"body":{"controllers/AuthController.html":{}}}],["user",{"_index":9,"title":{"entities/User.html":{}},"body":{"interfaces/ActiveUserData.html":{},"controllers/AuthController.html":{},"injectables/AuthService.html":{},"entities/ChatRoom.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/GenerateTokensProvider.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/Message.html":{},"injectables/RefreshTokensProvider.html":{},"classes/SignInDto.html":{},"injectables/SignInProvider.html":{},"entities/User.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"miscellaneous/enumerations.html":{},"miscellaneous/variables.html":{}}}],["user'})@apibody({type",{"_index":944,"title":{},"body":{"controllers/UserController.html":{}}}],["user'})@apiresponse({status",{"_index":420,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"controllers/GoogleAuthenticationController.html":{}}}],["user'})@isenum(userrole)@isoptional()@transform",{"_index":537,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["user.chatrooms",{"_index":369,"title":{},"body":{"entities/ChatRoom.html":{}}}],["user.chatrooms)@jointable",{"_index":358,"title":{},"body":{"entities/ChatRoom.html":{}}}],["user.controller",{"_index":1007,"title":{},"body":{"modules/UserModule.html":{}}}],["user.dto",{"_index":622,"title":{},"body":{"injectables/CreateUserProvider.html":{},"classes/EditUserDto.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["user.dto.ts",{"_index":476,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/EditUserDto.html":{},"classes/MatchPasswordsConstraint.html":{},"coverage.html":{}}}],["user.dto.ts:108",{"_index":493,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["user.dto.ts:12",{"_index":656,"title":{},"body":{"classes/EditUserDto.html":{}}}],["user.dto.ts:120",{"_index":538,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["user.dto.ts:133",{"_index":510,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["user.dto.ts:19",{"_index":807,"title":{},"body":{"classes/MatchPasswordsConstraint.html":{}}}],["user.dto.ts:30",{"_index":806,"title":{},"body":{"classes/MatchPasswordsConstraint.html":{}}}],["user.dto.ts:50",{"_index":504,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["user.dto.ts:63",{"_index":516,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["user.dto.ts:76",{"_index":500,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["user.dto.ts:95",{"_index":531,"title":{},"body":{"classes/CreateUserDto.html":{}}}],["user.email",{"_index":719,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["user.entitly",{"_index":620,"title":{},"body":{"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{}}}],["user.id",{"_index":820,"title":{},"body":{"entities/Message.html":{}}}],["user.password",{"_index":904,"title":{},"body":{"injectables/SignInProvider.html":{}}}],["user.provider",{"_index":1009,"title":{},"body":{"modules/UserModule.html":{},"injectables/UserService.html":{}}}],["user.provider.ts",{"_index":603,"title":{},"body":{"injectables/CreateUserProvider.html":{},"coverage.html":{}}}],["user.provider.ts:14",{"_index":606,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["user.provider.ts:40",{"_index":614,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["user?.[field",{"_index":1227,"title":{},"body":{"miscellaneous/variables.html":{}}}],["usercontroller",{"_index":68,"title":{"controllers/UserController.html":{}},"body":{"modules/AppModule.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"coverage.html":{}}}],["userid",{"_index":384,"title":{},"body":{"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{},"injectables/GenerateTokensProvider.html":{}}}],["userids",{"_index":390,"title":{},"body":{"controllers/ChatRoomsController.html":{},"injectables/ChatRoomsService.html":{}}}],["usermodule",{"_index":62,"title":{"modules/UserModule.html":{}},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/UserModule.html":{},"modules.html":{},"overview.html":{}}}],["username",{"_index":111,"title":{},"body":{"modules/AppModule.html":{}}}],["userrepository",{"_index":399,"title":{},"body":{"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"injectables/CreateUserProvider.html":{},"injectables/FindOneByEmail.html":{},"injectables/FindOneByGoogleIdProvider.html":{},"injectables/UserService.html":{}}}],["userrole",{"_index":482,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{},"miscellaneous/enumerations.html":{}}}],["userrole.user",{"_index":578,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"entities/User.html":{}}}],["users",{"_index":343,"title":{},"body":{"entities/ChatRoom.html":{},"injectables/ChatRoomsService.html":{},"injectables/CreateGoogleUserProvider.html":{},"classes/GetuserParamDto.html":{},"entities/Message.html":{},"entities/User.html":{},"controllers/UserController.html":{},"injectables/UserService.html":{}}}],["users'})@get('/:id?')@get('/:id",{"_index":975,"title":{},"body":{"controllers/UserController.html":{}}}],["users/user.controller",{"_index":83,"title":{},"body":{"modules/AppModule.html":{}}}],["users/user.module",{"_index":80,"title":{},"body":{"modules/AppModule.html":{}}}],["userservice",{"_index":302,"title":{"injectables/UserService.html":{}},"body":{"injectables/AuthService.html":{},"injectables/GenerateTokensProvider.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"injectables/SignInProvider.html":{},"controllers/UserController.html":{},"modules/UserModule.html":{},"injectables/UserService.html":{},"coverage.html":{},"overview.html":{}}}],["userservice:userservice",{"_index":988,"title":{},"body":{"controllers/UserController.html":{}}}],["user})@apiresponse({status",{"_index":608,"title":{},"body":{"injectables/CreateUserProvider.html":{}}}],["using",{"_index":460,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"classes/EditUserDto.html":{},"controllers/GoogleAuthenticationController.html":{},"injectables/GoogleAuthenticationService.html":{},"injectables/RefreshTokensProvider.html":{},"index.html":{}}}],["utilities",{"_index":1168,"title":{},"body":{"index.html":{}}}],["validate",{"_index":545,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"injectables/RefreshTokensProvider.html":{}}}],["validate(confirmpassword",{"_index":565,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["validate(matchpasswordsconstraint",{"_index":574,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["validates",{"_index":561,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["validating",{"_index":878,"title":{},"body":{"injectables/RefreshTokensProvider.html":{}}}],["validation",{"_index":533,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"index.html":{}}}],["validationarguments",{"_index":550,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["validator",{"_index":551,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/EditUserDto.html":{},"classes/GetuserParamDto.html":{},"classes/GoogleTokenDto.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"classes/RefreshTokenDto.html":{},"classes/SignInDto.html":{},"dependencies.html":{},"index.html":{}}}],["validatorconstraint",{"_index":548,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["validatorconstraintinterface",{"_index":549,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["value",{"_index":577,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{},"miscellaneous/enumerations.html":{},"miscellaneous/variables.html":{}}}],["variable",{"_index":1060,"title":{},"body":{"coverage.html":{}}}],["variables",{"_index":1218,"title":{"miscellaneous/variables.html":{}},"body":{"miscellaneous/variables.html":{}}}],["verify",{"_index":769,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["version",{"_index":1214,"title":{},"body":{"properties.html":{}}}],["via",{"_index":449,"title":{},"body":{"injectables/CreateGoogleUserProvider.html":{},"entities/User.html":{},"injectables/UserService.html":{}}}],["void",{"_index":756,"title":{},"body":{"injectables/GoogleAuthenticationService.html":{}}}],["where('user.id",{"_index":437,"title":{},"body":{"injectables/ChatRoomsService.html":{}}}],["whether",{"_index":226,"title":{},"body":{"guards/AuthGuardGuard.html":{},"classes/CreateUserDto.html":{},"classes/MatchPasswordsConstraint.html":{}}}],["windows/linux",{"_index":1192,"title":{},"body":{"index.html":{}}}],["yes",{"_index":701,"title":{},"body":{"injectables/GenerateTokensProvider.html":{}}}],["z0",{"_index":522,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["z])(?=.*[0",{"_index":519,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["z])(?=.*[a",{"_index":518,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["za",{"_index":521,"title":{},"body":{"classes/CreateUserDto.html":{},"classes/CreateUserDto-1.html":{},"classes/MatchPasswordsConstraint.html":{},"classes/MatchPasswordsConstraint-1.html":{}}}],["zoom",{"_index":63,"title":{},"body":{"modules/AppModule.html":{},"modules/AuthModule.html":{},"modules/ChatroomsModule.html":{},"modules/GoogleAuthticationModule.html":{},"modules/MessagesModule.html":{},"modules/UserModule.html":{},"overview.html":{}}}]],"pipeline":["stemmer"]}, + "store": {"interfaces/ActiveUserData.html":{"url":"interfaces/ActiveUserData.html","title":"interface - ActiveUserData","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Interfaces\n \n ActiveUserData\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/interface/activeInterface.ts\n \n\n\n \n Description\n \n \n Active user data interface\n\n \n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n Optional\n \n email\n \n \n \n \n sub\n \n \n \n \n \n \n \n \n\n\n\n \n Properties\n \n \n \n \n \n email\n \n \n \n \n \n \n \n \n email: string\n\n \n \n\n\n \n \n Type : string\n\n \n \n\n \n \n Optional\n \n \n\n\n\n\n \n \n email of type:string\n\n \n \n \n \n \n \n \n \n \n sub\n \n \n \n \n \n \n \n \n sub: number\n\n \n \n\n\n \n \n Type : number\n\n \n \n\n\n\n\n\n \n \n sub of type:string\n\n \n \n \n \n \n \n\n\n \n export interface ActiveUserData {\n \n /**sub of type:string */\n sub: number,\n\n /**email of type:string */\n email?: string\n}\n \n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"controllers/AppController.html":{"url":"controllers/AppController.html","title":"controller - AppController","body":"\n \n\n\n\n\n\n\n Controllers\n AppController\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/app.controller.ts\n \n\n\n\n \n Description\n \n \n App controller class\n\n \n\n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n getHello\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n getHello\n \n \n \n \n \n \n \n getHello()\n \n \n\n \n \n Decorators : \n \n @Get()\n \n \n\n \n \n Defined in src/app.controller.ts:12\n \n \n\n\n \n \n get method\n\n\n \n Returns : string\n\n \n \n \n \n \n \n\n\n \n import { Controller, Get } from '@nestjs/common';\nimport { AppService } from './app.service';\n\n/**App controller class */\n@Controller()\nexport class AppController {\n /**constructor for the app service */\n constructor(private readonly appService: AppService) {}\n\n /**get method */\n @Get()\n getHello(): string {\n return this.appService.getHello();\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"modules/AppModule.html":{"url":"modules/AppModule.html","title":"module - AppModule","body":"\n \n\n\n\n\n Modules\n AppModule\n\n\n\n \n \n\n\n\n\n\ndependencies\n\nLegend\n\n  Declarations\n\n  Module\n\n  Bootstrap\n\n  Providers\n\n  Exports\n\ncluster_AppModule\n\n\n\ncluster_AppModule_imports\n\n\n\ncluster_AppModule_providers\n\n\n\n\nAuthModule\n\nAuthModule\n\n\n\nAppModule\n\nAppModule\n\nAppModule -->\n\nAuthModule->AppModule\n\n\n\n\n\nChatroomsModule\n\nChatroomsModule\n\nAppModule -->\n\nChatroomsModule->AppModule\n\n\n\n\n\nMessagesModule\n\nMessagesModule\n\nAppModule -->\n\nMessagesModule->AppModule\n\n\n\n\n\nUserModule\n\nUserModule\n\nAppModule -->\n\nUserModule->AppModule\n\n\n\n\n\nAppService\n\nAppService\n\nAppModule -->\n\nAppService->AppModule\n\n\n\n\n\n\n \n \n \n Zoom in\n Reset\n Zoom out\n \n\n\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n\n \n File\n \n \n src/app.module.ts\n \n\n\n\n\n\n \n \n \n Providers\n \n \n AppService\n \n \n \n \n Controllers\n \n \n AppController\n \n \n AuthController\n \n \n UserController\n \n \n \n \n Imports\n \n \n AuthModule\n \n \n ChatroomsModule\n \n \n MessagesModule\n \n \n UserModule\n \n \n \n \n \n\n\n \n\n\n \n import { Module } from '@nestjs/common';\nimport { AppController } from './app.controller';\nimport { AppService } from './app.service';\nimport { ConfigModule, ConfigService } from '@nestjs/config';\nimport appConfig from './config/app.config';\nimport databaseConfig from './config/database.config';\nimport { TypeOrmModule } from '@nestjs/typeorm';\nimport { UserModule } from './users/user.module';\nimport { AuthModule } from './auth/auth.module';\nimport { AuthController } from './auth/auth.controller';\nimport { UserController } from './users/user.controller';\nimport { APP_GUARD, APP_INTERCEPTOR } from '@nestjs/core';\nimport { AuthGuardGuard } from './auth/guard/auth-guard/auth-guard.guard';\nimport { AccessTokenGuard } from './auth/guard/access-token/access-token.guard';\nimport { MessagesModule } from './messages/messages.module';\nimport { ChatroomsModule } from './chatrooms/chatrooms.module';\n\n@Module({\n imports: [\n ConfigModule.forRoot({\n isGlobal: true,\n envFilePath: ['.env.development'],\n load: [appConfig, databaseConfig],\n }),\n TypeOrmModule.forRootAsync({\n imports: [ConfigModule],\n inject: [ConfigService],\n useFactory: (configService: ConfigService) => ({\n type: 'postgres',\n host: configService.get('database.host'),\n port: +configService.get('database.port'),\n username: configService.get('database.user'),\n password: configService.get('database.password'),\n database: configService.get('database.name'),\n blog: configService.get('database.blog'),\n synchronize: configService.get('database.synchronize'),\n autoLoadEntities: configService.get('database.autoload'),\n }),\n }),\n AuthModule,\n UserModule,\n MessagesModule,\n ChatroomsModule\n ],\n controllers: [AppController, AuthController, UserController],\n providers: [\n AppService,\n // {\n // provide: APP_GUARD,\n // useClass: AuthGuardGuard,\n // },\n // {\n // provide: APP_INTERCEPTOR,\n // useClass: DataResponseInterceptor\n // },\n // AccessTokenGuard,\n ],\n})\nexport class AppModule {}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/AppService.html":{"url":"injectables/AppService.html","title":"injectable - AppService","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n AppService\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/app.service.ts\n \n\n\n \n Description\n \n \n AppService class\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n getHello\n \n \n \n \n\n\n\n\n\n \n \n\n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n getHello\n \n \n \n \n \n \ngetHello()\n \n \n\n\n \n \n Defined in src/app.service.ts:8\n \n \n\n\n \n \n Get hello method\n\n\n \n Returns : string\n\n \n \n \n \n \n\n\n \n\n\n \n import { Injectable } from '@nestjs/common';\n/**AppService class*/\n@Injectable()\n\nexport class AppService {\n \n /**Get hello method */\n getHello(): string {\n return 'Hello';\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"controllers/AuthController.html":{"url":"controllers/AuthController.html","title":"controller - AuthController","body":"\n \n\n\n\n\n\n\n Controllers\n AuthController\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/auth.controller.ts\n \n\n \n Prefix\n \n \n auth\n \n\n\n \n Description\n \n \n Auth controller class\n\n \n\n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n \n Public\n RefreshToken\n \n \n \n \n \n \n \n \n \n \n Public\n Async\n SignIn\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n \n \n Public\n RefreshToken\n \n \n \n \n \n \n \n RefreshToken(refreshToken: RefreshTokenDto)\n \n \n\n \n \n Decorators : \n \n @Post('/refreshToken')@ApiOperation({summary: 'Refresh authentication token'})@ApiResponse({status: undefined, description: 'Token refreshed successfully'})@ApiResponse({status: undefined, description: 'Invalid refresh token'})@ApiBody({type: RefreshTokenDto})\n \n \n\n \n \n Defined in src/auth/auth.controller.ts:47\n \n \n\n\n \n \n Refresh token method\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n refreshToken\n \n RefreshTokenDto\n \n\n \n No\n \n\n\n \n \nRefresh token object\n\n\n \n \n \n \n \n \n Returns : any\n\n \n \n New access token\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n SignIn\n \n \n \n \n \n \n \n SignIn(signInDto: SignInDto)\n \n \n\n \n \n Decorators : \n \n @Post('/signIn')@Auth(authTypes.None)@HttpCode(HttpStatus.OK)@UseInterceptors(ClassSerializerInterceptor)@ApiOperation({summary: 'User sign-in'})@ApiResponse({status: undefined, description: 'User signed in successfully'})@ApiResponse({status: undefined, description: 'Invalid credentials'})@ApiBody({type: SignInDto})\n \n \n\n \n \n Defined in src/auth/auth.controller.ts:33\n \n \n\n\n \n \n Sign in method\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n signInDto\n \n SignInDto\n \n\n \n No\n \n\n\n \n \nUser credentials\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n Access token and user details\n\n \n \n \n \n \n \n\n\n \n import { Body, ClassSerializerInterceptor, Controller, HttpCode, HttpStatus, Post, UseInterceptors } from '@nestjs/common';\nimport { AuthService } from './providers/auth.service';\nimport { SignInDto } from './dtos/userDto';\nimport { authTypes } from './enums/authTypes.enum';\nimport { RefreshTokenDto } from './dtos/refreshTokenDto';\nimport { Auth } from './decorators/auth.decorator';\nimport { ApiTags, ApiOperation, ApiResponse, ApiBody } from '@nestjs/swagger';\n\n/**\n * Auth controller class\n */\n@ApiTags('Authentication')\n@Controller('auth')\nexport class AuthController {\n constructor(\n /** Injecting auth service*/ \n private readonly authservice: AuthService,\n ) {}\n\n /**\n * Sign in method\n * @param signInDto - User credentials\n * @returns Access token and user details\n */\n @Post('/signIn')\n @Auth(authTypes.None)\n @HttpCode(HttpStatus.OK)\n @UseInterceptors(ClassSerializerInterceptor)\n @ApiOperation({ summary: 'User sign-in' })\n @ApiResponse({ status: HttpStatus.OK, description: 'User signed in successfully' })\n @ApiResponse({ status: HttpStatus.UNAUTHORIZED, description: 'Invalid credentials' })\n @ApiBody({ type: SignInDto })\n public async SignIn(@Body() signInDto: SignInDto) {\n return await this.authservice.SignIn(signInDto);\n }\n\n /**\n * Refresh token method\n * @param refreshToken - Refresh token object\n * @returns New access token\n */\n @Post('/refreshToken')\n @ApiOperation({ summary: 'Refresh authentication token' })\n @ApiResponse({ status: HttpStatus.OK, description: 'Token refreshed successfully' })\n @ApiResponse({ status: HttpStatus.UNAUTHORIZED, description: 'Invalid refresh token' })\n @ApiBody({ type: RefreshTokenDto })\n public RefreshToken(@Body() refreshToken: RefreshTokenDto) {\n return this.authservice.refreshToken(refreshToken);\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"guards/AuthGuardGuard.html":{"url":"guards/AuthGuardGuard.html","title":"guard - AuthGuardGuard","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n Guards\n AuthGuardGuard\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/guard/auth-guard/auth-guard.guard.ts\n \n\n\n \n Description\n \n \n AuthGuard class implementing CanActivate\n\n \n\n\n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n Private\n Readonly\n authTypeGuardMap\n \n \n Private\n Static\n Readonly\n defaultAuthType\n \n \n \n \n\n \n \n Methods\n \n \n \n \n \n \n Async\n canActivate\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(reflector: Reflector, accessTokenGuard: AccessTokenGuard)\n \n \n \n \n Defined in src/auth/guard/auth-guard/auth-guard.guard.ts:34\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n reflector\n \n \n Reflector\n \n \n \n No\n \n \n \n \n accessTokenGuard\n \n \n AccessTokenGuard\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Async\n canActivate\n \n \n \n \n \n \n \n canActivate(context: ExecutionContext)\n \n \n\n\n \n \n Defined in src/auth/guard/auth-guard/auth-guard.guard.ts:54\n \n \n\n\n \n \n CanActivate method to get authTypes from the reflector\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n context\n \n ExecutionContext\n \n\n \n No\n \n\n\n \n \nExecution context\n\n\n \n \n \n \n \n \n Returns : Promise\n\n \n \n A boolean indicating whether the request is authorized\n\n \n \n \n \n \n\n \n\n\n \n import {\n CanActivate,\n ExecutionContext,\n Injectable,\n UnauthorizedException,\n} from '@nestjs/common';\nimport { Reflector } from '@nestjs/core';\nimport { Observable } from 'rxjs';\nimport { AccessTokenGuard } from '../access-token/access-token.guard';\nimport { authTypes } from 'src/auth/enums/authTypes.enum';\nimport { AUTH_TYPE_KEY } from 'src/auth/constants/auth.constant';\nimport { ApiTags } from '@nestjs/swagger';\n\n/**\n * AuthGuard class implementing CanActivate\n */\n@ApiTags('Auth')\n@Injectable()\nexport class AuthGuardGuard implements CanActivate {\n /**\n * Injecting default AuthType\n */\n private static readonly defaultAuthType = authTypes.Bearer;\n\n /**\n * Injecting default AuthTypeGuardMap\n */\n private readonly authTypeGuardMap: Record = {\n [authTypes.Bearer]: this.accessTokenGuard,\n [authTypes.None]: { canActivate: () => true },\n };\n\n constructor(\n /**\n * Injecting reflector\n */\n private readonly reflector: Reflector,\n\n /**\n * Injecting Access Token Guard\n */\n private readonly accessTokenGuard: AccessTokenGuard,\n ) {}\n\n /**\n * CanActivate method to get authTypes from the reflector\n * @param context - Execution context\n * @returns A boolean indicating whether the request is authorized\n * @throws UnauthorizedException if access is denied\n */\n async canActivate(context: ExecutionContext): Promise {\n // Get authTypes from the reflector\n const authTypes =\n this.reflector.getAllAndOverride(AUTH_TYPE_KEY, [\n context.getHandler(),\n context.getClass(),\n ]) ?? [AuthGuardGuard.defaultAuthType];\n\n // Get array of guards\n const guards = authTypes.map((type) => this.authTypeGuardMap[type]);\n\n // Loop through the guards and execute the canActivate method\n for (const instance of guards) {\n const canActivate = await Promise.resolve(\n instance.canActivate(context),\n ).catch((err) => {\n error: err;\n });\n\n if (canActivate) {\n return true;\n }\n }\n throw new UnauthorizedException();\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"modules/AuthModule.html":{"url":"modules/AuthModule.html","title":"module - AuthModule","body":"\n \n\n\n\n\n Modules\n AuthModule\n\n\n\n \n \n\n\n\n\n\ndependencies\n\nLegend\n\n  Declarations\n\n  Module\n\n  Bootstrap\n\n  Providers\n\n  Exports\n\ncluster_AuthModule\n\n\n\ncluster_AuthModule_providers\n\n\n\ncluster_AuthModule_exports\n\n\n\n\nAuthService \n\nAuthService \n\n\n\nHashingProvider \n\nHashingProvider \n\n\n\nAuthModule\n\nAuthModule\n\nAuthService -->\n\nAuthModule->AuthService \n\n\n\nHashingProvider -->\n\nAuthModule->HashingProvider \n\n\n\n\n\nAuthService\n\nAuthService\n\nAuthModule -->\n\nAuthService->AuthModule\n\n\n\n\n\nGenerateTokensProvider\n\nGenerateTokensProvider\n\nAuthModule -->\n\nGenerateTokensProvider->AuthModule\n\n\n\n\n\nGoogleAuthenticationService\n\nGoogleAuthenticationService\n\nAuthModule -->\n\nGoogleAuthenticationService->AuthModule\n\n\n\n\n\nRefreshTokensProvider\n\nRefreshTokensProvider\n\nAuthModule -->\n\nRefreshTokensProvider->AuthModule\n\n\n\n\n\nSignInProvider\n\nSignInProvider\n\nAuthModule -->\n\nSignInProvider->AuthModule\n\n\n\n\n\n\n \n \n \n Zoom in\n Reset\n Zoom out\n \n\n\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n\n \n File\n \n \n src/auth/auth.module.ts\n \n\n\n\n\n\n \n \n \n Providers\n \n \n AuthService\n \n \n GenerateTokensProvider\n \n \n GoogleAuthenticationService\n \n \n RefreshTokensProvider\n \n \n SignInProvider\n \n \n \n \n Controllers\n \n \n AuthController\n \n \n GoogleAuthenticationController\n \n \n \n \n Exports\n \n \n AuthService\n \n \n HashingProvider\n \n \n \n \n \n\n\n \n\n\n \n import { forwardRef, Module } from '@nestjs/common';\nimport { AuthService } from './providers/auth.service';\nimport { BcryptProvider } from './providers/bcrypt';\nimport { HashingProvider } from './providers/hashing';\nimport { SignInProvider } from './providers/sign-in.provider';\nimport { ConfigModule } from '@nestjs/config';\nimport { JwtModule } from '@nestjs/jwt';\nimport jwtConfig from 'src/auth/authConfig/jwt.config';\nimport { APP_GUARD } from '@nestjs/core';\nimport { AccessTokenGuard } from './guard/access-token/access-token.guard';\nimport { GenerateTokensProvider } from './providers/generate-tokens.provider';\nimport { RefreshTokensProvider } from './providers/refresh-tokens.provider';\nimport { UserModule } from 'src/users/user.module';\nimport { AuthController } from './auth.controller';\nimport { GoogleAuthenticationService } from './social/providers/google-authentication.service';\nimport { GoogleAuthenticationController } from './social/google-authentication.controller';\n\n@Module({\n imports: [\n forwardRef(() => UserModule),\n ConfigModule.forFeature(jwtConfig),\n JwtModule.registerAsync(jwtConfig.asProvider()),\n ],\n controllers: [AuthController, GoogleAuthenticationController],\n providers: [\n AuthService,\n {\n provide: HashingProvider, // Use the abstract class as a token\n useClass: BcryptProvider, // Bind it to the concrete implementation\n },\n SignInProvider,\n GenerateTokensProvider,\n RefreshTokensProvider,\n GoogleAuthenticationService,\n ],\n exports: [AuthService, HashingProvider],\n})\nexport class AuthModule {}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/AuthService.html":{"url":"injectables/AuthService.html","title":"injectable - AuthService","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n AuthService\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/providers/auth.service.ts\n \n\n\n \n Description\n \n \n Auth service class\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Public\n refreshToken\n \n \n Public\n Async\n SignIn\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userService: UserService, signInProvider: SignInProvider, refreshTokensProvider: RefreshTokensProvider)\n \n \n \n \n Defined in src/auth/providers/auth.service.ts:10\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n userService\n \n \n UserService\n \n \n \n No\n \n \n \n \n signInProvider\n \n \n SignInProvider\n \n \n \n No\n \n \n \n \n refreshTokensProvider\n \n \n RefreshTokensProvider\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Public\n refreshToken\n \n \n \n \n \n \n \n refreshToken(refreshTokenDto: RefreshTokenDto)\n \n \n\n\n \n \n Defined in src/auth/providers/auth.service.ts:33\n \n \n\n\n \n \n method for the refresh token\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n refreshTokenDto\n \n RefreshTokenDto\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : any\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n SignIn\n \n \n \n \n \n \n \n SignIn(signInDto: SignInDto)\n \n \n\n\n \n \n Defined in src/auth/providers/auth.service.ts:28\n \n \n\n\n \n \n signin method taking signinDto\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n signInDto\n \n SignInDto\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : unknown\n\n \n \n \n \n \n \n \n \n\n\n \n\n\n \n import { forwardRef, Inject, Injectable } from '@nestjs/common';\nimport { SignInDto } from '../dtos/userDto';\nimport { RefreshTokenDto } from '../dtos/refreshTokenDto';\nimport { UserService } from 'src/users/provider/user.service';\nimport { SignInProvider } from './sign-in.provider';\nimport { RefreshTokensProvider } from './refresh-tokens.provider';\n\n/**Auth service class */\n@Injectable()\nexport class AuthService {\n constructor(\n /* \n injecting user service\n */\n @Inject(forwardRef(() => UserService))\n private readonly userService: UserService,\n\n /*inject signInProvider*/\n private readonly signInProvider: SignInProvider,\n\n /* \n inject refreshTokenProvider\n */\n private readonly refreshTokensProvider: RefreshTokensProvider\n ) {}\n\n /**signin method taking signinDto */\n public async SignIn(signInDto: SignInDto) {\n return await this.signInProvider.SignIn(signInDto)\n }\n\n /**method for the refresh token */\n public refreshToken(refreshTokenDto: RefreshTokenDto) {\n return this.refreshTokensProvider.refreshTokens(refreshTokenDto)\n } \n\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/BcryptProvider.html":{"url":"injectables/BcryptProvider.html","title":"injectable - BcryptProvider","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n BcryptProvider\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/providers/bcrypt.ts\n \n\n\n \n Description\n \n \n injectable decorator\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Public\n Async\n comparePasswords\n \n \n Public\n Async\n hashPassword\n \n \n \n \n\n\n\n\n\n \n \n\n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Public\n Async\n comparePasswords\n \n \n \n \n \n \n \n comparePasswords(password: string, encryPassword: string)\n \n \n\n\n \n \n Defined in src/auth/providers/bcrypt.ts:18\n \n \n\n\n \n \n Comparing password method\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n password\n \n string\n \n\n \n No\n \n\n\n \n \n encryPassword\n \n string\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : Promise\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n hashPassword\n \n \n \n \n \n \n \n hashPassword(inpPassword: string | Buffer)\n \n \n\n\n \n \n Defined in src/auth/providers/bcrypt.ts:10\n \n \n\n\n \n \n Hasshing password method\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n inpPassword\n \n string | Buffer\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : Promise\n\n \n \n \n \n \n \n \n \n\n\n \n\n\n \n import { Injectable } from '@nestjs/common';\nimport { HashingProvider } from './hashing';\nimport * as bcrypt from 'bcrypt';\n\n/**injectable decorator */\n@Injectable()\n/**BcryptProvider class that implements Hashing provider */\nexport class BcryptProvider implements HashingProvider {\n /**Hasshing password method*/\n public async hashPassword(inpPassword: string | Buffer): Promise {\n const saltRounds = 10\n const salt = await bcrypt.genSalt(saltRounds)\n \n return await bcrypt.hash(inpPassword, salt) \n }\n\n /**Comparing password method */ \n public async comparePasswords(password: string, encryPassword: string): Promise {\n return await bcrypt.compare(password, encryPassword)\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"entities/ChatRoom.html":{"url":"entities/ChatRoom.html","title":"entity - ChatRoom","body":"\n \n\n\n\n\n\n\n\n Entities\n ChatRoom\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/chatrooms/chatroom.entity.ts\n \n\n\n \n Description\n \n \n chat room entity\n\n \n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n createdAt\n \n \n \n id\n \n \n \n name\n \n \n \n type\n \n \n \n \n users\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n createdAt\n \n \n \n \n \n \n Type : Date\n\n \n \n \n \n Decorators : \n \n \n @CreateDateColumn()\n \n \n \n \n \n Defined in src/chatrooms/chatroom.entity.ts:29\n \n \n\n \n \n The date the chat was created\n\n \n \n\n \n \n \n \n \n \n \n \n \n id\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @PrimaryGeneratedColumn('uuid')\n \n \n \n \n \n Defined in src/chatrooms/chatroom.entity.ts:10\n \n \n\n \n \n Unique identifier\n\n \n \n\n \n \n \n \n \n \n \n \n \n name\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @Column()\n \n \n \n \n \n Defined in src/chatrooms/chatroom.entity.ts:16\n \n \n\n \n \n name of the user.\n\n \n \n\n \n \n \n \n \n \n \n \n \n type\n \n \n \n \n \n \n Type : chatroom\n\n \n \n \n \n Decorators : \n \n \n @Column({default: 'GROUP'})\n \n \n \n \n \n Defined in src/chatrooms/chatroom.entity.ts:20\n \n \n\n \n \n Type of the chat room Private or group\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n users\n \n \n \n \n \n \n Type : User[]\n\n \n \n \n \n Decorators : \n \n \n @ManyToMany(undefined, user => user.chatRooms)@JoinTable()\n \n \n \n \n \n Defined in src/chatrooms/chatroom.entity.ts:25\n \n \n\n \n \n Many-many relationship between the user and the chat room\n\n \n \n\n \n \n\n \n\n\n \n import { User } from 'src/users/user.entitly';\nimport { Entity, PrimaryGeneratedColumn, Column, ManyToMany, CreateDateColumn, JoinTable } from 'typeorm';\nimport { chatroom } from './enums/chatroomType';\n\n/**chat room entity */\n@Entity()\nexport class ChatRoom {\n /**Unique identifier */\n @PrimaryGeneratedColumn('uuid')\n id: string;\n\n /**\n name of the user.\n */\n @Column()\n name: string;\n\n /**Type of the chat room Private or group */\n @Column({ default: 'GROUP' }) // 'private' or 'group'\n type: chatroom;\n\n /**Many-many relationship between the user and the chat room */\n @ManyToMany(() => User, (user) => user.chatRooms)\n @JoinTable()\n users: User[];\n\n /**The date the chat was created */\n @CreateDateColumn()\n createdAt: Date;\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"controllers/ChatRoomsController.html":{"url":"controllers/ChatRoomsController.html","title":"controller - ChatRoomsController","body":"\n \n\n\n\n\n\n\n Controllers\n ChatRoomsController\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/chatrooms/chatroom.controller.ts\n \n\n \n Prefix\n \n \n chatroom\n \n\n\n \n Description\n \n \n chat room Controller\n\n \n\n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n create\n \n \n \n delete\n \n \n \n findAll\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n create\n \n \n \n \n \n \n \n create(undefined)\n \n \n\n \n \n Decorators : \n \n @Post()\n \n \n\n \n \n Defined in src/chatrooms/chatroom.controller.ts:11\n \n \n\n\n \n \n chat room to create a post\n\n\n \n Parameters :\n \n \n \n \n Name\n Optional\n \n \n \n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : any\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n delete\n \n \n \n \n \n \n \n delete(id: string)\n \n \n\n \n \n Decorators : \n \n @Delete(':id')\n \n \n\n \n \n Defined in src/chatrooms/chatroom.controller.ts:23\n \n \n\n\n \n \n chat room to delete a post\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n id\n \n string\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : any\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n findAll\n \n \n \n \n \n \n \n findAll(userId: string)\n \n \n\n \n \n Decorators : \n \n @Get(':userId')\n \n \n\n \n \n Defined in src/chatrooms/chatroom.controller.ts:17\n \n \n\n\n \n \n chat room to get a single post by id\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n userId\n \n string\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : any\n\n \n \n \n \n \n \n \n \n \n\n\n \n import { Controller, Post, Get, Delete, Body, Param } from '@nestjs/common';\nimport { ChatRoomsService } from './providers/chatrooms/chatrooms.service';\n\n/**chat room Controller */\n@Controller('chatroom')\nexport class ChatRoomsController {\n constructor(private readonly chatRoomService: ChatRoomsService) {}\n\n /**chat room to create a post */\n @Post()\n create(@Body() { name, userIds, type }) {\n return this.chatRoomService.create(name, userIds, type);\n }\n\n /**chat room to get a single post by id */\n @Get(':userId')\n findAll(@Param('userId') userId: string) {\n return this.chatRoomService.findAll(userId);\n }\n\n /**chat room to delete a post */\n @Delete(':id')\n delete(@Param('id') id: string) {\n return this.chatRoomService.delete(id);\n }\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/ChatRoomsService.html":{"url":"injectables/ChatRoomsService.html","title":"injectable - ChatRoomsService","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n ChatRoomsService\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/chatrooms/providers/chatrooms/chatrooms.service.ts\n \n\n\n \n Description\n \n \n Chatroom service class\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n \n \n Async\n create\n \n \n \n \n \n Async\n delete\n \n \n \n \n Async\n findAll\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(chatRoomRepository: Repository, userRepository: Repository)\n \n \n \n \n Defined in src/chatrooms/providers/chatrooms/chatrooms.service.ts:16\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n chatRoomRepository\n \n \n Repository\n \n \n \n No\n \n \n \n \n userRepository\n \n \n Repository\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n Async\n create\n \n \n \n \n \n \n \n create(name: string, userIds: string[], type: \"private\" | \"group\")\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Create a chatroom'})@ApiResponse({status: 201, description: 'Chatroom created successfully'})@ApiResponse({status: 400, description: 'Invalid input'})\n \n \n\n \n \n Defined in src/chatrooms/providers/chatrooms/chatrooms.service.ts:39\n \n \n\n\n \n \n Create method that takes in name, userIds, and type (private or group)\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n name\n \n string\n \n\n \n No\n \n\n\n \n \nName of the chatroom\n\n\n \n \n \n userIds\n \n string[]\n \n\n \n No\n \n\n\n \n \nList of user IDs\n\n\n \n \n \n type\n \n \"private\" | \"group\"\n \n\n \n No\n \n\n\n \n \nType of chatroom (private or group)\n\n\n \n \n \n \n \n \n Returns : any\n\n \n \n Created chatroom object\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Async\n delete\n \n \n \n \n \n \n \n delete(id: string)\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Delete a chatroom'})@ApiResponse({status: 200, description: 'Chatroom deleted successfully'})@ApiResponse({status: 404, description: 'Chatroom not found'})\n \n \n\n \n \n Defined in src/chatrooms/providers/chatrooms/chatrooms.service.ts:69\n \n \n\n\n \n \n Delete chatroom by ID\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n id\n \n string\n \n\n \n No\n \n\n\n \n \nChatroom ID\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n Deletion result\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n Async\n findAll\n \n \n \n \n \n \n \n findAll(userId: string)\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Get all chatrooms for a user'})@ApiResponse({status: 200, description: 'List of chatrooms retrieved successfully'})\n \n \n\n \n \n Defined in src/chatrooms/providers/chatrooms/chatrooms.service.ts:53\n \n \n\n\n \n \n Find all chatrooms associated with a user\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n userId\n \n string\n \n\n \n No\n \n\n\n \n \nUser ID\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n List of chatrooms\n\n \n \n \n \n \n\n\n \n\n\n \n import { Injectable } from '@nestjs/common';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { ChatRoom } from 'src/chatrooms/chatroom.entity';\nimport { User } from 'src/users/user.entitly';\nimport { Repository } from 'typeorm';\nimport { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';\n\n/**\n * Chatroom service class\n */\n@Injectable()\n@ApiTags('Chat Rooms')\n/**\n * Chatroom service class\n */\nexport class ChatRoomsService {\n constructor(\n /** Injecting chatroom repository */\n @InjectRepository(ChatRoom)\n private chatRoomRepository: Repository,\n\n /** Injecting user repository */\n @InjectRepository(User)\n private userRepository: Repository,\n ) {}\n\n /**\n * Create method that takes in name, userIds, and type (private or group)\n * @param name - Name of the chatroom\n * @param userIds - List of user IDs\n * @param type - Type of chatroom (private or group)\n * @returns Created chatroom object\n */\n @ApiOperation({ summary: 'Create a chatroom' })\n @ApiResponse({ status: 201, description: 'Chatroom created successfully' })\n @ApiResponse({ status: 400, description: 'Invalid input' })\n\n /**create method */\n async create(name: string, userIds: string[], type: 'private' | 'group') {\n // const users = await this.userRepository.findByIds(userIds);\n // const chatRoom = this.chatRoomRepository.create({ name, users, type });\n // return this.chatRoomRepository.save(chatRoom);\n }\n\n /**\n * Find all chatrooms associated with a user\n * @param userId - User ID\n * @returns List of chatrooms\n */\n @ApiOperation({ summary: 'Get all chatrooms for a user' })\n @ApiResponse({ status: 200, description: 'List of chatrooms retrieved successfully' })\n /**Find all */\n async findAll(userId: string) {\n return this.chatRoomRepository\n .createQueryBuilder('room')\n .innerJoinAndSelect('room.users', 'user')\n .where('user.id = :userId', { userId })\n .getMany();\n }\n\n /**\n * Delete chatroom by ID\n * @param id - Chatroom ID\n * @returns Deletion result\n */\n @ApiOperation({ summary: 'Delete a chatroom' })\n @ApiResponse({ status: 200, description: 'Chatroom deleted successfully' })\n @ApiResponse({ status: 404, description: 'Chatroom not found' })\n async delete(id: string) {\n return this.chatRoomRepository.delete(id);\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"modules/ChatroomsModule.html":{"url":"modules/ChatroomsModule.html","title":"module - ChatroomsModule","body":"\n \n\n\n\n\n Modules\n ChatroomsModule\n\n\n\n \n \n\n\n\n\n\ndependencies\n\nLegend\n\n  Declarations\n\n  Module\n\n  Bootstrap\n\n  Providers\n\n  Exports\n\ncluster_ChatroomsModule\n\n\n\ncluster_ChatroomsModule_providers\n\n\n\n\nChatRoomsService\n\nChatRoomsService\n\n\n\nChatroomsModule\n\nChatroomsModule\n\nChatroomsModule -->\n\nChatRoomsService->ChatroomsModule\n\n\n\n\n\n\n \n \n \n Zoom in\n Reset\n Zoom out\n \n\n\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n\n \n File\n \n \n src/chatrooms/chatrooms.module.ts\n \n\n\n\n \n Description\n \n \n chatroom module\n\n \n\n\n \n \n \n Providers\n \n \n ChatRoomsService\n \n \n \n \n Controllers\n \n \n ChatRoomsController\n \n \n \n \n \n\n\n \n\n\n \n import { Module } from '@nestjs/common';\nimport { ChatRoomsService } from './providers/chatrooms/chatrooms.service';\nimport { ChatRoomsController } from './chatroom.controller';\n\n/**chatroom module */\n@Module({\n controllers: [ChatRoomsController],\n providers: [ChatRoomsService]\n})\nexport class ChatroomsModule {}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/CreateGoogleUserProvider.html":{"url":"injectables/CreateGoogleUserProvider.html","title":"injectable - CreateGoogleUserProvider","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n CreateGoogleUserProvider\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/provider/googleUserProvider.ts\n \n\n\n \n Description\n \n \n Service responsible for creating users authenticated via Google.\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n \n \n Public\n Async\n createGoogleUser\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userRepository: Repository)\n \n \n \n \n Defined in src/users/provider/googleUserProvider.ts:15\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n userRepository\n \n \n Repository\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n Public\n Async\n createGoogleUser\n \n \n \n \n \n \n \n createGoogleUser(googleUser: GoogleInterface)\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Create a Google-authenticated user'})@ApiResponse({status: 201, description: 'User successfully created.'})@ApiResponse({status: 409, description: 'Could not create a new user.'})\n \n \n\n \n \n Defined in src/users/provider/googleUserProvider.ts:35\n \n \n\n\n \n \n Creates a new user using Google authentication.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n googleUser\n \n GoogleInterface\n \n\n \n No\n \n\n\n \n \nThe Google user data.\n\n\n \n \n \n \n \n \n Returns : Promise\n\n \n \n The created user entity.\n\n \n \n \n \n \n\n\n \n\n\n \n import { ConflictException, Injectable } from '@nestjs/common';\nimport { GoogleInterface } from '../../auth/social/interfaces/user.interface';\nimport { Repository } from 'typeorm';\nimport { User } from 'src/users/user.entitly';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';\n\n/**\n * Service responsible for creating users authenticated via Google.\n */\n@ApiTags('Users')\n@Injectable()\n\n/**Create Google User Provider class */\nexport class CreateGoogleUserProvider {\n constructor(\n /**\n * Injects the user repository.\n */\n @InjectRepository(User)\n private readonly userRepository: Repository,\n ) {}\n\n /**\n * Creates a new user using Google authentication.\n * @param googleUser - The Google user data.\n * @returns The created user entity.\n * @throws ConflictException if user creation fails.\n */\n @ApiOperation({ summary: 'Create a Google-authenticated user' })\n @ApiResponse({ status: 201, description: 'User successfully created.' })\n @ApiResponse({ status: 409, description: 'Could not create a new user.' })\n\n /**Method to create GoogleUser */\n public async createGoogleUser(googleUser: GoogleInterface): Promise {\n try {\n const user = this.userRepository.create(googleUser);\n return await this.userRepository.save(user);\n } catch (error) {\n throw new ConflictException(error, {\n description: 'Could not create a new user',\n });\n }\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"classes/CreateUserDto.html":{"url":"classes/CreateUserDto.html","title":"class - CreateUserDto","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n Classes\n CreateUserDto\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/DTOs/create-user.dto.ts\n \n\n\n \n Description\n \n \n DTO for creating a user.\n\n \n\n\n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n \n \n \n Optional\n confirmpassword\n \n \n \n \n \n \n email\n \n \n \n \n \n \n firstName\n \n \n \n \n \n \n Optional\n googleId\n \n \n \n \n \n \n lastName\n \n \n \n \n \n \n Optional\n password\n \n \n \n \n \n \n Optional\n userRole\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n \n \n \n Optional\n confirmpassword\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: '@Password123', description: 'Must contain numbers, alphabets, uppercase letters, and match the password'})@IsString()@MaxLength(225)@Validate(MatchPasswordsConstraint)\n \n \n \n \n \n Defined in src/users/DTOs/create-user.dto.ts:108\n \n \n\n \n \n Confirm password field, must match the password.\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n email\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: 'fatimaaminu@mail.com', description: 'Email field'})@IsEmail()@MaxLength(150)@Column({unique: true, length: 150})\n \n \n \n \n \n Defined in src/users/DTOs/create-user.dto.ts:76\n \n \n\n \n \n Email field (must be unique).\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n firstName\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: 'Fatima', description: 'First name field'})@IsString()@IsNotEmpty()@MaxLength(100)\n \n \n \n \n \n Defined in src/users/DTOs/create-user.dto.ts:50\n \n \n\n \n \n First name of the user.\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n Optional\n googleId\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: 'poiuytrdspoiuytrewazxcvbnmml;poiuytrdsdcvbnm]', description: 'This is auto-generated from Google when you sign up with Google'})@IsString()@IsOptional()@MaxLength(225)\n \n \n \n \n \n Defined in src/users/DTOs/create-user.dto.ts:133\n \n \n\n \n \n Google ID (used for OAuth authentication).\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n lastName\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: 'Aminu', description: 'Last name field'})@IsString()@IsOptional()@MaxLength(100)\n \n \n \n \n \n Defined in src/users/DTOs/create-user.dto.ts:63\n \n \n\n \n \n Last name of the user.\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n Optional\n password\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: '@Password123', description: 'Password should contain a number, alphabets, and an uppercase letter'})@IsString()@MaxLength(225)@Matches(/^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/, {message: 'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.'})\n \n \n \n \n \n Defined in src/users/DTOs/create-user.dto.ts:95\n \n \n\n \n \n Password field with specific validation rules.\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n Optional\n userRole\n \n \n \n \n \n \n Type : userRole\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({enum: userRole, description: 'Role of the user'})@IsEnum(userRole)@IsOptional()@Transform( => )\n \n \n \n \n \n Defined in src/users/DTOs/create-user.dto.ts:120\n \n \n\n \n \n User role (default is USER if not provided).\n\n \n \n\n \n \n\n\n\n\n\n\n\n\n \n\n\n \n import { IsString, IsEmail, IsNotEmpty, IsEnum, IsOptional, Validate, MaxLength, Matches, ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments, } from 'class-validator';\nimport { ApiProperty } from '@nestjs/swagger';\nimport { Column } from 'typeorm';\nimport { userRole } from '../Enums/userRole.enum';\nimport { Transform } from 'class-transformer';\n\n/**\n * ValidatorConstraint: Custom validation class to ensure that\n * the confirmPassword field matches the password field.\n */\n@ValidatorConstraint({ name: 'MatchPasswords', async: false })\nexport class MatchPasswordsConstraint implements ValidatorConstraintInterface {\n /**\n * Validates whether the confirmPassword field matches the password field.\n * @param confirmPassword - The confirm password input.\n * @param args - Validation arguments.\n * @returns Boolean indicating if passwords match.\n */\n validate(confirmPassword: string, args: ValidationArguments): boolean {\n const object = args.object as CreateUserDto;\n if (!object.password) return false; // Ensure password is present\n return confirmPassword === object.password;\n }\n\n /**\n * Returns the default error message for password mismatch.\n * @param args - Validation arguments.\n * @returns Error message string.\n */\n defaultMessage(args: ValidationArguments): string {\n return 'Password and confirm password do not match';\n }\n}\n\n/**\n * DTO for creating a user.\n */\nexport class CreateUserDto {\n /**\n * First name of the user.\n */\n @ApiProperty({\n type: 'string',\n example: 'Fatima',\n description: 'First name field',\n })\n @IsString()\n @IsNotEmpty()\n @MaxLength(100)\n firstName: string;\n\n /**\n * Last name of the user.\n */\n @ApiProperty({\n type: 'string',\n example: 'Aminu',\n description: 'Last name field',\n })\n @IsString()\n @IsOptional()\n @MaxLength(100)\n lastName: string;\n\n /**\n * Email field (must be unique).\n */\n @ApiProperty({\n type: 'string',\n example: 'fatimaaminu@mail.com',\n description: 'Email field',\n })\n @IsEmail()\n @MaxLength(150)\n @Column({ unique: true, length: 150 })\n email: string;\n\n /**\n * Password field with specific validation rules.\n */\n @ApiProperty({\n type: 'string',\n example: '@Password123',\n description: 'Password should contain a number, alphabets, and an uppercase letter',\n })\n @IsString()\n @MaxLength(225)\n @Matches(\n /^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/,\n {\n message:\n 'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.',\n },\n )\n password?: string;\n\n /**\n * Confirm password field, must match the password.\n */\n @ApiProperty({\n type: 'string',\n example: '@Password123',\n description: 'Must contain numbers, alphabets, uppercase letters, and match the password',\n })\n @IsString()\n @MaxLength(225)\n @Validate(MatchPasswordsConstraint)\n confirmpassword?: string;\n\n /**\n * User role (default is USER if not provided).\n */\n @ApiProperty({\n enum: userRole,\n description: 'Role of the user',\n })\n @IsEnum(userRole)\n @IsOptional()\n @Transform(({ value }) => value ?? userRole.USER)\n userRole?: userRole;\n\n /**\n * Google ID (used for OAuth authentication).\n */\n @ApiProperty({\n type: 'string',\n example: 'poiuytrdspoiuytrewa\\zxcvbnmml;poiuytrdsdcvbnm]',\n description: 'This is auto-generated from Google when you sign up with Google',\n })\n @IsString()\n @IsOptional()\n @MaxLength(225)\n googleId?: string;\n}\n\n \n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"classes/CreateUserDto-1.html":{"url":"classes/CreateUserDto-1.html","title":"class - CreateUserDto-1","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n Classes\n CreateUserDto\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/guard/access-token/access-token.guard.ts\n \n\n\n \n Description\n \n \n CreateUserDto class representing the user creation request payload.\n\n \n\n\n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n \n \n \n Optional\n confirmpassword\n \n \n \n \n \n \n email\n \n \n \n \n \n \n firstName\n \n \n \n \n \n \n Optional\n googleId\n \n \n \n \n \n \n lastName\n \n \n \n \n \n \n Optional\n password\n \n \n \n \n \n \n Optional\n userRole\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n \n \n \n Optional\n confirmpassword\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: '@Password123', description: 'Password should contain numbers, alphabets, and uppercase and should be the same as the password.'})@IsString()@MaxLength(225)@Validate(MatchPasswordsConstraint)\n \n \n \n \n \n Defined in src/auth/guard/access-token/access-token.guard.ts:117\n \n \n\n \n \n Confirm password field, must match the password.\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n email\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: 'fatimaaminu@mail.com', description: 'Email field'})@IsEmail()@MaxLength(150)@Column({unique: true, length: 150})\n \n \n \n \n \n Defined in src/auth/guard/access-token/access-token.guard.ts:84\n \n \n\n \n \n Email field (must be unique).\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n firstName\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: 'Fatima', description: 'First name field'})@IsString()@IsNotEmpty()@MaxLength(100)\n \n \n \n \n \n Defined in src/auth/guard/access-token/access-token.guard.ts:58\n \n \n\n \n \n First name of the user.\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n Optional\n googleId\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: 'poiuytrdspoiuytrewazxcvbnmml;poiuytrdsdcvbnm]', description: 'This is autogenerated from Google when you sign up with Google.'})@IsString()@IsOptional()@MaxLength(225)\n \n \n \n \n \n Defined in src/auth/guard/access-token/access-token.guard.ts:143\n \n \n\n \n \n Google ID (used for OAuth authentication).\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n lastName\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: 'Aminu', description: 'Last name field'})@IsString()@IsOptional()@MaxLength(100)\n \n \n \n \n \n Defined in src/auth/guard/access-token/access-token.guard.ts:71\n \n \n\n \n \n Last name of the user.\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n Optional\n password\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({type: 'string', example: '@Password123', description: 'Password should contain numbers, alphabets, and uppercase.'})@IsString()@MaxLength(225)@Matches(/^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/, {message: 'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.'})\n \n \n \n \n \n Defined in src/auth/guard/access-token/access-token.guard.ts:103\n \n \n\n \n \n Password field with specific validation rules.\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n Optional\n userRole\n \n \n \n \n \n \n Type : userRole\n\n \n \n \n \n Decorators : \n \n \n @ApiProperty({enum: userRole, example: undefined, description: 'User role (default is USER if not provided).'})@IsEnum(userRole)@IsOptional()@Transform( => )\n \n \n \n \n \n Defined in src/auth/guard/access-token/access-token.guard.ts:130\n \n \n\n \n \n User role (default is USER if not provided).\n\n \n \n\n \n \n\n\n\n\n\n\n\n\n \n\n\n \n import {\n IsString,\n IsEmail,\n IsNotEmpty,\n IsEnum,\n IsOptional,\n Validate,\n MaxLength,\n Matches,\n ValidatorConstraint,\n ValidatorConstraintInterface,\n ValidationArguments,\n} from 'class-validator';\nimport { ApiProperty } from '@nestjs/swagger';\nimport { Column } from 'typeorm';\nimport { userRole } from '../Enums/userRole.enum';\nimport { Transform } from 'class-transformer';\n\n/**\n * ValidatorConstraint: Custom validation class to ensure that\n * the confirmPassword field matches the password field.\n */\n@ValidatorConstraint({ name: 'MatchPasswords', async: false })\n/**\n * MatchPasswordsConstraint class that implements ValidatorConstraintInterface\n */\n\n/**MatchPasswordConstraint implementing ValidatorConstraintInterface */\nclass MatchPasswordsConstraint implements ValidatorConstraintInterface {\n validate(confirmPassword: string, args: ValidationArguments): boolean {\n const object = args.object as CreateUserDto;\n\n /** Ensure password is present before checking match */\n if (!object.password) return false;\n return confirmPassword === object.password;\n }\n\n defaultMessage(args: ValidationArguments): string {\n return 'Password and confirm password do not match';\n }\n}\n\n/**\n * CreateUserDto class representing the user creation request payload.\n */\nexport class CreateUserDto {\n /**\n * First name of the user.\n */\n @ApiProperty({\n type: 'string',\n example: 'Fatima',\n description: 'First name field',\n })\n @IsString()\n @IsNotEmpty()\n @MaxLength(100)\n firstName: string;\n\n /**\n * Last name of the user.\n */\n @ApiProperty({\n type: 'string',\n example: 'Aminu',\n description: 'Last name field',\n })\n @IsString()\n @IsOptional()\n @MaxLength(100)\n lastName: string;\n\n /**\n * Email field (must be unique).\n */\n @ApiProperty({\n type: 'string',\n example: 'fatimaaminu@mail.com',\n description: 'Email field',\n })\n @IsEmail()\n @MaxLength(150)\n @Column({ unique: true, length: 150 })\n email: string;\n\n /**\n * Password field with specific validation rules.\n */\n @ApiProperty({\n type: 'string',\n example: '@Password123',\n description: 'Password should contain numbers, alphabets, and uppercase.',\n })\n @IsString()\n @MaxLength(225)\n @Matches(\n /^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/,\n {\n message:\n 'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.',\n },\n )\n password?: string;\n\n /**\n * Confirm password field, must match the password.\n */\n @ApiProperty({\n type: 'string',\n example: '@Password123',\n description:\n 'Password should contain numbers, alphabets, and uppercase and should be the same as the password.',\n })\n @IsString()\n @MaxLength(225)\n @Validate(MatchPasswordsConstraint)\n confirmpassword?: string;\n\n /**\n * User role (default is USER if not provided).\n */\n @ApiProperty({\n enum: userRole,\n example: userRole.USER,\n description: 'User role (default is USER if not provided).',\n })\n @IsEnum(userRole)\n @IsOptional()\n @Transform(({ value }) => value ?? userRole.USER)\n userRole?: userRole;\n\n /**\n * Google ID (used for OAuth authentication).\n */\n @ApiProperty({\n type: 'string',\n example: 'poiuytrdspoiuytrewa\\zxcvbnmml;poiuytrdsdcvbnm]',\n description: 'This is autogenerated from Google when you sign up with Google.',\n })\n @IsString()\n @IsOptional()\n @MaxLength(225)\n googleId?: string;\n}\n\n \n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/CreateUserProvider.html":{"url":"injectables/CreateUserProvider.html","title":"injectable - CreateUserProvider","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n CreateUserProvider\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/provider/create-user.provider.ts\n \n\n\n \n Description\n \n \n Service responsible for handling user creation\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n Public\n Async\n createUsers\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userRepository: Repository, hashingProvider: HashingProvider)\n \n \n \n \n Defined in src/users/provider/create-user.provider.ts:14\n \n \n\n \n \n Constructor to inject dependencies.\n\n \n Parameters :\n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n userRepository\n \n \n Repository\n \n \n \n No\n \n \n \n \nRepository for User entity\n\n\n \n \n \n hashingProvider\n \n \n HashingProvider\n \n \n \n No\n \n \n \n \nService for password hashing\n\n\n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n createUsers\n \n \n \n \n \n \n \n createUsers(createUserDto: CreateUserDto)\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Create a new user'})@ApiResponse({status: 201, description: 'User successfully created.', type: User})@ApiResponse({status: 400, description: 'User already exists.'})@ApiResponse({status: 408, description: 'Database connection issue.'})\n \n \n\n \n \n Defined in src/users/provider/create-user.provider.ts:40\n \n \n\n\n \n \n Creates a new user in the system\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n createUserDto\n \n CreateUserDto\n \n\n \n No\n \n\n\n \n \nDTO containing user data.\n\n\n \n \n \n \n \n \n Returns : Promise\n\n \n \n The newly created user.\n\n \n \n \n \n \n\n\n \n\n\n \n import { BadRequestException, forwardRef, Inject, Injectable, RequestTimeoutException, } from '@nestjs/common';\nimport { Repository } from 'typeorm';\nimport { User } from '../user.entitly';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { CreateUserDto } from '../DTOs/create-user.dto';\nimport { HashingProvider } from 'src/auth/providers/hashing';\nimport { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';\n\n/**\n * Service responsible for handling user creation\n */\n@ApiTags('Users')\n@Injectable()\nexport class CreateUserProvider {\n /**\n * Constructor to inject dependencies.\n * @param userRepository - Repository for User entity\n * @param hashingProvider - Service for password hashing\n */\n constructor(\n /** Inject userRepository */\n @InjectRepository(User) private userRepository: Repository,\n\n /** Inject hashingProvider */\n @Inject(forwardRef(() => HashingProvider))\n private readonly hashingProvider: HashingProvider,\n ) {}\n\n /**\n * Creates a new user in the system\n * @param createUserDto - DTO containing user data.\n * @returns The newly created user.\n * @throws BadRequestException If the user already exists.\n * @throws RequestTimeoutException If there is an issue connecting to the database.\n */\n @ApiOperation({ summary: 'Create a new user' })\n @ApiResponse({ status: 201, description: 'User successfully created.', type: User })\n @ApiResponse({ status: 400, description: 'User already exists.' })\n @ApiResponse({ status: 408, description: 'Database connection issue.' })\n public async createUsers(createUserDto: CreateUserDto): Promise {\n let existingUser = undefined;\n\n try {\n existingUser = await this.userRepository.findOne({\n where: { email: createUserDto.email },\n });\n } catch (error) {\n throw new RequestTimeoutException(\n 'Unable to process your request at the moment, Please try later',\n {\n description: 'Error connecting to your database',\n cause: 'The user is having network issues',\n },\n );\n }\n\n if (existingUser) {\n throw new BadRequestException('User already exists');\n }\n\n const hashedPassword = await this.hashingProvider.hashPassword(\n createUserDto.password,\n );\n\n const newUser = this.userRepository.create({\n ...createUserDto,\n password: hashedPassword,\n });\n\n try {\n await this.userRepository.save(newUser);\n } catch (error) {\n throw new RequestTimeoutException(\n 'Unable to process your request at the moment, Please try later',\n {\n description: 'Error connecting to your database',\n cause: 'The user is having network issues',\n },\n );\n }\n\n return newUser;\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"classes/EditUserDto.html":{"url":"classes/EditUserDto.html","title":"class - EditUserDto","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n Classes\n EditUserDto\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/DTOs/patch-user.dto.ts\n \n\n\n \n Description\n \n \n using the patch to edit part of the data, the partialtype makes everything optional\n\n \n\n \n Extends\n \n \n PartialType(CreateUserDto)\n \n\n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n \n id\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n \n id\n \n \n \n \n \n \n Type : number\n\n \n \n \n \n Decorators : \n \n \n @IsInt()@IsNotEmpty()\n \n \n \n \n \n Defined in src/users/DTOs/patch-user.dto.ts:12\n \n \n\n \n \n unique identifier id\n\n \n \n\n \n \n\n\n\n\n\n\n\n\n \n\n\n \n import { IsEmail, IsInt, IsNotEmpty, IsString } from \"class-validator\";\nimport { PartialType } from \"@nestjs/mapped-types\";\nimport { CreateUserDto } from \"./create-user.dto\";\n\n \n/**using the patch to edit part of the data, the partialtype makes everything optional */ \nexport class EditUserDto extends PartialType(CreateUserDto) {\n /**unique identifier id */\n @IsInt()\n @IsNotEmpty()\n id: number;\n}\n\n\n \n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/FindOneByEmail.html":{"url":"injectables/FindOneByEmail.html","title":"injectable - FindOneByEmail","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n FindOneByEmail\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/provider/find-one-by-email.ts\n \n\n\n \n Description\n \n \n Service responsible for finding a user by email.\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Public\n Async\n findOneByEmail\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userRepository: Repository)\n \n \n \n \n Defined in src/users/provider/find-one-by-email.ts:10\n \n \n\n \n \n Injects the User repository for database operations.\n\n \n Parameters :\n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n userRepository\n \n \n Repository\n \n \n \n No\n \n \n \n \nRepository to interact with the User entity.\n\n\n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Public\n Async\n findOneByEmail\n \n \n \n \n \n \n \n findOneByEmail(email: string)\n \n \n\n\n \n \n Defined in src/users/provider/find-one-by-email.ts:27\n \n \n\n\n \n \n Method to find a user by email.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n email\n \n string\n \n\n \n No\n \n\n\n \n \nThe email of the user to find.\n\n\n \n \n \n \n \n \n Returns : Promise\n\n \n \n The found user.\n\n \n \n \n \n \n\n\n \n\n\n \n import { Injectable, RequestTimeoutException, UnauthorizedException } from '@nestjs/common';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { Repository } from 'typeorm';\nimport { User } from '../user.entitly';\n\n/**\n Service responsible for finding a user by email.\n */\n@Injectable()\nexport class FindOneByEmail {\n /**\n Injects the User repository for database operations.\n @param {Repository} userRepository - Repository to interact with the User entity.\n */\n constructor(\n @InjectRepository(User) private userRepository: Repository) {}\n\n \n /**\n \n @param {string} email - The email of the user to find.\n @returns {Promise} The found user.\n @throws {RequestTimeoutException} If there is an issue connecting to the database.\n @throws {UnauthorizedException} If the user does not exist.\n */\n /** Method to find a user by email. */\n public async findOneByEmail(email: string): Promise {\n let user: User | undefined;\n\n try {\n user = await this.userRepository.findOneBy({ email });\n } catch (error) {\n throw new RequestTimeoutException('Could not fetch user', {\n description: 'Error connecting to database',\n });\n }\n\n if (!user) {\n throw new UnauthorizedException('User does not exist');\n }\n\n return user; \n }\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/FindOneByGoogleIdProvider.html":{"url":"injectables/FindOneByGoogleIdProvider.html","title":"injectable - FindOneByGoogleIdProvider","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n FindOneByGoogleIdProvider\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/provider/find-one-by-googleId.ts\n \n\n\n \n Description\n \n \n Service responsible for finding a user by Google ID.\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Public\n Async\n findOneByGoogleId\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userRepository: Repository)\n \n \n \n \n Defined in src/users/provider/find-one-by-googleId.ts:10\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n userRepository\n \n \n Repository\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Public\n Async\n findOneByGoogleId\n \n \n \n \n \n \n \n findOneByGoogleId(googleId: string)\n \n \n\n\n \n \n Defined in src/users/provider/find-one-by-googleId.ts:20\n \n \n\n\n \n \n Method to find a user by their Google ID.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n googleId\n \n string\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : unknown\n\n \n \n \n \n \n \n \n \n\n\n \n\n\n \n import { Injectable } from '@nestjs/common';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { Repository } from 'typeorm';\nimport { User } from '../user.entitly';\n\n/**\n Service responsible for finding a user by Google ID.\n */\n@Injectable()\nexport class FindOneByGoogleIdProvider {\n constructor(\n /*\n *inject userRepository\n */\n @InjectRepository(User)\n private userRepository: Repository,\n ) {}\n\n /** Method to find a user by their Google ID. */\n public async findOneByGoogleId(googleId: string) {\n return await this.userRepository.findOneBy({ googleId })\n }\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/GenerateTokensProvider.html":{"url":"injectables/GenerateTokensProvider.html","title":"injectable - GenerateTokensProvider","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n GenerateTokensProvider\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/providers/generate-tokens.provider.ts\n \n\n\n \n Description\n \n \n Injectable service for generating tokens.\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Public\n Async\n generateTokens\n \n \n Public\n Async\n signToken\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userService: UserService, jwtService: JwtService, jwtConfiguration: ConfigType<>)\n \n \n \n \n Defined in src/auth/providers/generate-tokens.provider.ts:13\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n userService\n \n \n UserService\n \n \n \n No\n \n \n \n \n jwtService\n \n \n JwtService\n \n \n \n No\n \n \n \n \n jwtConfiguration\n \n \n ConfigType<>\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Public\n Async\n generateTokens\n \n \n \n \n \n \n \n generateTokens(user: User)\n \n \n\n\n \n \n Defined in src/auth/providers/generate-tokens.provider.ts:60\n \n \n\n\n \n \n Generates access and refresh tokens for a given user.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n user\n \n User\n \n\n \n No\n \n\n\n \n \nThe user entity for whom tokens are generated.\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n An object containing access token, refresh token, and user details.\n\n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n signToken\n \n \n \n \n \n \n \n signToken(userId: number, expiresIn: number, payload?: T)\n \n \n\n\n \n \n Defined in src/auth/providers/generate-tokens.provider.ts:40\n \n \n\n \n \n Type parameters :\n \n T\n \n \n \n\n \n \n Signs a token with a given user ID, expiration time, and optional payload.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n userId\n \n number\n \n\n \n No\n \n\n\n \n \nThe ID of the user.\n\n\n \n \n \n expiresIn\n \n number\n \n\n \n No\n \n\n\n \n \nThe expiration time for the token.\n\n\n \n \n \n payload\n \n T\n \n\n \n Yes\n \n\n\n \n \nAdditional data to include in the token.\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n A signed JWT token.\n\n \n \n \n \n \n\n\n \n\n\n \n import { forwardRef, Inject, Injectable } from '@nestjs/common';\nimport { JwtService } from '@nestjs/jwt';\nimport jwtConfig from '../authConfig/jwt.config';\nimport { ConfigType } from '@nestjs/config';\nimport { ActiveUserData } from '../interface/activeInterface';\nimport { UserService } from 'src/users/provider/user.service';\nimport { User } from 'src/users/user.entitly';\n\n/**\n * Injectable service for generating tokens.\n */\n@Injectable()\nexport class GenerateTokensProvider {\n constructor(\n /**\n * Injecting userService repository.\n */\n @Inject(forwardRef(() => UserService))\n private readonly userService: UserService,\n\n /**\n * Injecting JwtService.\n */\n private readonly jwtService: JwtService,\n\n /**\n * Injecting jwtConfig.\n */\n @Inject(jwtConfig.KEY)\n private readonly jwtConfiguration: ConfigType,\n ) {}\n\n /**\n * Signs a token with a given user ID, expiration time, and optional payload.\n * @param userId - The ID of the user.\n * @param expiresIn - The expiration time for the token.\n * @param payload - Additional data to include in the token.\n * @returns A signed JWT token.\n */\n public async signToken(userId: number, expiresIn: number, payload?: T) {\n return await this.jwtService.signAsync(\n {\n sub: userId,\n ...payload,\n } as ActiveUserData,\n {\n secret: this.jwtConfiguration.secret,\n audience: this.jwtConfiguration.audience,\n issuer: this.jwtConfiguration.issuer,\n expiresIn,\n },\n );\n }\n\n /**\n * Generates access and refresh tokens for a given user.\n * @param user - The user entity for whom tokens are generated.\n * @returns An object containing access token, refresh token, and user details.\n */\n public async generateTokens(user: User) {\n const [accessToken, refreshToken] = await Promise.all([\n /**\n * Generate access token.\n */\n this.signToken(user.id, this.jwtConfiguration.ttl, { email: user.email }),\n\n /**\n * Generate refresh token.\n */\n this.signToken(user.id, this.jwtConfiguration.ttl),\n ]);\n\n return { accessToken, refreshToken, user };\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"classes/GetuserParamDto.html":{"url":"classes/GetuserParamDto.html","title":"class - GetuserParamDto","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n Classes\n GetuserParamDto\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/DTOs/getUserparamdto.ts\n \n\n\n \n Description\n \n \n Get users paramsdto class\n\n \n\n\n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n \n Optional\n id\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n \n Optional\n id\n \n \n \n \n \n \n Type : number\n\n \n \n \n \n Decorators : \n \n \n @IsInt()@Type(undefined)\n \n \n \n \n \n Defined in src/users/DTOs/getUserparamdto.ts:10\n \n \n\n \n \n Unique identifier id\n\n \n \n\n \n \n\n\n\n\n\n\n\n\n \n\n\n \n import { IsOptional,IsInt } from \"class-validator\";\nimport { Type } from 'class-transformer';\n\n/**Get users paramsdto class */\nexport class GetuserParamDto {\n \n /**Unique identifier id */\n @IsInt()\n @Type (() => Number )\n id?:number\n\n}\n \n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"controllers/GoogleAuthenticationController.html":{"url":"controllers/GoogleAuthenticationController.html","title":"controller - GoogleAuthenticationController","body":"\n \n\n\n\n\n\n\n Controllers\n GoogleAuthenticationController\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/social/google-authentication.controller.ts\n \n\n \n Prefix\n \n \n auth/google-authentication\n \n\n\n \n Description\n \n \n Google authentication controller\n\n \n\n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n Public\n authenticate\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n \n Public\n authenticate\n \n \n \n \n \n \n \n authenticate(googleTokenDto: GoogleTokenDto)\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Authenticate user with Google token'})@ApiResponse({status: 200, description: 'Successfully authenticated user'})@ApiResponse({status: 400, description: 'Invalid Google token'})@Post()\n \n \n\n \n \n Defined in src/auth/social/google-authentication.controller.ts:32\n \n \n\n\n \n \n Authenticates a user using Google authentication.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n googleTokenDto\n \n GoogleTokenDto\n \n\n \n No\n \n\n\n \n \nThe Google authentication token.\n\n\n \n \n \n \n \n \n Returns : any\n\n \n \n Authentication response.\n\n \n \n \n \n \n \n\n\n \n import { Body, Controller, Post } from '@nestjs/common';\nimport { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger';\nimport { GoogleAuthenticationService } from './providers/google-authentication.service';\nimport { Auth } from '../decorators/auth.decorator';\nimport { authTypes } from '../enums/authTypes.enum';\nimport { GoogleTokenDto } from './dtos/google-token.dto';\n\n/**\n * Google authentication controller\n */\n@ApiTags('Google Authentication')\n@Auth(authTypes.None)\n@Controller('auth/google-authentication')\nexport class GoogleAuthenticationController {\n /**\n * Constructor for GoogleAuthenticationController\n * @param googleAuthenticationService - Injects GoogleAuthenticationService\n */\n constructor(\n private readonly googleAuthenticationService: GoogleAuthenticationService\n ) {}\n\n /**\n * Authenticates a user using Google authentication.\n * @param googleTokenDto - The Google authentication token.\n * @returns Authentication response.\n */\n @ApiOperation({ summary: 'Authenticate user with Google token' })\n @ApiResponse({ status: 200, description: 'Successfully authenticated user' })\n @ApiResponse({ status: 400, description: 'Invalid Google token' })\n @Post()\n public authenticate(@Body() googleTokenDto: GoogleTokenDto) {\n return this.googleAuthenticationService.authenticate(googleTokenDto);\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/GoogleAuthenticationService.html":{"url":"injectables/GoogleAuthenticationService.html","title":"injectable - GoogleAuthenticationService","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n GoogleAuthenticationService\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/social/providers/google-authentication.service.ts\n \n\n\n \n Description\n \n \n Google Authentication Service\nHandles authentication using Google OAuth tokens.\n\n \n\n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n Private\n oAuthClient\n \n \n \n \n\n \n \n Methods\n \n \n \n \n \n \n Public\n Async\n authenticate\n \n \n onModuleInit\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userService: UserService, jwtConfigurattion: ConfigType<>, generateTokensProvider: GenerateTokensProvider)\n \n \n \n \n Defined in src/auth/social/providers/google-authentication.service.ts:17\n \n \n\n \n \n Constructor to inject dependencies.\n\n \n Parameters :\n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n userService\n \n \n UserService\n \n \n \n No\n \n \n \n \nService to handle user-related operations\n\n\n \n \n \n jwtConfigurattion\n \n \n ConfigType<>\n \n \n \n No\n \n \n \n \nConfiguration object for JWT\n\n\n \n \n \n generateTokensProvider\n \n \n GenerateTokensProvider\n \n \n \n No\n \n \n \n \nService to generate authentication tokens\n\n\n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Public\n Async\n authenticate\n \n \n \n \n \n \n \n authenticate(googleTokenDto: GoogleTokenDto)\n \n \n\n\n \n \n Defined in src/auth/social/providers/google-authentication.service.ts:55\n \n \n\n\n \n \n Authenticate method\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n googleTokenDto\n \n GoogleTokenDto\n \n\n \n No\n \n\n\n \n \nDTO containing the Google ID token\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n The generated authentication tokens for the user\n\n \n \n \n \n \n \n \n \n \n \n \n onModuleInit\n \n \n \n \n \n \nonModuleInit()\n \n \n\n\n \n \n Defined in src/auth/social/providers/google-authentication.service.ts:40\n \n \n\n\n \n \n\n \n Returns : void\n\n \n \n \n \n \n\n \n \n \n Properties\n \n \n \n \n \n \n \n Private\n oAuthClient\n \n \n \n \n \n \n Type : OAuth2Client\n\n \n \n \n \n Defined in src/auth/social/providers/google-authentication.service.ts:17\n \n \n\n \n \n inject oAuthClient\n\n \n \n\n \n \n\n\n \n\n\n \n import { forwardRef, Inject, Injectable, OnModuleInit, UnauthorizedException } from '@nestjs/common';\nimport { ConfigType } from '@nestjs/config';\nimport { OAuth2Client } from 'google-auth-library';\nimport jwtConfig from 'src/auth/authConfig/jwt.config';\nimport { GenerateTokensProvider } from 'src/auth/providers/generate-tokens.provider';\nimport { UserService } from 'src/users/provider/user.service';\nimport { GoogleTokenDto } from '../dtos/google-token.dto';\n\n/**\n Google Authentication Service\n Handles authentication using Google OAuth tokens.\n */\n@Injectable()\n/** OAuth2 client for handling Google authentication */\nexport class GoogleAuthenticationService implements OnModuleInit {\n /**inject oAuthClient */\n private oAuthClient: OAuth2Client;\n /**\n Constructor to inject dependencies.\n @param userService - Service to handle user-related operations\n @param jwtConfigurattion - Configuration object for JWT\n @param generateTokensProvider - Service to generate authentication tokens\n */\n constructor(\n /**\n * inject userService\n */\n @Inject(forwardRef(() => UserService))\n private readonly userService: UserService,\n\n /** Inject JWT configuration */\n @Inject(jwtConfig.KEY)\n private readonly jwtConfigurattion: ConfigType,\n /**\n inject generateTokensProvider\n */\n private readonly generateTokensProvider: GenerateTokensProvider,\n ) {}\n\n onModuleInit() {\n const client_id = this.jwtConfigurattion.googleClient_id;\n const client_secret = this.jwtConfigurattion.googleClient_secret;\n\n this.oAuthClient = new OAuth2Client(client_id, client_secret);\n }\n\n /**\n Authenticates a user using a Google token.\n @param googleTokenDto - DTO containing the Google ID token\n @returns The generated authentication tokens for the user\n @throws UnauthorizedException if authentication fails\n */\n\n /**Authenticate method */\n public async authenticate(googleTokenDto: GoogleTokenDto) {\n try {\n console.log(\"Received Token:\", googleTokenDto.token);\n\n // verify the google token sent by user\n const loginTicket = await this.oAuthClient.verifyIdToken({\n idToken: googleTokenDto.token,\n });\n\n console.log(\"Google Token Payload:\", loginTicket.getPayload());\n\n // extract the payload from google jwt token\n const {\n email,\n sub: googleId,\n given_name: firstName,\n family_name: lastName,\n } = loginTicket.getPayload();\n\n // find the user in the database using googleid\n const user = await this.userService.findOneByGoogleId(googleId);\n\n // if user exist, generate token\n if (user) {\n return this.generateTokensProvider.generateTokens(user);\n }\n // else generate the user and create the token\n const newUser = await this.userService.createGoogleUser({\n email: email,\n firstName: firstName,\n lastName: lastName,\n googleId: googleId,\n });\n return this.generateTokensProvider.generateTokens(newUser);\n } catch (error) {\n console.error(\"Google Auth Error:\", error);\n throw new UnauthorizedException('failed to authenticate with google');\n }\n // if any of the step fails, send an unauthorised exception\n }\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"modules/GoogleAuthticationModule.html":{"url":"modules/GoogleAuthticationModule.html","title":"module - GoogleAuthticationModule","body":"\n \n\n\n\n\n Modules\n GoogleAuthticationModule\n\n\n\n \n \n\n\n\n\n\ndependencies\n\nLegend\n\n  Declarations\n\n  Module\n\n  Bootstrap\n\n  Providers\n\n  Exports\n\ncluster_GoogleAuthticationModule\n\n\n\ncluster_GoogleAuthticationModule_providers\n\n\n\n\nGoogleAuthenticationService\n\nGoogleAuthenticationService\n\n\n\nGoogleAuthticationModule\n\nGoogleAuthticationModule\n\nGoogleAuthticationModule -->\n\nGoogleAuthenticationService->GoogleAuthticationModule\n\n\n\n\n\n\n \n \n \n Zoom in\n Reset\n Zoom out\n \n\n\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n\n \n File\n \n \n src/auth/social/google-authtication.module.ts\n \n\n\n\n\n\n \n \n \n Providers\n \n \n GoogleAuthenticationService\n \n \n \n \n Controllers\n \n \n GoogleAuthenticationController\n \n \n \n \n \n\n\n \n\n\n \n import { Module } from '@nestjs/common';\nimport { GoogleAuthenticationController } from './google-authentication.controller';\nimport { GoogleAuthenticationService } from './providers/google-authentication.service';\n\n@Module({\n controllers: [GoogleAuthenticationController],\n providers: [GoogleAuthenticationService]\n})\nexport class GoogleAuthticationModule {}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"interfaces/GoogleInterface.html":{"url":"interfaces/GoogleInterface.html","title":"interface - GoogleInterface","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Interfaces\n \n GoogleInterface\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/social/interfaces/user.interface.ts\n \n\n\n \n Description\n \n \n Google interface\n\n \n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n email\n \n \n \n \n firstName\n \n \n \n \n googleId\n \n \n \n \n lastName\n \n \n \n \n \n \n \n \n\n\n\n \n Properties\n \n \n \n \n \n email\n \n \n \n \n \n \n \n \n email: string\n\n \n \n\n\n \n \n Type : string\n\n \n \n\n\n\n\n\n \n \n email as string\n\n \n \n \n \n \n \n \n \n \n firstName\n \n \n \n \n \n \n \n \n firstName: string\n\n \n \n\n\n \n \n Type : string\n\n \n \n\n\n\n\n\n \n \n first name as string\n\n \n \n \n \n \n \n \n \n \n googleId\n \n \n \n \n \n \n \n \n googleId: string\n\n \n \n\n\n \n \n Type : string\n\n \n \n\n\n\n\n\n \n \n Google id as string\n\n \n \n \n \n \n \n \n \n \n lastName\n \n \n \n \n \n \n \n \n lastName: string\n\n \n \n\n\n \n \n Type : string\n\n \n \n\n\n\n\n\n \n \n last name as strig\n\n \n \n \n \n \n \n\n\n \n export interface GoogleInterface {\n /**email as string */\n email: string\n\n /**first name as string */\n firstName: string\n /**last name as strig */\n lastName: string\n /**Google id as string */\n googleId: string\n}\n \n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"classes/GoogleTokenDto.html":{"url":"classes/GoogleTokenDto.html","title":"class - GoogleTokenDto","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n Classes\n GoogleTokenDto\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/social/dtos/google-token.dto.ts\n \n\n\n \n Description\n \n \n class for GoogleTokendto\n\n \n\n\n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n token\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n token\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @IsNotEmpty()\n \n \n \n \n \n Defined in src/auth/social/dtos/google-token.dto.ts:8\n \n \n\n \n \n The Token of type string\n\n \n \n\n \n \n\n\n\n\n\n\n\n\n \n\n\n \n import {IsNotEmpty} from 'class-validator'\n\n/**class for GoogleTokendto */\nexport class GoogleTokenDto {\n\n /**The Token of type string */\n @IsNotEmpty()\n token: string\n}\n \n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/HashingProvider.html":{"url":"injectables/HashingProvider.html","title":"injectable - HashingProvider","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n HashingProvider\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/providers/hashing.ts\n \n\n\n \n Description\n \n \n Hasing provider abstract class\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Abstract\n comparePasswords\n \n \n Abstract\n hashPassword\n \n \n \n \n\n\n\n\n\n \n \n\n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Abstract\n comparePasswords\n \n \n \n \n \n \n \n comparePasswords(password: string, encryPassword: string)\n \n \n\n\n \n \n Defined in src/auth/providers/hashing.ts:10\n \n \n\n\n \n \n comparison during signIn\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n password\n \n string\n \n\n \n No\n \n\n\n \n \n encryPassword\n \n string\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : Promise\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Abstract\n hashPassword\n \n \n \n \n \n \n \n hashPassword(inpPassword: string | Buffer)\n \n \n\n\n \n \n Defined in src/auth/providers/hashing.ts:7\n \n \n\n\n \n \n hashing during signUp\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n inpPassword\n \n string | Buffer\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : Promise\n\n \n \n \n \n \n \n \n \n\n\n \n\n\n \n import { Injectable } from '@nestjs/common';\n\n/**Hasing provider abstract class */\n@Injectable()\nexport abstract class HashingProvider {\n /**hashing during signUp */ \n abstract hashPassword(inpPassword: string | Buffer): Promise\n\n /**comparison during signIn */ \n abstract comparePasswords(password: string, encryPassword: string): Promise\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"classes/MatchPasswordsConstraint.html":{"url":"classes/MatchPasswordsConstraint.html","title":"class - MatchPasswordsConstraint","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n Classes\n MatchPasswordsConstraint\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/DTOs/create-user.dto.ts\n \n\n\n \n Description\n \n \n ValidatorConstraint: Custom validation class to ensure that\nthe confirmPassword field matches the password field.\n\n \n\n\n \n Implements\n \n \n ValidatorConstraintInterface\n \n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n defaultMessage\n \n \n validate\n \n \n \n \n\n\n\n\n\n \n \n\n\n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n defaultMessage\n \n \n \n \n \n \ndefaultMessage(args: ValidationArguments)\n \n \n\n\n \n \n Defined in src/users/DTOs/create-user.dto.ts:30\n \n \n\n\n \n \n Returns the default error message for password mismatch.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n args\n \n ValidationArguments\n \n\n \n No\n \n\n\n \n \nValidation arguments.\n\n\n \n \n \n \n \n \n Returns : string\n\n \n \n Error message string.\n\n \n \n \n \n \n \n \n \n \n \n \n validate\n \n \n \n \n \n \nvalidate(confirmPassword: string, args: ValidationArguments)\n \n \n\n\n \n \n Defined in src/users/DTOs/create-user.dto.ts:19\n \n \n\n\n \n \n Validates whether the confirmPassword field matches the password field.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n confirmPassword\n \n string\n \n\n \n No\n \n\n\n \n \nThe confirm password input.\n\n\n \n \n \n args\n \n ValidationArguments\n \n\n \n No\n \n\n\n \n \nValidation arguments.\n\n\n \n \n \n \n \n \n Returns : boolean\n\n \n \n Boolean indicating if passwords match.\n\n \n \n \n \n \n\n\n\n\n\n\n \n\n\n \n import { IsString, IsEmail, IsNotEmpty, IsEnum, IsOptional, Validate, MaxLength, Matches, ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments, } from 'class-validator';\nimport { ApiProperty } from '@nestjs/swagger';\nimport { Column } from 'typeorm';\nimport { userRole } from '../Enums/userRole.enum';\nimport { Transform } from 'class-transformer';\n\n/**\n * ValidatorConstraint: Custom validation class to ensure that\n * the confirmPassword field matches the password field.\n */\n@ValidatorConstraint({ name: 'MatchPasswords', async: false })\nexport class MatchPasswordsConstraint implements ValidatorConstraintInterface {\n /**\n * Validates whether the confirmPassword field matches the password field.\n * @param confirmPassword - The confirm password input.\n * @param args - Validation arguments.\n * @returns Boolean indicating if passwords match.\n */\n validate(confirmPassword: string, args: ValidationArguments): boolean {\n const object = args.object as CreateUserDto;\n if (!object.password) return false; // Ensure password is present\n return confirmPassword === object.password;\n }\n\n /**\n * Returns the default error message for password mismatch.\n * @param args - Validation arguments.\n * @returns Error message string.\n */\n defaultMessage(args: ValidationArguments): string {\n return 'Password and confirm password do not match';\n }\n}\n\n/**\n * DTO for creating a user.\n */\nexport class CreateUserDto {\n /**\n * First name of the user.\n */\n @ApiProperty({\n type: 'string',\n example: 'Fatima',\n description: 'First name field',\n })\n @IsString()\n @IsNotEmpty()\n @MaxLength(100)\n firstName: string;\n\n /**\n * Last name of the user.\n */\n @ApiProperty({\n type: 'string',\n example: 'Aminu',\n description: 'Last name field',\n })\n @IsString()\n @IsOptional()\n @MaxLength(100)\n lastName: string;\n\n /**\n * Email field (must be unique).\n */\n @ApiProperty({\n type: 'string',\n example: 'fatimaaminu@mail.com',\n description: 'Email field',\n })\n @IsEmail()\n @MaxLength(150)\n @Column({ unique: true, length: 150 })\n email: string;\n\n /**\n * Password field with specific validation rules.\n */\n @ApiProperty({\n type: 'string',\n example: '@Password123',\n description: 'Password should contain a number, alphabets, and an uppercase letter',\n })\n @IsString()\n @MaxLength(225)\n @Matches(\n /^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/,\n {\n message:\n 'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.',\n },\n )\n password?: string;\n\n /**\n * Confirm password field, must match the password.\n */\n @ApiProperty({\n type: 'string',\n example: '@Password123',\n description: 'Must contain numbers, alphabets, uppercase letters, and match the password',\n })\n @IsString()\n @MaxLength(225)\n @Validate(MatchPasswordsConstraint)\n confirmpassword?: string;\n\n /**\n * User role (default is USER if not provided).\n */\n @ApiProperty({\n enum: userRole,\n description: 'Role of the user',\n })\n @IsEnum(userRole)\n @IsOptional()\n @Transform(({ value }) => value ?? userRole.USER)\n userRole?: userRole;\n\n /**\n * Google ID (used for OAuth authentication).\n */\n @ApiProperty({\n type: 'string',\n example: 'poiuytrdspoiuytrewa\\zxcvbnmml;poiuytrdsdcvbnm]',\n description: 'This is auto-generated from Google when you sign up with Google',\n })\n @IsString()\n @IsOptional()\n @MaxLength(225)\n googleId?: string;\n}\n\n \n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"classes/MatchPasswordsConstraint-1.html":{"url":"classes/MatchPasswordsConstraint-1.html","title":"class - MatchPasswordsConstraint-1","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n Classes\n MatchPasswordsConstraint\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/guard/access-token/access-token.guard.ts\n \n\n\n \n Description\n \n \n ValidatorConstraint: Custom validation class to ensure that\nthe confirmPassword field matches the password field.\n\n \n\n\n \n Implements\n \n \n ValidatorConstraintInterface\n \n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n defaultMessage\n \n \n validate\n \n \n \n \n\n\n\n\n\n \n \n\n\n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n defaultMessage\n \n \n \n \n \n \ndefaultMessage(args: ValidationArguments)\n \n \n\n\n \n \n Defined in src/auth/guard/access-token/access-token.guard.ts:38\n \n \n\n\n \n \n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n args\n \n ValidationArguments\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : string\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n validate\n \n \n \n \n \n \nvalidate(confirmPassword: string, args: ValidationArguments)\n \n \n\n\n \n \n Defined in src/auth/guard/access-token/access-token.guard.ts:30\n \n \n\n\n \n \n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n confirmPassword\n \n string\n \n\n \n No\n \n\n\n \n \n args\n \n ValidationArguments\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : boolean\n\n \n \n \n \n \n \n \n \n\n\n\n\n\n\n \n\n\n \n import {\n IsString,\n IsEmail,\n IsNotEmpty,\n IsEnum,\n IsOptional,\n Validate,\n MaxLength,\n Matches,\n ValidatorConstraint,\n ValidatorConstraintInterface,\n ValidationArguments,\n} from 'class-validator';\nimport { ApiProperty } from '@nestjs/swagger';\nimport { Column } from 'typeorm';\nimport { userRole } from '../Enums/userRole.enum';\nimport { Transform } from 'class-transformer';\n\n/**\n * ValidatorConstraint: Custom validation class to ensure that\n * the confirmPassword field matches the password field.\n */\n@ValidatorConstraint({ name: 'MatchPasswords', async: false })\n/**\n * MatchPasswordsConstraint class that implements ValidatorConstraintInterface\n */\n\n/**MatchPasswordConstraint implementing ValidatorConstraintInterface */\nclass MatchPasswordsConstraint implements ValidatorConstraintInterface {\n validate(confirmPassword: string, args: ValidationArguments): boolean {\n const object = args.object as CreateUserDto;\n\n /** Ensure password is present before checking match */\n if (!object.password) return false;\n return confirmPassword === object.password;\n }\n\n defaultMessage(args: ValidationArguments): string {\n return 'Password and confirm password do not match';\n }\n}\n\n/**\n * CreateUserDto class representing the user creation request payload.\n */\nexport class CreateUserDto {\n /**\n * First name of the user.\n */\n @ApiProperty({\n type: 'string',\n example: 'Fatima',\n description: 'First name field',\n })\n @IsString()\n @IsNotEmpty()\n @MaxLength(100)\n firstName: string;\n\n /**\n * Last name of the user.\n */\n @ApiProperty({\n type: 'string',\n example: 'Aminu',\n description: 'Last name field',\n })\n @IsString()\n @IsOptional()\n @MaxLength(100)\n lastName: string;\n\n /**\n * Email field (must be unique).\n */\n @ApiProperty({\n type: 'string',\n example: 'fatimaaminu@mail.com',\n description: 'Email field',\n })\n @IsEmail()\n @MaxLength(150)\n @Column({ unique: true, length: 150 })\n email: string;\n\n /**\n * Password field with specific validation rules.\n */\n @ApiProperty({\n type: 'string',\n example: '@Password123',\n description: 'Password should contain numbers, alphabets, and uppercase.',\n })\n @IsString()\n @MaxLength(225)\n @Matches(\n /^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/,\n {\n message:\n 'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.',\n },\n )\n password?: string;\n\n /**\n * Confirm password field, must match the password.\n */\n @ApiProperty({\n type: 'string',\n example: '@Password123',\n description:\n 'Password should contain numbers, alphabets, and uppercase and should be the same as the password.',\n })\n @IsString()\n @MaxLength(225)\n @Validate(MatchPasswordsConstraint)\n confirmpassword?: string;\n\n /**\n * User role (default is USER if not provided).\n */\n @ApiProperty({\n enum: userRole,\n example: userRole.USER,\n description: 'User role (default is USER if not provided).',\n })\n @IsEnum(userRole)\n @IsOptional()\n @Transform(({ value }) => value ?? userRole.USER)\n userRole?: userRole;\n\n /**\n * Google ID (used for OAuth authentication).\n */\n @ApiProperty({\n type: 'string',\n example: 'poiuytrdspoiuytrewa\\zxcvbnmml;poiuytrdsdcvbnm]',\n description: 'This is autogenerated from Google when you sign up with Google.',\n })\n @IsString()\n @IsOptional()\n @MaxLength(225)\n googleId?: string;\n}\n\n \n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"entities/Message.html":{"url":"entities/Message.html","title":"entity - Message","body":"\n \n\n\n\n\n\n\n\n Entities\n Message\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/messages/message.entity.ts\n \n\n\n \n Description\n \n \n Message entity representing the user table in the database.\n\n \n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n chatRoom\n \n \n \n id\n \n \n \n sender\n \n \n \n text\n \n \n \n timestamp\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n chatRoom\n \n \n \n \n \n \n Type : ChatRoom\n\n \n \n \n \n Decorators : \n \n \n @ManyToOne(undefined, chatRoom => chatRoom.id)\n \n \n \n \n \n Defined in src/messages/message.entity.ts:16\n \n \n\n \n \n Many-to-one relationship between chatroom and messages\n\n \n \n\n \n \n \n \n \n \n \n \n \n id\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @PrimaryGeneratedColumn()\n \n \n \n \n \n Defined in src/messages/message.entity.ts:12\n \n \n\n \n \n unique identifier\n\n \n \n\n \n \n \n \n \n \n \n \n \n sender\n \n \n \n \n \n \n Type : User\n\n \n \n \n \n Decorators : \n \n \n @ManyToOne(undefined, user => user.id)\n \n \n \n \n \n Defined in src/messages/message.entity.ts:20\n \n \n\n \n \n Many-to-one relationship between users and messages\n\n \n \n\n \n \n \n \n \n \n \n \n \n text\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @Column()\n \n \n \n \n \n Defined in src/messages/message.entity.ts:24\n \n \n\n \n \n The text entered by the user\n\n \n \n\n \n \n \n \n \n \n \n \n \n timestamp\n \n \n \n \n \n \n Type : Date\n\n \n \n \n \n Decorators : \n \n \n @CreateDateColumn()\n \n \n \n \n \n Defined in src/messages/message.entity.ts:28\n \n \n\n \n \n time stamp of the user.\n\n \n \n\n \n \n\n \n\n\n \n import { ChatRoom } from 'src/chatrooms/chatroom.entity';\nimport { User } from 'src/users/user.entitly';\nimport { Entity, PrimaryGeneratedColumn, Column, ManyToOne, CreateDateColumn } from 'typeorm';\n\n/**\n Message entity representing the user table in the database.\n */\n@Entity()\nexport class Message {\n /**unique identifier */\n @PrimaryGeneratedColumn()\n id: string;\n\n /**Many-to-one relationship between chatroom and messages */\n @ManyToOne(() => ChatRoom, (chatRoom) => chatRoom.id)\n chatRoom: ChatRoom;\n\n /**Many-to-one relationship between users and messages */\n @ManyToOne(() => User, (user) => user.id)\n sender: User;\n\n /**The text entered by the user */\n @Column()\n text: string;\n\n /** time stamp of the user.*/\n @CreateDateColumn()\n timestamp: Date;\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"controllers/MessagesController.html":{"url":"controllers/MessagesController.html","title":"controller - MessagesController","body":"\n \n\n\n\n\n\n\n Controllers\n MessagesController\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/messages/messages.controller.ts\n \n\n \n Prefix\n \n \n messages\n \n\n\n \n Description\n \n \n Controller for managing messages-related operations.\n\n \n\n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n getMessages\n \n \n \n sendMessage\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n getMessages\n \n \n \n \n \n \n \n getMessages(chatRoomId: string)\n \n \n\n \n \n Decorators : \n \n @Get(':chatRoomId')\n \n \n\n \n \n Defined in src/messages/messages.controller.ts:19\n \n \n\n\n \n \n Get messages method based on chat id\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n chatRoomId\n \n string\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : any\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n sendMessage\n \n \n \n \n \n \n \n sendMessage(undefined)\n \n \n\n \n \n Decorators : \n \n @Post()\n \n \n\n \n \n Defined in src/messages/messages.controller.ts:13\n \n \n\n\n \n \n Send message method\n\n\n \n Parameters :\n \n \n \n \n Name\n Optional\n \n \n \n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : any\n\n \n \n \n \n \n \n \n \n \n\n\n \n import { Controller, Post, Get, Body, Param } from '@nestjs/common';\nimport { MessagesService } from './providers/messages/messages.service';\n\n/**\n Controller for managing messages-related operations.\n */\n@Controller('messages')\nexport class MessagesController {\n constructor(private readonly messageService: MessagesService) {}\n\n /**Send message method */\n @Post()\n sendMessage(@Body() { chatRoomId, senderId, text }) {\n return this.messageService.sendMessage(chatRoomId, senderId, text);\n }\n\n /**Get messages method based on chat id */\n @Get(':chatRoomId')\n getMessages(@Param('chatRoomId') chatRoomId: string) {\n return this.messageService.getMessages(chatRoomId);\n }\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"modules/MessagesModule.html":{"url":"modules/MessagesModule.html","title":"module - MessagesModule","body":"\n \n\n\n\n\n Modules\n MessagesModule\n\n\n\n \n \n\n\n\n\n\ndependencies\n\nLegend\n\n  Declarations\n\n  Module\n\n  Bootstrap\n\n  Providers\n\n  Exports\n\ncluster_MessagesModule\n\n\n\ncluster_MessagesModule_providers\n\n\n\n\nMessagesService\n\nMessagesService\n\n\n\nMessagesModule\n\nMessagesModule\n\nMessagesModule -->\n\nMessagesService->MessagesModule\n\n\n\n\n\n\n \n \n \n Zoom in\n Reset\n Zoom out\n \n\n\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n\n \n File\n \n \n src/messages/messages.module.ts\n \n\n\n\n \n Description\n \n \n Message module\n\n \n\n\n \n \n \n Providers\n \n \n MessagesService\n \n \n \n \n Controllers\n \n \n MessagesController\n \n \n \n \n \n\n\n \n\n\n \n import { Module } from '@nestjs/common';\nimport { MessagesController } from './messages.controller';\nimport { MessagesService } from './providers/messages/messages.service';\n\n/**Message module */\n@Module({\n controllers: [MessagesController],\n providers: [MessagesService]\n})\nexport class MessagesModule {}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/MessagesService.html":{"url":"injectables/MessagesService.html","title":"injectable - MessagesService","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n MessagesService\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/messages/providers/messages/messages.service.ts\n \n\n\n \n Description\n \n \n Message service class\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Async\n getMessages\n \n \n Async\n sendMessage\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(messageRepo: Repository)\n \n \n \n \n Defined in src/messages/providers/messages/messages.service.ts:8\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n messageRepo\n \n \n Repository\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Async\n getMessages\n \n \n \n \n \n \n \n getMessages(chatRoomId: string)\n \n \n\n\n \n \n Defined in src/messages/providers/messages/messages.service.ts:20\n \n \n\n\n \n \n get messages method\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n chatRoomId\n \n string\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : unknown\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Async\n sendMessage\n \n \n \n \n \n \n \n sendMessage(chatRoomId: string, senderId: string, text: string)\n \n \n\n\n \n \n Defined in src/messages/providers/messages/messages.service.ts:14\n \n \n\n\n \n \n method for sending message takes in chatroom id, sender id and text as parameter\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n chatRoomId\n \n string\n \n\n \n No\n \n\n\n \n \n senderId\n \n string\n \n\n \n No\n \n\n\n \n \n text\n \n string\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : any\n\n \n \n \n \n \n \n \n \n\n\n \n\n\n \n import { Injectable } from '@nestjs/common';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { Message } from 'src/messages/message.entity';\nimport { Repository } from 'typeorm';\n\n/**Message service class */\n@Injectable()\nexport class MessagesService {\n constructor(\n /**injecting message repo */\n @InjectRepository(Message) private messageRepo: Repository) {}\n\n /**method for sending message takes in chatroom id, sender id and text as parameter */\n async sendMessage(chatRoomId: string, senderId: string, text: string) {\n // const message = this.messageRepo.create({ chatRoom: { id: chatRoomId }, sender: { id: senderId }, text });\n // return this.messageRepo.save(message);\n }\n\n /**get messages method */\n async getMessages(chatRoomId: string) {\n return this.messageRepo.find({ where: { chatRoom: { id: chatRoomId } }, relations: ['sender'] });\n }\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"classes/RefreshTokenDto.html":{"url":"classes/RefreshTokenDto.html","title":"class - RefreshTokenDto","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n Classes\n RefreshTokenDto\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/dtos/refreshTokenDto.ts\n \n\n\n \n Description\n \n \n refresh tokendto class\n\n \n\n\n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n \n refreshToken\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n \n refreshToken\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @IsString()@IsNotEmpty()\n \n \n \n \n \n Defined in src/auth/dtos/refreshTokenDto.ts:9\n \n \n\n \n \n refreshToken of type string\n\n \n \n\n \n \n\n\n\n\n\n\n\n\n \n\n\n \n import { IsNotEmpty, IsString, } from \"class-validator\";\n\n/**refresh tokendto class */\nexport class RefreshTokenDto {\n\n /**refreshToken of type string */\n @IsString()\n @IsNotEmpty()\n refreshToken: string\n}\n \n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/RefreshTokensProvider.html":{"url":"injectables/RefreshTokensProvider.html","title":"injectable - RefreshTokensProvider","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n RefreshTokensProvider\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/providers/refresh-tokens.provider.ts\n \n\n\n \n Description\n \n \n Refresh token provider class\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Public\n Async\n refreshTokens\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userService: UserService, jwtService: JwtService, jwtConfiguration: ConfigType<>, generateTokenProvider: GenerateTokensProvider)\n \n \n \n \n Defined in src/auth/providers/refresh-tokens.provider.ts:11\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n userService\n \n \n UserService\n \n \n \n No\n \n \n \n \n jwtService\n \n \n JwtService\n \n \n \n No\n \n \n \n \n jwtConfiguration\n \n \n ConfigType<>\n \n \n \n No\n \n \n \n \n generateTokenProvider\n \n \n GenerateTokensProvider\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Public\n Async\n refreshTokens\n \n \n \n \n \n \n \n refreshTokens(refreshTokenDto: RefreshTokenDto)\n \n \n\n\n \n \n Defined in src/auth/providers/refresh-tokens.provider.ts:37\n \n \n\n\n \n \n A method for validating refresh token\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n refreshTokenDto\n \n RefreshTokenDto\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : unknown\n\n \n \n \n \n \n \n \n \n\n\n \n\n\n \n import { forwardRef, Inject, Injectable } from '@nestjs/common';\nimport { RefreshTokenDto } from '../dtos/refreshTokenDto';\nimport { JwtService } from '@nestjs/jwt';\nimport { ConfigType } from '@nestjs/config';\nimport jwtConfig from '../authConfig/jwt.config';\nimport { GenerateTokensProvider } from './generate-tokens.provider';\nimport { UserService } from 'src/users/provider/user.service';\n\n/**Refresh token provider class */\n@Injectable()\nexport class RefreshTokensProvider {\n constructor(\n /*\n injecting userService repo\n */\n @Inject(forwardRef(() => UserService))\n private readonly userService: UserService,\n\n /*\n inject jwtService\n */\n private readonly jwtService: JwtService,\n\n /*\n inject jwtService\n */\n @Inject(jwtConfig.KEY)\n private readonly jwtConfiguration: ConfigType,\n\n /* \n inject generateTokenProvider\n */\n private readonly generateTokenProvider: GenerateTokensProvider\n ) {}\n\n /**A method for validating refresh token */\n public async refreshTokens(refreshTokenDto: RefreshTokenDto) {\n // validate the refresh token using jwt\n const { sub } = await this.jwtService.verifyAsync(\n refreshTokenDto.refreshToken, \n {\n secret: this.jwtConfiguration.secret,\n audience: this.jwtConfiguration.audience,\n issuer: this.jwtConfiguration.issuer,\n })\n\n // grab the user from the database\n const user = await this.userService.FindOneById(sub)\n\n // generate the token\n return await this.generateTokenProvider.generateTokens(user)\n }\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"classes/SignInDto.html":{"url":"classes/SignInDto.html","title":"class - SignInDto","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n Classes\n SignInDto\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/dtos/userDto.ts\n \n\n\n \n Description\n \n \n signinDto class\n\n \n\n\n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n \n email\n \n \n \n \n password\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n \n email\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @IsEmail()@IsNotEmpty()\n \n \n \n \n \n Defined in src/auth/dtos/userDto.ts:8\n \n \n\n \n \n A unique email address of the user example:Rukky@gmail.com\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n password\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @IsString()@IsNotEmpty()\n \n \n \n \n \n Defined in src/auth/dtos/userDto.ts:13\n \n \n\n \n \n password of the user\n\n \n \n\n \n \n\n\n\n\n\n\n\n\n \n\n\n \n import { IsEmail, IsNotEmpty, IsString } from \"class-validator\";\n\n/**signinDto class */\nexport class SignInDto {\n /**A unique email address of the user example:Rukky@gmail.com */\n @IsEmail()\n @IsNotEmpty()\n email: string;\n\n /**password of the user */\n @IsString()\n @IsNotEmpty()\n password: string;\n}\n \n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/SignInProvider.html":{"url":"injectables/SignInProvider.html","title":"injectable - SignInProvider","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n SignInProvider\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/auth/providers/sign-in.provider.ts\n \n\n\n \n Description\n \n \n Sign in provider class\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Public\n Async\n SignIn\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userService: UserService, hashingProvider: HashingProvider, generateTokenProvider: GenerateTokensProvider)\n \n \n \n \n Defined in src/auth/providers/sign-in.provider.ts:9\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n userService\n \n \n UserService\n \n \n \n No\n \n \n \n \n hashingProvider\n \n \n HashingProvider\n \n \n \n No\n \n \n \n \n generateTokenProvider\n \n \n GenerateTokensProvider\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Public\n Async\n SignIn\n \n \n \n \n \n \n \n SignIn(signInDto: SignInDto)\n \n \n\n\n \n \n Defined in src/auth/providers/sign-in.provider.ts:28\n \n \n\n\n \n \n A method to check if user exist in db\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n \n \n \n \n signInDto\n \n SignInDto\n \n\n \n No\n \n\n\n \n \n \n \n \n Returns : unknown\n\n \n \n \n \n \n \n \n \n\n\n \n\n\n \n import { forwardRef, Inject, Injectable, RequestTimeoutException, UnauthorizedException } from '@nestjs/common';\nimport { SignInDto } from '../dtos/userDto';\nimport { HashingProvider } from './hashing';\nimport { GenerateTokensProvider } from './generate-tokens.provider';\nimport { UserService } from 'src/users/provider/user.service';\n\n/**Sign in provider class */\n@Injectable()\nexport class SignInProvider {\n constructor(\n /* \n injecting userService repo\n */\n @Inject(forwardRef(() => UserService))\n private readonly userService: UserService,\n\n /* \n injecting hashing dependency\n */\n private readonly hashingProvider: HashingProvider,\n \n /* \n injecting generateTokenProvider\n */\n private readonly generateTokenProvider: GenerateTokensProvider\n ){}\n /**A method to check if user exist in db */\n public async SignIn(signInDto: SignInDto) {\n // check if user exist in db\n // throw error if user doesnt exist\n let user = await this.userService.GetOneByEmail(signInDto.email)\n\n if (!user) {\n throw new UnauthorizedException('email or password is incorrect');\n }\n \n /**conpare password */\n let isCheckedPassword: boolean = false\n\n try {\n isCheckedPassword = await this.hashingProvider.comparePasswords(signInDto.password, user.password)\n } catch (error) {\n throw new RequestTimeoutException(error, {\n description: 'error connecting to the database'\n })\n }\n\n if (!isCheckedPassword) {\n throw new UnauthorizedException('email or password is incorrect')\n }\n // login\n return await this.generateTokenProvider.generateTokens(user)\n }\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"entities/User.html":{"url":"entities/User.html","title":"entity - User","body":"\n \n\n\n\n\n\n\n\n Entities\n User\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/user.entitly.ts\n \n\n\n \n Description\n \n \n User entity representing the user table in the database.\n\n \n\n\n \n Index\n \n \n \n \n Properties\n \n \n \n \n \n \n \n \n chatRooms\n \n \n \n email\n \n \n \n firstName\n \n \n \n Optional\n googleId\n \n \n \n id\n \n \n \n lastName\n \n \n \n messages\n \n \n \n Optional\n password\n \n \n \n Optional\n userRole\n \n \n \n \n\n\n\n\n\n\n \n \n\n\n \n \n \n Properties\n \n \n \n \n \n \n \n \n \n chatRooms\n \n \n \n \n \n \n Type : ChatRoom[]\n\n \n \n \n \n Decorators : \n \n \n @ManyToMany(undefined, chatRoom => chatRoom.users)@JoinTable()\n \n \n \n \n \n Defined in src/users/user.entitly.ts:68\n \n \n\n \n \n Many-to-Many relationship between users and chat rooms.\nThis allows a user to be part of multiple chat rooms.\n\n \n \n\n \n \n \n \n \n \n \n \n \n email\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @Column('varchar', {unique: true, nullable: false})\n \n \n \n \n \n Defined in src/users/user.entitly.ts:38\n \n \n\n \n \n Unique email address of the user.\nExample :\n \n \n\n \n \n \n \n \n \n \n \n \n firstName\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @Column('varchar', {length: 100, nullable: false})\n \n \n \n \n \n Defined in src/users/user.entitly.ts:24\n \n \n\n \n \n First name of the user.\nExample :\n \n \n\n \n \n \n \n \n \n \n \n \n Optional\n googleId\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @Column('varchar', {length: 225, nullable: true})\n \n \n \n \n \n Defined in src/users/user.entitly.ts:60\n \n \n\n \n \n Example :\n \n \n\n \n \n \n \n \n \n \n \n \n id\n \n \n \n \n \n \n Type : number\n\n \n \n \n \n Decorators : \n \n \n @PrimaryGeneratedColumn()\n \n \n \n \n \n Defined in src/users/user.entitly.ts:17\n \n \n\n \n \n Unique identifier for the user.\nExample :\n \n \n\n \n \n \n \n \n \n \n \n \n lastName\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @Column('varchar', {length: 100})\n \n \n \n \n \n Defined in src/users/user.entitly.ts:31\n \n \n\n \n \n Last name of the user.\nExample :\n \n \n\n \n \n \n \n \n \n \n \n \n messages\n \n \n \n \n \n \n Type : Message[]\n\n \n \n \n \n Decorators : \n \n \n @OneToMany(undefined, message => message.sender)\n \n \n \n \n \n Defined in src/users/user.entitly.ts:75\n \n \n\n \n \n One-to-Many relationship between users and messages.\nA user can send multiple messages.\n\n \n \n\n \n \n \n \n \n \n \n \n \n Optional\n password\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Decorators : \n \n \n @Column('varchar', {nullable: true})\n \n \n \n \n \n Defined in src/users/user.entitly.ts:46\n \n \n\n \n \n Example :\n \n \n\n \n \n \n \n \n \n \n \n \n Optional\n userRole\n \n \n \n \n \n \n Type : userRole\n\n \n \n \n \n Decorators : \n \n \n @Column({type: 'enum', enum: userRole, default: undefined})\n \n \n \n \n \n Defined in src/users/user.entitly.ts:53\n \n \n\n \n \n Example :\n \n \n\n \n \n\n \n\n\n \n // import { Exclude } from 'class-transformer';\nimport { Entity, Column, PrimaryGeneratedColumn, ManyToMany, JoinTable, OneToMany } from 'typeorm';\nimport { userRole } from './Enums/userRole.enum';\nimport { ChatRoom } from 'src/chatrooms/chatroom.entity';\nimport { Message } from 'src/messages/message.entity';\n\n/**\n User entity representing the user table in the database.\n */\n@Entity()\nexport class User {\n /**\n Unique identifier for the user.\n @example 1\n */\n @PrimaryGeneratedColumn()\n id: number;\n\n /**\n First name of the user.\n @example \"John\"\n */\n @Column('varchar', { length: 100, nullable: false })\n firstName: string;\n\n /**\n Last name of the user.\n @example \"Doe\"\n */\n @Column('varchar', { length: 100 })\n lastName: string;\n\n /**\n Unique email address of the user.\n @example \"johndoe@example.com\"\n */\n @Column('varchar', { unique: true, nullable: false })\n email: string;\n\n /**\n @description Encrypted password of the user. Can be null if the user signs up via Google.\n @example \"hashedpassword123\"\n */\n // @Exclude()\n @Column('varchar', { nullable: true })\n password?: string;\n\n /**\n @description Role of the user in the application. Default is `USER`.\n @example \"USER\"\n */\n @Column({ type: 'enum', enum: userRole, default: userRole.USER })\n userRole?: userRole;\n\n /**\n @description Google ID for authentication when the user signs up with Google.\n @example \"123456789-google-id\"\n */\n @Column('varchar', { length: 225, nullable: true })\n googleId?: string;\n\n /**\n Many-to-Many relationship between users and chat rooms.\n This allows a user to be part of multiple chat rooms.\n */\n @ManyToMany(() => ChatRoom, (chatRoom) => chatRoom.users)\n @JoinTable() // This creates a junction table to link users and chat rooms\n chatRooms: ChatRoom[];\n\n /**\n One-to-Many relationship between users and messages.\n A user can send multiple messages.\n */\n @OneToMany(() => Message, (message) => message.sender)\n messages: Message[];\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"controllers/UserController.html":{"url":"controllers/UserController.html","title":"controller - UserController","body":"\n \n\n\n\n\n\n\n Controllers\n UserController\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/user.controller.ts\n \n\n \n Prefix\n \n \n users\n \n\n\n \n Description\n \n \n Controller for managing user-related operations.\n\n \n\n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n Public\n createUsers\n \n \n \n \n \n \n Public\n deleteUser\n \n \n \n \n \n \n Public\n editedPost\n \n \n \n \n \n \n \n \n \n Public\n getUsers\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n \n \n \n \n Public\n createUsers\n \n \n \n \n \n \n \n createUsers(createUserDto: CreateUserDto)\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Create a new user'})@ApiBody({type: CreateUserDto, description: 'User data'})@ApiResponse({status: 201, description: 'User successfully created'})@Post()\n \n \n\n \n \n Defined in src/users/user.controller.ts:51\n \n \n\n\n \n \n Creates a new user.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n createUserDto\n \n CreateUserDto\n \n\n \n No\n \n\n\n \n \nUser data transfer object.\n\n\n \n \n \n \n \n \n Returns : any\n\n \n \n The newly created user.\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Public\n deleteUser\n \n \n \n \n \n \n \n deleteUser(id: number)\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Delete a user by ID'})@ApiQuery({name: 'id', required: true, description: 'User ID', example: 1})@ApiResponse({status: 200, description: 'User successfully deleted'})@Delete()\n \n \n\n \n \n Defined in src/users/user.controller.ts:66\n \n \n\n\n \n \n Deletes a user by ID.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n id\n \n number\n \n\n \n No\n \n\n\n \n \nThe ID of the user to delete.\n\n\n \n \n \n \n \n \n Returns : any\n\n \n \n A confirmation message.\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Public\n editedPost\n \n \n \n \n \n \n \n editedPost(edituserDto: EditUserDto)\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Update user details'})@ApiBody({type: EditUserDto, description: 'Updated user data'})@ApiResponse({status: 200, description: 'User successfully updated'})@Patch()\n \n \n\n \n \n Defined in src/users/user.controller.ts:83\n \n \n\n\n \n \n Updates user details.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n edituserDto\n \n EditUserDto\n \n\n \n No\n \n\n\n \n \nUpdated user data.\n\n\n \n \n \n \n \n \n Returns : any\n\n \n \n The updated user details.\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n Public\n getUsers\n \n \n \n \n \n \n \n getUsers(getuserParamDto: GetuserParamDto, limit: number, page: number)\n \n \n\n \n \n Decorators : \n \n @ApiOperation({summary: 'Retrieve users or a single user by ID'})@ApiParam({name: 'id', required: false, description: 'User ID (optional)'})@ApiQuery({name: 'limit', required: false, description: 'Number of users per page', example: 20})@ApiQuery({name: 'page', required: false, description: 'Page number for pagination', example: 1})@ApiResponse({status: 200, description: 'Successful retrieval of users'})@Get('/:id?')@Get('/:id?')\n \n \n\n \n \n Defined in src/users/user.controller.ts:32\n \n \n\n\n \n \n Retrieves a list of users or a single user if an ID is provided.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n getuserParamDto\n \n GetuserParamDto\n \n\n \n No\n \n\n\n \n \nOptional user ID parameter.\n\n\n \n \n \n limit\n \n number\n \n\n \n No\n \n\n\n \n \nThe number of users per page (default: 20).\n\n\n \n \n \n page\n \n number\n \n\n \n No\n \n\n\n \n \nThe page number for pagination (default: 1).\n\n\n \n \n \n \n \n \n Returns : any\n\n \n \n A list of users or a specific user if ID is provided.\n\n \n \n \n \n \n \n\n\n \n import { Body, Controller, DefaultValuePipe, Delete, Get, Param, ParseIntPipe, Patch, Post, Query } from \"@nestjs/common\";\nimport { UserService } from \"./provider/user.service\";\nimport { CreateUserDto } from \"./DTOs/create-user.dto\";\nimport { EditUserDto } from \"./DTOs/patch-user.dto\";\nimport { GetuserParamDto } from \"./DTOs/getUserparamdto\";\nimport { ApiTags, ApiOperation, ApiQuery, ApiParam, ApiBody, ApiResponse } from \"@nestjs/swagger\";\n\n/**\n Controller for managing user-related operations.\n */\n@Controller('users')\nexport class UserController {\n /**constructor for injecting user service */\n constructor(private readonly userService:UserService) {}\n\n /**\n Retrieves a list of users or a single user if an ID is provided.\n @param {GetuserParamDto} getuserParamDto - Optional user ID parameter.\n @param {number} limit - The number of users per page (default: 20).\n @param {number} page - The page number for pagination (default: 1).\n @returns {Promise} A list of users or a specific user if ID is provided.\n */\n @ApiOperation({ summary: 'Retrieve users or a single user by ID' })\n @ApiParam({ name: 'id', required: false, description: 'User ID (optional)' })\n @ApiQuery({ name: 'limit', required: false, description: 'Number of users per page', example: 20 })\n @ApiQuery({ name: 'page', required: false, description: 'Page number for pagination', example: 1 })\n @ApiResponse({ status: 200, description: 'Successful retrieval of users' })\n @Get('/:id?')\n \n /**Get user method */\n @Get('/:id?')\n public getUsers(\n @Param() getuserParamDto: GetuserParamDto,\n @Query('limit', new DefaultValuePipe(20), ParseIntPipe) limit: number,\n @Query('page', new DefaultValuePipe(1), ParseIntPipe) page: number,\n ) {\n console.log(getuserParamDto);\n return this.userService.findAll(getuserParamDto, limit, page);\n }\n\n /**\n Creates a new user.\n @param {CreateUserDto} createUserDto - User data transfer object.\n @returns {Promise} The newly created user.\n */\n @ApiOperation({ summary: 'Create a new user' })\n @ApiBody({ type: CreateUserDto, description: 'User data' })\n @ApiResponse({ status: 201, description: 'User successfully created' })\n /**Create a user method */\n@Post()\n public createUsers(@Body() createUserDto: CreateUserDto) {\n return this.userService.createUsers(createUserDto);\n }\n \n /**\n Deletes a user by ID.\n @param {number} id - The ID of the user to delete.\n @returns {Promise} A confirmation message.\n */\n @ApiOperation({ summary: 'Delete a user by ID' })\n @ApiQuery({ name: 'id', required: true, description: 'User ID', example: 1 })\n @ApiResponse({ status: 200, description: 'User successfully deleted' })\n\n /**Delete a user method */\n @Delete()\n public deleteUser(@Query('id', ParseIntPipe) id:number) {\n return this.userService.deleteUser(id)\n\n }\n\n /**\n Updates user details.\n @param {EditUserDto} edituserDto - Updated user data.\n @returns {Promise} The updated user details.\n */\n @ApiOperation({ summary: 'Update user details' })\n @ApiBody({ type: EditUserDto, description: 'Updated user data' })\n @ApiResponse({ status: 200, description: 'User successfully updated' })\n \n\n /**Update or edit a user method */\n @Patch()\n public editedPost(@Body() edituserDto: EditUserDto) {\n return this.userService.editUser(edituserDto);\n }\n\n\n}\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"modules/UserModule.html":{"url":"modules/UserModule.html","title":"module - UserModule","body":"\n \n\n\n\n\n Modules\n UserModule\n\n\n\n \n \n\n\n\n\n\ndependencies\n\nLegend\n\n  Declarations\n\n  Module\n\n  Bootstrap\n\n  Providers\n\n  Exports\n\ncluster_UserModule\n\n\n\ncluster_UserModule_providers\n\n\n\ncluster_UserModule_exports\n\n\n\n\nUserService \n\nUserService \n\n\n\nUserModule\n\nUserModule\n\nUserService -->\n\nUserModule->UserService \n\n\n\n\n\nCreateGoogleUserProvider\n\nCreateGoogleUserProvider\n\nUserModule -->\n\nCreateGoogleUserProvider->UserModule\n\n\n\n\n\nCreateUserProvider\n\nCreateUserProvider\n\nUserModule -->\n\nCreateUserProvider->UserModule\n\n\n\n\n\nFindOneByEmail\n\nFindOneByEmail\n\nUserModule -->\n\nFindOneByEmail->UserModule\n\n\n\n\n\nFindOneByGoogleIdProvider\n\nFindOneByGoogleIdProvider\n\nUserModule -->\n\nFindOneByGoogleIdProvider->UserModule\n\n\n\n\n\nUserService\n\nUserService\n\nUserModule -->\n\nUserService->UserModule\n\n\n\n\n\n\n \n \n \n Zoom in\n Reset\n Zoom out\n \n\n\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n\n \n File\n \n \n src/users/user.module.ts\n \n\n\n\n\n\n \n \n \n Providers\n \n \n CreateGoogleUserProvider\n \n \n CreateUserProvider\n \n \n FindOneByEmail\n \n \n FindOneByGoogleIdProvider\n \n \n UserService\n \n \n \n \n Controllers\n \n \n UserController\n \n \n \n \n Exports\n \n \n UserService\n \n \n \n \n \n\n\n \n\n\n \n import { forwardRef, Module } from '@nestjs/common';\nimport { UserService } from './provider/user.service';\nimport { UserController } from './user.controller';\nimport { TypeOrmModule } from '@nestjs/typeorm';\nimport { User } from './user.entitly';\nimport { CreateUserProvider } from './provider/create-user.provider';\nimport { FindOneByEmail } from './provider/find-one-by-email';\nimport { FindOneByGoogleIdProvider } from './provider/find-one-by-googleId';\nimport { CreateGoogleUserProvider } from './provider/googleUserProvider';\nimport { AuthModule } from 'src/auth/auth.module';\n\n@Module({\n imports: [forwardRef(() => AuthModule), TypeOrmModule.forFeature([User])],\n controllers: [UserController],\n providers: [\n UserService,\n CreateUserProvider,\n FindOneByEmail,\n FindOneByGoogleIdProvider,\n CreateGoogleUserProvider\n ],\n exports: [UserService],\n})\nexport class UserModule {}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"injectables/UserService.html":{"url":"injectables/UserService.html","title":"injectable - UserService","body":"\n \n\n\n\n\n\n\n\n\n\n Injectables\n UserService\n\n\n\n \n Info\n \n \n Source\n \n\n\n\n \n \n File\n \n \n src/users/provider/user.service.ts\n \n\n\n \n Description\n \n \n Service class for managing user-related operations.\n\n \n\n\n\n \n Index\n \n \n\n \n \n Methods\n \n \n \n \n \n \n Public\n Async\n createGoogleUser\n \n \n Public\n Async\n createUsers\n \n \n Public\n Async\n deleteUser\n \n \n Public\n Async\n editUser\n \n \n Public\n findAll\n \n \n Public\n Async\n findOneByGoogleId\n \n \n Public\n FindOneById\n \n \n Public\n Async\n GetOneByEmail\n \n \n \n \n\n\n\n\n\n \n \n\n\n \n Constructor\n \n \n \n \nconstructor(userRepository: Repository, createUserProvider: CreateUserProvider, findOneByemail: FindOneByEmail, findOneByGoogleIdProvider: FindOneByGoogleIdProvider, createGoogleUserProvider: CreateGoogleUserProvider)\n \n \n \n \n Defined in src/users/provider/user.service.ts:19\n \n \n\n \n \n \n Parameters :\n \n \n \n Name\n Type\n Optional\n \n \n \n \n userRepository\n \n \n Repository\n \n \n \n No\n \n \n \n \n createUserProvider\n \n \n CreateUserProvider\n \n \n \n No\n \n \n \n \n findOneByemail\n \n \n FindOneByEmail\n \n \n \n No\n \n \n \n \n findOneByGoogleIdProvider\n \n \n FindOneByGoogleIdProvider\n \n \n \n No\n \n \n \n \n createGoogleUserProvider\n \n \n CreateGoogleUserProvider\n \n \n \n No\n \n \n \n \n \n \n \n \n \n \n\n\n \n \n \n Methods\n \n \n \n \n \n \n \n Public\n Async\n createGoogleUser\n \n \n \n \n \n \n \n createGoogleUser(googleUser: GoogleInterface)\n \n \n\n\n \n \n Defined in src/users/provider/user.service.ts:143\n \n \n\n\n \n \n Creates a new user via Google authentication.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n googleUser\n \n GoogleInterface\n \n\n \n No\n \n\n\n \n \nGoogle user data.\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n The created user.\n\n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n createUsers\n \n \n \n \n \n \n \n createUsers(createUserDto: CreateUserDto)\n \n \n\n\n \n \n Defined in src/users/provider/user.service.ts:67\n \n \n\n\n \n \n Method to Creates a new user\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n createUserDto\n \n CreateUserDto\n \n\n \n No\n \n\n\n \n \nUser data for creation.\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n The created user.\n\n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n deleteUser\n \n \n \n \n \n \n \n deleteUser(id: number)\n \n \n\n\n \n \n Defined in src/users/provider/user.service.ts:100\n \n \n\n\n \n \n A method to Deletes a user by ID.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n id\n \n number\n \n\n \n No\n \n\n\n \n \nUser ID.\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n Deletion confirmation.\n\n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n editUser\n \n \n \n \n \n \n \n editUser(edituserDto: EditUserDto)\n \n \n\n\n \n \n Defined in src/users/provider/user.service.ts:113\n \n \n\n\n \n \n A method to Updates user details.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n edituserDto\n \n EditUserDto\n \n\n \n No\n \n\n\n \n \nData for updating user information.\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n The updated user.\n\n \n \n \n \n \n \n \n \n \n \n \n Public\n findAll\n \n \n \n \n \n \n \n findAll(getUserParamDto: GetuserParamDto, limit: number, page: number)\n \n \n\n\n \n \n Defined in src/users/provider/user.service.ts:52\n \n \n\n\n \n \n Method to Retrieves all users.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n getUserParamDto\n \n GetuserParamDto\n \n\n \n No\n \n\n\n \n \nParameters for filtering users.\n\n\n \n \n \n limit\n \n number\n \n\n \n No\n \n\n\n \n \nNumber of users to return.\n\n\n \n \n \n page\n \n number\n \n\n \n No\n \n\n\n \n \nPage number for pagination.\n\n\n \n \n \n \n \n \n Returns : Promise\n\n \n \n List of users.\n\n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n findOneByGoogleId\n \n \n \n \n \n \n \n findOneByGoogleId(googleId: string)\n \n \n\n\n \n \n Defined in src/users/provider/user.service.ts:133\n \n \n\n\n \n \n A method to Finds a user by Google ID.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n googleId\n \n string\n \n\n \n No\n \n\n\n \n \nGoogle ID of the user.\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n The user associated with the given Google ID.\n\n \n \n \n \n \n \n \n \n \n \n \n Public\n FindOneById\n \n \n \n \n \n \n \n FindOneById(id: number)\n \n \n\n\n \n \n Defined in src/users/provider/user.service.ts:78\n \n \n\n\n \n \n A method to Finds a user by ID.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n id\n \n number\n \n\n \n No\n \n\n\n \n \nUser ID.\n\n\n \n \n \n \n \n \n Returns : Promise\n\n \n \n The found user or null.\n\n \n \n \n \n \n \n \n \n \n \n \n Public\n Async\n GetOneByEmail\n \n \n \n \n \n \n \n GetOneByEmail(email: string)\n \n \n\n\n \n \n Defined in src/users/provider/user.service.ts:89\n \n \n\n\n \n \n A method to Retrieves a user by email.\n\n\n \n Parameters :\n \n \n \n \n Name\n Type\n Optional\n Description\n \n \n \n \n email\n \n string\n \n\n \n No\n \n\n\n \n \nUser email.\n\n\n \n \n \n \n \n \n Returns : unknown\n\n \n \n The user matching the email.\n\n \n \n \n \n \n\n\n \n\n\n \n import { Injectable } from '@nestjs/common';\nimport { InjectRepository } from '@nestjs/typeorm';\nimport { User } from '../user.entitly';\nimport { Repository } from 'typeorm';\nimport { CreateUserProvider } from './create-user.provider';\nimport { CreateUserDto } from '../DTOs/create-user.dto';\nimport { FindOneByEmail } from './find-one-by-email';\nimport { EditUserDto } from '../DTOs/patch-user.dto';\nimport { GetuserParamDto } from '../DTOs/getUserparamdto';\nimport { FindOneByGoogleIdProvider } from './find-one-by-googleId';\nimport { CreateGoogleUserProvider } from './googleUserProvider';\nimport { GoogleInterface } from 'src/auth/social/interfaces/user.interface';\n\n\n/**\n Service class for managing user-related operations.\n */\n@Injectable()\nexport class UserService {\n constructor(\n /*\n *inject User entity*/\n /**\n Injects dependencies for user management.\n @param {Repository} userRepository - Repository to interact with the User entity.\n @param {CreateUserProvider} createUserProvider - Provider to handle user creation.\n @param {FindOneByEmail} findOneByemail - Service to find a user by email.\n @param {FindOneByGoogleIdProvider} findOneByGoogleIdProvider - Service to find a user by Google ID.\n @param {CreateGoogleUserProvider} createGoogleUserProvider - Service to create a user via Google authentication.\n */\n @InjectRepository(User)\n private userRepository: Repository,\n\n private readonly createUserProvider: CreateUserProvider,\n\n private readonly findOneByemail: FindOneByEmail,\n\n private readonly findOneByGoogleIdProvider: FindOneByGoogleIdProvider,\n\n private readonly createGoogleUserProvider: CreateGoogleUserProvider,\n ) {}\n\n /**\n Retrieves all users.\n @param {GetuserParamDto} getUserParamDto - Parameters for filtering users.\n @param {number} limit - Number of users to return.\n @param {number} page - Page number for pagination.\n @returns {Promise} List of users.\n */\n\n /**Method to Retrieves all users. */\n public findAll(\n getUserParamDto: GetuserParamDto,\n limit: number,\n page: number,\n ): Promise {\n return this.userRepository.find();\n }\n\n /**\n Creates a new user.\n @param {CreateUserDto} createUserDto - User data for creation.\n @returns {Promise} The created user.\n */\n\n /**Method to Creates a new user */\n public async createUsers(createUserDto: CreateUserDto) {\n return this.createUserProvider.createUsers(createUserDto);\n }\n\n /**\n \n @param {number} id - User ID.\n @returns {Promise} The found user or null.\n */\n\n /**A method to Finds a user by ID. */\n public FindOneById(id: number): Promise {\n return this.userRepository.findOneBy({ id });\n }\n\n /**\n \n @param {string} email - User email.\n @returns {Promise} The user matching the email.\n */\n\n /**A method to Retrieves a user by email. */\n public async GetOneByEmail(email: string) {\n return await this.findOneByemail.findOneByEmail(email);\n }\n\n /**\n \n @param {number} id - User ID.\n @returns {Promise} Deletion confirmation.\n */\n\n /**A method to Deletes a user by ID. */\n public async deleteUser(id: number) {\n await this.userRepository.delete(id);\n\n return { deleted: true, id };\n }\n\n /**\n \n @param {EditUserDto} edituserDto - Data for updating user information.\n @returns {Promise} The updated user.\n */\n\n /**A method to Updates user details. */\n public async editUser(edituserDto: EditUserDto) {\n let edit = await this.userRepository.findOneBy({\n id: edituserDto.id,\n });\n\n edit.firstName = edituserDto.firstName ?? edit.firstName;\n edit.lastName = edituserDto.lastName ?? edit.lastName;\n edit.password = edituserDto.password ?? edit.password;\n edit.email = edituserDto.email ?? edit.email;\n\n return this.userRepository.save(edit);\n }\n\n /**\n \n @param {string} googleId - Google ID of the user.\n @returns {Promise} The user associated with the given Google ID.\n */\n\n /**A method to Finds a user by Google ID. */\n public async findOneByGoogleId(googleId: string) {\n return this.findOneByGoogleIdProvider.findOneByGoogleId(googleId);\n }\n\n /**\n @param {GoogleInterface} googleUser - Google user data.\n @returns {Promise} The created user.\n */\n \n /** Creates a new user via Google authentication. */\n public async createGoogleUser(googleUser: GoogleInterface) {\n return this.createGoogleUserProvider.createGoogleUser(googleUser);\n }\n}\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"coverage.html":{"url":"coverage.html","title":"coverage - coverage","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Documentation coverage\n\n\n\n \n\n\n\n \n \n File\n Type\n Identifier\n Statements\n \n \n \n \n \n \n src/app.controller.ts\n \n controller\n AppController\n \n 100 %\n (2/2)\n \n \n \n \n \n src/app.service.ts\n \n injectable\n AppService\n \n 100 %\n (2/2)\n \n \n \n \n \n src/auth/auth.controller.ts\n \n controller\n AuthController\n \n 100 %\n (3/3)\n \n \n \n \n \n src/auth/constants/auth.constant.ts\n \n variable\n AUTH_TYPE_KEY\n \n 100 %\n (1/1)\n \n \n \n \n \n src/auth/constants/auth.constant.ts\n \n variable\n REQUEST_USER_KEY\n \n 100 %\n (1/1)\n \n \n \n \n \n src/auth/decorators/activeUser.decorator.ts\n \n variable\n ActiveUser\n \n 100 %\n (1/1)\n \n \n \n \n \n src/auth/decorators/auth.decorator.ts\n \n variable\n Auth\n \n 100 %\n (1/1)\n \n \n \n \n \n src/auth/dtos/refreshTokenDto.ts\n \n class\n RefreshTokenDto\n \n 100 %\n (2/2)\n \n \n \n \n \n src/auth/dtos/userDto.ts\n \n class\n SignInDto\n \n 100 %\n (3/3)\n \n \n \n \n \n src/auth/guard/access-token/access-token.guard.ts\n \n class\n CreateUserDto\n \n 100 %\n (8/8)\n \n \n \n \n \n src/auth/guard/access-token/access-token.guard.ts\n \n class\n MatchPasswordsConstraint\n \n 33 %\n (1/3)\n \n \n \n \n \n src/auth/guard/auth-guard/auth-guard.guard.ts\n \n guard\n AuthGuardGuard\n \n 80 %\n (4/5)\n \n \n \n \n \n src/auth/interface/activeInterface.ts\n \n interface\n ActiveUserData\n \n 100 %\n (3/3)\n \n \n \n \n \n src/auth/providers/auth.service.ts\n \n injectable\n AuthService\n \n 75 %\n (3/4)\n \n \n \n \n \n src/auth/providers/bcrypt.ts\n \n injectable\n BcryptProvider\n \n 100 %\n (3/3)\n \n \n \n \n \n src/auth/providers/generate-tokens.provider.ts\n \n injectable\n GenerateTokensProvider\n \n 75 %\n (3/4)\n \n \n \n \n \n src/auth/providers/hashing.ts\n \n injectable\n HashingProvider\n \n 100 %\n (3/3)\n \n \n \n \n \n src/auth/providers/refresh-tokens.provider.ts\n \n injectable\n RefreshTokensProvider\n \n 66 %\n (2/3)\n \n \n \n \n \n src/auth/providers/sign-in.provider.ts\n \n injectable\n SignInProvider\n \n 66 %\n (2/3)\n \n \n \n \n \n src/auth/social/dtos/google-token.dto.ts\n \n class\n GoogleTokenDto\n \n 100 %\n (2/2)\n \n \n \n \n \n src/auth/social/google-authentication.controller.ts\n \n controller\n GoogleAuthenticationController\n \n 100 %\n (2/2)\n \n \n \n \n \n src/auth/social/interfaces/user.interface.ts\n \n interface\n GoogleInterface\n \n 100 %\n (5/5)\n \n \n \n \n \n src/auth/social/providers/google-authentication.service.ts\n \n injectable\n GoogleAuthenticationService\n \n 80 %\n (4/5)\n \n \n \n \n \n src/chatrooms/chatroom.controller.ts\n \n controller\n ChatRoomsController\n \n 100 %\n (4/4)\n \n \n \n \n \n src/chatrooms/chatroom.entity.ts\n \n entity\n ChatRoom\n \n 100 %\n (1/1)\n \n \n \n \n \n src/chatrooms/providers/chatrooms/chatrooms.service.ts\n \n injectable\n ChatRoomsService\n \n 80 %\n (4/5)\n \n \n \n \n \n src/main.ts\n \n function\n bootstrap\n \n 100 %\n (1/1)\n \n \n \n \n \n src/messages/message.entity.ts\n \n entity\n Message\n \n 100 %\n (1/1)\n \n \n \n \n \n src/messages/messages.controller.ts\n \n controller\n MessagesController\n \n 100 %\n (3/3)\n \n \n \n \n \n src/messages/providers/messages/messages.service.ts\n \n injectable\n MessagesService\n \n 75 %\n (3/4)\n \n \n \n \n \n src/users/DTOs/create-user.dto.ts\n \n class\n CreateUserDto\n \n 100 %\n (8/8)\n \n \n \n \n \n src/users/DTOs/create-user.dto.ts\n \n class\n MatchPasswordsConstraint\n \n 100 %\n (3/3)\n \n \n \n \n \n src/users/DTOs/getUserparamdto.ts\n \n class\n GetuserParamDto\n \n 100 %\n (2/2)\n \n \n \n \n \n src/users/DTOs/patch-user.dto.ts\n \n class\n EditUserDto\n \n 100 %\n (2/2)\n \n \n \n \n \n src/users/provider/create-user.provider.ts\n \n injectable\n CreateUserProvider\n \n 100 %\n (3/3)\n \n \n \n \n \n src/users/provider/find-one-by-email.ts\n \n injectable\n FindOneByEmail\n \n 100 %\n (3/3)\n \n \n \n \n \n src/users/provider/find-one-by-googleId.ts\n \n injectable\n FindOneByGoogleIdProvider\n \n 66 %\n (2/3)\n \n \n \n \n \n src/users/provider/googleUserProvider.ts\n \n injectable\n CreateGoogleUserProvider\n \n 66 %\n (2/3)\n \n \n \n \n \n src/users/provider/user.service.ts\n \n injectable\n UserService\n \n 90 %\n (9/10)\n \n \n \n \n \n src/users/user.controller.ts\n \n controller\n UserController\n \n 100 %\n (5/5)\n \n \n \n \n \n src/users/user.entitly.ts\n \n entity\n User\n \n 100 %\n (1/1)\n \n \n \n\n\n\n\n\n new Tablesort(document.getElementById('coverage-table'));\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"dependencies.html":{"url":"dependencies.html","title":"package-dependencies - dependencies","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n Dependencies\n \n \n \n @compodoc/compodoc : ^1.1.23\n \n @nestjs/common : ^10.0.0\n \n @nestjs/config : ^4.0.0\n \n @nestjs/core : ^10.0.0\n \n @nestjs/platform-express : ^10.0.0\n \n @nestjs/swagger : ^7.3.0\n \n @nestjs/typeorm : ^11.0.0\n \n @types/bcrypt : ^5.0.2\n \n bcrypt : ^5.1.1\n \n class-transformer : ^0.5.1\n \n class-validator : ^0.14.1\n \n google-auth-library : ^9.15.1\n \n pg : ^8.13.1\n \n reflect-metadata : ^0.2.0\n \n rxjs : ^7.8.1\n \n typeorm : ^0.3.20\n \n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"miscellaneous/enumerations.html":{"url":"miscellaneous/enumerations.html","title":"miscellaneous-enumerations - enumerations","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Miscellaneous\n Enumerations\n\n\n\n Index\n \n \n \n \n \n \n authTypes   (src/.../authTypes.enum.ts)\n \n \n chatroom   (src/.../chatroomType.ts)\n \n \n userRole   (src/.../userRole.enum.ts)\n \n \n \n \n \n \n\n\n src/auth/enums/authTypes.enum.ts\n \n \n \n \n \n \n authTypes\n \n \n \n \n define authTypes enum\n\n \n \n \n \n  Bearer\n \n \n \n \n  None\n \n \n \n \n\n src/chatrooms/enums/chatroomType.ts\n \n \n \n \n \n \n chatroom\n \n \n \n \n  PRIVATE\n \n \n \n \n  GROUP\n \n \n \n \n\n src/users/Enums/userRole.enum.ts\n \n \n \n \n \n \n userRole\n \n \n \n \n Enum for user role\n\n \n \n \n \n  ADMIN\n \n \n \n \n Value : admin\n \n \n \n \n  MODERATOR\n \n \n \n \n Value : moderator\n \n \n \n \n  USER\n \n \n \n \n Value : user\n \n \n \n \n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"miscellaneous/functions.html":{"url":"miscellaneous/functions.html","title":"miscellaneous-functions - functions","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Miscellaneous\n Functions\n\n\n\n Index\n \n \n \n \n \n \n bootstrap   (src/.../main.ts)\n \n \n \n \n \n \n\n\n src/main.ts\n \n \n \n \n \n \n \n bootstrap\n \n \n \n \n \n \nbootstrap()\n \n \n\n\n\n\n \n \n The main entry point of the application. \nIt initializes the NestJS application, sets up global configurations, \nand starts the server.\n\n\n \n \n \n \n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"index.html":{"url":"index.html","title":"getting-started - index","body":"\n \n\nrealTimeChat (NestJS Project)\nThis is a NestJS project bootstrapped using the Nest CLI.\nGetting Started\nPrerequisites\n\nNode.js (LTS enforced)\nnpm\n\nInstallation\nClone the repository and install dependencies:\nExample :git clone https://github.com/phertyameen/realTimeChat.git\ncd realTimeChat\nnpm install\n\n# Running the Application\n\nStart the development server:\n```npm run start\n\nFor hot reload:\n```npm run start:dev\n\n# Project Structure\n\nsrc/ - Main application source code\nmain.ts - Entry point of the application\napp.module.ts - Root module with TypeORM connection\nconfig folder - contains appConfig and database configurations\napp.controller.ts - Default controller\napp.service.ts - Default service\n\n# Installed Packages\n\n@nestjs/config - Configuration management\n@nestjs/typeorm - TypeORM integration\nclass-validator - Validation utilities\nclass-transformer - Transformation utilities\n\n#Rules\n\nDo not push directly to any branch.\nAlways create a new branch for your changes.\nOpen a pull request for review before merging.\nAlways use multi-line comment i.e (/**...*/) comment system instead of the double slash (//) for uproper documentation\n\n#The keyboard shortcut for commenting\nMulti-line comment: Shift + Alt + A (Windows/Linux) or Shift + Option + A (Mac)\n\n#Useful Commands\nnpm run build - Build the project\nnpm run test - Run tests\n\n#License\nThis project is licensed under the MIT License.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"modules.html":{"url":"modules.html","title":"modules - modules","body":"\n \n\n\n\n\n Modules\n\n\n \n \n \n \n AppModule\n \n \n \n \n Your browser does not support SVG\n \n \n \n Browse\n \n \n \n \n \n \n \n AuthModule\n \n \n \n \n Your browser does not support SVG\n \n \n \n Browse\n \n \n \n \n \n \n \n ChatroomsModule\n \n \n \n \n Your browser does not support SVG\n \n \n \n Browse\n \n \n \n \n \n \n \n GoogleAuthticationModule\n \n \n \n \n Your browser does not support SVG\n \n \n \n Browse\n \n \n \n \n \n \n \n MessagesModule\n \n \n \n \n Your browser does not support SVG\n \n \n \n Browse\n \n \n \n \n \n \n \n UserModule\n \n \n \n \n Your browser does not support SVG\n \n \n \n Browse\n \n \n \n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"overview.html":{"url":"overview.html","title":"overview - overview","body":"\n \n\n\n\n Overview\n\n \n\n \n \n\n\n\n\n\ndependencies\n\nLegend\n\n  Declarations\n\n  Module\n\n  Bootstrap\n\n  Providers\n\n  Exports\n\ncluster_AppModule\n\n\n\ncluster_AppModule_imports\n\n\n\ncluster_AppModule_providers\n\n\n\ncluster_AuthModule\n\n\n\ncluster_AuthModule_exports\n\n\n\ncluster_AuthModule_providers\n\n\n\ncluster_ChatroomsModule\n\n\n\ncluster_ChatroomsModule_providers\n\n\n\ncluster_GoogleAuthticationModule\n\n\n\ncluster_MessagesModule\n\n\n\ncluster_MessagesModule_providers\n\n\n\ncluster_UserModule\n\n\n\ncluster_UserModule_exports\n\n\n\ncluster_UserModule_providers\n\n\n\n\nAuthModule\n\nAuthModule\n\n\n\nAppModule\n\nAppModule\n\nAppModule -->\n\nAuthModule->AppModule\n\n\n\n\n\nAuthService \n\nAuthService \n\nAuthService -->\n\nAuthModule->AuthService \n\n\n\n\n\nHashingProvider \n\nHashingProvider \n\nHashingProvider -->\n\nAuthModule->HashingProvider \n\n\n\n\n\nChatroomsModule\n\nChatroomsModule\n\nAppModule -->\n\nChatroomsModule->AppModule\n\n\n\n\n\nMessagesModule\n\nMessagesModule\n\nAppModule -->\n\nMessagesModule->AppModule\n\n\n\n\n\nUserModule\n\nUserModule\n\nAppModule -->\n\nUserModule->AppModule\n\n\n\n\n\nUserService \n\nUserService \n\nUserService -->\n\nUserModule->UserService \n\n\n\n\n\nAppService\n\nAppService\n\nAppModule -->\n\nAppService->AppModule\n\n\n\n\n\nAuthService\n\nAuthService\n\nAuthModule -->\n\nAuthService->AuthModule\n\n\n\n\n\nGenerateTokensProvider\n\nGenerateTokensProvider\n\nAuthModule -->\n\nGenerateTokensProvider->AuthModule\n\n\n\n\n\nGoogleAuthenticationService\n\nGoogleAuthenticationService\n\nAuthModule -->\n\nGoogleAuthenticationService->AuthModule\n\n\n\n\n\nGoogleAuthticationModule\n\nGoogleAuthticationModule\n\nGoogleAuthticationModule -->\n\nGoogleAuthenticationService->GoogleAuthticationModule\n\n\n\n\n\nRefreshTokensProvider\n\nRefreshTokensProvider\n\nAuthModule -->\n\nRefreshTokensProvider->AuthModule\n\n\n\n\n\nSignInProvider\n\nSignInProvider\n\nAuthModule -->\n\nSignInProvider->AuthModule\n\n\n\n\n\nChatRoomsService\n\nChatRoomsService\n\nChatroomsModule -->\n\nChatRoomsService->ChatroomsModule\n\n\n\n\n\nMessagesService\n\nMessagesService\n\nMessagesModule -->\n\nMessagesService->MessagesModule\n\n\n\n\n\nCreateGoogleUserProvider\n\nCreateGoogleUserProvider\n\nUserModule -->\n\nCreateGoogleUserProvider->UserModule\n\n\n\n\n\nCreateUserProvider\n\nCreateUserProvider\n\nUserModule -->\n\nCreateUserProvider->UserModule\n\n\n\n\n\nFindOneByEmail\n\nFindOneByEmail\n\nUserModule -->\n\nFindOneByEmail->UserModule\n\n\n\n\n\nFindOneByGoogleIdProvider\n\nFindOneByGoogleIdProvider\n\nUserModule -->\n\nFindOneByGoogleIdProvider->UserModule\n\n\n\n\n\nUserService\n\nUserService\n\nUserModule -->\n\nUserService->UserModule\n\n\n\n\n\n\n \n \n \n Zoom in\n Reset\n Zoom out\n \n\n \n\n \n \n \n \n \n \n 6 Modules\n \n \n \n \n \n \n \n \n 6 Controllers\n \n \n \n \n \n \n \n 3 Entities\n \n \n \n \n \n \n \n 15 Injectables\n \n \n \n \n \n \n \n 9 Classes\n \n \n \n \n \n \n \n 1 Guard\n \n \n \n \n \n \n \n 2 Interfaces\n \n \n \n \n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"properties.html":{"url":"properties.html","title":"package-properties - properties","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n Properties\n \n \n \n Version : 0.0.1\n \n Description : \n \n License : UNLICENSED\n \n Author : \n \n\n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"},"miscellaneous/variables.html":{"url":"miscellaneous/variables.html","title":"miscellaneous-variables - variables","body":"\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Miscellaneous\n Variables\n\n\n\n Index\n \n \n \n \n \n \n ActiveUser   (src/.../activeUser.decorator.ts)\n \n \n Auth   (src/.../auth.decorator.ts)\n \n \n AUTH_TYPE_KEY   (src/.../auth.constant.ts)\n \n \n REQUEST_USER_KEY   (src/.../auth.constant.ts)\n \n \n \n \n \n \n\n\n src/auth/decorators/activeUser.decorator.ts\n \n \n \n \n \n \n \n ActiveUser\n \n \n \n \n \n \n Default value : createParamDecorator(\n (field: keyof ActiveUserData | undefined, ctx: ExecutionContext) => {\n const request = ctx.switchToHttp().getRequest();\n\n const user: ActiveUserData = request[REQUEST_USER_KEY]\n return field ? user?.[field] : user \n },\n)\n \n \n\n \n \n Custom decorator to retrieve active user data from the request.\nIt extracts the user information stored under REQUEST_USER_KEY.\n\n \n \n\n \n \n\n src/auth/decorators/auth.decorator.ts\n \n \n \n \n \n \n \n Auth\n \n \n \n \n \n \n Default value : (...authTypes: authTypes[]) => \n SetMetadata(AUTH_TYPE_KEY, authTypes)\n \n \n\n \n \n main auth class retrieve active user data from the request\n\n \n \n\n \n \n\n src/auth/constants/auth.constant.ts\n \n \n \n \n \n \n \n AUTH_TYPE_KEY\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Default value : 'auth'\n \n \n\n \n \n defining the request authtype key\n\n \n \n\n \n \n \n \n \n \n \n \n REQUEST_USER_KEY\n \n \n \n \n \n \n Type : string\n\n \n \n \n \n Default value : 'user'\n \n \n\n \n \n defining the request user key\n\n \n \n\n \n \n\n\n\n\n \n \n results matching \"\"\n \n \n \n No results matching \"\"\n \n\n"}} } diff --git a/documentation/miscellaneous/enumerations.html b/documentation/miscellaneous/enumerations.html new file mode 100644 index 0000000..a6837cf --- /dev/null +++ b/documentation/miscellaneous/enumerations.html @@ -0,0 +1,299 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                        +
                                                                        + + +
                                                                        +
                                                                        + + + + + + + + + + + + + + + + + + + + +
                                                                        +

                                                                        Index

                                                                        + + + + + + +
                                                                        + +
                                                                        +
                                                                        + +

                                                                        src/auth/enums/authTypes.enum.ts

                                                                        +
                                                                        + + + + + + + + + + + + + + + +
                                                                        + + authTypes +
                                                                        +

                                                                        define authTypes enum

                                                                        +
                                                                        +
                                                                        +  Bearer +
                                                                        +  None +
                                                                        +
                                                                        +

                                                                        src/chatrooms/enums/chatroomType.ts

                                                                        +
                                                                        + + + + + + + + + + + + +
                                                                        + + chatroom +
                                                                        +  PRIVATE +
                                                                        +  GROUP +
                                                                        +
                                                                        +

                                                                        src/users/Enums/userRole.enum.ts

                                                                        +
                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                        + + userRole +
                                                                        +

                                                                        Enum for user role

                                                                        +
                                                                        +
                                                                        +  ADMIN +
                                                                        + Value : admin +
                                                                        +  MODERATOR +
                                                                        + Value : moderator +
                                                                        +  USER +
                                                                        + Value : user +
                                                                        +
                                                                        + + + +
                                                                        +
                                                                        +

                                                                        results matching ""

                                                                        +
                                                                          +
                                                                          +
                                                                          +

                                                                          No results matching ""

                                                                          +
                                                                          +
                                                                          +
                                                                          + +
                                                                          +
                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/miscellaneous/functions.html b/documentation/miscellaneous/functions.html index 94cb0e9..b064100 100644 --- a/documentation/miscellaneous/functions.html +++ b/documentation/miscellaneous/functions.html @@ -150,6 +150,15 @@

                                                                          + + +
                                                                          +

                                                                          The main entry point of the application. +It initializes the NestJS application, sets up global configurations, +and starts the server.

                                                                          +
                                                                          + +
                                                                          diff --git a/documentation/miscellaneous/variables.html b/documentation/miscellaneous/variables.html new file mode 100644 index 0000000..36d9c4e --- /dev/null +++ b/documentation/miscellaneous/variables.html @@ -0,0 +1,335 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                          +
                                                                          + + +
                                                                          +
                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                          +

                                                                          Index

                                                                          + + + + + + +
                                                                          + +
                                                                          +
                                                                          + +

                                                                          src/auth/decorators/activeUser.decorator.ts

                                                                          +
                                                                          +

                                                                          + + + + + + + + + + + + + +
                                                                          + + + ActiveUser + + +
                                                                          + Default value : createParamDecorator( + (field: keyof ActiveUserData | undefined, ctx: ExecutionContext) => { + const request = ctx.switchToHttp().getRequest(); + + const user: ActiveUserData = request[REQUEST_USER_KEY] + return field ? user?.[field] : user + }, +) +
                                                                          +

                                                                          Custom decorator to retrieve active user data from the request. +It extracts the user information stored under REQUEST_USER_KEY.

                                                                          +
                                                                          +
                                                                          +
                                                                          +

                                                                          src/auth/decorators/auth.decorator.ts

                                                                          +
                                                                          +

                                                                          + + + + + + + + + + + + + +
                                                                          + + + Auth + + +
                                                                          + Default value : (...authTypes: authTypes[]) => + SetMetadata(AUTH_TYPE_KEY, authTypes) +
                                                                          +

                                                                          main auth class retrieve active user data from the request

                                                                          +
                                                                          +
                                                                          +
                                                                          +

                                                                          src/auth/constants/auth.constant.ts

                                                                          +
                                                                          +

                                                                          + + + + + + + + + + + + + + + + +
                                                                          + + + AUTH_TYPE_KEY + + +
                                                                          + Type : string + +
                                                                          + Default value : 'auth' +
                                                                          +

                                                                          defining the request authtype key

                                                                          +
                                                                          +
                                                                          + + + + + + + + + + + + + + + + + +
                                                                          + + + REQUEST_USER_KEY + + +
                                                                          + Type : string + +
                                                                          + Default value : 'user' +
                                                                          +

                                                                          defining the request user key

                                                                          +
                                                                          +
                                                                          +
                                                                          + + + +
                                                                          +
                                                                          +

                                                                          results matching ""

                                                                          +
                                                                            +
                                                                            +
                                                                            +

                                                                            No results matching ""

                                                                            +
                                                                            +
                                                                            +
                                                                            + +
                                                                            +
                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/modules.html b/documentation/modules.html index ebd982b..4dba84f 100644 --- a/documentation/modules.html +++ b/documentation/modules.html @@ -113,6 +113,91 @@

                                                                            AppModule

                                                                          • +
                                                                            +
                                                                            +
                                                                            +

                                                                            AuthModule

                                                                            +
                                                                            +
                                                                            +

                                                                            + + Your browser does not support SVG + +

                                                                            + +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            +

                                                                            ChatroomsModule

                                                                            +
                                                                            +
                                                                            +

                                                                            + + Your browser does not support SVG + +

                                                                            + +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            +

                                                                            GoogleAuthticationModule

                                                                            +
                                                                            +
                                                                            +

                                                                            + + Your browser does not support SVG + +

                                                                            + +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            +

                                                                            MessagesModule

                                                                            +
                                                                            +
                                                                            +

                                                                            + + Your browser does not support SVG + +

                                                                            + +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            +
                                                                            +

                                                                            UserModule

                                                                            +
                                                                            +
                                                                            +

                                                                            + + Your browser does not support SVG + +

                                                                            + +
                                                                            +
                                                                            +
                                                                            diff --git a/documentation/modules/AppModule.html b/documentation/modules/AppModule.html index 0ff4807..61ef869 100644 --- a/documentation/modules/AppModule.html +++ b/documentation/modules/AppModule.html @@ -104,47 +104,99 @@ - + dependencies - -Legend - -  Declarations - -  Module - -  Bootstrap - -  Providers - -  Exports + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports cluster_AppModule - + + + +cluster_AppModule_imports + cluster_AppModule_providers - + - + -AppService - -AppService +AuthModule + +AuthModule - + AppModule - -AppModule + +AppModule - + +AuthModule->AppModule + + + + + +ChatroomsModule + +ChatroomsModule + + + +ChatroomsModule->AppModule + + + + + +MessagesModule + +MessagesModule + + + +MessagesModule->AppModule + + + + + +UserModule + +UserModule + + + +UserModule->AppModule + + + + + +AppService + +AppService + + + AppService->AppModule - - + + @@ -208,6 +260,31 @@

                                                                            Controllers AppController +
                                                                          • + AuthController +
                                                                          • +
                                                                          • + UserController +
                                                                          • + + +
                                                                            +

                                                                            Imports

                                                                            +
                                                                            @@ -225,6 +302,15 @@

                                                                            ControllersControllers diff --git a/documentation/modules/AppModule/dependencies.svg b/documentation/modules/AppModule/dependencies.svg index 39f442f..e4af031 100644 --- a/documentation/modules/AppModule/dependencies.svg +++ b/documentation/modules/AppModule/dependencies.svg @@ -4,47 +4,99 @@ - + dependencies - -Legend - -  Declarations - -  Module - -  Bootstrap - -  Providers - -  Exports + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports cluster_AppModule - + + + +cluster_AppModule_imports + cluster_AppModule_providers - + - + -AppService - -AppService +AuthModule + +AuthModule - + AppModule - -AppModule + +AppModule - + +AuthModule->AppModule + + + + + +ChatroomsModule + +ChatroomsModule + + + +ChatroomsModule->AppModule + + + + + +MessagesModule + +MessagesModule + + + +MessagesModule->AppModule + + + + + +UserModule + +UserModule + + + +UserModule->AppModule + + + + + +AppService + +AppService + + + AppService->AppModule - - + + diff --git a/documentation/modules/AuthModule.html b/documentation/modules/AuthModule.html new file mode 100644 index 0000000..55b2a68 --- /dev/null +++ b/documentation/modules/AuthModule.html @@ -0,0 +1,440 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                            +
                                                                            + + +
                                                                            +
                                                                            + + + + + +
                                                                            +
                                                                            + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_AuthModule + + + +cluster_AuthModule_providers + + + +cluster_AuthModule_exports + + + + +AuthService + +AuthService + + + +HashingProvider + +HashingProvider + + + +AuthModule + +AuthModule + + + +AuthModule->AuthService + + + + + +AuthModule->HashingProvider + + + + + +AuthService + +AuthService + + + +AuthService->AuthModule + + + + + +GenerateTokensProvider + +GenerateTokensProvider + + + +GenerateTokensProvider->AuthModule + + + + + +GoogleAuthenticationService + +GoogleAuthenticationService + + + +GoogleAuthenticationService->AuthModule + + + + + +RefreshTokensProvider + +RefreshTokensProvider + + + +RefreshTokensProvider->AuthModule + + + + + +SignInProvider + +SignInProvider + + + +SignInProvider->AuthModule + + + + + + +
                                                                            + +
                                                                            + + + +
                                                                            +
                                                                            + + + + + +
                                                                            +
                                                                            + +

                                                                            +

                                                                            File

                                                                            +

                                                                            +

                                                                            + src/auth/auth.module.ts +

                                                                            + + + + + +
                                                                            +
                                                                            + +
                                                                            +

                                                                            Controllers

                                                                            + +
                                                                            +
                                                                            +

                                                                            Exports

                                                                            + +
                                                                            +
                                                                            +
                                                                            + + +
                                                                            + + +
                                                                            +
                                                                            import { forwardRef, Module } from '@nestjs/common';
                                                                            +import { AuthService } from './providers/auth.service';
                                                                            +import { BcryptProvider } from './providers/bcrypt';
                                                                            +import { HashingProvider } from './providers/hashing';
                                                                            +import { SignInProvider } from './providers/sign-in.provider';
                                                                            +import { ConfigModule } from '@nestjs/config';
                                                                            +import { JwtModule } from '@nestjs/jwt';
                                                                            +import jwtConfig from 'src/auth/authConfig/jwt.config';
                                                                            +import { APP_GUARD } from '@nestjs/core';
                                                                            +import { AccessTokenGuard } from './guard/access-token/access-token.guard';
                                                                            +import { GenerateTokensProvider } from './providers/generate-tokens.provider';
                                                                            +import { RefreshTokensProvider } from './providers/refresh-tokens.provider';
                                                                            +import { UserModule } from 'src/users/user.module';
                                                                            +import { AuthController } from './auth.controller';
                                                                            +import { GoogleAuthenticationService } from './social/providers/google-authentication.service';
                                                                            +import { GoogleAuthenticationController } from './social/google-authentication.controller';
                                                                            +
                                                                            +@Module({
                                                                            +  imports: [
                                                                            +    forwardRef(() => UserModule),
                                                                            +    ConfigModule.forFeature(jwtConfig),
                                                                            +    JwtModule.registerAsync(jwtConfig.asProvider()),
                                                                            +  ],
                                                                            +  controllers: [AuthController, GoogleAuthenticationController],
                                                                            +  providers: [
                                                                            +    AuthService,
                                                                            +    {
                                                                            +      provide: HashingProvider, // Use the abstract class as a token
                                                                            +      useClass: BcryptProvider, // Bind it to the concrete implementation
                                                                            +    },
                                                                            +    SignInProvider,
                                                                            +    GenerateTokensProvider,
                                                                            +    RefreshTokensProvider,
                                                                            +    GoogleAuthenticationService,
                                                                            +  ],
                                                                            +  exports: [AuthService, HashingProvider],
                                                                            +})
                                                                            +export class AuthModule {}
                                                                            +
                                                                            +
                                                                            + + + + + + + + + + + + + + + + + +
                                                                            +
                                                                            +

                                                                            results matching ""

                                                                            +
                                                                              +
                                                                              +
                                                                              +

                                                                              No results matching ""

                                                                              +
                                                                              +
                                                                              +
                                                                              + +
                                                                              +
                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/modules/AuthModule/dependencies.svg b/documentation/modules/AuthModule/dependencies.svg new file mode 100644 index 0000000..e04d3cf --- /dev/null +++ b/documentation/modules/AuthModule/dependencies.svg @@ -0,0 +1,126 @@ + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_AuthModule + + + +cluster_AuthModule_providers + + + +cluster_AuthModule_exports + + + + +AuthService + +AuthService + + + +HashingProvider + +HashingProvider + + + +AuthModule + +AuthModule + + + +AuthModule->AuthService + + + + + +AuthModule->HashingProvider + + + + + +AuthService + +AuthService + + + +AuthService->AuthModule + + + + + +GenerateTokensProvider + +GenerateTokensProvider + + + +GenerateTokensProvider->AuthModule + + + + + +GoogleAuthenticationService + +GoogleAuthenticationService + + + +GoogleAuthenticationService->AuthModule + + + + + +RefreshTokensProvider + +RefreshTokensProvider + + + +RefreshTokensProvider->AuthModule + + + + + +SignInProvider + +SignInProvider + + + +SignInProvider->AuthModule + + + + + diff --git a/documentation/modules/ChatroomsModule.html b/documentation/modules/ChatroomsModule.html new file mode 100644 index 0000000..560dc77 --- /dev/null +++ b/documentation/modules/ChatroomsModule.html @@ -0,0 +1,316 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                              +
                                                                              + + +
                                                                              +
                                                                              + + + + + +
                                                                              +
                                                                              + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_ChatroomsModule + + + +cluster_ChatroomsModule_providers + + + + +ChatRoomsService + +ChatRoomsService + + + +ChatroomsModule + +ChatroomsModule + + + +ChatRoomsService->ChatroomsModule + + + + + + +
                                                                              + +
                                                                              + + + +
                                                                              +
                                                                              + + + + + +
                                                                              +
                                                                              + +

                                                                              +

                                                                              File

                                                                              +

                                                                              +

                                                                              + src/chatrooms/chatrooms.module.ts +

                                                                              + + + +

                                                                              +

                                                                              Description

                                                                              +

                                                                              +

                                                                              +

                                                                              chatroom module

                                                                              + +

                                                                              + + +
                                                                              +
                                                                              +
                                                                              +

                                                                              Providers

                                                                              + +
                                                                              +
                                                                              +

                                                                              Controllers

                                                                              + +
                                                                              +
                                                                              +
                                                                              + + +
                                                                              + + +
                                                                              +
                                                                              import { Module } from '@nestjs/common';
                                                                              +import { ChatRoomsService } from './providers/chatrooms/chatrooms.service';
                                                                              +import { ChatRoomsController } from './chatroom.controller';
                                                                              +
                                                                              +/**chatroom module */
                                                                              +@Module({
                                                                              +  controllers: [ChatRoomsController],
                                                                              +  providers: [ChatRoomsService]
                                                                              +})
                                                                              +export class ChatroomsModule {}
                                                                              +
                                                                              +
                                                                              +
                                                                              + + + + + + + + + + + + + + + + + +
                                                                              +
                                                                              +

                                                                              results matching ""

                                                                              +
                                                                                +
                                                                                +
                                                                                +

                                                                                No results matching ""

                                                                                +
                                                                                +
                                                                                +
                                                                                + +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/modules/ChatroomsModule/dependencies.svg b/documentation/modules/ChatroomsModule/dependencies.svg new file mode 100644 index 0000000..dc74b39 --- /dev/null +++ b/documentation/modules/ChatroomsModule/dependencies.svg @@ -0,0 +1,50 @@ + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_ChatroomsModule + + + +cluster_ChatroomsModule_providers + + + + +ChatRoomsService + +ChatRoomsService + + + +ChatroomsModule + +ChatroomsModule + + + +ChatRoomsService->ChatroomsModule + + + + + diff --git a/documentation/modules/GoogleAuthticationModule.html b/documentation/modules/GoogleAuthticationModule.html new file mode 100644 index 0000000..dada3a1 --- /dev/null +++ b/documentation/modules/GoogleAuthticationModule.html @@ -0,0 +1,307 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                +
                                                                                + + +
                                                                                +
                                                                                + + + + + +
                                                                                +
                                                                                + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_GoogleAuthticationModule + + + +cluster_GoogleAuthticationModule_providers + + + + +GoogleAuthenticationService + +GoogleAuthenticationService + + + +GoogleAuthticationModule + +GoogleAuthticationModule + + + +GoogleAuthenticationService->GoogleAuthticationModule + + + + + + +
                                                                                + +
                                                                                + + + +
                                                                                +
                                                                                + + + + + +
                                                                                +
                                                                                + +

                                                                                +

                                                                                File

                                                                                +

                                                                                +

                                                                                + src/auth/social/google-authtication.module.ts +

                                                                                + + + + + +
                                                                                +
                                                                                +
                                                                                +

                                                                                Providers

                                                                                + +
                                                                                +
                                                                                +

                                                                                Controllers

                                                                                + +
                                                                                +
                                                                                +
                                                                                + + +
                                                                                + + +
                                                                                +
                                                                                import { Module } from '@nestjs/common';
                                                                                +import { GoogleAuthenticationController } from './google-authentication.controller';
                                                                                +import { GoogleAuthenticationService } from './providers/google-authentication.service';
                                                                                +
                                                                                +@Module({
                                                                                +  controllers: [GoogleAuthenticationController],
                                                                                +  providers: [GoogleAuthenticationService]
                                                                                +})
                                                                                +export class GoogleAuthticationModule {}
                                                                                +
                                                                                +
                                                                                + + + + + + + + + + + + + + + + + +
                                                                                +
                                                                                +

                                                                                results matching ""

                                                                                +
                                                                                  +
                                                                                  +
                                                                                  +

                                                                                  No results matching ""

                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/modules/GoogleAuthticationModule/dependencies.svg b/documentation/modules/GoogleAuthticationModule/dependencies.svg new file mode 100644 index 0000000..f6f4f4a --- /dev/null +++ b/documentation/modules/GoogleAuthticationModule/dependencies.svg @@ -0,0 +1,50 @@ + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_GoogleAuthticationModule + + + +cluster_GoogleAuthticationModule_providers + + + + +GoogleAuthenticationService + +GoogleAuthenticationService + + + +GoogleAuthticationModule + +GoogleAuthticationModule + + + +GoogleAuthenticationService->GoogleAuthticationModule + + + + + diff --git a/documentation/modules/MessagesModule.html b/documentation/modules/MessagesModule.html new file mode 100644 index 0000000..a50f5f8 --- /dev/null +++ b/documentation/modules/MessagesModule.html @@ -0,0 +1,316 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                  +
                                                                                  + + +
                                                                                  +
                                                                                  + + + + + +
                                                                                  +
                                                                                  + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_MessagesModule + + + +cluster_MessagesModule_providers + + + + +MessagesService + +MessagesService + + + +MessagesModule + +MessagesModule + + + +MessagesService->MessagesModule + + + + + + +
                                                                                  + +
                                                                                  + + + +
                                                                                  +
                                                                                  + + + + + +
                                                                                  +
                                                                                  + +

                                                                                  +

                                                                                  File

                                                                                  +

                                                                                  +

                                                                                  + src/messages/messages.module.ts +

                                                                                  + + + +

                                                                                  +

                                                                                  Description

                                                                                  +

                                                                                  +

                                                                                  +

                                                                                  Message module

                                                                                  + +

                                                                                  + + +
                                                                                  +
                                                                                  +
                                                                                  +

                                                                                  Providers

                                                                                  + +
                                                                                  +
                                                                                  +

                                                                                  Controllers

                                                                                  + +
                                                                                  +
                                                                                  +
                                                                                  + + +
                                                                                  + + +
                                                                                  +
                                                                                  import { Module } from '@nestjs/common';
                                                                                  +import { MessagesController } from './messages.controller';
                                                                                  +import { MessagesService } from './providers/messages/messages.service';
                                                                                  +
                                                                                  +/**Message module */
                                                                                  +@Module({
                                                                                  +  controllers: [MessagesController],
                                                                                  +  providers: [MessagesService]
                                                                                  +})
                                                                                  +export class MessagesModule {}
                                                                                  +
                                                                                  +
                                                                                  +
                                                                                  + + + + + + + + + + + + + + + + + +
                                                                                  +
                                                                                  +

                                                                                  results matching ""

                                                                                  +
                                                                                    +
                                                                                    +
                                                                                    +

                                                                                    No results matching ""

                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    + +
                                                                                    +
                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/modules/MessagesModule/dependencies.svg b/documentation/modules/MessagesModule/dependencies.svg new file mode 100644 index 0000000..d6607ae --- /dev/null +++ b/documentation/modules/MessagesModule/dependencies.svg @@ -0,0 +1,50 @@ + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_MessagesModule + + + +cluster_MessagesModule_providers + + + + +MessagesService + +MessagesService + + + +MessagesModule + +MessagesModule + + + +MessagesService->MessagesModule + + + + + diff --git a/documentation/modules/UserModule.html b/documentation/modules/UserModule.html new file mode 100644 index 0000000..7e56d4f --- /dev/null +++ b/documentation/modules/UserModule.html @@ -0,0 +1,409 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                    +
                                                                                    + + +
                                                                                    +
                                                                                    + + + + + +
                                                                                    +
                                                                                    + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_UserModule + + + +cluster_UserModule_providers + + + +cluster_UserModule_exports + + + + +UserService + +UserService + + + +UserModule + +UserModule + + + +UserModule->UserService + + + + + +CreateGoogleUserProvider + +CreateGoogleUserProvider + + + +CreateGoogleUserProvider->UserModule + + + + + +CreateUserProvider + +CreateUserProvider + + + +CreateUserProvider->UserModule + + + + + +FindOneByEmail + +FindOneByEmail + + + +FindOneByEmail->UserModule + + + + + +FindOneByGoogleIdProvider + +FindOneByGoogleIdProvider + + + +FindOneByGoogleIdProvider->UserModule + + + + + +UserService + +UserService + + + +UserService->UserModule + + + + + + +
                                                                                    + +
                                                                                    + + + +
                                                                                    +
                                                                                    + + + + + +
                                                                                    +
                                                                                    + +

                                                                                    +

                                                                                    File

                                                                                    +

                                                                                    +

                                                                                    + src/users/user.module.ts +

                                                                                    + + + + + +
                                                                                    +
                                                                                    + +
                                                                                    +

                                                                                    Controllers

                                                                                    + +
                                                                                    +
                                                                                    +

                                                                                    Exports

                                                                                    + +
                                                                                    +
                                                                                    +
                                                                                    + + +
                                                                                    + + +
                                                                                    +
                                                                                    import { forwardRef, Module } from '@nestjs/common';
                                                                                    +import { UserService } from './provider/user.service';
                                                                                    +import { UserController } from './user.controller';
                                                                                    +import { TypeOrmModule } from '@nestjs/typeorm';
                                                                                    +import { User } from './user.entitly';
                                                                                    +import { CreateUserProvider } from './provider/create-user.provider';
                                                                                    +import { FindOneByEmail } from './provider/find-one-by-email';
                                                                                    +import { FindOneByGoogleIdProvider } from './provider/find-one-by-googleId';
                                                                                    +import { CreateGoogleUserProvider } from './provider/googleUserProvider';
                                                                                    +import { AuthModule } from 'src/auth/auth.module';
                                                                                    +
                                                                                    +@Module({
                                                                                    +  imports: [forwardRef(() => AuthModule), TypeOrmModule.forFeature([User])],
                                                                                    +  controllers: [UserController],
                                                                                    +  providers: [
                                                                                    +    UserService,
                                                                                    +    CreateUserProvider,
                                                                                    +    FindOneByEmail,
                                                                                    +    FindOneByGoogleIdProvider,
                                                                                    +    CreateGoogleUserProvider
                                                                                    +  ],
                                                                                    +  exports: [UserService],
                                                                                    +})
                                                                                    +export class UserModule {}
                                                                                    +
                                                                                    +
                                                                                    +
                                                                                    + + + + + + + + + + + + + + + + + +
                                                                                    +
                                                                                    +

                                                                                    results matching ""

                                                                                    +
                                                                                      +
                                                                                      +
                                                                                      +

                                                                                      No results matching ""

                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/modules/UserModule/dependencies.svg b/documentation/modules/UserModule/dependencies.svg new file mode 100644 index 0000000..5a94048 --- /dev/null +++ b/documentation/modules/UserModule/dependencies.svg @@ -0,0 +1,114 @@ + + + + + + +dependencies + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports + +cluster_UserModule + + + +cluster_UserModule_providers + + + +cluster_UserModule_exports + + + + +UserService + +UserService + + + +UserModule + +UserModule + + + +UserModule->UserService + + + + + +CreateGoogleUserProvider + +CreateGoogleUserProvider + + + +CreateGoogleUserProvider->UserModule + + + + + +CreateUserProvider + +CreateUserProvider + + + +CreateUserProvider->UserModule + + + + + +FindOneByEmail + +FindOneByEmail + + + +FindOneByEmail->UserModule + + + + + +FindOneByGoogleIdProvider + +FindOneByGoogleIdProvider + + + +FindOneByGoogleIdProvider->UserModule + + + + + +UserService + +UserService + + + +UserService->UserModule + + + + + diff --git a/documentation/overview.html b/documentation/overview.html index 4a16108..2651a8e 100644 --- a/documentation/overview.html +++ b/documentation/overview.html @@ -102,47 +102,335 @@ - - + + dependencies - -Legend - -  Declarations - -  Module - -  Bootstrap - -  Providers - -  Exports + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports cluster_AppModule - + + + +cluster_AppModule_imports + cluster_AppModule_providers - + - + +cluster_AuthModule + + + +cluster_AuthModule_exports + + + +cluster_AuthModule_providers + + + +cluster_ChatroomsModule + + + +cluster_ChatroomsModule_providers + + + +cluster_GoogleAuthticationModule + + + +cluster_MessagesModule + + + +cluster_MessagesModule_providers + + + +cluster_UserModule + + + +cluster_UserModule_exports + + + +cluster_UserModule_providers + + + -AppService - -AppService +AuthModule + +AuthModule - + AppModule - -AppModule + +AppModule - + +AuthModule->AppModule + + + + + +AuthService + +AuthService + + + +AuthModule->AuthService + + + + + +HashingProvider + +HashingProvider + + + +AuthModule->HashingProvider + + + + + +ChatroomsModule + +ChatroomsModule + + + +ChatroomsModule->AppModule + + + + + +MessagesModule + +MessagesModule + + + +MessagesModule->AppModule + + + + + +UserModule + +UserModule + + + +UserModule->AppModule + + + + + +UserService + +UserService + + + +UserModule->UserService + + + + + +AppService + +AppService + + + AppService->AppModule - - + + + + + +AuthService + +AuthService + + + +AuthService->AuthModule + + + + + +GenerateTokensProvider + +GenerateTokensProvider + + + +GenerateTokensProvider->AuthModule + + + + + +GoogleAuthenticationService + +GoogleAuthenticationService + + + +GoogleAuthenticationService->AuthModule + + + + + +GoogleAuthticationModule + +GoogleAuthticationModule + + + +GoogleAuthenticationService->GoogleAuthticationModule + + + + + +RefreshTokensProvider + +RefreshTokensProvider + + + +RefreshTokensProvider->AuthModule + + + + + +SignInProvider + +SignInProvider + + + +SignInProvider->AuthModule + + + + + +ChatRoomsService + +ChatRoomsService + + + +ChatRoomsService->ChatroomsModule + + + + + +MessagesService + +MessagesService + + + +MessagesService->MessagesModule + + + + + +CreateGoogleUserProvider + +CreateGoogleUserProvider + + + +CreateGoogleUserProvider->UserModule + + + + + +CreateUserProvider + +CreateUserProvider + + + +CreateUserProvider->UserModule + + + + + +FindOneByEmail + +FindOneByEmail + + + +FindOneByEmail->UserModule + + + + + +FindOneByGoogleIdProvider + +FindOneByGoogleIdProvider + + + +FindOneByGoogleIdProvider->UserModule + + + + + +UserService + +UserService + + + +UserService->UserModule + + @@ -163,7 +451,7 @@ @@ -172,7 +460,15 @@

                                                                                      -

                                                                                      1 Controller

                                                                                      +

                                                                                      6 Controllers

                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      +
                                                                                      +

                                                                                      +

                                                                                      3 Entities

                                                                                      @@ -180,7 +476,31 @@

                                                                                      -

                                                                                      1 Injectable

                                                                                      +

                                                                                      15 Injectables

                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      +
                                                                                      +

                                                                                      +

                                                                                      9 Classes

                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +

                                                                                      +

                                                                                      1 Guard

                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +
                                                                                      +

                                                                                      +

                                                                                      2 Interfaces

                                                                                      diff --git a/package-lock.json b/package-lock.json index edff855..a65922b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4821,11 +4821,6 @@ "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==" }, - "node_modules/bcryptjs": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", - "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" - }, "node_modules/bcrypt": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-5.1.1.tgz", @@ -4840,6 +4835,11 @@ "node": ">= 10.0.0" } }, + "node_modules/bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha512-V/Hy/X9Vt7f3BbPJEi8BdVFMByHi+jNXrYkW3huaybV/kQ0KJg0Y6PkEMbn+zeT+i+SiKZ/HMqJGIIt4LZDqNQ==" + }, "node_modules/bignumber.js": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", @@ -5564,6 +5564,22 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "engines": { + "node": ">=0.1.90" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -6327,7 +6343,6 @@ "version": "1.5.96", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.96.tgz", "integrity": "sha512-8AJUW6dh75Fm/ny8+kZKJzI1pgoE8bKLZlzDU2W1ENd+DXKJrx7I7l9hb8UWR4ojlnb5OlixMt00QWiYJoVw1w==", - "dev": true, "license": "ISC" }, "node_modules/emitter-component": { @@ -7495,6 +7510,86 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.8.tgz", + "integrity": "sha512-e5iwyodOHhbMr/yNrc7fDYG4qlbIvI5gajyzPnb5TCwyhjApznQh1BMFou9b30SevY43gCJKXycoCBjMbsuW0Q==", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "deprecated": "This package is no longer supported.", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/gauge/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/gaxios": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.7.1.tgz", + "integrity": "sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==", + "dependencies": { + "extend": "^3.0.2", + "https-proxy-agent": "^7.0.1", + "is-stream": "^2.0.0", + "node-fetch": "^2.6.9", + "uuid": "^9.0.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/gcp-metadata": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.1.tgz", + "integrity": "sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A==", + "dependencies": { + "gaxios": "^6.1.1", + "google-logging-utils": "^0.0.2", + "json-bigint": "^1.0.0" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -7644,6 +7739,45 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/google-auth-library": { + "version": "9.15.1", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.15.1.tgz", + "integrity": "sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng==", + "dependencies": { + "base64-js": "^1.3.0", + "ecdsa-sig-formatter": "^1.0.11", + "gaxios": "^6.1.1", + "gcp-metadata": "^6.1.0", + "gtoken": "^7.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/google-logging-utils": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/google-logging-utils/-/google-logging-utils-0.0.2.tgz", + "integrity": "sha512-NEgUnEcBiP5HrPzufUkBzJOD/Sxsco3rLNo1F1TNf7ieU8ryUzBhqba8r756CjLX7rn3fHl6iLEwPYuqpoKgQQ==", + "engines": { + "node": ">=14" + } + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -7669,6 +7803,65 @@ "dev": true, "license": "MIT" }, + "node_modules/gtoken": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", + "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", + "dependencies": { + "gaxios": "^6.0.0", + "jws": "^4.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/hammerjs": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", + "integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-bigints": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.1.0.tgz", + "integrity": "sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -7726,6 +7919,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -7843,6 +8055,23 @@ "node": ">= 0.8" } }, + "node_modules/http-parser-js": { + "version": "0.5.9", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.9.tgz", + "integrity": "sha512-n1XsPy3rXVxlqxVioEWdC+0+M+SQw0DpJynwtOPo1X+ZlvdzTLtDBIJJlDQTnwZIFJrZSzSGmIOUdP8tu+SgLw==" + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -9453,6 +9682,30 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/jwa": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-2.0.0.tgz", + "integrity": "sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA==", + "dependencies": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/jws": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jws/-/jws-4.0.0.tgz", + "integrity": "sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg==", + "dependencies": { + "jwa": "^2.0.0", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/keycharm": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/keycharm/-/keycharm-0.2.0.tgz", + "integrity": "sha512-i/XBRTiLqRConPKioy2oq45vbv04e8x59b0mnsIRQM+7Ec/8BC7UcL5pnC4FMeGb8KwG7q4wOMw7CtNZf5tiIg==" + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -10090,6 +10343,29 @@ "node": ">=8" } }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "deprecated": "This package is no longer supported.", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -13594,6 +13870,162 @@ "node": ">= 8" } }, + "node_modules/which-boxed-primitive": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", + "dependencies": { + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "node_modules/which-collection": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", + "integrity": "sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==", + "dependencies": { + "is-map": "^2.0.3", + "is-set": "^2.0.3", + "is-weakmap": "^2.0.2", + "is-weakset": "^2.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.18", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.18.tgz", + "integrity": "sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "for-each": "^0.3.3", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/windows-release": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-4.0.0.tgz", + "integrity": "sha512-OxmV4wzDKB1x7AZaZgXMVsdJ1qER1ed83ZrTYd5Bwq2HfJVg3DJS8nqlAG4sMoJ7mu8cuRmLEYyU13BKwctRAg==", + "dependencies": { + "execa": "^4.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/windows-release/node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/windows-release/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/windows-release/node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/windows-release/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", diff --git a/src/app.controller.ts b/src/app.controller.ts index cce879e..548aefa 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -1,10 +1,13 @@ import { Controller, Get } from '@nestjs/common'; import { AppService } from './app.service'; +/**App controller class */ @Controller() export class AppController { + /**constructor for the app service */ constructor(private readonly appService: AppService) {} + /**get method */ @Get() getHello(): string { return this.appService.getHello(); diff --git a/src/app.service.ts b/src/app.service.ts index d671e91..13e39c4 100644 --- a/src/app.service.ts +++ b/src/app.service.ts @@ -1,7 +1,10 @@ import { Injectable } from '@nestjs/common'; - +/**AppService class*/ @Injectable() + export class AppService { + + /**Get hello method */ getHello(): string { return 'Hello'; } diff --git a/src/auth/auth.controller.ts b/src/auth/auth.controller.ts index cb4c46f..6fadc30 100644 --- a/src/auth/auth.controller.ts +++ b/src/auth/auth.controller.ts @@ -4,22 +4,47 @@ import { SignInDto } from './dtos/userDto'; import { authTypes } from './enums/authTypes.enum'; import { RefreshTokenDto } from './dtos/refreshTokenDto'; import { Auth } from './decorators/auth.decorator'; +import { ApiTags, ApiOperation, ApiResponse, ApiBody } from '@nestjs/swagger'; +/** + * Auth controller class + */ +@ApiTags('Authentication') @Controller('auth') export class AuthController { constructor( - // injecting auth service + /** Injecting auth service*/ private readonly authservice: AuthService, ) {} + + /** + * Sign in method + * @param signInDto - User credentials + * @returns Access token and user details + */ @Post('/signIn') @Auth(authTypes.None) @HttpCode(HttpStatus.OK) @UseInterceptors(ClassSerializerInterceptor) + @ApiOperation({ summary: 'User sign-in' }) + @ApiResponse({ status: HttpStatus.OK, description: 'User signed in successfully' }) + @ApiResponse({ status: HttpStatus.UNAUTHORIZED, description: 'Invalid credentials' }) + @ApiBody({ type: SignInDto }) public async SignIn(@Body() signInDto: SignInDto) { - return await this.authservice.SignIn(signInDto) + return await this.authservice.SignIn(signInDto); } + + /** + * Refresh token method + * @param refreshToken - Refresh token object + * @returns New access token + */ @Post('/refreshToken') + @ApiOperation({ summary: 'Refresh authentication token' }) + @ApiResponse({ status: HttpStatus.OK, description: 'Token refreshed successfully' }) + @ApiResponse({ status: HttpStatus.UNAUTHORIZED, description: 'Invalid refresh token' }) + @ApiBody({ type: RefreshTokenDto }) public RefreshToken(@Body() refreshToken: RefreshTokenDto) { - return this.authservice.refreshToken(refreshToken) + return this.authservice.refreshToken(refreshToken); } -} \ No newline at end of file +} diff --git a/src/auth/constants/auth.constant.ts b/src/auth/constants/auth.constant.ts index d4a8e7f..884ea85 100644 --- a/src/auth/constants/auth.constant.ts +++ b/src/auth/constants/auth.constant.ts @@ -1,2 +1,6 @@ + +/**defining the request user key */ + export const REQUEST_USER_KEY = 'user' +/**defining the request authtype key */ export const AUTH_TYPE_KEY = 'auth' \ No newline at end of file diff --git a/src/auth/decorators/activeUser.decorator.ts b/src/auth/decorators/activeUser.decorator.ts index 68e28a8..bc8660f 100644 --- a/src/auth/decorators/activeUser.decorator.ts +++ b/src/auth/decorators/activeUser.decorator.ts @@ -3,6 +3,9 @@ import { createParamDecorator, ExecutionContext } from '@nestjs/common'; import { REQUEST_USER_KEY } from '../constants/auth.constant'; import { ActiveUserData } from '../interface/activeInterface'; +/** Custom decorator to retrieve active user data from the request. + *It extracts the user information stored under `REQUEST_USER_KEY`. */ + export const ActiveUser = createParamDecorator( (field: keyof ActiveUserData | undefined, ctx: ExecutionContext) => { const request = ctx.switchToHttp().getRequest(); diff --git a/src/auth/decorators/auth.decorator.ts b/src/auth/decorators/auth.decorator.ts index b81af09..1b8dcfc 100644 --- a/src/auth/decorators/auth.decorator.ts +++ b/src/auth/decorators/auth.decorator.ts @@ -2,5 +2,6 @@ import { SetMetadata } from '@nestjs/common'; import { AUTH_TYPE_KEY } from '../constants/auth.constant'; import { authTypes } from '../enums/authTypes.enum'; +/**main auth class retrieve active user data from the request */ export const Auth = (...authTypes: authTypes[]) => SetMetadata(AUTH_TYPE_KEY, authTypes); \ No newline at end of file diff --git a/src/auth/dtos/refreshTokenDto.ts b/src/auth/dtos/refreshTokenDto.ts index 0fe58ba..9de18f7 100644 --- a/src/auth/dtos/refreshTokenDto.ts +++ b/src/auth/dtos/refreshTokenDto.ts @@ -1,6 +1,9 @@ import { IsNotEmpty, IsString, } from "class-validator"; +/**refresh tokendto class */ export class RefreshTokenDto { + + /**refreshToken of type string */ @IsString() @IsNotEmpty() refreshToken: string diff --git a/src/auth/dtos/userDto.ts b/src/auth/dtos/userDto.ts index f3e4061..537cba9 100644 --- a/src/auth/dtos/userDto.ts +++ b/src/auth/dtos/userDto.ts @@ -1,10 +1,13 @@ import { IsEmail, IsNotEmpty, IsString } from "class-validator"; +/**signinDto class */ export class SignInDto { + /**A unique email address of the user example:Rukky@gmail.com */ @IsEmail() @IsNotEmpty() email: string; + /**password of the user */ @IsString() @IsNotEmpty() password: string; diff --git a/src/auth/enums/authTypes.enum.ts b/src/auth/enums/authTypes.enum.ts index 83a61ba..05b8794 100644 --- a/src/auth/enums/authTypes.enum.ts +++ b/src/auth/enums/authTypes.enum.ts @@ -1,3 +1,4 @@ +/**define authTypes enum */ export enum authTypes { Bearer, None diff --git a/src/auth/guard/access-token/access-token.guard.ts b/src/auth/guard/access-token/access-token.guard.ts index 6d45b44..0b16352 100644 --- a/src/auth/guard/access-token/access-token.guard.ts +++ b/src/auth/guard/access-token/access-token.guard.ts @@ -1,51 +1,145 @@ import { - CanActivate, - ExecutionContext, - Inject, - Injectable, - UnauthorizedException, - } from '@nestjs/common'; - import { ConfigType } from '@nestjs/config'; - import { JwtService } from '@nestjs/jwt'; - import { Request } from 'express'; - import { Observable } from 'rxjs'; - import jwtConfig from 'src/auth/authConfig/jwt.config'; - import { REQUEST_USER_KEY } from 'src/auth/constants/auth.constant'; - - @Injectable() - export class AccessTokenGuard implements CanActivate { - constructor( - private readonly jwtService: JwtService, - - @Inject(jwtConfig.KEY) - private readonly jwtConfiguration: ConfigType, - ) {} - - async canActivate(context: ExecutionContext): Promise { - //Extract the request from the execution context - const request = context.switchToHttp().getRequest(); - // Extract the token from the header - const token = this.extractRequestFromHeader(request); - // Validate the token - if (!token) { - throw new UnauthorizedException(); - } - try { - const payload = await this.jwtService.verifyAsync( - token, - this.jwtConfiguration, - ); - - request[REQUEST_USER_KEY] = payload; - console.log(payload); - } catch (error) { - throw new UnauthorizedException(error); - } - return true; - } - - private extractRequestFromHeader(request: Request) { - const [_, token] = request.headers.authorization?.split(' ') ?? []; - return token; - } - } \ No newline at end of file + IsString, + IsEmail, + IsNotEmpty, + IsEnum, + IsOptional, + Validate, + MaxLength, + Matches, + ValidatorConstraint, + ValidatorConstraintInterface, + ValidationArguments, +} from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; +import { Column } from 'typeorm'; +import { userRole } from '../Enums/userRole.enum'; +import { Transform } from 'class-transformer'; + +/** + * ValidatorConstraint: Custom validation class to ensure that + * the confirmPassword field matches the password field. + */ +@ValidatorConstraint({ name: 'MatchPasswords', async: false }) +/** + * MatchPasswordsConstraint class that implements ValidatorConstraintInterface + */ + +/**MatchPasswordConstraint implementing ValidatorConstraintInterface */ +class MatchPasswordsConstraint implements ValidatorConstraintInterface { + validate(confirmPassword: string, args: ValidationArguments): boolean { + const object = args.object as CreateUserDto; + + /** Ensure password is present before checking match */ + if (!object.password) return false; + return confirmPassword === object.password; + } + + defaultMessage(args: ValidationArguments): string { + return 'Password and confirm password do not match'; + } +} + +/** + * CreateUserDto class representing the user creation request payload. + */ + +export class CreateUserDto { + /** + * First name of the user. + */ + @ApiProperty({ + type: 'string', + example: 'Fatima', + description: 'First name field', + }) + @IsString() + @IsNotEmpty() + @MaxLength(100) + firstName: string; + + /** + * Last name of the user. + */ + @ApiProperty({ + type: 'string', + example: 'Aminu', + description: 'Last name field', + }) + @IsString() + @IsOptional() + @MaxLength(100) + lastName: string; + + /** + * Email field (must be unique). + */ + @ApiProperty({ + type: 'string', + example: 'fatimaaminu@mail.com', + description: 'Email field', + }) + @IsEmail() + @MaxLength(150) + @Column({ unique: true, length: 150 }) + email: string; + + /** + * Password field with specific validation rules. + */ + @ApiProperty({ + type: 'string', + example: '@Password123', + description: 'Password should contain numbers, alphabets, and uppercase.', + }) + @IsString() + @MaxLength(225) + @Matches( + /^(?=.*[!@#$%^&])(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9!@#$%^&*]{8,16}$/, + { + message: + 'Password must include at least one uppercase letter, one lowercase letter, one number, and one special character.', + }, + ) + password?: string; + + /** + * Confirm password field, must match the password. + */ + @ApiProperty({ + type: 'string', + example: '@Password123', + description: + 'Password should contain numbers, alphabets, and uppercase and should be the same as the password.', + }) + @IsString() + @MaxLength(225) + @Validate(MatchPasswordsConstraint) + confirmpassword?: string; + + /** + * User role (default is USER if not provided). + */ + @ApiProperty({ + enum: userRole, + example: userRole.USER, + description: 'User role (default is USER if not provided).', + }) + @IsEnum(userRole) + @IsOptional() + @Transform(({ value }) => value ?? userRole.USER) + userRole?: userRole; + + /** + * Google ID (used for OAuth authentication). + */ + @ApiProperty({ + type: 'string', + example: 'poiuytrdspoiuytrewa\zxcvbnmml;poiuytrdsdcvbnm]', + description: 'This is autogenerated from Google when you sign up with Google.', + }) + @IsString() + @IsOptional() + @MaxLength(225) + googleId?: string; +} diff --git a/src/auth/guard/auth-guard/auth-guard.guard.ts b/src/auth/guard/auth-guard/auth-guard.guard.ts index fff9672..e9bd0c0 100644 --- a/src/auth/guard/auth-guard/auth-guard.guard.ts +++ b/src/auth/guard/auth-guard/auth-guard.guard.ts @@ -1,64 +1,79 @@ import { - CanActivate, - ExecutionContext, - Injectable, - UnauthorizedException, - } from '@nestjs/common'; - import { Reflector } from '@nestjs/core'; - import { Observable } from 'rxjs'; - import { AccessTokenGuard } from '../access-token/access-token.guard'; - import { authTypes } from 'src/auth/enums/authTypes.enum'; - import { AUTH_TYPE_KEY } from 'src/auth/constants/auth.constant'; - - @Injectable() - export class AuthGuardGuard implements CanActivate { - - private static readonly defaultAuthType = authTypes.Bearer; - - private readonly authTypeGuardMap: Record< - authTypes, - CanActivate | CanActivate[] - > = { - [authTypes.Bearer]: this.accessTokenGuard, - [authTypes.None]: { canActivate: () => true }, - }; - - constructor( - private readonly reflector: Reflector, - private readonly accessTokenGuard: AccessTokenGuard, - ) {} - - async canActivate(context: ExecutionContext): Promise { - // get authTypes from the reflector - const authTypes = this.reflector.getAllAndOverride(AUTH_TYPE_KEY, [ + CanActivate, + ExecutionContext, + Injectable, + UnauthorizedException, +} from '@nestjs/common'; +import { Reflector } from '@nestjs/core'; +import { Observable } from 'rxjs'; +import { AccessTokenGuard } from '../access-token/access-token.guard'; +import { authTypes } from 'src/auth/enums/authTypes.enum'; +import { AUTH_TYPE_KEY } from 'src/auth/constants/auth.constant'; +import { ApiTags } from '@nestjs/swagger'; + +/** + * AuthGuard class implementing CanActivate + */ +@ApiTags('Auth') +@Injectable() +export class AuthGuardGuard implements CanActivate { + /** + * Injecting default AuthType + */ + private static readonly defaultAuthType = authTypes.Bearer; + + /** + * Injecting default AuthTypeGuardMap + */ + private readonly authTypeGuardMap: Record< + authTypes, + CanActivate | CanActivate[] + > = { + [authTypes.Bearer]: this.accessTokenGuard, + [authTypes.None]: { canActivate: () => true }, + }; + + constructor( + /** + * Injecting reflector + */ + private readonly reflector: Reflector, + + /** + * Injecting Access Token Guard + */ + private readonly accessTokenGuard: AccessTokenGuard, + ) {} + + /** + * CanActivate method to get authTypes from the reflector + * @param context - Execution context + * @returns A boolean indicating whether the request is authorized + * @throws UnauthorizedException if access is denied + */ + async canActivate(context: ExecutionContext): Promise { + // Get authTypes from the reflector + const authTypes = + this.reflector.getAllAndOverride(AUTH_TYPE_KEY, [ context.getHandler(), context.getClass(), - ]) ?? [AuthGuardGuard.defaultAuthType]; - // console.log('show all types', authTypes); - - // get array of guards - const guards = authTypes.map((type) => this.authTypeGuardMap[type]) - // const guards = authTypes - // .map((type) => { - // const guard = this.authTypeGuardMap[type]; - // return Array.isArray(guard) ? guard : [guard]; // Normalize to an array - // }) - // .flat(); - - // loop through the guard and fire the can activate method - for (const instance of guards) { - // console.log("instance of", instance) - const canActivate = await Promise.resolve( - instance.canActivate(context), - ).catch((err) => { - error: err; - }); - // console.log(canActivate) - - if (canActivate) { - return true; - } + ]) ?? [AuthGuardGuard.defaultAuthType]; + + // Get array of guards + const guards = authTypes.map((type) => this.authTypeGuardMap[type]); + + // Loop through the guards and execute the canActivate method + for (const instance of guards) { + const canActivate = await Promise.resolve( + instance.canActivate(context), + ).catch((err) => { + error: err; + }); + + if (canActivate) { + return true; } - throw new UnauthorizedException(); } - } \ No newline at end of file + throw new UnauthorizedException(); + } +} diff --git a/src/auth/interface/activeInterface.ts b/src/auth/interface/activeInterface.ts index 47ea5f6..ffc9f50 100644 --- a/src/auth/interface/activeInterface.ts +++ b/src/auth/interface/activeInterface.ts @@ -1,4 +1,9 @@ +/**Active user data interface */ export interface ActiveUserData { + + /**sub of type:string */ sub: number, + + /**email of type:string */ email?: string } \ No newline at end of file diff --git a/src/auth/providers/auth.service.ts b/src/auth/providers/auth.service.ts index 310750a..212ac2b 100644 --- a/src/auth/providers/auth.service.ts +++ b/src/auth/providers/auth.service.ts @@ -5,30 +5,31 @@ import { UserService } from 'src/users/provider/user.service'; import { SignInProvider } from './sign-in.provider'; import { RefreshTokensProvider } from './refresh-tokens.provider'; +/**Auth service class */ @Injectable() export class AuthService { constructor( /* - * injecting user service + injecting user service */ @Inject(forwardRef(() => UserService)) private readonly userService: UserService, - /* - * inject signInProvider - */ + /*inject signInProvider*/ private readonly signInProvider: SignInProvider, /* - *inject refreshTokenProvider + inject refreshTokenProvider */ private readonly refreshTokensProvider: RefreshTokensProvider ) {} + /**signin method taking signinDto */ public async SignIn(signInDto: SignInDto) { return await this.signInProvider.SignIn(signInDto) } + /**method for the refresh token */ public refreshToken(refreshTokenDto: RefreshTokenDto) { return this.refreshTokensProvider.refreshTokens(refreshTokenDto) } diff --git a/src/auth/providers/bcrypt.ts b/src/auth/providers/bcrypt.ts index b3ff2af..7203a9d 100644 --- a/src/auth/providers/bcrypt.ts +++ b/src/auth/providers/bcrypt.ts @@ -2,9 +2,11 @@ import { Injectable } from '@nestjs/common'; import { HashingProvider } from './hashing'; import * as bcrypt from 'bcrypt'; +/**injectable decorator */ @Injectable() +/**BcryptProvider class that implements Hashing provider */ export class BcryptProvider implements HashingProvider { - // hash + /**Hasshing password method*/ public async hashPassword(inpPassword: string | Buffer): Promise { const saltRounds = 10 const salt = await bcrypt.genSalt(saltRounds) @@ -12,7 +14,7 @@ export class BcryptProvider implements HashingProvider { return await bcrypt.hash(inpPassword, salt) } - // compare + /**Comparing password method */ public async comparePasswords(password: string, encryPassword: string): Promise { return await bcrypt.compare(password, encryPassword) } diff --git a/src/auth/providers/generate-tokens.provider.ts b/src/auth/providers/generate-tokens.provider.ts index b6bc7cf..e150dfa 100644 --- a/src/auth/providers/generate-tokens.provider.ts +++ b/src/auth/providers/generate-tokens.provider.ts @@ -6,27 +6,37 @@ import { ActiveUserData } from '../interface/activeInterface'; import { UserService } from 'src/users/provider/user.service'; import { User } from 'src/users/user.entitly'; +/** + * Injectable service for generating tokens. + */ @Injectable() export class GenerateTokensProvider { constructor( - /* - * injecting userService repo + /** + * Injecting userService repository. */ @Inject(forwardRef(() => UserService)) private readonly userService: UserService, - /* - *injecting jwtService + /** + * Injecting JwtService. */ private readonly jwtService: JwtService, - /* - * injecting jwtConfig + /** + * Injecting jwtConfig. */ @Inject(jwtConfig.KEY) private readonly jwtConfiguration: ConfigType, ) {} + /** + * Signs a token with a given user ID, expiration time, and optional payload. + * @param userId - The ID of the user. + * @param expiresIn - The expiration time for the token. + * @param payload - Additional data to include in the token. + * @returns A signed JWT token. + */ public async signToken(userId: number, expiresIn: number, payload?: T) { return await this.jwtService.signAsync( { @@ -42,15 +52,24 @@ export class GenerateTokensProvider { ); } + /** + * Generates access and refresh tokens for a given user. + * @param user - The user entity for whom tokens are generated. + * @returns An object containing access token, refresh token, and user details. + */ public async generateTokens(user: User) { const [accessToken, refreshToken] = await Promise.all([ - // generate access token - this.signToken(user.id, this.jwtConfiguration.ttl, {email: user.email}), + /** + * Generate access token. + */ + this.signToken(user.id, this.jwtConfiguration.ttl, { email: user.email }), - // generate refresh token - this.signToken(user.id, this.jwtConfiguration.ttl) - ]) - - return {'accessToken': accessToken, 'refreshToken': refreshToken, user} + /** + * Generate refresh token. + */ + this.signToken(user.id, this.jwtConfiguration.ttl), + ]); + + return { accessToken, refreshToken, user }; } -} \ No newline at end of file +} diff --git a/src/auth/providers/hashing.ts b/src/auth/providers/hashing.ts index acb60ac..7493a73 100644 --- a/src/auth/providers/hashing.ts +++ b/src/auth/providers/hashing.ts @@ -1,10 +1,11 @@ import { Injectable } from '@nestjs/common'; +/**Hasing provider abstract class */ @Injectable() export abstract class HashingProvider { - // hashing during signUp + /**hashing during signUp */ abstract hashPassword(inpPassword: string | Buffer): Promise - // comparison during signIn + /**comparison during signIn */ abstract comparePasswords(password: string, encryPassword: string): Promise } \ No newline at end of file diff --git a/src/auth/providers/refresh-tokens.provider.ts b/src/auth/providers/refresh-tokens.provider.ts index cf255c2..b8d4e24 100644 --- a/src/auth/providers/refresh-tokens.provider.ts +++ b/src/auth/providers/refresh-tokens.provider.ts @@ -6,31 +6,34 @@ import jwtConfig from '../authConfig/jwt.config'; import { GenerateTokensProvider } from './generate-tokens.provider'; import { UserService } from 'src/users/provider/user.service'; +/**Refresh token provider class */ @Injectable() export class RefreshTokensProvider { constructor( /* - * injecting userService repo + injecting userService repo */ @Inject(forwardRef(() => UserService)) private readonly userService: UserService, /* - * inject jwtService + inject jwtService */ private readonly jwtService: JwtService, /* - * inject jwtService + inject jwtService */ @Inject(jwtConfig.KEY) private readonly jwtConfiguration: ConfigType, /* - * inject generateTokenProvider + inject generateTokenProvider */ private readonly generateTokenProvider: GenerateTokensProvider ) {} + + /**A method for validating refresh token */ public async refreshTokens(refreshTokenDto: RefreshTokenDto) { // validate the refresh token using jwt const { sub } = await this.jwtService.verifyAsync( diff --git a/src/auth/providers/sign-in.provider.ts b/src/auth/providers/sign-in.provider.ts index 9c88d08..f82d472 100644 --- a/src/auth/providers/sign-in.provider.ts +++ b/src/auth/providers/sign-in.provider.ts @@ -4,26 +4,28 @@ import { HashingProvider } from './hashing'; import { GenerateTokensProvider } from './generate-tokens.provider'; import { UserService } from 'src/users/provider/user.service'; +/**Sign in provider class */ @Injectable() export class SignInProvider { constructor( /* - * injecting userService repo + injecting userService repo */ @Inject(forwardRef(() => UserService)) private readonly userService: UserService, /* - * injecting hashing dependency + injecting hashing dependency */ private readonly hashingProvider: HashingProvider, /* - * injecting generateTokenProvider + injecting generateTokenProvider */ private readonly generateTokenProvider: GenerateTokensProvider ){} - public async SignIn(signInDto: SignInDto) { + /**A method to check if user exist in db */ + public async SignIn(signInDto: SignInDto) { // check if user exist in db // throw error if user doesnt exist let user = await this.userService.GetOneByEmail(signInDto.email) @@ -32,7 +34,7 @@ export class SignInProvider { throw new UnauthorizedException('email or password is incorrect'); } - // conpare password + /**conpare password */ let isCheckedPassword: boolean = false try { diff --git a/src/auth/social/dtos/google-token.dto.ts b/src/auth/social/dtos/google-token.dto.ts index 407327c..ea1e912 100644 --- a/src/auth/social/dtos/google-token.dto.ts +++ b/src/auth/social/dtos/google-token.dto.ts @@ -1,6 +1,9 @@ import {IsNotEmpty} from 'class-validator' +/**class for GoogleTokendto */ export class GoogleTokenDto { + + /**The Token of type string */ @IsNotEmpty() token: string } \ No newline at end of file diff --git a/src/auth/social/google-authentication.controller.ts b/src/auth/social/google-authentication.controller.ts index ef57a77..61116c3 100644 --- a/src/auth/social/google-authentication.controller.ts +++ b/src/auth/social/google-authentication.controller.ts @@ -1,21 +1,35 @@ import { Body, Controller, Post } from '@nestjs/common'; +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; import { GoogleAuthenticationService } from './providers/google-authentication.service'; import { Auth } from '../decorators/auth.decorator'; import { authTypes } from '../enums/authTypes.enum'; import { GoogleTokenDto } from './dtos/google-token.dto'; +/** + * Google authentication controller + */ +@ApiTags('Google Authentication') @Auth(authTypes.None) @Controller('auth/google-authentication') export class GoogleAuthenticationController { + /** + * Constructor for GoogleAuthenticationController + * @param googleAuthenticationService - Injects GoogleAuthenticationService + */ constructor( - /* - * inject googleAuthenticationService - */ private readonly googleAuthenticationService: GoogleAuthenticationService ) {} + /** + * Authenticates a user using Google authentication. + * @param googleTokenDto - The Google authentication token. + * @returns Authentication response. + */ + @ApiOperation({ summary: 'Authenticate user with Google token' }) + @ApiResponse({ status: 200, description: 'Successfully authenticated user' }) + @ApiResponse({ status: 400, description: 'Invalid Google token' }) @Post() - public authenticate(@Body() googlTokenDto: GoogleTokenDto) { - return this.googleAuthenticationService.authenticate(googlTokenDto) + public authenticate(@Body() googleTokenDto: GoogleTokenDto) { + return this.googleAuthenticationService.authenticate(googleTokenDto); } } diff --git a/src/auth/social/interfaces/user.interface.ts b/src/auth/social/interfaces/user.interface.ts index 5d540c8..8ca9762 100644 --- a/src/auth/social/interfaces/user.interface.ts +++ b/src/auth/social/interfaces/user.interface.ts @@ -1,6 +1,12 @@ +/**Google interface */ export interface GoogleInterface { + /**email as string */ email: string + + /**first name as string */ firstName: string + /**last name as strig */ lastName: string + /**Google id as string */ googleId: string } \ No newline at end of file diff --git a/src/auth/social/providers/google-authentication.service.ts b/src/auth/social/providers/google-authentication.service.ts index c3c15c5..464285f 100644 --- a/src/auth/social/providers/google-authentication.service.ts +++ b/src/auth/social/providers/google-authentication.service.ts @@ -6,9 +6,21 @@ import { GenerateTokensProvider } from 'src/auth/providers/generate-tokens.provi import { UserService } from 'src/users/provider/user.service'; import { GoogleTokenDto } from '../dtos/google-token.dto'; +/** + Google Authentication Service + Handles authentication using Google OAuth tokens. + */ @Injectable() +/** OAuth2 client for handling Google authentication */ export class GoogleAuthenticationService implements OnModuleInit { + /**inject oAuthClient */ private oAuthClient: OAuth2Client; + /** + Constructor to inject dependencies. + @param userService - Service to handle user-related operations + @param jwtConfigurattion - Configuration object for JWT + @param generateTokensProvider - Service to generate authentication tokens + */ constructor( /** * inject userService @@ -16,13 +28,11 @@ export class GoogleAuthenticationService implements OnModuleInit { @Inject(forwardRef(() => UserService)) private readonly userService: UserService, - /** - * inject jwtconfig - */ + /** Inject JWT configuration */ @Inject(jwtConfig.KEY) private readonly jwtConfigurattion: ConfigType, /** - * inject generateTokensProvider + inject generateTokensProvider */ private readonly generateTokensProvider: GenerateTokensProvider, ) {} @@ -33,6 +43,15 @@ export class GoogleAuthenticationService implements OnModuleInit { this.oAuthClient = new OAuth2Client(client_id, client_secret); } + + /** + Authenticates a user using a Google token. + @param googleTokenDto - DTO containing the Google ID token + @returns The generated authentication tokens for the user + @throws UnauthorizedException if authentication fails + */ + + /**Authenticate method */ public async authenticate(googleTokenDto: GoogleTokenDto) { try { console.log("Received Token:", googleTokenDto.token); diff --git a/src/chatrooms/chatroom.controller.ts b/src/chatrooms/chatroom.controller.ts index 078b544..7f01f11 100644 --- a/src/chatrooms/chatroom.controller.ts +++ b/src/chatrooms/chatroom.controller.ts @@ -1,20 +1,24 @@ import { Controller, Post, Get, Delete, Body, Param } from '@nestjs/common'; import { ChatRoomsService } from './providers/chatrooms/chatrooms.service'; +/**chat room Controller */ @Controller('chatroom') export class ChatRoomsController { constructor(private readonly chatRoomService: ChatRoomsService) {} + /**chat room to create a post */ @Post() create(@Body() { name, userIds, type }) { return this.chatRoomService.create(name, userIds, type); } + /**chat room to get a single post by id */ @Get(':userId') findAll(@Param('userId') userId: string) { return this.chatRoomService.findAll(userId); } + /**chat room to delete a post */ @Delete(':id') delete(@Param('id') id: string) { return this.chatRoomService.delete(id); diff --git a/src/chatrooms/chatroom.entity.ts b/src/chatrooms/chatroom.entity.ts index 009a744..94c0ce9 100644 --- a/src/chatrooms/chatroom.entity.ts +++ b/src/chatrooms/chatroom.entity.ts @@ -2,21 +2,29 @@ import { User } from 'src/users/user.entitly'; import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, CreateDateColumn, JoinTable } from 'typeorm'; import { chatroom } from './enums/chatroomType'; +/**chat room entity */ @Entity() export class ChatRoom { + /**Unique identifier */ @PrimaryGeneratedColumn('uuid') id: string; + /** + name of the user. + */ @Column() name: string; + /**Type of the chat room Private or group */ @Column({ default: 'GROUP' }) // 'private' or 'group' type: chatroom; + /**Many-many relationship between the user and the chat room */ @ManyToMany(() => User, (user) => user.chatRooms) @JoinTable() users: User[]; + /**The date the chat was created */ @CreateDateColumn() createdAt: Date; } \ No newline at end of file diff --git a/src/chatrooms/chatrooms.module.ts b/src/chatrooms/chatrooms.module.ts index e275857..b5e0f65 100644 --- a/src/chatrooms/chatrooms.module.ts +++ b/src/chatrooms/chatrooms.module.ts @@ -2,6 +2,7 @@ import { Module } from '@nestjs/common'; import { ChatRoomsService } from './providers/chatrooms/chatrooms.service'; import { ChatRoomsController } from './chatroom.controller'; +/**chatroom module */ @Module({ controllers: [ChatRoomsController], providers: [ChatRoomsService] diff --git a/src/chatrooms/providers/chatrooms/chatrooms.service.spec.ts b/src/chatrooms/providers/chatrooms/chatrooms.service.spec.ts index 3dfb947..1793626 100644 --- a/src/chatrooms/providers/chatrooms/chatrooms.service.spec.ts +++ b/src/chatrooms/providers/chatrooms/chatrooms.service.spec.ts @@ -1,18 +1,18 @@ -import { Test, TestingModule } from '@nestjs/testing'; -import { ChatroomsService } from './chatrooms.service'; +// import { Test, TestingModule } from '@nestjs/testing'; +// import { ChatroomsService } from './chatrooms.service'; -describe('ChatroomsService', () => { - let service: ChatroomsService; +// describe('ChatroomsService', () => { +// let service: ChatroomsService; - beforeEach(async () => { - const module: TestingModule = await Test.createTestingModule({ - providers: [ChatroomsService], - }).compile(); +// beforeEach(async () => { +// const module: TestingModule = await Test.createTestingModule({ +// providers: [ChatroomsService], +// }).compile(); - service = module.get(ChatroomsService); - }); +// service = module.get(ChatroomsService); +// }); - it('should be defined', () => { - expect(service).toBeDefined(); - }); -}); +// it('should be defined', () => { +// expect(service).toBeDefined(); +// }); +// }); diff --git a/src/chatrooms/providers/chatrooms/chatrooms.service.ts b/src/chatrooms/providers/chatrooms/chatrooms.service.ts index a3465cc..01d6677 100644 --- a/src/chatrooms/providers/chatrooms/chatrooms.service.ts +++ b/src/chatrooms/providers/chatrooms/chatrooms.service.ts @@ -3,29 +3,53 @@ import { InjectRepository } from '@nestjs/typeorm'; import { ChatRoom } from 'src/chatrooms/chatroom.entity'; import { User } from 'src/users/user.entitly'; import { Repository } from 'typeorm'; +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; +/** + * Chatroom service class + */ @Injectable() +@ApiTags('Chat Rooms') +/** + * Chatroom service class + */ export class ChatRoomsService { constructor( - /* - * injecting chatroom repository - */ + /** Injecting chatroom repository */ @InjectRepository(ChatRoom) private chatRoomRepository: Repository, - /* - * injecting user repository - */ + /** Injecting user repository */ @InjectRepository(User) private userRepository: Repository, ) {} + /** + * Create method that takes in name, userIds, and type (private or group) + * @param name - Name of the chatroom + * @param userIds - List of user IDs + * @param type - Type of chatroom (private or group) + * @returns Created chatroom object + */ + @ApiOperation({ summary: 'Create a chatroom' }) + @ApiResponse({ status: 201, description: 'Chatroom created successfully' }) + @ApiResponse({ status: 400, description: 'Invalid input' }) + + /**create method */ async create(name: string, userIds: string[], type: 'private' | 'group') { // const users = await this.userRepository.findByIds(userIds); // const chatRoom = this.chatRoomRepository.create({ name, users, type }); // return this.chatRoomRepository.save(chatRoom); } + /** + * Find all chatrooms associated with a user + * @param userId - User ID + * @returns List of chatrooms + */ + @ApiOperation({ summary: 'Get all chatrooms for a user' }) + @ApiResponse({ status: 200, description: 'List of chatrooms retrieved successfully' }) + /**Find all */ async findAll(userId: string) { return this.chatRoomRepository .createQueryBuilder('room') @@ -34,6 +58,14 @@ export class ChatRoomsService { .getMany(); } + /** + * Delete chatroom by ID + * @param id - Chatroom ID + * @returns Deletion result + */ + @ApiOperation({ summary: 'Delete a chatroom' }) + @ApiResponse({ status: 200, description: 'Chatroom deleted successfully' }) + @ApiResponse({ status: 404, description: 'Chatroom not found' }) async delete(id: string) { return this.chatRoomRepository.delete(id); } diff --git a/src/main.ts b/src/main.ts index 5027fb6..e9337a8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,9 +4,21 @@ import { Request, Response, NextFunction } from 'express'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import { ValidationPipe } from '@nestjs/common'; +/** + The main entry point of the application. + It initializes the NestJS application, sets up global configurations, + and starts the server. + */ async function bootstrap() { const app = await NestFactory.create(AppModule); + /** + Sets up global validation using `ValidationPipe`. + `whitelist: true` removes properties that do not have validation decorators. + `forbidNonWhitelisted: true` throws an error if non-whitelisted properties are found. + `transform: true` enables automatic transformation of input data. + -`enableImplicitConversion: true` allows automatic type conversion. + */ app.useGlobalPipes(new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, @@ -38,7 +50,9 @@ async function bootstrap() { allowedHeaders: ['Content-Type', 'Authorization'], }); - // Set custom headers to avoid COOP issues + /** + Sets custom security headers to prevent COOP issues. + */ app.use((req: Request, res: Response, next: NextFunction) => { res.setHeader('Cross-Origin-Opener-Policy', 'same-origin-allow-popups'); res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp'); diff --git a/src/messages/message.entity.ts b/src/messages/message.entity.ts index 96f2f7a..3bd40e6 100644 --- a/src/messages/message.entity.ts +++ b/src/messages/message.entity.ts @@ -2,20 +2,28 @@ import { ChatRoom } from 'src/chatrooms/chatroom.entity'; import { User } from 'src/users/user.entitly'; import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, CreateDateColumn } from 'typeorm'; +/** + Message entity representing the user table in the database. + */ @Entity() export class Message { + /**unique identifier */ @PrimaryGeneratedColumn() id: string; + /**Many-to-one relationship between chatroom and messages */ @ManyToOne(() => ChatRoom, (chatRoom) => chatRoom.id) chatRoom: ChatRoom; + /**Many-to-one relationship between users and messages */ @ManyToOne(() => User, (user) => user.id) sender: User; + /**The text entered by the user */ @Column() text: string; + /** time stamp of the user.*/ @CreateDateColumn() timestamp: Date; } \ No newline at end of file diff --git a/src/messages/messages.controller.ts b/src/messages/messages.controller.ts index 1471a9e..994a2f7 100644 --- a/src/messages/messages.controller.ts +++ b/src/messages/messages.controller.ts @@ -1,15 +1,20 @@ import { Controller, Post, Get, Body, Param } from '@nestjs/common'; import { MessagesService } from './providers/messages/messages.service'; +/** + Controller for managing messages-related operations. + */ @Controller('messages') export class MessagesController { constructor(private readonly messageService: MessagesService) {} + /**Send message method */ @Post() sendMessage(@Body() { chatRoomId, senderId, text }) { return this.messageService.sendMessage(chatRoomId, senderId, text); } + /**Get messages method based on chat id */ @Get(':chatRoomId') getMessages(@Param('chatRoomId') chatRoomId: string) { return this.messageService.getMessages(chatRoomId); diff --git a/src/messages/messages.module.ts b/src/messages/messages.module.ts index 5e97b3d..cc119db 100644 --- a/src/messages/messages.module.ts +++ b/src/messages/messages.module.ts @@ -2,6 +2,7 @@ import { Module } from '@nestjs/common'; import { MessagesController } from './messages.controller'; import { MessagesService } from './providers/messages/messages.service'; +/**Message module */ @Module({ controllers: [MessagesController], providers: [MessagesService] diff --git a/src/messages/providers/messages/messages.service.spec.ts b/src/messages/providers/messages/messages.service.spec.ts index d928c59..690f1e4 100644 --- a/src/messages/providers/messages/messages.service.spec.ts +++ b/src/messages/providers/messages/messages.service.spec.ts @@ -1,6 +1,7 @@ import { Test, TestingModule } from '@nestjs/testing'; import { MessagesService } from './messages.service'; +/**Message service */ describe('MessagesService', () => { let service: MessagesService; diff --git a/src/messages/providers/messages/messages.service.ts b/src/messages/providers/messages/messages.service.ts index 9156bfa..bee93be 100644 --- a/src/messages/providers/messages/messages.service.ts +++ b/src/messages/providers/messages/messages.service.ts @@ -3,15 +3,20 @@ import { InjectRepository } from '@nestjs/typeorm'; import { Message } from 'src/messages/message.entity'; import { Repository } from 'typeorm'; +/**Message service class */ @Injectable() export class MessagesService { - constructor(@InjectRepository(Message) private messageRepo: Repository) {} + constructor( + /**injecting message repo */ + @InjectRepository(Message) private messageRepo: Repository) {} + /**method for sending message takes in chatroom id, sender id and text as parameter */ async sendMessage(chatRoomId: string, senderId: string, text: string) { // const message = this.messageRepo.create({ chatRoom: { id: chatRoomId }, sender: { id: senderId }, text }); // return this.messageRepo.save(message); } + /**get messages method */ async getMessages(chatRoomId: string) { return this.messageRepo.find({ where: { chatRoom: { id: chatRoomId } }, relations: ['sender'] }); } diff --git a/src/users/DTOs/create-user.dto.ts b/src/users/DTOs/create-user.dto.ts index 0cf9190..acc23f7 100644 --- a/src/users/DTOs/create-user.dto.ts +++ b/src/users/DTOs/create-user.dto.ts @@ -1,71 +1,87 @@ -import { - IsString, - IsEmail, - IsNotEmpty, - IsEnum, - IsOptional, - Validate, - MaxLength, - Matches, - ValidatorConstraint, - ValidatorConstraintInterface, - ValidationArguments, -} from 'class-validator'; +import { IsString, IsEmail, IsNotEmpty, IsEnum, IsOptional, Validate, MaxLength, Matches, ValidatorConstraint, ValidatorConstraintInterface, ValidationArguments, } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; import { Column } from 'typeorm'; import { userRole } from '../Enums/userRole.enum'; import { Transform } from 'class-transformer'; -// custum validation to compare passwords - +/** + * ValidatorConstraint: Custom validation class to ensure that + * the confirmPassword field matches the password field. + */ @ValidatorConstraint({ name: 'MatchPasswords', async: false }) -class MatchPasswordsConstraint implements ValidatorConstraintInterface { +export class MatchPasswordsConstraint implements ValidatorConstraintInterface { + /** + * Validates whether the confirmPassword field matches the password field. + * @param confirmPassword - The confirm password input. + * @param args - Validation arguments. + * @returns Boolean indicating if passwords match. + */ validate(confirmPassword: string, args: ValidationArguments): boolean { const object = args.object as CreateUserDto; if (!object.password) return false; // Ensure password is present return confirmPassword === object.password; } + /** + * Returns the default error message for password mismatch. + * @param args - Validation arguments. + * @returns Error message string. + */ defaultMessage(args: ValidationArguments): string { return 'Password and confirm password do not match'; } } +/** + * DTO for creating a user. + */ export class CreateUserDto { + /** + * First name of the user. + */ @ApiProperty({ type: 'string', example: 'Fatima', - description: 'first name field', + description: 'First name field', }) @IsString() @IsNotEmpty() @MaxLength(100) firstName: string; + /** + * Last name of the user. + */ @ApiProperty({ type: 'string', example: 'Aminu', - description: 'last name field', + description: 'Last name field', }) @IsString() @IsOptional() @MaxLength(100) lastName: string; + /** + * Email field (must be unique). + */ @ApiProperty({ type: 'string', example: 'fatimaaminu@mail.com', - description: 'email field', + description: 'Email field', }) @IsEmail() @MaxLength(150) @Column({ unique: true, length: 150 }) email: string; + /** + * Password field with specific validation rules. + */ @ApiProperty({ type: 'string', example: '@Password123', - description: 'password should containg number, alphabets and uppercase', + description: 'Password should contain a number, alphabets, and an uppercase letter', }) @IsString() @MaxLength(225) @@ -78,26 +94,38 @@ export class CreateUserDto { ) password?: string; + /** + * Confirm password field, must match the password. + */ @ApiProperty({ type: 'string', example: '@Password123', - description: - 'password should containg number, alphabets and uppercase and should be same as the password', + description: 'Must contain numbers, alphabets, uppercase letters, and match the password', }) @IsString() @MaxLength(225) @Validate(MatchPasswordsConstraint) confirmpassword?: string; + /** + * User role (default is USER if not provided). + */ + @ApiProperty({ + enum: userRole, + description: 'Role of the user', + }) @IsEnum(userRole) @IsOptional() - @Transform(({ value }) => value ?? userRole.USER) // Set default if undefined + @Transform(({ value }) => value ?? userRole.USER) userRole?: userRole; + /** + * Google ID (used for OAuth authentication). + */ @ApiProperty({ type: 'string', example: 'poiuytrdspoiuytrewa\zxcvbnmml;poiuytrdsdcvbnm]', - description: 'this is autogenerated from google when you signup with google', + description: 'This is auto-generated from Google when you sign up with Google', }) @IsString() @IsOptional() diff --git a/src/users/DTOs/getUserparamdto.ts b/src/users/DTOs/getUserparamdto.ts index ce35844..420553f 100644 --- a/src/users/DTOs/getUserparamdto.ts +++ b/src/users/DTOs/getUserparamdto.ts @@ -1,8 +1,10 @@ import { IsOptional,IsInt } from "class-validator"; import { Type } from 'class-transformer'; +/**Get users paramsdto class */ export class GetuserParamDto { + /**Unique identifier id */ @IsInt() @Type (() => Number ) id?:number diff --git a/src/users/DTOs/patch-user.dto.ts b/src/users/DTOs/patch-user.dto.ts index e9ab3d9..c55538c 100644 --- a/src/users/DTOs/patch-user.dto.ts +++ b/src/users/DTOs/patch-user.dto.ts @@ -4,8 +4,9 @@ import { PartialType } from "@nestjs/mapped-types"; import { CreateUserDto } from "./create-user.dto"; -// using the patch to edit part of the data, the partialtype makes everything optional +/**using the patch to edit part of the data, the partialtype makes everything optional */ export class EditUserDto extends PartialType(CreateUserDto) { + /**unique identifier id */ @IsInt() @IsNotEmpty() id: number; diff --git a/src/users/Enums/userRole.enum.ts b/src/users/Enums/userRole.enum.ts index 1e2b44f..fabb17c 100644 --- a/src/users/Enums/userRole.enum.ts +++ b/src/users/Enums/userRole.enum.ts @@ -1,3 +1,4 @@ +/**Enum for user role */ export enum userRole { ADMIN = 'admin', MODERATOR = 'moderator', diff --git a/src/users/provider/create-user.provider.ts b/src/users/provider/create-user.provider.ts index ea112dc..3ce4dcd 100644 --- a/src/users/provider/create-user.provider.ts +++ b/src/users/provider/create-user.provider.ts @@ -1,32 +1,43 @@ -import { - BadRequestException, - forwardRef, - Inject, - Injectable, - RequestTimeoutException, -} from '@nestjs/common'; +import { BadRequestException, forwardRef, Inject, Injectable, RequestTimeoutException, } from '@nestjs/common'; import { Repository } from 'typeorm'; import { User } from '../user.entitly'; import { InjectRepository } from '@nestjs/typeorm'; import { CreateUserDto } from '../DTOs/create-user.dto'; import { HashingProvider } from 'src/auth/providers/hashing'; +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; +/** + * Service responsible for handling user creation + */ +@ApiTags('Users') @Injectable() export class CreateUserProvider { + /** + * Constructor to inject dependencies. + * @param userRepository - Repository for User entity + * @param hashingProvider - Service for password hashing + */ constructor( - /* - * Inject userRepository - */ + /** Inject userRepository */ @InjectRepository(User) private userRepository: Repository, - /* - * Inject hashingProvider - */ + /** Inject hashingProvider */ @Inject(forwardRef(() => HashingProvider)) private readonly hashingProvider: HashingProvider, ) {} + + /** + * Creates a new user in the system + * @param createUserDto - DTO containing user data. + * @returns The newly created user. + * @throws BadRequestException If the user already exists. + * @throws RequestTimeoutException If there is an issue connecting to the database. + */ + @ApiOperation({ summary: 'Create a new user' }) + @ApiResponse({ status: 201, description: 'User successfully created.', type: User }) + @ApiResponse({ status: 400, description: 'User already exists.' }) + @ApiResponse({ status: 408, description: 'Database connection issue.' }) public async createUsers(createUserDto: CreateUserDto): Promise { - // check if user already exits let existingUser = undefined; try { @@ -34,18 +45,17 @@ export class CreateUserProvider { where: { email: createUserDto.email }, }); } catch (error) { - // you might save/log your error throw new RequestTimeoutException( 'Unable to process your request at the moment, Please try later', { description: 'Error connecting to your database', - cause: 'the user is having network issues', + cause: 'The user is having network issues', }, ); } - // Handle Error + if (existingUser) { - throw new BadRequestException('User already exist'); + throw new BadRequestException('User already exists'); } const hashedPassword = await this.hashingProvider.hashPassword( @@ -57,15 +67,14 @@ export class CreateUserProvider { password: hashedPassword, }); - // Create the user try { - this.userRepository.save(newUser); + await this.userRepository.save(newUser); } catch (error) { throw new RequestTimeoutException( 'Unable to process your request at the moment, Please try later', { description: 'Error connecting to your database', - cause: 'the user is having network issues', + cause: 'The user is having network issues', }, ); } diff --git a/src/users/provider/find-one-by-email.ts b/src/users/provider/find-one-by-email.ts index cbb2806..8b0a1e5 100644 --- a/src/users/provider/find-one-by-email.ts +++ b/src/users/provider/find-one-by-email.ts @@ -3,11 +3,27 @@ import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { User } from '../user.entitly'; - +/** + Service responsible for finding a user by email. + */ @Injectable() export class FindOneByEmail { - constructor(@InjectRepository(User) private userRepository: Repository) {} + /** + Injects the User repository for database operations. + @param {Repository} userRepository - Repository to interact with the User entity. + */ + constructor( + @InjectRepository(User) private userRepository: Repository) {} + + /** + + @param {string} email - The email of the user to find. + @returns {Promise} The found user. + @throws {RequestTimeoutException} If there is an issue connecting to the database. + @throws {UnauthorizedException} If the user does not exist. + */ + /** Method to find a user by email. */ public async findOneByEmail(email: string): Promise { let user: User | undefined; diff --git a/src/users/provider/find-one-by-googleId.ts b/src/users/provider/find-one-by-googleId.ts index 437a6ee..96213de 100644 --- a/src/users/provider/find-one-by-googleId.ts +++ b/src/users/provider/find-one-by-googleId.ts @@ -3,6 +3,9 @@ import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; import { User } from '../user.entitly'; +/** + Service responsible for finding a user by Google ID. + */ @Injectable() export class FindOneByGoogleIdProvider { constructor( @@ -12,6 +15,8 @@ export class FindOneByGoogleIdProvider { @InjectRepository(User) private userRepository: Repository, ) {} + + /** Method to find a user by their Google ID. */ public async findOneByGoogleId(googleId: string) { return await this.userRepository.findOneBy({ googleId }) } diff --git a/src/users/provider/googleUserProvider.ts b/src/users/provider/googleUserProvider.ts index 451cc22..ad19fe4 100644 --- a/src/users/provider/googleUserProvider.ts +++ b/src/users/provider/googleUserProvider.ts @@ -3,24 +3,42 @@ import { GoogleInterface } from '../../auth/social/interfaces/user.interface'; import { Repository } from 'typeorm'; import { User } from 'src/users/user.entitly'; import { InjectRepository } from '@nestjs/typeorm'; +import { ApiTags, ApiOperation, ApiResponse } from '@nestjs/swagger'; +/** + * Service responsible for creating users authenticated via Google. + */ +@ApiTags('Users') @Injectable() + +/**Create Google User Provider class */ export class CreateGoogleUserProvider { constructor( - /* - * inject userRepository + /** + * Injects the user repository. */ @InjectRepository(User) private readonly userRepository: Repository, ) {} - public async createGoogleUser(googleUser: GoogleInterface) { + /** + * Creates a new user using Google authentication. + * @param googleUser - The Google user data. + * @returns The created user entity. + * @throws ConflictException if user creation fails. + */ + @ApiOperation({ summary: 'Create a Google-authenticated user' }) + @ApiResponse({ status: 201, description: 'User successfully created.' }) + @ApiResponse({ status: 409, description: 'Could not create a new user.' }) + + /**Method to create GoogleUser */ + public async createGoogleUser(googleUser: GoogleInterface): Promise { try { const user = this.userRepository.create(googleUser); return await this.userRepository.save(user); } catch (error) { throw new ConflictException(error, { - description: 'could not create a new user', + description: 'Could not create a new user', }); } } diff --git a/src/users/provider/user.service.ts b/src/users/provider/user.service.ts index 559c92c..6aac378 100644 --- a/src/users/provider/user.service.ts +++ b/src/users/provider/user.service.ts @@ -11,12 +11,23 @@ import { FindOneByGoogleIdProvider } from './find-one-by-googleId'; import { CreateGoogleUserProvider } from './googleUserProvider'; import { GoogleInterface } from 'src/auth/social/interfaces/user.interface'; + +/** + Service class for managing user-related operations. + */ @Injectable() export class UserService { constructor( /* - *inject User entity - */ + *inject User entity*/ + /** + Injects dependencies for user management. + @param {Repository} userRepository - Repository to interact with the User entity. + @param {CreateUserProvider} createUserProvider - Provider to handle user creation. + @param {FindOneByEmail} findOneByemail - Service to find a user by email. + @param {FindOneByGoogleIdProvider} findOneByGoogleIdProvider - Service to find a user by Google ID. + @param {CreateGoogleUserProvider} createGoogleUserProvider - Service to create a user via Google authentication. + */ @InjectRepository(User) private userRepository: Repository, @@ -29,6 +40,15 @@ export class UserService { private readonly createGoogleUserProvider: CreateGoogleUserProvider, ) {} + /** + Retrieves all users. + @param {GetuserParamDto} getUserParamDto - Parameters for filtering users. + @param {number} limit - Number of users to return. + @param {number} page - Page number for pagination. + @returns {Promise} List of users. + */ + + /**Method to Retrieves all users. */ public findAll( getUserParamDto: GetuserParamDto, limit: number, @@ -37,24 +57,59 @@ export class UserService { return this.userRepository.find(); } + /** + Creates a new user. + @param {CreateUserDto} createUserDto - User data for creation. + @returns {Promise} The created user. + */ + + /**Method to Creates a new user */ public async createUsers(createUserDto: CreateUserDto) { return this.createUserProvider.createUsers(createUserDto); } + /** + + @param {number} id - User ID. + @returns {Promise} The found user or null. + */ + + /**A method to Finds a user by ID. */ public FindOneById(id: number): Promise { return this.userRepository.findOneBy({ id }); } + /** + + @param {string} email - User email. + @returns {Promise} The user matching the email. + */ + + /**A method to Retrieves a user by email. */ public async GetOneByEmail(email: string) { return await this.findOneByemail.findOneByEmail(email); } + /** + + @param {number} id - User ID. + @returns {Promise<{deleted: boolean, id: number}>} Deletion confirmation. + */ + + /**A method to Deletes a user by ID. */ public async deleteUser(id: number) { await this.userRepository.delete(id); return { deleted: true, id }; } + /** + + @param {EditUserDto} edituserDto - Data for updating user information. + @returns {Promise} The updated user. + */ + + /**A method to Updates user details. */ public async editUser(edituserDto: EditUserDto) { let edit = await this.userRepository.findOneBy({ id: edituserDto.id, @@ -68,10 +123,23 @@ export class UserService { return this.userRepository.save(edit); } + /** + + @param {string} googleId - Google ID of the user. + @returns {Promise} The user associated with the given Google ID. + */ + + /**A method to Finds a user by Google ID. */ public async findOneByGoogleId(googleId: string) { return this.findOneByGoogleIdProvider.findOneByGoogleId(googleId); } + /** + @param {GoogleInterface} googleUser - Google user data. + @returns {Promise} The created user. + */ + + /** Creates a new user via Google authentication. */ public async createGoogleUser(googleUser: GoogleInterface) { return this.createGoogleUserProvider.createGoogleUser(googleUser); } diff --git a/src/users/user.controller.ts b/src/users/user.controller.ts index 7dbd544..e8c0f18 100644 --- a/src/users/user.controller.ts +++ b/src/users/user.controller.ts @@ -3,12 +3,31 @@ import { UserService } from "./provider/user.service"; import { CreateUserDto } from "./DTOs/create-user.dto"; import { EditUserDto } from "./DTOs/patch-user.dto"; import { GetuserParamDto } from "./DTOs/getUserparamdto"; +import { ApiTags, ApiOperation, ApiQuery, ApiParam, ApiBody, ApiResponse } from "@nestjs/swagger"; - +/** + Controller for managing user-related operations. + */ @Controller('users') export class UserController { + /**constructor for injecting user service */ constructor(private readonly userService:UserService) {} + /** + Retrieves a list of users or a single user if an ID is provided. + @param {GetuserParamDto} getuserParamDto - Optional user ID parameter. + @param {number} limit - The number of users per page (default: 20). + @param {number} page - The page number for pagination (default: 1). + @returns {Promise} A list of users or a specific user if ID is provided. + */ + @ApiOperation({ summary: 'Retrieve users or a single user by ID' }) + @ApiParam({ name: 'id', required: false, description: 'User ID (optional)' }) + @ApiQuery({ name: 'limit', required: false, description: 'Number of users per page', example: 20 }) + @ApiQuery({ name: 'page', required: false, description: 'Page number for pagination', example: 1 }) + @ApiResponse({ status: 200, description: 'Successful retrieval of users' }) + @Get('/:id?') + + /**Get user method */ @Get('/:id?') public getUsers( @Param() getuserParamDto: GetuserParamDto, @@ -19,19 +38,47 @@ export class UserController { return this.userService.findAll(getuserParamDto, limit, page); } + /** + Creates a new user. + @param {CreateUserDto} createUserDto - User data transfer object. + @returns {Promise} The newly created user. + */ + @ApiOperation({ summary: 'Create a new user' }) + @ApiBody({ type: CreateUserDto, description: 'User data' }) + @ApiResponse({ status: 201, description: 'User successfully created' }) + /**Create a user method */ @Post() public createUsers(@Body() createUserDto: CreateUserDto) { return this.userService.createUsers(createUserDto); } + /** + Deletes a user by ID. + @param {number} id - The ID of the user to delete. + @returns {Promise} A confirmation message. + */ + @ApiOperation({ summary: 'Delete a user by ID' }) + @ApiQuery({ name: 'id', required: true, description: 'User ID', example: 1 }) + @ApiResponse({ status: 200, description: 'User successfully deleted' }) + /**Delete a user method */ @Delete() public deleteUser(@Query('id', ParseIntPipe) id:number) { return this.userService.deleteUser(id) } + /** + Updates user details. + @param {EditUserDto} edituserDto - Updated user data. + @returns {Promise} The updated user details. + */ + @ApiOperation({ summary: 'Update user details' }) + @ApiBody({ type: EditUserDto, description: 'Updated user data' }) + @ApiResponse({ status: 200, description: 'User successfully updated' }) + + /**Update or edit a user method */ @Patch() public editedPost(@Body() edituserDto: EditUserDto) { return this.userService.editUser(edituserDto); diff --git a/src/users/user.entitly.ts b/src/users/user.entitly.ts index 41715fe..a1537df 100644 --- a/src/users/user.entitly.ts +++ b/src/users/user.entitly.ts @@ -4,36 +4,73 @@ import { userRole } from './Enums/userRole.enum'; import { ChatRoom } from 'src/chatrooms/chatroom.entity'; import { Message } from 'src/messages/message.entity'; +/** + User entity representing the user table in the database. + */ @Entity() export class User { + /** + Unique identifier for the user. + @example 1 + */ @PrimaryGeneratedColumn() id: number; + /** + First name of the user. + @example "John" + */ @Column('varchar', { length: 100, nullable: false }) firstName: string; + /** + Last name of the user. + @example "Doe" + */ @Column('varchar', { length: 100 }) lastName: string; + /** + Unique email address of the user. + @example "johndoe@example.com" + */ @Column('varchar', { unique: true, nullable: false }) email: string; + /** + @description Encrypted password of the user. Can be null if the user signs up via Google. + @example "hashedpassword123" + */ // @Exclude() @Column('varchar', { nullable: true }) password?: string; + /** + @description Role of the user in the application. Default is `USER`. + @example "USER" + */ @Column({ type: 'enum', enum: userRole, default: userRole.USER }) userRole?: userRole; + /** + @description Google ID for authentication when the user signs up with Google. + @example "123456789-google-id" + */ @Column('varchar', { length: 225, nullable: true }) googleId?: string; - // Many-to-Many relationship with ChatRoom + /** + Many-to-Many relationship between users and chat rooms. + This allows a user to be part of multiple chat rooms. + */ @ManyToMany(() => ChatRoom, (chatRoom) => chatRoom.users) @JoinTable() // This creates a junction table to link users and chat rooms chatRooms: ChatRoom[]; - // One-to-Many relationship with Message + /** + One-to-Many relationship between users and messages. + A user can send multiple messages. + */ @OneToMany(() => Message, (message) => message.sender) messages: Message[]; } From a5bb70198f25f5d770c27908712c636918a6d579 Mon Sep 17 00:00:00 2001 From: Rukayat Zakariyau Date: Wed, 19 Feb 2025 23:22:05 -0800 Subject: [PATCH 2/3] chatroom testing --- documentation/classes/CreateChatRoomDto.html | 390 ++++++++ documentation/classes/CreateUserDto-1.html | 15 +- .../classes/MatchPasswordsConstraint-1.html | 1 + documentation/classes/Paginated.html | 354 +++++++ documentation/classes/PaginationQueryDto.html | 361 +++++++ documentation/classes/UpdateChatRoomDto.html | 229 +++++ .../controllers/ChatRoomController.html | 865 ++++++++++++++++ documentation/coverage.html | 126 ++- documentation/dependencies.html | 8 + documentation/entities/ChatRoom.html | 50 +- documentation/entities/User.html | 83 +- documentation/graph/dependencies.svg | 390 +++++--- .../images/coverage-badge-documentation.svg | 6 +- .../injectables/ChatRoomService.html | 943 ++++++++++++++++++ .../injectables/CreateUserProvider.html | 3 +- .../injectables/DataResponseInterceptor.html | 344 +++++++ .../GoogleAuthenticationService.html | 4 +- documentation/injectables/MailProvider.html | 400 ++++++++ .../injectables/PaginationProvider.html | 462 +++++++++ documentation/js/menu-wc.js | 113 ++- documentation/js/menu-wc_es5.js | 2 +- documentation/js/search/search_index.js | 4 +- documentation/miscellaneous/enumerations.html | 16 +- documentation/modules.html | 29 +- documentation/modules/AppModule.html | 100 +- .../modules/AppModule/dependencies.svg | 84 +- documentation/modules/ChatModule.html | 348 +++++++ .../modules/ChatModule/dependencies.svg | 66 ++ documentation/modules/MailModule.html | 360 +++++++ .../modules/MailModule/dependencies.svg | 66 ++ documentation/modules/PaginationModule.html | 328 ++++++ .../modules/PaginationModule/dependencies.svg | 66 ++ documentation/modules/UserModule.html | 145 +-- .../modules/UserModule/dependencies.svg | 132 +-- documentation/overview.html | 400 +++++--- .../chatrooms/chatrooms.service.spec.ts | 103 +- 36 files changed, 6655 insertions(+), 741 deletions(-) create mode 100644 documentation/classes/CreateChatRoomDto.html create mode 100644 documentation/classes/Paginated.html create mode 100644 documentation/classes/PaginationQueryDto.html create mode 100644 documentation/classes/UpdateChatRoomDto.html create mode 100644 documentation/controllers/ChatRoomController.html create mode 100644 documentation/injectables/ChatRoomService.html create mode 100644 documentation/injectables/DataResponseInterceptor.html create mode 100644 documentation/injectables/MailProvider.html create mode 100644 documentation/injectables/PaginationProvider.html create mode 100644 documentation/modules/ChatModule.html create mode 100644 documentation/modules/ChatModule/dependencies.svg create mode 100644 documentation/modules/MailModule.html create mode 100644 documentation/modules/MailModule/dependencies.svg create mode 100644 documentation/modules/PaginationModule.html create mode 100644 documentation/modules/PaginationModule/dependencies.svg diff --git a/documentation/classes/CreateChatRoomDto.html b/documentation/classes/CreateChatRoomDto.html new file mode 100644 index 0000000..dd853dc --- /dev/null +++ b/documentation/classes/CreateChatRoomDto.html @@ -0,0 +1,390 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                      +
                                                                                      + + +
                                                                                      +
                                                                                      + + + + + + + + + + + + + + + + +
                                                                                      +
                                                                                      +

                                                                                      +

                                                                                      File

                                                                                      +

                                                                                      +

                                                                                      + src/chatrooms/DTOs/create-chat-room.dto.ts +

                                                                                      + + + + + + +
                                                                                      +

                                                                                      Index

                                                                                      + + + + + + + + + + + + + + + +
                                                                                      +
                                                                                      Properties
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + +
                                                                                      + +

                                                                                      + Properties +

                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                      + + + + name + + +
                                                                                      + Type : string + +
                                                                                      + Decorators : +
                                                                                      + + @IsString()
                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                      + + + + + Optional + type + + +
                                                                                      + Type : ChatRoomType + +
                                                                                      + Decorators : +
                                                                                      + + @IsEnum(ChatRoomType)
                                                                                      @IsOptional()
                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      + + + + + + + + + + + + + + + + + +
                                                                                      + + + + + userIds + + +
                                                                                      + Type : string[] + +
                                                                                      + Decorators : +
                                                                                      + + @IsArray()
                                                                                      @IsUUID('4', {each: true})
                                                                                      +
                                                                                      +
                                                                                      + +
                                                                                      +
                                                                                      + + + + + + + +
                                                                                      + + +
                                                                                      +
                                                                                      import { IsString, IsEnum, IsArray, IsUUID, IsOptional } from 'class-validator';
                                                                                      +import { ChatRoomType } from '../enums/chatroomType'; 
                                                                                      +
                                                                                      +export class CreateChatRoomDto {
                                                                                      +  @IsString()
                                                                                      +  name: string;
                                                                                      +
                                                                                      +  @IsEnum(ChatRoomType)
                                                                                      +  @IsOptional()
                                                                                      +  type?: ChatRoomType;
                                                                                      +
                                                                                      +  @IsArray()
                                                                                      +  @IsUUID('4', { each: true })
                                                                                      +  userIds: string[];
                                                                                      +}
                                                                                      +
                                                                                      +
                                                                                      + + + + + + + + + +
                                                                                      +
                                                                                      +

                                                                                      results matching ""

                                                                                      +
                                                                                        +
                                                                                        +
                                                                                        +

                                                                                        No results matching ""

                                                                                        +
                                                                                        +
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/CreateUserDto-1.html b/documentation/classes/CreateUserDto-1.html index e939885..1cceeff 100644 --- a/documentation/classes/CreateUserDto-1.html +++ b/documentation/classes/CreateUserDto-1.html @@ -258,7 +258,7 @@

                                                                                        - + @@ -303,7 +303,7 @@

                                                                                        - + @@ -348,7 +348,7 @@

                                                                                        - + @@ -394,7 +394,7 @@

                                                                                        - + @@ -439,7 +439,7 @@

                                                                                        - + @@ -485,7 +485,7 @@

                                                                                        - + @@ -531,7 +531,7 @@

                                                                                        - + @@ -601,6 +601,7 @@

                                                                                        /** * CreateUserDto class representing the user creation request payload. */ + export class CreateUserDto { /** * First name of the user. diff --git a/documentation/classes/MatchPasswordsConstraint-1.html b/documentation/classes/MatchPasswordsConstraint-1.html index 9112412..56724ea 100644 --- a/documentation/classes/MatchPasswordsConstraint-1.html +++ b/documentation/classes/MatchPasswordsConstraint-1.html @@ -387,6 +387,7 @@

                                                                                        /** * CreateUserDto class representing the user creation request payload. */ + export class CreateUserDto { /** * First name of the user. diff --git a/documentation/classes/Paginated.html b/documentation/classes/Paginated.html new file mode 100644 index 0000000..dbf11a4 --- /dev/null +++ b/documentation/classes/Paginated.html @@ -0,0 +1,354 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                        +
                                                                                        + + +
                                                                                        +
                                                                                        + + + + + + + + + + + + + + + + +
                                                                                        +
                                                                                        +

                                                                                        +

                                                                                        File

                                                                                        +

                                                                                        +

                                                                                        + src/common/pagination/Interfaces/paginatedInterface.ts +

                                                                                        + + + + + + +
                                                                                        +

                                                                                        Index

                                                                                        + + + + + + + + + + + + + + + +
                                                                                        +
                                                                                        Properties
                                                                                        +
                                                                                        + +
                                                                                        +
                                                                                        + + +
                                                                                        + +

                                                                                        + Properties +

                                                                                        + + + + + + + + + + + + + + +
                                                                                        + + + data + + +
                                                                                        + Type : T[] + +
                                                                                        + +
                                                                                        + + + + + + + + + + + + + + +
                                                                                        + + + link + + +
                                                                                        + Type : literal type + +
                                                                                        + +
                                                                                        + + + + + + + + + + + + + + +
                                                                                        + + + meta + + +
                                                                                        + Type : literal type + +
                                                                                        + +
                                                                                        +
                                                                                        + + + + + + + +
                                                                                        + + +
                                                                                        +
                                                                                        export class Paginated <T>  {
                                                                                        +    data:T[];
                                                                                        +    meta: {
                                                                                        +        itemsPerPage:number,
                                                                                        +        totalItems: number,
                                                                                        +        currentPage:number,
                                                                                        +        totalPage:number,
                                                                                        +    };
                                                                                        +    link: 
                                                                                        +    {
                                                                                        +        first: string,
                                                                                        +        last:string,
                                                                                        +        current: string,
                                                                                        +        previous:string,
                                                                                        +        next:string,
                                                                                        +    }
                                                                                        +
                                                                                        +}
                                                                                        +
                                                                                        +
                                                                                        + + + + + + + + + +
                                                                                        +
                                                                                        +

                                                                                        results matching ""

                                                                                        +
                                                                                          +
                                                                                          +
                                                                                          +

                                                                                          No results matching ""

                                                                                          +
                                                                                          +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/PaginationQueryDto.html b/documentation/classes/PaginationQueryDto.html new file mode 100644 index 0000000..0a8afe3 --- /dev/null +++ b/documentation/classes/PaginationQueryDto.html @@ -0,0 +1,361 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                          +
                                                                                          + + +
                                                                                          +
                                                                                          + + + + + + + + + + + + + + + + +
                                                                                          +
                                                                                          +

                                                                                          +

                                                                                          File

                                                                                          +

                                                                                          +

                                                                                          + src/common/pagination/pagination-query.dto.ts +

                                                                                          + + + + + + +
                                                                                          +

                                                                                          Index

                                                                                          + + + + + + + + + + + + + + + +
                                                                                          +
                                                                                          Properties
                                                                                          +
                                                                                          +
                                                                                            +
                                                                                          • + + + Optional + limit +
                                                                                          • +
                                                                                          • + + + Optional + page +
                                                                                          • +
                                                                                          +
                                                                                          +
                                                                                          + + +
                                                                                          + +

                                                                                          + Properties +

                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + + + Optional + limit + + +
                                                                                          + Type : number + +
                                                                                          + Default value : 2 +
                                                                                          + Decorators : +
                                                                                          + + @IsOptional()
                                                                                          @IsPositive()
                                                                                          +
                                                                                          +
                                                                                          + +
                                                                                          + + + + + + + + + + + + + + + + + + + + +
                                                                                          + + + + + Optional + page + + +
                                                                                          + Type : number + +
                                                                                          + Default value : 1 +
                                                                                          + Decorators : +
                                                                                          + + @IsOptional()
                                                                                          @IsPositive()
                                                                                          +
                                                                                          +
                                                                                          + +
                                                                                          +
                                                                                          + + + + + + + +
                                                                                          + + +
                                                                                          +
                                                                                          import { IsOptional, IsPositive } from "class-validator";
                                                                                          +
                                                                                          +
                                                                                          +export class PaginationQueryDto {
                                                                                          +
                                                                                          +    @IsOptional()
                                                                                          +    @IsPositive()
                                                                                          +    limit?:number = 2;
                                                                                          +
                                                                                          +    @IsOptional()
                                                                                          +    @IsPositive()
                                                                                          +    page?:number = 1;
                                                                                          +
                                                                                          +}
                                                                                          +
                                                                                          +
                                                                                          + + + + + + + + + +
                                                                                          +
                                                                                          +

                                                                                          results matching ""

                                                                                          +
                                                                                            +
                                                                                            +
                                                                                            +

                                                                                            No results matching ""

                                                                                            +
                                                                                            +
                                                                                            +
                                                                                            + +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/classes/UpdateChatRoomDto.html b/documentation/classes/UpdateChatRoomDto.html new file mode 100644 index 0000000..31ff89b --- /dev/null +++ b/documentation/classes/UpdateChatRoomDto.html @@ -0,0 +1,229 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                            +
                                                                                            + + +
                                                                                            +
                                                                                            + + + + + + + + + + + + + + + + +
                                                                                            +
                                                                                            +

                                                                                            +

                                                                                            File

                                                                                            +

                                                                                            +

                                                                                            + src/chatrooms/DTOs/update-chat-room.dto.ts +

                                                                                            + + + +

                                                                                            +

                                                                                            Extends

                                                                                            +

                                                                                            +

                                                                                            + PartialType(CreateChatRoomDto) +

                                                                                            + + + + + + + + + + + + +
                                                                                            + + +
                                                                                            +
                                                                                            import { PartialType } from '@nestjs/mapped-types';
                                                                                            +import { CreateChatRoomDto } from './create-chat-room.dto';
                                                                                            +
                                                                                            +export class UpdateChatRoomDto extends PartialType(CreateChatRoomDto) {}
                                                                                            +
                                                                                            +
                                                                                            + + + + + + + + + +
                                                                                            +
                                                                                            +

                                                                                            results matching ""

                                                                                            +
                                                                                              +
                                                                                              +
                                                                                              +

                                                                                              No results matching ""

                                                                                              +
                                                                                              +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/controllers/ChatRoomController.html b/documentation/controllers/ChatRoomController.html new file mode 100644 index 0000000..376ea13 --- /dev/null +++ b/documentation/controllers/ChatRoomController.html @@ -0,0 +1,865 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                              +
                                                                                              + + +
                                                                                              +
                                                                                              + + + + + + + + + +
                                                                                              +
                                                                                              +

                                                                                              +

                                                                                              File

                                                                                              +

                                                                                              +

                                                                                              + src/chatrooms/chatroom.controller.ts +

                                                                                              + +

                                                                                              +

                                                                                              Prefix

                                                                                              +

                                                                                              +

                                                                                              + chat-rooms +

                                                                                              + + + + + + +
                                                                                              +

                                                                                              Index

                                                                                              + + + + + + + + + + + + + + + +
                                                                                              +
                                                                                              Methods
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + +
                                                                                              + +

                                                                                              + Methods +

                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              + + + + addUser + + +
                                                                                              + + addUser(id: string, userId: string) +
                                                                                              + Decorators : +
                                                                                              + @Post(':id/users/:userId')
                                                                                              +
                                                                                              + +
                                                                                              + +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              id + string + + No +
                                                                                              userId + string + + No +
                                                                                              +
                                                                                              +
                                                                                              + Returns : any + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              + + + + create + + +
                                                                                              + + create(createChatRoomDto: CreateChatRoomDto) +
                                                                                              + Decorators : +
                                                                                              + @Post()
                                                                                              +
                                                                                              + +
                                                                                              +

                                                                                              chat room to create a post

                                                                                              +
                                                                                              + +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              createChatRoomDto + CreateChatRoomDto + + No +
                                                                                              +
                                                                                              +
                                                                                              + Returns : any + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              + + + + findAll + + +
                                                                                              + + findAll() +
                                                                                              + Decorators : +
                                                                                              + @Get()
                                                                                              +
                                                                                              + +
                                                                                              + +
                                                                                              + Returns : any + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              + + + + findOne + + +
                                                                                              + + findOne(id: string) +
                                                                                              + Decorators : +
                                                                                              + @Get(':id')
                                                                                              +
                                                                                              + +
                                                                                              + +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              id + string + + No +
                                                                                              +
                                                                                              +
                                                                                              + Returns : any + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              + + + + remove + + +
                                                                                              + + remove(id: string) +
                                                                                              + Decorators : +
                                                                                              + @Delete(':id')
                                                                                              +
                                                                                              + +
                                                                                              +

                                                                                              chat room to delete a post

                                                                                              +
                                                                                              + +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              id + string + + No +
                                                                                              +
                                                                                              +
                                                                                              + Returns : any + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              + + + + removeUser + + +
                                                                                              + + removeUser(id: string, userId: string) +
                                                                                              + Decorators : +
                                                                                              + @Delete(':id/users/:userId')
                                                                                              +
                                                                                              + +
                                                                                              + +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              id + string + + No +
                                                                                              userId + string + + No +
                                                                                              +
                                                                                              +
                                                                                              + Returns : any + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              + + + + update + + +
                                                                                              + + update(id: string, updateChatRoomDto: UpdateChatRoomDto) +
                                                                                              + Decorators : +
                                                                                              + @Patch(':id')
                                                                                              +
                                                                                              + +
                                                                                              + +
                                                                                              + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                              NameTypeOptional
                                                                                              id + string + + No +
                                                                                              updateChatRoomDto + UpdateChatRoomDto + + No +
                                                                                              +
                                                                                              +
                                                                                              + Returns : any + +
                                                                                              +
                                                                                              + +
                                                                                              +
                                                                                              +
                                                                                              + + +
                                                                                              +
                                                                                              import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards } from '@nestjs/common';
                                                                                              +import { ChatRoomService } from './providers/chatrooms/chatrooms.service'; 
                                                                                              +import { CreateChatRoomDto } from './DTOs/create-chat-room.dto'; 
                                                                                              +import { UpdateChatRoomDto } from './DTOs/update-chat-room.dto'; 
                                                                                              +// import { JwtAuthGuard } from '../auth/guards/jwt-auth.guard';
                                                                                              +
                                                                                              +@Controller('chat-rooms')
                                                                                              +// @UseGuards(JwtAuthGuard)
                                                                                              +export class ChatRoomController {
                                                                                              +  constructor(private readonly chatRoomService: ChatRoomService) {}
                                                                                              +
                                                                                              +    /**chat room to create a post */
                                                                                              +  @Post()
                                                                                              +  create(@Body() createChatRoomDto: CreateChatRoomDto) {
                                                                                              +    return this.chatRoomService.create(createChatRoomDto);
                                                                                              +  }
                                                                                              +
                                                                                              +  @Get()
                                                                                              +  findAll() {
                                                                                              +    return this.chatRoomService.findAll();
                                                                                              +  }
                                                                                              +
                                                                                              +  @Get(':id')
                                                                                              +  findOne(@Param('id') id: string) {
                                                                                              +    return this.chatRoomService.findOne(id);
                                                                                              +  }
                                                                                              +
                                                                                              +  @Patch(':id')
                                                                                              +  update(@Param('id') id: string, @Body() updateChatRoomDto: UpdateChatRoomDto) {
                                                                                              +    return this.chatRoomService.update(id, updateChatRoomDto);
                                                                                              +  }
                                                                                              +
                                                                                              +  /**chat room to delete a post */
                                                                                              +  @Delete(':id')
                                                                                              +  remove(@Param('id') id: string) {
                                                                                              +    return this.chatRoomService.remove(id);
                                                                                              +  }
                                                                                              +
                                                                                              +  @Post(':id/users/:userId')
                                                                                              +  addUser(@Param('id') id: string, @Param('userId') userId: string) {
                                                                                              +    return this.chatRoomService.addUserToChatRoom(id, userId);
                                                                                              +  }
                                                                                              +
                                                                                              +  @Delete(':id/users/:userId')
                                                                                              +  removeUser(@Param('id') id: string, @Param('userId') userId: string) {
                                                                                              +    return this.chatRoomService.removeUserFromChatRoom(id, userId);
                                                                                              +  }
                                                                                              +}
                                                                                              +
                                                                                              +
                                                                                              + + + + + + + + + + + + + + + + +
                                                                                              +
                                                                                              +

                                                                                              results matching ""

                                                                                              +
                                                                                                +
                                                                                                +
                                                                                                +

                                                                                                No results matching ""

                                                                                                +
                                                                                                +
                                                                                                +
                                                                                                + +
                                                                                                +
                                                                                                + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/coverage.html b/documentation/coverage.html index a831098..6af621c 100644 --- a/documentation/coverage.html +++ b/documentation/coverage.html @@ -401,16 +401,40 @@ (4/5) - + + + + src/chatrooms/DTOs/create-chat-room.dto.ts + + class + CreateChatRoomDto + + 0 % + (0/4) + + + + + + src/chatrooms/DTOs/update-chat-room.dto.ts + + class + UpdateChatRoomDto + + 0 % + (0/1) + + + - src/chatrooms/chatroom.controller.ts + src/chatrooms/chatroom.controller.ts controller - ChatRoomsController - - 100 % - (4/4) + ChatRoomController + + 25 % + (2/8) @@ -425,64 +449,88 @@ (1/1) - + - src/chatrooms/providers/chatrooms/chatrooms.service.ts + src/chatrooms/providers/chatrooms/chatrooms.service.ts injectable - ChatRoomsService - - 80 % - (4/5) + ChatRoomService + + 11 % + (1/9) - + - src/main.ts + src/common/interceptor/data-response/data-response.interceptor.ts - function - bootstrap - - 100 % - (1/1) + injectable + DataResponseInterceptor + + 0 % + (0/2) - + - src/messages/message.entity.ts + src/common/pagination/Interfaces/paginatedInterface.ts - entity - Message - - 100 % - (1/1) + class + Paginated + + 0 % + (0/4) - + - src/messages/messages.controller.ts + src/common/pagination/Provider/pagination.provider.ts - controller - MessagesController - - 100 % - (3/3) + injectable + PaginationProvider + + 0 % + (0/3) - + + + + src/common/pagination/pagination-query.dto.ts + + class + PaginationQueryDto + + 0 % + (0/3) + + + - src/messages/providers/messages/messages.service.ts + src/mail/providers/mail.provider.ts injectable - MessagesService - - 75 % - (3/4) + MailProvider + + 0 % + (0/3) + + + + + + src/main.ts + + function + bootstrap + + 100 % + (1/1) diff --git a/documentation/dependencies.html b/documentation/dependencies.html index c438620..2ab07e8 100644 --- a/documentation/dependencies.html +++ b/documentation/dependencies.html @@ -109,12 +109,16 @@
                                                                                                • @compodoc/compodoc : ^1.1.23
                                                                                                • +
                                                                                                • + @nestjs-modules/mailer : ^2.0.2
                                                                                                • @nestjs/common : ^10.0.0
                                                                                                • @nestjs/config : ^4.0.0
                                                                                                • @nestjs/core : ^10.0.0
                                                                                                • +
                                                                                                • + @nestjs/jwt : ^11.0.0
                                                                                                • @nestjs/platform-express : ^10.0.0
                                                                                                • @@ -129,8 +133,12 @@ class-transformer : ^0.5.1
                                                                                                • class-validator : ^0.14.1
                                                                                                • +
                                                                                                • + ejs : ^3.1.10
                                                                                                • google-auth-library : ^9.15.1
                                                                                                • +
                                                                                                • + nodemailer : ^6.9.13
                                                                                                • pg : ^8.13.1
                                                                                                • diff --git a/documentation/entities/ChatRoom.html b/documentation/entities/ChatRoom.html index 4085bba..f123b83 100644 --- a/documentation/entities/ChatRoom.html +++ b/documentation/entities/ChatRoom.html @@ -213,7 +213,7 @@

                                                                                                  - + @@ -255,7 +255,7 @@

                                                                                                  - + @@ -297,7 +297,7 @@

                                                                                                  - + @@ -324,7 +324,7 @@

                                                                                                  - Type : chatroom + Type : ChatRoomType @@ -333,22 +333,16 @@

                                                                                                  Decorators :
                                                                                                  - @Column({default: 'GROUP'})
                                                                                                  + @Column({type: 'enum', enum: ChatRoomType, default: undefined})
                                                                                                  - + - - -

                                                                                                  Type of the chat room Private or group

                                                                                                  -
                                                                                                  - - @@ -376,13 +370,13 @@

                                                                                                  Decorators :
                                                                                                  - @ManyToMany(undefined, user => user.chatRooms)
                                                                                                  @JoinTable()
                                                                                                  + @ManyToMany(undefined, user => user.chatRooms)
                                                                                                  @JoinTable({name: 'chat_room_users', joinColumn: undefined, inverseJoinColumn: undefined})
                                                                                                  - + @@ -400,9 +394,10 @@

                                                                                                  -
                                                                                                  import { User } from 'src/users/user.entitly';
                                                                                                  -import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, CreateDateColumn, JoinTable } from 'typeorm';
                                                                                                  -import { chatroom } from './enums/chatroomType';
                                                                                                  +        
                                                                                                  import { Entity, PrimaryGeneratedColumn, Column, ManyToMany, JoinTable, CreateDateColumn } from 'typeorm';
                                                                                                  +import { User } from 'src/users/user.entitly'; 
                                                                                                  +import { ChatRoomType } from './enums/chatroomType';
                                                                                                  +
                                                                                                   
                                                                                                   /**chat room entity */
                                                                                                   @Entity()
                                                                                                  @@ -417,13 +412,26 @@ 

                                                                                                  @Column() name: string; - /**Type of the chat room Private or group */ - @Column({ default: 'GROUP' }) // 'private' or 'group' - type: chatroom; + @Column({ + type: 'enum', + enum: ChatRoomType, + default: ChatRoomType.GROUP + }) + type: ChatRoomType; /**Many-many relationship between the user and the chat room */ @ManyToMany(() => User, (user) => user.chatRooms) - @JoinTable() + @JoinTable({ + name: 'chat_room_users', + joinColumn: { + name: 'chat_room_id', + referencedColumnName: 'id' + }, + inverseJoinColumn: { + name: 'user_id', + referencedColumnName: 'id' + } + }) users: User[]; /**The date the chat was created */ diff --git a/documentation/entities/User.html b/documentation/entities/User.html index db29321..89bdf23 100644 --- a/documentation/entities/User.html +++ b/documentation/entities/User.html @@ -173,9 +173,6 @@

                                                                                                  Properties

                                                                                                • - messages -
                                                                                                • -
                                                                                                • Optional password @@ -233,7 +230,7 @@

                                                                                                  - + @@ -361,7 +358,7 @@

                                                                                                  - + @@ -457,55 +454,13 @@

                                                                                                  - - - - - - - - - - - - - - - - - - - - -
                                                                                                  - - - - messages - - -
                                                                                                  - Type : Message[] - -
                                                                                                  - Decorators : -
                                                                                                  - - @OneToMany(undefined, message => message.sender)
                                                                                                  -
                                                                                                  -
                                                                                                  - -
                                                                                                  -

                                                                                                  One-to-Many relationship between users and messages. -A user can send multiple messages.

                                                                                                  -
                                                                                                  -
                                                                                                  - - -
                                                                                                  + Optional password @@ -524,21 +479,16 @@

                                                                                                  Decorators :
                                                                                                  - @Column('varchar', {nullable: true})
                                                                                                  + @Exclude()
                                                                                                  @Column('varchar', {nullable: true})

                                                                                                  - +
                                                                                                  -
                                                                                                  Example :
                                                                                                  -
                                                                                                  @@ -572,7 +522,7 @@

                                                                                                  - + @@ -589,11 +539,11 @@

                                                                                                  -
                                                                                                  // import { Exclude } from 'class-transformer';
                                                                                                  +        
                                                                                                  import { Exclude } from 'class-transformer';
                                                                                                   import { Entity, Column, PrimaryGeneratedColumn, ManyToMany, JoinTable, OneToMany } from 'typeorm';
                                                                                                   import { userRole } from './Enums/userRole.enum';
                                                                                                  -import { ChatRoom } from 'src/chatrooms/chatroom.entity';
                                                                                                  -import { Message } from 'src/messages/message.entity';
                                                                                                  +import { ChatRoom } from '../chatrooms/chatroom.entity';
                                                                                                  +// import { Message } from 'src/messages/message.entity';
                                                                                                   
                                                                                                   /**
                                                                                                     User entity representing the user table in the database.
                                                                                                  @@ -628,11 +578,7 @@ 

                                                                                                  @Column('varchar', { unique: true, nullable: false }) email: string; - /** - @description Encrypted password of the user. Can be null if the user signs up via Google. - @example "hashedpassword123" - */ - // @Exclude() + @Exclude() @Column('varchar', { nullable: true }) password?: string; @@ -658,12 +604,9 @@

                                                                                                  @JoinTable() // This creates a junction table to link users and chat rooms chatRooms: ChatRoom[]; - /** - One-to-Many relationship between users and messages. - A user can send multiple messages. - */ - @OneToMany(() => Message, (message) => message.sender) - messages: Message[]; + // One-to-Many relationship with Message + // @OneToMany(() => Message, (message) => message.sender) + // messages: Message[]; }

                                                                                                  diff --git a/documentation/graph/dependencies.svg b/documentation/graph/dependencies.svg index efd7560..d93a8c6 100644 --- a/documentation/graph/dependencies.svg +++ b/documentation/graph/dependencies.svg @@ -4,335 +4,415 @@ - - + + dependencies - -Legend - -  Declarations - -  Module - -  Bootstrap - -  Providers - -  Exports + +Legend + +  Declarations + +  Module + +  Bootstrap + +  Providers + +  Exports cluster_AppModule - + cluster_AppModule_imports - + cluster_AppModule_providers - + cluster_AuthModule - + cluster_AuthModule_exports - + cluster_AuthModule_providers - + -cluster_ChatroomsModule - +cluster_ChatModule + + + +cluster_ChatModule_exports + -cluster_ChatroomsModule_providers - +cluster_ChatModule_providers + cluster_GoogleAuthticationModule - + -cluster_MessagesModule - +cluster_MailModule + + + +cluster_MailModule_exports + -cluster_MessagesModule_providers - +cluster_MailModule_providers + -cluster_UserModule - +cluster_PaginationModule + -cluster_UserModule_exports - +cluster_PaginationModule_exports + +cluster_PaginationModule_providers + + + +cluster_UserModule + + + +cluster_UserModule_exports + + + cluster_UserModule_providers - + AuthModule - -AuthModule + +AuthModule AppModule - -AppModule + +AppModule AuthModule->AppModule - - + + AuthService - -AuthService + +AuthService AuthModule->AuthService - - + + HashingProvider - -HashingProvider + +HashingProvider AuthModule->HashingProvider - - + + - + -ChatroomsModule - -ChatroomsModule +ChatModule + +ChatModule - + -ChatroomsModule->AppModule - - +ChatModule->AppModule + + + + + +ChatRoomService + +ChatRoomService - + + +ChatModule->ChatRoomService + + + + -MessagesModule - -MessagesModule +PaginationModule + +PaginationModule - + -MessagesModule->AppModule - - +PaginationModule->AppModule + + + + + +PaginationProvider + +PaginationProvider + + + +PaginationModule->PaginationProvider + + UserModule - -UserModule + +UserModule UserModule->AppModule - - + + - + UserService - -UserService + +UserService - + UserModule->UserService - - + + AppService - -AppService + +AppService AppService->AppModule - - + + AuthService - -AuthService + +AuthService AuthService->AuthModule - - + + GenerateTokensProvider - -GenerateTokensProvider + +GenerateTokensProvider GenerateTokensProvider->AuthModule - - + + GoogleAuthenticationService - -GoogleAuthenticationService + +GoogleAuthenticationService GoogleAuthenticationService->AuthModule - - + + - + GoogleAuthticationModule - -GoogleAuthticationModule + +GoogleAuthticationModule - + GoogleAuthenticationService->GoogleAuthticationModule - - + + RefreshTokensProvider - -RefreshTokensProvider + +RefreshTokensProvider RefreshTokensProvider->AuthModule - - + + SignInProvider - -SignInProvider + +SignInProvider SignInProvider->AuthModule - - + + - - -ChatRoomsService - -ChatRoomsService + + +ChatRoomService + +ChatRoomService - - -ChatRoomsService->ChatroomsModule - - + + +ChatRoomService->ChatModule + + - - -MessagesService - -MessagesService + + +MailProvider + +MailProvider - - -MessagesService->MessagesModule - - + + +MailModule + +MailModule + + + +MailModule->UserModule + + + + + +MailModule->MailProvider + + + + + +MailProvider + +MailProvider + + + +MailProvider->MailModule + + + + + +PaginationProvider + +PaginationProvider + + + +PaginationProvider->PaginationModule + + - + CreateGoogleUserProvider - -CreateGoogleUserProvider + +CreateGoogleUserProvider - + CreateGoogleUserProvider->UserModule - - + + - + CreateUserProvider - -CreateUserProvider + +CreateUserProvider - + CreateUserProvider->UserModule - - + + - + FindOneByEmail - -FindOneByEmail + +FindOneByEmail - + FindOneByEmail->UserModule - - + + - + FindOneByGoogleIdProvider - -FindOneByGoogleIdProvider + +FindOneByGoogleIdProvider - + FindOneByGoogleIdProvider->UserModule - - + + - + UserService - -UserService + +UserService - + UserService->UserModule - - + + diff --git a/documentation/images/coverage-badge-documentation.svg b/documentation/images/coverage-badge-documentation.svg index 7b1afb8..8729eca 100644 --- a/documentation/images/coverage-badge-documentation.svg +++ b/documentation/images/coverage-badge-documentation.svg @@ -1,9 +1,9 @@ - - + + documentation - 91% + 74% diff --git a/documentation/injectables/ChatRoomService.html b/documentation/injectables/ChatRoomService.html new file mode 100644 index 0000000..a153f2a --- /dev/null +++ b/documentation/injectables/ChatRoomService.html @@ -0,0 +1,943 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                                  +
                                                                                                  + + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  +

                                                                                                  File

                                                                                                  +

                                                                                                  +

                                                                                                  + src/chatrooms/providers/chatrooms/chatrooms.service.ts +

                                                                                                  + + +

                                                                                                  +

                                                                                                  Description

                                                                                                  +

                                                                                                  +

                                                                                                  +

                                                                                                  Chatroom service class

                                                                                                  + +

                                                                                                  + + + +
                                                                                                  +

                                                                                                  Index

                                                                                                  + + + + + + + + + + + + + + + +
                                                                                                  +
                                                                                                  Methods
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +

                                                                                                  Constructor

                                                                                                  + + + + + + + + + + + + + +
                                                                                                  +constructor(chatRoomRepository: Repository<ChatRoom>, userRepository: Repository<User>) +
                                                                                                  + +
                                                                                                  +
                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  NameTypeOptional
                                                                                                  chatRoomRepository + Repository<ChatRoom> + + No +
                                                                                                  userRepository + Repository<User> + + No +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + +
                                                                                                  + +

                                                                                                  + Methods +

                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + + Async + addUserToChatRoom + + +
                                                                                                  + + addUserToChatRoom(chatRoomId: string, userId: string) +
                                                                                                  + +
                                                                                                  + +
                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  NameTypeOptional
                                                                                                  chatRoomId + string + + No +
                                                                                                  userId + string + + No +
                                                                                                  +
                                                                                                  +
                                                                                                  + Returns : Promise<ChatRoom> + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + + Async + create + + +
                                                                                                  + + create(createChatRoomDto: CreateChatRoomDto) +
                                                                                                  + +
                                                                                                  + +
                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                  NameTypeOptional
                                                                                                  createChatRoomDto + CreateChatRoomDto + + No +
                                                                                                  +
                                                                                                  +
                                                                                                  + Returns : Promise<ChatRoom> + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + + Async + findAll + + +
                                                                                                  + + findAll() +
                                                                                                  + +
                                                                                                  + +
                                                                                                  + Returns : Promise<ChatRoom[]> + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + + Async + findOne + + +
                                                                                                  + + findOne(id: string) +
                                                                                                  + +
                                                                                                  + +
                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                  NameTypeOptional
                                                                                                  id + string + + No +
                                                                                                  +
                                                                                                  +
                                                                                                  + Returns : Promise<ChatRoom> + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + + Async + remove + + +
                                                                                                  + + remove(id: string) +
                                                                                                  + +
                                                                                                  + +
                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                  NameTypeOptional
                                                                                                  id + string + + No +
                                                                                                  +
                                                                                                  +
                                                                                                  + Returns : Promise<void> + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + + Async + removeUserFromChatRoom + + +
                                                                                                  + + removeUserFromChatRoom(chatRoomId: string, userId: string) +
                                                                                                  + +
                                                                                                  + +
                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  NameTypeOptional
                                                                                                  chatRoomId + string + + No +
                                                                                                  userId + string + + No +
                                                                                                  +
                                                                                                  +
                                                                                                  + Returns : Promise<ChatRoom> + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  + + + + + + + + + + + + + + + + + + + +
                                                                                                  + + + Async + update + + +
                                                                                                  + + update(id: string, updateChatRoomDto: UpdateChatRoomDto) +
                                                                                                  + +
                                                                                                  + +
                                                                                                  + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                  NameTypeOptional
                                                                                                  id + string + + No +
                                                                                                  updateChatRoomDto + UpdateChatRoomDto + + No +
                                                                                                  +
                                                                                                  +
                                                                                                  + Returns : Promise<ChatRoom> + +
                                                                                                  +
                                                                                                  + +
                                                                                                  +
                                                                                                  +
                                                                                                  + +
                                                                                                  + + +
                                                                                                  +
                                                                                                  import { Injectable, NotFoundException, BadRequestException } from '@nestjs/common';
                                                                                                  +import { InjectRepository } from '@nestjs/typeorm';
                                                                                                  +import { Repository } from 'typeorm';
                                                                                                  +import { ChatRoom } from '../../../chatrooms/chatroom.entity'; 
                                                                                                  +import { CreateChatRoomDto } from '../../../chatrooms/DTOs/create-chat-room.dto';
                                                                                                  +import { UpdateChatRoomDto } from '../../../chatrooms/DTOs/update-chat-room.dto';
                                                                                                  +import { User } from '../../../users/user.entitly'; 
                                                                                                  +import { ChatRoomType } from 'src/chatrooms/enums/chatroomType';
                                                                                                  +
                                                                                                  +/**
                                                                                                  + * Chatroom service class
                                                                                                  + */
                                                                                                  +@Injectable()
                                                                                                  +export class ChatRoomService {
                                                                                                  +  constructor(
                                                                                                  +    @InjectRepository(ChatRoom)
                                                                                                  +    private chatRoomRepository: Repository<ChatRoom>,
                                                                                                  +    @InjectRepository(User)
                                                                                                  +    private userRepository: Repository<User>,
                                                                                                  +  ) {}
                                                                                                  +
                                                                                                  +  
                                                                                                  +  async create(createChatRoomDto: CreateChatRoomDto): Promise<ChatRoom> {
                                                                                                  +    const users = await this.userRepository.findByIds(createChatRoomDto.userIds);
                                                                                                  +    
                                                                                                  +    if (users.length !== createChatRoomDto.userIds.length) {
                                                                                                  +      throw new BadRequestException('One or more users not found');
                                                                                                  +    }
                                                                                                  +
                                                                                                  +    if (createChatRoomDto.type === ChatRoomType.PRIVATE && users.length !== 2) {
                                                                                                  +      throw new BadRequestException('Private chat rooms must have exactly 2 users');
                                                                                                  +    }
                                                                                                  +
                                                                                                  +    const chatRoom = this.chatRoomRepository.create({
                                                                                                  +      ...createChatRoomDto,
                                                                                                  +      users,
                                                                                                  +    });
                                                                                                  +
                                                                                                  +    return this.chatRoomRepository.save(chatRoom);
                                                                                                  +  }
                                                                                                  +
                                                                                                  +  async findAll(): Promise<ChatRoom[]> {
                                                                                                  +    return this.chatRoomRepository.find({
                                                                                                  +      relations: ['users'],
                                                                                                  +    });
                                                                                                  +  }
                                                                                                  +
                                                                                                  +  async findOne(id: string): Promise<ChatRoom> {
                                                                                                  +    const chatRoom = await this.chatRoomRepository.findOne({
                                                                                                  +      where: { id },
                                                                                                  +      relations: ['users'],
                                                                                                  +    });
                                                                                                  +
                                                                                                  +    if (!chatRoom) {
                                                                                                  +      throw new NotFoundException(`Chat room with ID ${id} not found`);
                                                                                                  +    }
                                                                                                  +
                                                                                                  +    return chatRoom;
                                                                                                  +  }
                                                                                                  +
                                                                                                  +  async update(id: string, updateChatRoomDto: UpdateChatRoomDto): Promise<ChatRoom> {
                                                                                                  +    const chatRoom = await this.findOne(id);
                                                                                                  +    
                                                                                                  +    if (updateChatRoomDto.userIds) {
                                                                                                  +      const users = await this.userRepository.findByIds(updateChatRoomDto.userIds);
                                                                                                  +      
                                                                                                  +      if (users.length !== updateChatRoomDto.userIds.length) {
                                                                                                  +        throw new BadRequestException('One or more users not found');
                                                                                                  +      }
                                                                                                  +
                                                                                                  +      if (chatRoom.type === ChatRoomType.PRIVATE && users.length !== 2) {
                                                                                                  +        throw new BadRequestException('Private chat rooms must have exactly 2 users');
                                                                                                  +      }
                                                                                                  +
                                                                                                  +      chatRoom.users = users;
                                                                                                  +    }
                                                                                                  +
                                                                                                  +    Object.assign(chatRoom, updateChatRoomDto);
                                                                                                  +    return this.chatRoomRepository.save(chatRoom);
                                                                                                  +  }
                                                                                                  +
                                                                                                  +  async remove(id: string): Promise<void> {
                                                                                                  +    const result = await this.chatRoomRepository.delete(id);
                                                                                                  +    
                                                                                                  +    if (result.affected === 0) {
                                                                                                  +      throw new NotFoundException(`Chat room with ID ${id} not found`);
                                                                                                  +    }
                                                                                                  +  }
                                                                                                  +
                                                                                                  +  async addUserToChatRoom(chatRoomId: string, userId: string): Promise<ChatRoom> {
                                                                                                  +    const chatRoom = await this.findOne(chatRoomId);
                                                                                                  +    const user = await this.userRepository.findOne({ where: { id: Number(userId) }});
                                                                                                  +
                                                                                                  +    if (!user) {
                                                                                                  +      throw new NotFoundException(`User with ID ${userId} not found`);
                                                                                                  +    }
                                                                                                  +
                                                                                                  +    if (chatRoom.type === ChatRoomType.PRIVATE) {
                                                                                                  +      throw new BadRequestException('Cannot add users to private chat rooms');
                                                                                                  +    }
                                                                                                  +
                                                                                                  +    chatRoom.users.push(user);
                                                                                                  +    return this.chatRoomRepository.save(chatRoom);
                                                                                                  +  }
                                                                                                  +
                                                                                                  +  async removeUserFromChatRoom(chatRoomId: string, userId: string): Promise<ChatRoom> {
                                                                                                  +    const chatRoom = await this.findOne(chatRoomId);
                                                                                                  +
                                                                                                  +    if (chatRoom.type === ChatRoomType.PRIVATE) {
                                                                                                  +      throw new BadRequestException('Cannot remove users from private chat rooms');
                                                                                                  +    }
                                                                                                  +
                                                                                                  +    chatRoom.users = chatRoom.users.filter(user => user.id !== Number(userId));
                                                                                                  +    return this.chatRoomRepository.save(chatRoom);
                                                                                                  +  }
                                                                                                  +}
                                                                                                  +
                                                                                                  + +
                                                                                                  + + + + + + + + + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  results matching ""

                                                                                                  +
                                                                                                    +
                                                                                                    +
                                                                                                    +

                                                                                                    No results matching ""

                                                                                                    +
                                                                                                    +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/CreateUserProvider.html b/documentation/injectables/CreateUserProvider.html index d634c77..be26fa3 100644 --- a/documentation/injectables/CreateUserProvider.html +++ b/documentation/injectables/CreateUserProvider.html @@ -431,8 +431,7 @@

                                                                                                    return newUser; } -} - +} diff --git a/documentation/injectables/DataResponseInterceptor.html b/documentation/injectables/DataResponseInterceptor.html new file mode 100644 index 0000000..67c279f --- /dev/null +++ b/documentation/injectables/DataResponseInterceptor.html @@ -0,0 +1,344 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    +
                                                                                                    + + + + + + + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    +

                                                                                                    File

                                                                                                    +

                                                                                                    +

                                                                                                    + src/common/interceptor/data-response/data-response.interceptor.ts +

                                                                                                    + + + + + +
                                                                                                    +

                                                                                                    Index

                                                                                                    + + + + + + + + + + + + + + + +
                                                                                                    +
                                                                                                    Methods
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    + + +
                                                                                                    + +

                                                                                                    + Methods +

                                                                                                    + + + + + + + + + + + + + + + + + + + +
                                                                                                    + + + intercept + + +
                                                                                                    +intercept(context: ExecutionContext, next: CallHandler) +
                                                                                                    + +
                                                                                                    + +
                                                                                                    + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                    NameTypeOptional
                                                                                                    context + ExecutionContext + + No +
                                                                                                    next + CallHandler + + No +
                                                                                                    +
                                                                                                    +
                                                                                                    + Returns : Observable<any> + +
                                                                                                    +
                                                                                                    + +
                                                                                                    +
                                                                                                    +
                                                                                                    + +
                                                                                                    + + +
                                                                                                    +
                                                                                                    import { CallHandler, 
                                                                                                    +  ExecutionContext, 
                                                                                                    +  Injectable, 
                                                                                                    +  NestInterceptor 
                                                                                                    +} from '@nestjs/common';
                                                                                                    +import { map, Observable, pipe, tap } from 'rxjs';
                                                                                                    +
                                                                                                    +@Injectable()
                                                                                                    +export class DataResponseInterceptor implements NestInterceptor {
                                                                                                    +  intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
                                                                                                    +    console.log('before')
                                                                                                    +    return next.handle().pipe(map((data) => ({
                                                                                                    +      apiversrion:'0.0.1',
                                                                                                    +      result: data.length,
                                                                                                    +      data: data
                                                                                                    +    })));
                                                                                                    +  }
                                                                                                    +}
                                                                                                    +
                                                                                                    +
                                                                                                    + +
                                                                                                    + + + + + + + + + + + + + +
                                                                                                    +
                                                                                                    +

                                                                                                    results matching ""

                                                                                                    +
                                                                                                      +
                                                                                                      +
                                                                                                      +

                                                                                                      No results matching ""

                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/GoogleAuthenticationService.html b/documentation/injectables/GoogleAuthenticationService.html index 5530737..a3050bd 100644 --- a/documentation/injectables/GoogleAuthenticationService.html +++ b/documentation/injectables/GoogleAuthenticationService.html @@ -519,7 +519,7 @@

                                                                                                      family_name: lastName, } = loginTicket.getPayload(); - // find the user in the database using googleid + // find the user in the database using googleId const user = await this.userService.findOneByGoogleId(googleId); // if user exist, generate token @@ -535,10 +535,10 @@

                                                                                                      }); return this.generateTokensProvider.generateTokens(newUser); } catch (error) { + // if any of the step fails, send an unauthorised exception console.error("Google Auth Error:", error); throw new UnauthorizedException('failed to authenticate with google'); } - // if any of the step fails, send an unauthorised exception } } diff --git a/documentation/injectables/MailProvider.html b/documentation/injectables/MailProvider.html new file mode 100644 index 0000000..3d91432 --- /dev/null +++ b/documentation/injectables/MailProvider.html @@ -0,0 +1,400 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                                      +
                                                                                                      + + +
                                                                                                      +
                                                                                                      + + + + + + + + + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      +

                                                                                                      File

                                                                                                      +

                                                                                                      +

                                                                                                      + src/mail/providers/mail.provider.ts +

                                                                                                      + + + + + +
                                                                                                      +

                                                                                                      Index

                                                                                                      + + + + + + + + + + + + + + + +
                                                                                                      +
                                                                                                      Methods
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +

                                                                                                      Constructor

                                                                                                      + + + + + + + + + + + + + +
                                                                                                      +constructor(mailerService: MailerService) +
                                                                                                      + +
                                                                                                      +
                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                      NameTypeOptional
                                                                                                      mailerService + MailerService + + No +
                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      + +
                                                                                                      + +

                                                                                                      + Methods +

                                                                                                      + + + + + + + + + + + + + + + + + + + +
                                                                                                      + + + Public + Async + WelcomeEmail + + +
                                                                                                      + + WelcomeEmail(user: User) +
                                                                                                      + +
                                                                                                      + +
                                                                                                      + Parameters : + + + + + + + + + + + + + + + + + + + +
                                                                                                      NameTypeOptional
                                                                                                      user + User + + No +
                                                                                                      +
                                                                                                      +
                                                                                                      + Returns : Promise<void> + +
                                                                                                      +
                                                                                                      + +
                                                                                                      +
                                                                                                      +
                                                                                                      + +
                                                                                                      + + +
                                                                                                      +
                                                                                                      import { MailerService } from '@nestjs-modules/mailer';
                                                                                                      +import { Injectable } from '@nestjs/common';
                                                                                                      +import { name } from 'ejs';
                                                                                                      +import { User } from 'src/users/user.entitly';
                                                                                                      +
                                                                                                      +
                                                                                                      +@Injectable()
                                                                                                      +export class MailProvider {
                                                                                                      +    constructor (
                                                                                                      +        //inject the mailer Service
                                                                                                      +        private readonly mailerService:MailerService,
                                                                                                      +    ) {}
                                                                                                      +
                                                                                                      +
                                                                                                      +    public async WelcomeEmail (user:User):Promise<void> {
                                                                                                      +        await this.mailerService.sendMail({
                                                                                                      +         to: user.email,
                                                                                                      +         from: `helpdesk from realTimeChat.com`,
                                                                                                      +         subject: `welcome to realTimeChat`,
                                                                                                      +         template: './welcome',
                                                                                                      +        context: {
                                                                                                      +            name: user.firstName,
                                                                                                      +            email: user.email,
                                                                                                      +            loginUrl: 'http://localhost:3000/',
                                                                                                      +        }
                                                                                                      +        })
                                                                                                      +
                                                                                                      +
                                                                                                      +    }
                                                                                                      +
                                                                                                      +
                                                                                                      +
                                                                                                      +}
                                                                                                      +
                                                                                                      +
                                                                                                      + +
                                                                                                      + + + + + + + + + + + + + +
                                                                                                      +
                                                                                                      +

                                                                                                      results matching ""

                                                                                                      +
                                                                                                        +
                                                                                                        +
                                                                                                        +

                                                                                                        No results matching ""

                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/injectables/PaginationProvider.html b/documentation/injectables/PaginationProvider.html new file mode 100644 index 0000000..0df30b9 --- /dev/null +++ b/documentation/injectables/PaginationProvider.html @@ -0,0 +1,462 @@ + + + + + + real-time-chat-api documentation + + + + + + + + + + + + + + +
                                                                                                        +
                                                                                                        + + +
                                                                                                        +
                                                                                                        + + + + + + + + + + + + +
                                                                                                        +
                                                                                                        +

                                                                                                        +

                                                                                                        File

                                                                                                        +

                                                                                                        +

                                                                                                        + src/common/pagination/Provider/pagination.provider.ts +

                                                                                                        + + + + + +
                                                                                                        +

                                                                                                        Index

                                                                                                        + + + + + + + + + + + + + + + +
                                                                                                        +
                                                                                                        Methods
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +

                                                                                                        Constructor

                                                                                                        + + + + + + + + + + + + + +
                                                                                                        +constructor(request: Request) +
                                                                                                        + +
                                                                                                        +
                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + +
                                                                                                        NameTypeOptional
                                                                                                        request + Request + + No +
                                                                                                        +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        + +

                                                                                                        + Methods +

                                                                                                        + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        + + + Public + Async + paginatedQuery + + +
                                                                                                        + + paginatedQuery(paginationQueryDto: PaginationQueryDto, repository: Repository) +
                                                                                                        + +
                                                                                                        + Type parameters : +
                                                                                                          +
                                                                                                        • T
                                                                                                        • +
                                                                                                        +
                                                                                                        + +
                                                                                                        + Parameters : + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                                                                                                        NameTypeOptional
                                                                                                        paginationQueryDto + PaginationQueryDto + + No +
                                                                                                        repository + Repository<T> + + No +
                                                                                                        +
                                                                                                        +
                                                                                                        + Returns : Promise<Paginated<T>> + +
                                                                                                        +
                                                                                                        + +
                                                                                                        +
                                                                                                        +
                                                                                                        + +
                                                                                                        + + +
                                                                                                        +
                                                                                                        import { Inject, Injectable } from "@nestjs/common";
                                                                                                        +import { PaginationQueryDto } from "../pagination-query.dto";
                                                                                                        +import { ObjectLiteral, Repository } from "typeorm";
                                                                                                        +import { Request } from "express";
                                                                                                        +import { REQUEST } from "@nestjs/core"
                                                                                                        +import { Paginated } from "../Interfaces/paginatedInterface";
                                                                                                        +
                                                                                                        +
                                                                                                        +@Injectable()
                                                                                                        +export class PaginationProvider {
                                                                                                        +
                                                                                                        +    constructor (
                                                                                                        +        @Inject(REQUEST)
                                                                                                        +        private readonly request:Request,
                                                                                                        +    ) {}
                                                                                                        +    
                                                                                                        +
                                                                                                        +    public async paginatedQuery<T extends ObjectLiteral> (paginationQueryDto:PaginationQueryDto, repository:Repository<T>,): Promise<Paginated<T>> {
                                                                                                        +
                                                                                                        +        const result = await repository.find({
                                                                                                        +
                                                                                                        +            //skip: number of post
                                                                                                        +            //take: number of post to show per page
                                                                                                        +            skip: paginationQueryDto.limit * (paginationQueryDto.page - 1),
                                                                                                        +            take: paginationQueryDto.limit,
                                                                                                        +        })
                                                                                                        +
                                                                                                        +
                                                                                                        +        // create a requestUrl 
                                                                                                        +        // i.e http://localhost:3000/resource 
                                                                                                        +        // the http is this.requestprotocol
                                                                                                        +        const baseUrl = this.request.protocol; + "://" + this.request.headers.host + "/"
                                                                                                        +
                                                                                                        +        const newUrl = new URL(this.request.url, baseUrl)
                                                                                                        +
                                                                                                        +        console.log(baseUrl);
                                                                                                        +        // line 34 give u http://localhost:3000/resource  as result on your terminal
                                                                                                        +        console.log(newUrl)
                                                                                                        +
                                                                                                        +       const totalItems = await repository.count()
                                                                                                        +
                                                                                                        +       const totalpage = Math.ceil(totalItems / paginationQueryDto.limit)
                                                                                                        +
                                                                                                        +       const nextpage = paginationQueryDto.page === 1 ? paginationQueryDto.page: paginationQueryDto.page +1
                                                                                                        +
                                                                                                        +       const prevpage = paginationQueryDto.page === 1 ? paginationQueryDto.page: paginationQueryDto.page -1
                                                                                                        +
                                                                                                        +
                                                                                                        +        const finalResponse: Paginated<T> = {
                                                                                                        +            data: result,
                                                                                                        +            meta: {
                                                                                                        +                itemsPerPage: paginationQueryDto.limit,
                                                                                                        +                totalItems: totalItems,
                                                                                                        +                currentPage: paginationQueryDto.page,
                                                                                                        +                totalPage : totalpage
                                                                                                        +            }, 
                                                                                                        +            link: {
                                                                                                        +                first: `${newUrl.origin}${newUrl.pathname}?limit=${paginationQueryDto.limit}&page=1`,
                                                                                                        +
                                                                                                        +                last: `${newUrl.origin}${newUrl.pathname}?limit=${paginationQueryDto.limit}&${totalpage}`,
                                                                                                        +   
                                                                                                        +               current: `${newUrl.origin}${newUrl.pathname}?limit=${paginationQueryDto.limit}&page=${paginationQueryDto.page}`,
                                                                                                        +   
                                                                                                        +               next: `${newUrl.origin}${newUrl.pathname}?limit=${paginationQueryDto.limit}&page=${nextpage}`,
                                                                                                        +   
                                                                                                        +               previous: `${newUrl.origin}${newUrl.pathname}?limit=${paginationQueryDto.limit}&page=${prevpage}`
                                                                                                        +   
                                                                                                        +            }
                                                                                                        +        }
                                                                                                        +
                                                                                                        +        return finalResponse
                                                                                                        +
                                                                                                        +
                                                                                                        +    }
                                                                                                        +
                                                                                                        +}
                                                                                                        +
                                                                                                        + +
                                                                                                        + + + + + + + + + + + + + +
                                                                                                        +
                                                                                                        +

                                                                                                        results matching ""

                                                                                                        +
                                                                                                          +
                                                                                                          +
                                                                                                          +

                                                                                                          No results matching ""

                                                                                                          +
                                                                                                          +
                                                                                                          +
                                                                                                          + +
                                                                                                          +
                                                                                                          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/js/menu-wc.js b/documentation/js/menu-wc.js index 15de552..8428ecc 100644 --- a/documentation/js/menu-wc.js +++ b/documentation/js/menu-wc.js @@ -59,13 +59,13 @@ customElements.define('compodoc-menu', class extends HTMLElement { AppModule
                                                                                                        • -