* 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
* 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
* 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
* 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
* 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>
* 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 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>
* 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
* 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
* 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
* 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