* feat: added route to delete users in user management api's
* chore: added lastLoggedOn and lastActiveOn fields to user response type
* chore: changed return type
* chore: changed target to prod for hopp-old-backend service
* feat: infra token module added
* feat: infra token guard added
* feat: token prefix removed
* feat: get pending invites api added
* docs: swagger doc added for get user invites api
* feat: delete user invitation api added
* feat: get users api added
* feat: update user api added
* feat: update admin status api added
* feat: create invitation api added
* chore: swagger doc update for create user invite
* feat: interceptor added to track last used on
* feat: change db schema
* chore: readonly tag added
* feat: get user by id api added
* fix: return type of a function
* feat: controller name change
* chore: improve token extractino
* chore: added email validation logic
---------
Co-authored-by: Balu Babu <balub997@gmail.com>
* feat: env variable added in infra-config for smtp enable status
* feat: event emitter added
* feat: added advance mailer configurations from infra config
* test: fix test cases
* feat: added query to see is smtp enabled or not
* feat: email auth provider disabled on smtp disable
* chore: restrict on update directly instead of dedicated mutation
* fix: feedback resolved
* chore: modify mailer module
* chore: error handle in mailer functions
* chore: removed unused imports
* chore: remove event-emit
* chore: update env example
* test: fix broken test cases
* chore: feedback resolved
* chore: isSMTPEnabled moved to infra config resolver
* fix: email can not reenable if smtp not enabled
* feat: lastLoggedOn added in schema and service function
* feat: add lastLoggedOn logic for magic link
* test: update test cases
* feat: add lastLoggedOn in gql model
* fix: nullable allowed in model attribute
* fix: resolve feedback
* feat: user last login interceptor added
* feat: added query in infra to fetch all shortcodes
* feat: added mutation in admin to delete shortcode
* chore: added new tests for methods in shortcode module
* chore: removed .vscode file
* chore: added a new ShortcodeCreator type to output of fetchAllShortcodes query
* chore: shortcodeCreator type is now nullable
* chore: added type defs to fetchAllShortcodes method in admin module
* docs: update code comments
* chore: changed target to prod in hoppscotch-old-backend
---------
Co-authored-by: Mir Arif Hasan <arif.ishan05@gmail.com>
* feat: infra type added in admin module
* feat: infra-resolver added in admin module
* feat: feedback resolved
* feat: deprecated tag added in some admin ResolveFields
* build: update pnpm-lock file
* feat: add field in infra type
* feat: admin extends user partially
* feat: admin extends user with omitting some fields
* chore: remove unused imports
* build: conflict resolve in pnpm lock file
* 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>
* 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
* 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>