Commit Graph

346 Commits

Author SHA1 Message Date
Andrew Bastin
e3dd9e99a1 chore: bump version to 2023.4.6 2023-06-12 10:43:44 +05:30
Andrew Bastin
a213c0c26c chore: bump version to 2023.4.5 2023-06-04 23:41:01 -04:00
Andrew Bastin
15424903ed fix: stop logging DATABASE_URL in logs 2023-06-04 23:33:32 -04:00
Andrew Bastin
1cce117b0a chore: bump version to 2023.4.4 2023-06-02 11:06:51 -04:00
Ankit Sridhar
05e32ef9e4
fix: update team invitation link to domain specified in .env [HBE-202] (#3096) 2023-05-31 10:36:34 -04:00
Mir Arif Hasan
1b413e2f47
fix: timing dependency on test case (#3070) 2023-05-23 16:32:39 -04:00
Andrew Bastin
d6c8400116 chore: bump version to 2023.4.3 2023-05-11 17:05:28 +05:30
Andrew Bastin
c2520006ac chore: bump version to 2023.4.2 2023-05-11 14:09:38 +05:30
Mir Arif Hasan
08f61e7408 fix: magic link URL (#3028) 2023-05-11 14:09:38 +05:30
Mir Arif Hasan
9beda15f00 fix: returning response from authCookieHandler (#3025) 2023-05-11 14:09:38 +05:30
Andrew Bastin
8450fb6596 chore: release 2023.4.1 2023-04-23 16:44:51 +05:30
Andrew Bastin
b68115d3b2 refactor: change user collections min title length to 1 2023-04-11 15:40:26 +05:30
Balu Babu
4ce9e67460
chore: added global lint and test commands to backend package (#81)
* chore: added global lint and test commands to backend package

* chore: removed lint command from root scope execution
2023-04-10 12:25:45 +05:30
Balu Babu
7668be50ae chore: added orderBy field to query to fetch childCollectionList 2023-04-08 05:56:08 +05:30
Ankit Sridhar
100664f77e
fix: refactor related to checklist observation (#73)
* refactor: removed unused files, dependencies and added valid callback URL

* chore: update env example

* test: fixed issue with subscription on deleteUserCollection in UserCollection module

* test: fixed time related issue with auth service methods

* chore: removed unused dependencies in auth.service file

---------

Co-authored-by: Mir Arif Hasan <arif.ishan05@gmail.com>
Co-authored-by: Balu Babu <balub997@gmail.com>
2023-04-07 22:22:41 +05:30
Mir Arif Hasan
696cf8490b
refactor: removing unused import, commented codes, improved cursor query (#69)
* chore: refactor code in some modules

* refactor: getTeamsOfUser functino

* chore: remove unused import

* chore: revert some changes
2023-04-06 19:54:10 +05:30
Mir Arif Hasan
ffc08227dd
fix: all unit test cases for backend modules (HBE-171) (#51)
* fix: if-condition for getCollectionOfRequest func

* fix: all test cases for team request module

* fix: user collection test case

* fix: team module test case

* refactor: updated test description for last implemented changes in admin and removed commented code

---------

Co-authored-by: ankitsridhar16 <ankit.sridhar16@gmail.com>
2023-04-06 19:53:04 +05:30
Balu Babu
2435436580
chore: changes origins to view whitelisted origins in backend (#70) 2023-04-06 14:04:04 +05:30
Balu Babu
22aa8ee334
hotfix: magiclink dynamic email redirection url (#67)
* chore: modified magiclink /signin function to work with origin

* chore: modified testcases for signInMagicLink to reflect new changes

* chore: removed prisma migration file

* chore: removed admin module dulicate from guards folder

* chore: implemented ENUMs for origins in signin method

* chore: added VITE_ADMIN_URL to .env.example file
2023-04-06 12:11:01 +06:00
Ankit Sridhar
6d688ed2bc
refactor: removing unused env variables from env example (#66) 2023-04-05 21:53:27 +05:30
Ankit Sridhar
8bdb9a657f
feat: self host packaging (HBE-166) (#41)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
2023-04-04 03:17:18 +05:30
Akash K
c49573db65
fix: serialize user sessions properly (#62)
* fix: cast prisma user object to user object

* chore: improved consistency

* chore: cast function renamed

---------

Co-authored-by: Mir Arif Hasan <arif.ishan05@gmail.com>
2023-04-03 09:47:40 +05:30
Akash K
7286d3b94f
feat: add reqType to userHistoryDeletedMany subscription (#61) 2023-03-30 12:17:00 +05:30
Balu Babu
ea93162056
refactor: modifed return types of mutation/subscriptions in UserCollections (#57)
* refactor: modifed userCollectionRemoved subscription to return custom return type

* chore: created new return type for export to JSON mutation in UserCollection

* refactor: added reqType to exportUserCollectionsToJSON query

* chore: remove duplicate enum in user-collection.model.ts file
2023-03-29 15:50:48 +05:30
Mir Arif Hasan
ccdce37f88
fix: enum type fixes in SDL (HBE-183) (#55)
* fix: added reqType typed in sdl

* fix: updateUserSession type
2023-03-28 17:46:41 +06:00
Ankit Sridhar
9d6a7f709c
feat: introducing get team info by id in admin module as a query (HBE-182) (#54)
* feat: introducing get team info by id in admin module as a query

* chore: adding resolve field for admin

* chore: remove nullable false

* refactor: rename getTeamInfo to teamInfo

* refactor: make myRole nullable
2023-03-28 15:35:38 +05:30
Mir Arif Hasan
96a4125f15
feat: rate-limit annotation added in admin resolver (#53) 2023-03-24 15:21:46 +05:30
Ankit Sridhar
b16e90c10d
fix: check for admin users when removing user as admin (HBE-180) (#52)
* fix: check if admin users are there in infra when removing user as an admin

* fix: corrected the logic for length check

* chore: update error message

* chore: add new error message
2023-03-24 15:21:23 +05:30
Balu Babu
3df0492275
refactor: removing Redis from pubsub in sh-backend (HBE-178) (#49)
* chore: removed production env check and redis as pubsub provider in pubsub module

* chore: removed pnpm-lock.yaml file from backend

* chore: removed migrations folder from prisma

* chore: removed RedisPubSub from pubsub service file and changed signature of asyncIterator method
2023-03-21 16:46:54 +05:30
Mir Arif Hasan
fa8ca0569d
feat: introducing rate-limiting on queries, mutations and most of the REST endpoints (HBE-111) (#46)
* feat: rate-limiting guard added and configured in app module

* feat: rate-limit annotation added in controllers and resolvers (query, mutation, not subscription)

* docs: added comments
2023-03-21 16:45:50 +05:30
Ankit Sridhar
f78354a377
feat: Introducing Admin Module to Backend (HBE-83) (#21)
* feat: introducing admin module, resolvers and service files as a module

* feat: adding admin module in the app module

* feat: introducing admin guard and decorator for allowing admin operations

* feat: invited user model

* chore: added user invitation mail description to mailer service

* chore: added admin and user related error

* feat: added invited users as a new model in prisma

* chore: added admin related topics to pubsub

* chore: added service method to fetch all users from user table

* chore: added user deletion base implementation

* Revert "chore: added user deletion base implementation"

This reverts commit d1615ad83db2bae946e2d366a903d2f95051dabb.

* feat: adding team related operations to admin

* chore: adding admin related service methods to teams module service

* chore: adding admin related service methods to team coll invitations requests envs

* chore: added more module error messages

* chore: added admin check service method

* chore: added find individual user by UID in admin

* HBE-106 feat: introduced code to handle first time admin login setup (#23)

* test: wrote test cases for verifyAdmin route service method

* chore: added comments to verifyAdmin service method

* chore: deleted the prisma migration file

* chore: added find admin users

* feat: added user deletion into admin module

* chore: admin user related errors

* chore: fixed registry pattern in the shortcodes and teams to handle user deletion

* chore: add subscription topic for user deletion

* chore: updated user type in data handler

* feat: implement and fix user deletion

* feat: added make user admin mutation

* chore: added unit tests for admin specific service methods in admin module

* chore: added invitation not found error

* chore: added admin specific operation test cases in specific modules

* chore: added tests related to user deletion and admin related operation in user module

* chore: updated to error constant when invitations not found

* chore: fix rebase overwritten methods

* feat: implement remove user as admin

* chore: add new line

* feat: introducing basic metrics into the self-hosted admin module (HBE-104) (#43)

* feat: introducing admin module, resolvers and service files as a module

* feat: adding admin module in the app module

* feat: introducing admin guard and decorator for allowing admin operations

* feat: invited user model

* chore: added user invitation mail description to mailer service

* chore: added admin and user related error

* feat: added invited users as a new model in prisma

* chore: added admin related topics to pubsub

* chore: added service method to fetch all users from user table

* chore: added user deletion base implementation

* Revert "chore: added user deletion base implementation"

This reverts commit d1615ad83db2bae946e2d366a903d2f95051dabb.

* feat: adding team related operations to admin

* chore: adding admin related service methods to teams module service

* chore: adding admin related service methods to team coll invitations requests envs

* chore: added more module error messages

* chore: added admin check service method

* chore: added find individual user by UID in admin

* HBE-106 feat: introduced code to handle first time admin login setup (#23)

* test: wrote test cases for verifyAdmin route service method

* chore: added comments to verifyAdmin service method

* chore: deleted the prisma migration file

* chore: added find admin users

* feat: added user deletion into admin module

* chore: admin user related errors

* chore: fixed registry pattern in the shortcodes and teams to handle user deletion

* chore: add subscription topic for user deletion

* chore: updated user type in data handler

* feat: implement and fix user deletion

* feat: added make user admin mutation

* chore: added unit tests for admin specific service methods in admin module

* chore: added invitation not found error

* chore: added admin specific operation test cases in specific modules

* chore: added tests related to user deletion and admin related operation in user module

* chore: updated to error constant when invitations not found

* chore: fix rebase overwritten methods

* feat: implement remove user as admin

* chore: add new line

* chore: created new GQL return type for admin module

* chore: created resolver and service method for method to fetch org metrics

* chore: removed all entities relevant to seperate query for fetching admin metrics

* chore: created all resolvers for metrics

* feat: completed adding field resolves to query org metrics

* test: wrote tests for all metrics related methods in admin module

* test: added test cases for get count functions in multiple modules

* chore: removed prisma migration folder

* Delete backend-schema.gql

* chore: resolved merge conflicts in team test file

---------

Co-authored-by: ankitsridhar16 <ankit.sridhar16@gmail.com>

* refactor: update mailer service to stop using postmark (#38)

* refactor: update mailer service to stop using postmark

* chore: remove postmark as a dep and move out postmark code

* chore: remove postmark variables from .env.example

* chore: add formal errors for mailer initialization errors

* chore: add and update jsdoc comments in mailer service methods

* chore: added user invitation mail description to mailer service

* chore: updated with review changes requested for admin module

* feat: adding admin resolver to gql schema

* feat: adding input args for admin resolvers

* chore: invited user renamed

* chore: updated mailer service to be compatible with new mailer

* chore: updated team service with review changes

* chore: updated team collection service with review changes

* chore: updated team environments service with review changes

* chore: updated team requests service with review changes

* chore: updated user service with review changes

* refactor: invited user model

* chore: review changes implemented

* chore: implemented the review changes for admin, user and teams module

* chore: removed error handling and implemented review changes

* refactor: naming change for IsAdmin

---------

Co-authored-by: Balu Babu <balub997@gmail.com>
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
2023-03-21 16:42:30 +05:30
Andrew Bastin
2244fb0523 chore: add numberScalarMode for schema gen as well 2023-03-20 22:01:06 +05:30
Andrew Bastin
e978541bf1
refactor: update mailer service to stop using postmark (#38)
* refactor: update mailer service to stop using postmark

* chore: remove postmark as a dep and move out postmark code

* chore: remove postmark variables from .env.example

* chore: add formal errors for mailer initialization errors

* chore: add and update jsdoc comments in mailer service methods
2023-03-15 14:02:55 +05:30
Balu Babu
b0d9a934d9
hotfix: fixing type errors in backend graphql layer (HBE-174) (#45)
* chore: added the nest graphql fix for making it use Int over Float

* chore: changed the type of cursor to Int in PaginationArgs

* chore: fixed description mismatch in rootUserCreation functions in UserCollection module

* chore: removed unused title type in UserRequest input-args

* fix: added ID scaler in user-request input type

* fix: added ID scaler in team-invitation and user-history

---------

Co-authored-by: Mir Arif Hasan <arif.ishan05@gmail.com>
2023-03-15 11:20:45 +05:30
Balu Babu
a779ba5c0e
hotfix: adding dynamic redirection in self-host auth system (HBE-173) (#40)
* chore: completed base auth implementation with redirectUrl

* chore: completed base auth fix with redirect_uri

* chore: added whitelist based redirection

* chore: added a env variable for session secret in main.ts

* chore: removed migrations folder from prisma directory
2023-03-14 19:19:22 +05:30
Balu Babu
be46ed2686
refactor: adding JSON import/export functions to UserCollections module (HBE-169) (#37)
* feat: created exportUserCollectionsToJSON mutation for UserCollection module

* chore: added comments to export functions

* chore: added type and user ownership checking to creation methods

* chore: replaced request property with spread request object instead

* chore: completed all changes requested in inital review of PR

* chore: explicitly exporting request title in export function

* chore: explicitly exporting request title in export function

* chore: added codegen folder to gitignore

* chore: removed gql-code gen file from repo
2023-03-14 18:31:47 +05:30
Balu Babu
28dbaf317e
chore: added the correct GQL return type to userRequestMoved subscription (#44) 2023-03-14 11:49:27 +05:30
Andrew Bastin
65719b560b
feat: introduce gql schema sdl generation to the backend (#35)
* feat: introduce gql schema sdl generation to the backend

* chore: update gql-codegen consumers to get schema from generated sdl

* chore: hoppscotch-backend generates gql sdl on postinstall

* fix: add back missed part of generate-gql-sdl script

* chore: updated generate sdl script to hardcode whitelisted domains

* chore: add prisma generate on postinstall script

---------

Co-authored-by: ankitsridhar16 <ankit.sridhar16@gmail.com>
2023-03-13 18:52:50 +05:30
Mir Arif Hasan
8550c92e37
feat: subscription return response updated for moveUserRequest (#39)
* feat: subscription return response updated for moveUserRequest

* feat: update test cases
2023-03-13 16:15:51 +05:30
Mir Arif Hasan
7d3b2c064a
refactor: Refactoring of Team Request with Reordering (HBE-151) (#20)
* feat: createdOn, updatedOn added in team-request schema and updateTeamReq resolver refactored

* feat: resolver name changed for updateTeamRequest

* refactor: searchForTeamRequest resolver

* refactor: some functions refactored

* refactor: team-request service and subscriptions

* refactor: update GqlRequestTeamMemberGuard

* feat: team request reordering add

* feat: handle exception on update Team Request

* chore: change some return statement

* fix: change field name of MoveTeamRequestArgs

* feat: publish message update for reorder team req

* test: fix all the exists cases

* fix: add return statement

* test: add few functions test cases

* feat: made backward compatible

* fix: team-member guard for retrive user

* fix: few bugs

* chore: destructured parameters in service methods

* test: fix test cases

* feat: updateLookUpRequestOrder resolver added

* test: fix test cases

* chore: improved code consistency

* fix: feedback changes

* fix: main changes
2023-03-09 20:59:39 +06:00
Balu Babu
2a715d5348
refactor: refactoring Team-Collections with reordering in self-host (HBE-150) (#34)
* chore: removed firebase module as a dependency from team-collection module

* chore: modified team-collection resolver file to use input-args types

* chore: modified getTeamOfCollection service method and resolver

* chore: modified getParentOfCollection service method in team-collection module

* chore: modified getChildrenOfCollection service method in team-collection module

* chore: added new fields to TeamCollection model in prisma schema file

* chore: modified getCollection service method and resolver in team-collection module

* chore: modified createCollection service method and resolver in team-collection module

* chore: created cast helper function to resolve issue with creation mutation in team-collection

* chore: modified teamCollectionRemoved subscription return types

* chore: removed return types from subscriptions in team-collection module

* chore: removed all instances of getTeamCollections service method in team-collection module

* feat: added mutation to handle moving collections and supporting subscriptions

* feat: added mutation to re-ordering team-collection order

* chore: added teacher comments to both collection modules

* test: added test cases for getTeamOfCollection service method

* test: added test cases for getParentOfCollection service method

* test: added test cases for getChildrenOfCollection service method

* test: added test cases for getTeamRootCollections service method

* test: added test cases for getCollection service method

* test: added test cases for createCollection service method

* chore: renamed renameCollection to renameUserCollection in UserCollection module

* test: added test cases for renameCollection service method

* test: added test cases for deleteCollection service method

* test: added test cases for moveCollection service method

* test: added test cases for updateCollectionOrder service method

* chore: added import and export to JSON mutations to team-collection module

* chore: created replaceCollectionsWithJSON mutation in team-collection module

* chore: moved the mutation and service method of importCollectionFromFirestore to the end of file

* chore: added helper comments to all import,export functions

* chore: exportCollectionsToJSON service method orders collections and requests in ascending order

* chore: added test cases for importCollectionsFromJSON service method

* chore: added ToDo to write test cases for exportCollectionsToJSON

* chore: removed prisma migration folder

* chore: completed all changes requested in inital PR review

* chore: completed all changes requested in second  PR review

* chore: completed all changes requested in third PR review
2023-03-09 19:37:40 +05:30
Mir Arif Hasan
223150550f
feat: user request module with re-ordering (HBE-78) (#11)
* feat: added user-request schema in prisma

* feat: basic mutation and queries implementation

* fix: enum registration in graphql

* feat: user resolver added for user requests

* chore: refactor codes

* feat: transaction added in request reordering operation

* feat: pubsub added in user request

* refactor: user request service

* chore: feedback added

* chore: code improvement

* fix: bug fix

* feat: request type update in schema and JSDoc added

* test: fetchUserRequests and fetchUserRequest unit test added

* chore: refactor two functions

* test: unit test added for more functions

* chore: code readability improved

* test: added unit test for reorderRequests function

* feat: subscriptions added

* fix: User reference to AuthUser

* fix: User to AuthUser in test file

* chore: update dto file extensions

* feat: relation added in schema level

* chore: add function for db to model type casting

* feat: filter with title and collectionID add in userRequest resolver

* feat: resolvers added for userCollection in request module, and move inputTypes in a single file

* test: test file updated

* docs: description updated

* feat: createdOn, updatedOn added in user request schema

* chore: (delete in future) user collection module add for testing purpose

* feat: separate resolvers for create, update, delete user request based on req type

* feat: used paginationArgs from common types

* fix: shift InputTypes to ArgsTypes

* docs: update docs

* feat: avoid destructuring

* test: fix test cases for create and update

* docs: update JS doc

* feat: separate object variables for moveRequest function

* test: fix test case for moveRequest function

* feat: saperate parameters for fetchUserRequest

* test: fix test cases for fetchUserRequests

* feat: update some query names and made review changes

* test: fix test cases

* feat: remove filtering with title

* test: fix text cases for fetchUserRequests func

* feat: update subscription key

* feat: edge case handled for user request creation

* test: fix test case

* fix: user field resolver

* fix: fetch user req issue

* fix: update with type check

* test: fix test cases

* feat: type checked on move request

* test: add test case for typeValidity check func

* fix: edge condition added in if statement

* fix: error message

* chore: removed user collection from this branch

* fix: typos
2023-03-03 16:51:49 +06:00
Balu Babu
80c6f600db
hotfix: refresh token cookie migration (HBE-167) (#31)
* chore: removed signed cookies from refresh token strategy

* chore: removed signed cookies from refresh RTCookie decorator
2023-03-03 15:52:26 +05:30
Balu Babu
a938be3712
feat: Introducing user-collections into self-host (HBE-98) (#18)
* feat: team module added

* feat: teamEnvironment module added

* feat: teamCollection module added

* feat: team request module added

* feat: team invitation module added

* feat: selfhost auth frontend (#15)

Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>

* feat: bringing shortcodes from central to selfhost

* chore: added review changes in resolver

* chore: commented out subscriptions

* chore: bump backend prettier version

* feat: created new user-collections module with base files

* feat: added new models for user-collection and user-request tables in schema.prisma file

* feat: mutations to create user-collections complete

* feat: added user field resolver for userCollections

* feat: added parent field resolver for userCollections

* feat: added child field resolver with pagination for userCollections

* feat: added query to fetch root user-collections with pagination for userCollections

* feat: added query to fetch user-collections for userCollections

* feat: added mutation to rename user-collections

* feat: added mutation to delete user-collections

* feat: added mutation to delete user-collections

* refactor: changed the way we fetch root and child user-collection counts for other operations

* feat: added mutation to move user-collections between root and other child collections

* refactor: abstracted orderIndex update logic into helpert function

* chore: mutation to update order root user-collections complete

* feat: user-collections order can be updated when moving it to the end of list

* feat: user-collections order update feature complete

* feat: subscriptions for user-collection module complete

* chore: removed all console.logs from user-collection.service file

* test: added tests for all field resolvers for user-collection module

* test: test cases for getUserCollection is complete

* test: test cases for getUserRootCollections is complete

* test: test cases for createUserCollection is complete

* test: test cases for renameCollection is complete

* test: test cases for moveUserCollection is complete

* test: test cases for updateUserCollectionOrder is complete

* chore: added createdOn and updatedOn fields to userCollections and userRequests schema

* chore: created function to check if title are of valid size

* refactor: simplified user-collection creation code

* chore: made changed requested in initial PR review

* chore: added requestType enum to user-collections

* refactor: created two seperate queries to fetch root REST or GQL queries

* chore: created seperate mutations and queries for REST and GQL root/child collections

* chore: migrated all input args classess into a single file

* chore: modified createUserCollection service method to work with different creation inputs args type

* chore: rewrote all test cases for user-collections service methods with new CollType

* fix: added updated and deleted subscription changes

* fix: made all the changes requested in the initial PR review

* fix: made all the changes requested in the second PR review

* chore: removed migrations from prisma directory

* fix: made all the changes requested in the third PR review

* chore: added collection type checking to updateUserCollectionOrder service method

* chore: refactored all test cases to reflect new additions to service methods

* chore: fixed issues with pnpm-lock

* chore: removed migrations from prisma directory

* chore: hopefully fixed pnpm-lock issues

* chore: removed console logs in auth controller

---------

Co-authored-by: Mir Arif Hasan <arif.ishan05@gmail.com>
Co-authored-by: Akash K <57758277+amk-dev@users.noreply.github.com>
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
Co-authored-by: ankitsridhar16 <ankit.sridhar16@gmail.com>
2023-03-03 15:03:05 +05:30
Ankit Sridhar
1780f3858d
fix : User history fix for returning most recently executed 50 user history REST/GraphQL items (HBE-165) (#27)
* chore: updated fetchUserHistory operation to return recently executed 50 entries

* chore: updated history to use PaginationArgs for operation

* chore: updated GraphQL resolver name
2023-03-02 14:56:50 +05:30
Mir Arif Hasan
5eb85fd99c
fix: cleaning deprecated resolvers on Team Module (HBE-157) (#25)
* fix: retrive user object from gql-team-member-guard

* feat: removed addTeamMemberByEmail resolver
2023-02-28 14:22:00 +06:00
Balu Babu
2ba05a46ee
HBE-164 refactor: subscriptions auth cookie fix (#26)
* chore: added error handling to cookie extraction logic for subscriptions

* chore: removed migration file from prisma directory
2023-02-27 19:32:33 +05:30
Ankit Sridhar
292ed87201
fix: added updated and deleted subscription changes (#24) 2023-02-27 19:03:48 +05:30
Balu Babu
1860057a25
HBE-147 refactor: Introduce shortcodes into self-host refactored to pseudo-fp format (#22)
* refactor: refactor all queries,mutations and subscriptions for shortcode module

* test: rewrote test cases for shortcodes

* chore: modified shortcode error code

* chore: created helper function to do shortcode type conversion in service file

* chore: simplifed logic to fetch user shortcodes with cursor pagination

* chore: removed migrations file

* chore: removed unused imports in shortcodes module

* chore: modified generateUniqueShortCodeID function

* chore: modified generateUniqueShortCodeID function

* chore: changed jwtService to use verify instead of decode

* docs: added teacher comments to all shortcodes service methods

* chore: removed stale test cases from shortcode modules
2023-02-22 17:40:53 +05:30
Mir Arif Hasan
24dd535d9e
HBE-155 Common input-args for Pagination (#19)
* feat: common input-args added

* chore: move common input-types.args.ts into types folder

* fix: add gql InputType annotation

* docs: update field description
2023-02-16 11:58:07 +06:00
Mir Arif Hasan
b60d45ba76
HBE 145 - fixes cookie parse issue (#17)
* feat: handled cookie parsing

* chore: enum added

* chore: enum name updated
2023-02-10 12:39:04 +06:00
Andrew Bastin
7336a3d9c7 chore: bump backend prettier version 2023-02-09 18:05:41 +05:30
ankitsridhar16
c7829201e1 chore: commented out subscriptions 2023-02-09 17:31:54 +05:30
ankitsridhar16
63b6c76f51 chore: added review changes in resolver 2023-02-09 17:31:54 +05:30
ankitsridhar16
056a5df4e1 feat: bringing shortcodes from central to selfhost 2023-02-09 17:31:54 +05:30
Andrew Bastin
3cf3feb2ae chore: updated dockerfile to install deps less 2023-02-08 22:50:37 +05:30
Mir Arif Hasan
46579900cd feat: team invitation module added 2023-02-08 20:21:51 +06:00
Mir Arif Hasan
2d4a5a30f7 test: instance create error commenting mockFB 2023-02-08 20:21:51 +06:00
Mir Arif Hasan
2ed5a045de feat: team request module added 2023-02-08 20:21:51 +06:00
Mir Arif Hasan
4b42496273 feat: teamCollection module added 2023-02-08 20:21:51 +06:00
Mir Arif Hasan
c5d8a446ae feat: teamEnvironment module added 2023-02-08 20:21:51 +06:00
Mir Arif Hasan
9bee62ada9 feat: team module added 2023-02-08 20:21:51 +06:00
Balu Babu
2ee4029e04 chore: removed migrations in prisma 2023-02-08 15:50:02 +05:30
Balu Babu
edd186bdfe chore: changed const names in subscriptionContextCookieParser 2023-02-08 15:48:40 +05:30
Balu Babu
856752db21 chore: added env_file property to SH-backend docker-compose file 2023-02-08 14:41:05 +05:30
Balu Babu
7fde6db9d1 refactor: changed onConnect function in subscriptionHandler to decode cookies for subscriptions 2023-02-08 14:36:01 +05:30
Balu Babu
0aac046a0e refactor: changed context to contain just req,res and connection objects for GraphQLModule 2023-02-08 14:27:24 +05:30
Balu Babu
1ad11adb94 chore: remved signed flag from cookie setter in auth/helper.ts 2023-02-08 14:25:05 +05:30
Balu Babu
505adea0ef chore: changed jwt stratergy to use cookies instead of signedCookies 2023-02-08 14:24:16 +05:30
Balu Babu
9c64721bf0 refactor: refactored gql-user-decorator to work for subscriptions 2023-02-08 14:23:27 +05:30
Balu Babu
965fdad8b1 refactor: refactored gql-auth-guard to work for websocket based subscriptions 2023-02-08 14:20:51 +05:30
Balu Babu
a6d6589811 chore: removed SIGNED_COOKIE_SECRET from cookieParser in main.ts and .env.example files 2023-02-08 14:18:39 +05:30
Balu Babu
65472bed54 test: fixed date issue in user-history test 2023-02-02 19:09:26 +05:30
Balu Babu
a188ad68ed
Merge branch 'main' into feat/user-authentication 2023-02-02 18:54:45 +05:30
Andrew Bastin
bb01afeb99 fix: jest crashing out on tests 2023-02-02 13:39:54 +05:30
Balu Babu
a1be3a3e77 chore: added nestjs version into auth module 2023-02-01 19:19:39 +05:30
Balu Babu
b5e7877912 chore: moved auth utility functions to auth/helper.ts from src/utils.ts 2023-02-01 18:47:11 +05:30
Balu Babu
587e7118c9 chore: added versioning to auth rest module 2023-02-01 18:36:03 +05:30
Balu Babu
8c5ffb88a3 fix: changed user type to AuthUser in user-settings resolver 2023-02-01 18:24:18 +05:30
Balu Babu
2a00f41ef8 test: refactored all test cases with new user type change 2023-02-01 17:52:33 +05:30
Balu Babu
4ca762344c chore: captialized DTO names 2023-02-01 14:58:31 +05:30
Balu Babu
5c5ab5bad5 fix: changed all refrences to passwordlessVerification to verificationTokens in auth module 2023-02-01 11:58:15 +05:30
Balu Babu
3afc89db6b fix: fixed all issues raised in initial PR review 2023-01-30 18:55:53 +05:30
Balu Babu
a8d50223aa refactor: changed auth module to work with signed cookies 2023-01-30 06:31:10 +05:30
Balu Babu
1bbcd638b8 chore: converted hardcoded whitelisted domains in GQL module to use env variables 2023-01-27 13:42:28 +05:30
Balu Babu
fe73750d66 fix: fixed the user type error in auth.service file 2023-01-27 13:38:36 +05:30
Balu Babu
ca4c576f78 chore: resolved all merge conflicts 2023-01-24 19:35:40 +05:30
Mir Arif Hasan
91adf379da chore: removed redundant comment 2023-01-24 17:27:40 +06:00
Mir Arif Hasan
08ca57cba2 feat: user session resolver added for sessions updates 2023-01-24 17:19:24 +06:00
Mir Arif Hasan
e6fcb1272a Merge branch 'main' into feat/user-session 2023-01-24 15:40:19 +06:00
Mir Arif Hasan
60a5acdb9d fix: typo 2023-01-24 15:28:27 +06:00
Mir Arif Hasan
2221261ec2 fix: typo 2023-01-24 15:27:03 +06:00
Mir Arif Hasan
6627514e88 chore: pulled from main 2023-01-24 15:24:11 +06:00
Mir Arif Hasan
d7b02da719 test: more test case added for user module 2023-01-24 15:12:30 +06:00
Mir Arif Hasan
ebbe015bbc feat: db schema update from string to json column type 2023-01-24 15:10:54 +06:00
ankitsridhar16
7d98c1b355 Merge remote-tracking branch 'origin/main' into feat/user-history
# Conflicts:
#	packages/hoppscotch-backend/prisma/schema.prisma
2023-01-24 13:04:19 +05:30
ankitsridhar16
e78040a376 refactor: removed migrations 2023-01-24 13:00:34 +05:30
ankitsridhar16
97eedb568c refactor: added fetchUserHistoryByID method and added changes for spread 2023-01-24 12:53:44 +05:30
Mir Arif Hasan
b50b97a4d1 chore: removed seed cmd form package.json 2023-01-24 12:50:31 +06:00
Mir Arif Hasan
e8e176ed40 fix: removed seed scripts 2023-01-24 12:49:22 +06:00
Mir Arif Hasan
bc82e9c7fa feat: user settings create subscription added and fixed typos 2023-01-24 07:26:47 +06:00
Balu Babu
73ace77305 refactor: changed the test cases to reflect change to UserHistory schema 2023-01-24 02:02:17 +05:30
Balu Babu
4023dcf09d chore: changed the return data to use spread operator 2023-01-24 00:40:14 +05:30
ankitsridhar16
ebf236b387 chore: added changes to creating a history in resolvers and service method 2023-01-23 22:51:37 +05:30
Mir Arif Hasan
e40d77420c chore: comment text updated 2023-01-23 21:54:19 +06:00
Mir Arif Hasan
27b9f57d7a test: pubsub test case added on user settings create 2023-01-23 21:51:46 +06:00
Mir Arif Hasan
3cd9639f34 test: feedback updated on test script 2023-01-23 21:32:00 +06:00
ankitsridhar16
a5a14f6c76 chore: applied review changes for resolvers 2023-01-23 20:21:44 +05:30
Mir Arif Hasan
bfac3f8ad0 feat: db column update from settings to properties 2023-01-23 20:25:48 +06:00
Mir Arif Hasan
dcadbac4d5 docs: update mutation description 2023-01-23 16:33:48 +06:00
ankitsridhar16
626d703d77 refactor: updated test cases to split subscription 2023-01-23 15:23:53 +05:30
ankitsridhar16
25b7ef3d2e refactor: updated pubsub publishing to leverage new topic defs and rewrote map logic 2023-01-23 15:23:02 +05:30
ankitsridhar16
d812e6ab96 refactor: user history resolver changes 2023-01-23 15:06:01 +05:30
ankitsridhar16
74e4a77ce6 chore: added topics for user history subscriptions 2023-01-23 15:04:05 +05:30
ankitsridhar16
863e1ee113 fix: fixed merge related conflicting data 2023-01-23 15:03:03 +05:30
Mir Arif Hasan
33e4a15830 feat: used new pubsub method to publish 2023-01-23 15:28:55 +06:00
Mir Arif Hasan
bf09786423 feat: used new pubsub method and resolve conflicts 2023-01-23 15:11:52 +06:00
ankitsridhar16
f7070dd3f7 Merge remote-tracking branch 'origin/main' into feat/user-history
# Conflicts:
#	packages/hoppscotch-backend/prisma/schema.prisma
#	packages/hoppscotch-backend/src/app.module.ts
2023-01-23 13:22:12 +05:30
ankitsridhar16
523c650c9d chore: updated primsa type for executed on 2023-01-23 13:13:19 +05:30
ankitsridhar16
cb1b13bdb4 chore: updated filename to topicDefs 2023-01-23 11:49:41 +05:30
ankitsridhar16
480a34c0f7 fix: updated resolver pubsub topic name 2023-01-23 09:54:20 +05:30
Balu Babu
93479320ee chore: added teacher comments to all service methods 2023-01-23 06:04:23 +05:30
Balu Babu
b2acd5511c chore: user displayName and photoURL property updates itself when found with SSO providers 2023-01-23 05:31:03 +05:30
Balu Babu
96ed2f2119 test: wrote tests for auth service file 2023-01-23 05:07:59 +05:30
ankitsridhar16
606e0120ee chore: removed the logic for primitiveTypes as it is unused 2023-01-20 16:13:35 +05:30
ankitsridhar16
6da85fd286 chore: updated types to def and changed deleted many as a new indexed type 2023-01-20 16:12:45 +05:30
ankitsridhar16
298b960ef7 chore: removed comment 2023-01-20 15:18:04 +05:30
Balu Babu
ee3fbabece chore: updated .env.example file with new data 2023-01-20 15:00:54 +05:30
ankitsridhar16
0bed5cd99a chore: removed subscription handler related files 2023-01-20 14:57:47 +05:30
ankitsridhar16
bc55af27a7 chore: updated user environment to use PubSub instead of SubscriptionHandler 2023-01-20 14:56:28 +05:30
ankitsridhar16
a0006f73ac chore: added message types to PubSub Service 2023-01-20 14:55:26 +05:30
Balu Babu
f79070fe60 test: wrote tests for user service file 2023-01-20 11:56:33 +05:30
Balu Babu
b238f3d060 fix: fixed magic-link account creation bug 2023-01-20 07:59:52 +05:30
Balu Babu
a6ad86bd59 chore: replaced hardcoded values with env variables in app.module.ts, main.ts and utils.ts 2023-01-20 07:56:19 +05:30
Balu Babu
cde0ba11fa fix: changed the return type of delete many subscription to number from user-environment type 2023-01-20 04:55:35 +05:30
Balu Babu
da9fcd1087 refactor: changed the return type of deleteUserEnvironments method to number from void 2023-01-20 04:36:30 +05:30
Balu Babu
8929b37dbe fix: changed return type of deleteUserEnvironment mutation to boolean in user-environments resolver 2023-01-20 04:26:05 +05:30
Balu Babu
509604833e chore: cleaned unwanted imports in auth module 2023-01-20 00:04:01 +05:30
Mir Arif Hasan
08ac9680d7 fix: keeping timestamp without timezone 2023-01-19 17:11:32 +06:00
ankitsridhar16
ca5404a93b chore: updated ts config with review changes 2023-01-19 16:25:36 +05:30
ankitsridhar16
f6f4547af3 chore: introduced string to json from user-settings and moved types 2023-01-19 16:24:31 +05:30
ankitsridhar16
669f8b0431 chore: made review changes for resolvers and introduced stringToJson from user-settings 2023-01-19 16:22:49 +05:30
ankitsridhar16
86aa0251ab chore: made review changes 2023-01-19 16:21:05 +05:30
ankitsridhar16
2252048d2e chore: updated module type name 2023-01-19 16:20:12 +05:30
Balu Babu
53571a7d72 refactor: logout route now just returning 200 status code not redirecting to app_domain 2023-01-19 15:13:55 +05:30
ankitsridhar16
0a469f4ccf chore: introduced subscription handler and fixed requested review changes 2023-01-19 12:57:59 +05:30
ankitsridhar16
d10ed664bf chore: updated test cases with requested changes to handle publishing seperately 2023-01-19 12:56:41 +05:30
ankitsridhar16
4aad8d36a9 chore: updated comment for Subscription Type and updated JSDoc for publish 2023-01-19 12:53:40 +05:30
ankitsridhar16
3e9295f313 chore: added review changes for updating mutations and naming for descriptions 2023-01-19 12:50:20 +05:30
ankitsridhar16
6aa66e99b5 chore: added review changes for description 2023-01-19 12:48:25 +05:30