mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[PR #4079] [MERGED] feat: adding support for hopp-cli in self-host Hoppscotch #4654
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#4654
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hoppscotch/hoppscotch/pull/4079
Author: @balub
Created: 5/20/2024
Status: ✅ Merged
Merged: 5/28/2024
Merged by: @balub
Base:
next← Head:feat/pat📝 Commits (10+)
6b53a82feat: created a new table to store user PATse24b7aachore: renamed UserTokens table name to PersonalAccessToken0b5dcdachore: added unique property to token column8c9ab5achore: made expiresOn field optionalb6fe9aechore: created access-token module089bd1ffeat: created access-token rest routesbd7aeecchore: created a new auth guard for PATs1a88ddachore: scaffolded routes in team collection and environments modules for CLI2bad15echore: created method to update lastUsedOn property for accessTokens9090320chore: created interceptor to update lastUsedOn property of PAT📊 Changes
20 files changed (+983 additions, -24 deletions)
View changed files
📝
docker-compose.yml(+2 -2)➕
packages/hoppscotch-backend/prisma/migrations/20240520091033_personal_access_tokens/migration.sql(+19 -0)📝
packages/hoppscotch-backend/prisma/schema.prisma(+31 -19)➕
packages/hoppscotch-backend/src/access-token/access-token.controller.ts(+107 -0)➕
packages/hoppscotch-backend/src/access-token/access-token.module.ts(+20 -0)➕
packages/hoppscotch-backend/src/access-token/access-token.service.spec.ts(+195 -0)➕
packages/hoppscotch-backend/src/access-token/access-token.service.ts(+203 -0)➕
packages/hoppscotch-backend/src/access-token/dto/create-access-token.dto.ts(+5 -0)➕
packages/hoppscotch-backend/src/access-token/helper.ts(+17 -0)📝
packages/hoppscotch-backend/src/app.module.ts(+2 -0)📝
packages/hoppscotch-backend/src/errors.ts(+36 -0)➕
packages/hoppscotch-backend/src/guards/rest-pat-auth.guard.ts(+48 -0)➕
packages/hoppscotch-backend/src/interceptors/access-token.interceptor.ts(+34 -0)📝
packages/hoppscotch-backend/src/team-collection/helper.ts(+11 -0)📝
packages/hoppscotch-backend/src/team-collection/team-collection.service.spec.ts(+64 -0)📝
packages/hoppscotch-backend/src/team-collection/team-collection.service.ts(+104 -2)📝
packages/hoppscotch-backend/src/team-environments/team-environments.service.spec.ts(+48 -0)📝
packages/hoppscotch-backend/src/team-environments/team-environments.service.ts(+29 -0)➕
packages/hoppscotch-backend/src/types/AccessToken.ts(+7 -0)📝
packages/hoppscotch-backend/src/types/RESTError.ts(+1 -1)📄 Description
Closes HSB-441
Description
In this PR we are adding features to the Hoppscotch platform to support interaction with the Hoppscotch CLI. This PR introduces the following routes for this:
http://localhost:3170/v1/access-tokens/create- Create a Personal access tokenhttp://localhost:3170/v1/access-tokens/revoke?id=- Delete a Personal access tokenhttp://localhost:3170/v1/access-tokens/list?offset=0&limit=10- Get a list of personal access tokenshttp://localhost:3170/v1/access-tokens/collection/id- Get a team-collections for clihttp://localhost:3170/v1/access-tokens/environment/id- Get a team-environments for cliChecks
Additional Information
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.