├── .npmrc ├── .gitattributes ├── packages ├── hoppscotch-backend │ ├── cross-env │ ├── eslint │ ├── .dockerignore │ ├── global.d.ts │ ├── jest.setup.js │ ├── .prettierrc │ ├── src │ │ ├── types │ │ │ ├── RequestTypes.ts │ │ │ ├── Passwordless.ts │ │ │ ├── CollectionFolder.ts │ │ │ ├── AuthUser.ts │ │ │ ├── AuthError.ts │ │ │ ├── input-types.args.ts │ │ │ └── Email.ts │ │ ├── admin │ │ │ ├── admin.model.ts │ │ │ ├── decorators │ │ │ │ └── gql-admin.decorator.ts │ │ │ ├── invited-user.model.ts │ │ │ └── guards │ │ │ │ └── gql-admin.guard.ts │ │ ├── auth │ │ │ ├── dto │ │ │ │ ├── signin-magic.dto.ts │ │ │ │ └── verify-magic.dto.ts │ │ │ └── guards │ │ │ │ ├── jwt-auth.guard.ts │ │ │ │ └── rt-jwt-auth.guard.ts │ │ ├── app.controller.ts │ │ ├── pubsub │ │ │ └── pubsub.module.ts │ │ ├── prisma │ │ │ ├── prisma.module.ts │ │ │ └── prisma.service.ts │ │ ├── team │ │ │ └── decorators │ │ │ │ └── requires-team-role.decorator.ts │ │ ├── guards │ │ │ ├── throttler-behind-proxy.guard.ts │ │ │ ├── gql-auth.guard.ts │ │ │ └── gql-throttler.guard.ts │ │ ├── decorators │ │ │ ├── gql-user.decorator.ts │ │ │ └── rt-cookie.decorator.ts │ │ ├── user │ │ │ ├── user.data.handler.ts │ │ │ └── user.module.ts │ │ ├── shortcode │ │ │ └── shortcode.model.ts │ │ ├── mailer │ │ │ └── MailDescriptions.ts │ │ ├── user-collection │ │ │ └── user-collection.module.ts │ │ └── team-invitation │ │ │ └── input-type.args.ts │ ├── tsconfig.build.json │ ├── prisma │ │ └── migrations │ │ │ └── migration_lock.toml │ ├── test │ │ └── jest-e2e.json │ ├── nest-cli.json │ ├── .gitignore │ └── tsconfig.json ├── hoppscotch-common │ ├── public │ │ ├── CNAME │ │ ├── icon.png │ │ ├── logo.png │ │ ├── banner.png │ │ ├── favicon.ico │ │ ├── icons │ │ │ ├── pwa-128x128.png │ │ │ ├── pwa-16x16.png │ │ │ ├── pwa-192x192.png │ │ │ ├── pwa-256x256.png │ │ │ ├── pwa-32x32.png │ │ │ ├── pwa-512x512.png │ │ │ └── pwa-1024x1024.png │ │ ├── images │ │ │ ├── banner-dark.png │ │ │ ├── banner-light.png │ │ │ └── cover.svg │ │ ├── badge-dark.svg │ │ ├── badge-light.svg │ │ └── badge.svg │ ├── src │ │ ├── composables │ │ │ ├── head.ts │ │ │ ├── toast.ts │ │ │ ├── theming.ts │ │ │ └── i18n.ts │ │ ├── helpers │ │ │ ├── backend │ │ │ │ ├── gql │ │ │ │ │ ├── mutations │ │ │ │ │ │ ├── DeleteUser.graphql │ │ │ │ │ │ ├── LeaveTeam.graphql │ │ │ │ │ │ ├── DeleteTeam.graphql │ │ │ │ │ │ ├── DeleteShortcode.graphql │ │ │ │ │ │ ├── DeleteRequest.graphql │ │ │ │ │ │ ├── DeleteTeamEnvironment.graphql │ │ │ │ │ │ ├── RevokeTeamInvitation.graphql │ │ │ │ │ │ ├── DeleteCollection.graphql │ │ │ │ │ │ ├── RemoveTeamMember.graphql │ │ │ │ │ │ ├── CreateShortcode.graphql │ │ │ │ │ │ ├── ImportFromJSON.graphql │ │ │ │ │ │ ├── CreateNewRootCollection.graphql │ │ │ │ │ │ ├── UpdateCollectionOrder.graphql │ │ │ │ │ │ ├── CreateDuplicateEnvironment.graphql │ │ │ │ │ │ ├── MoveRESTTeamRequest.graphql │ │ │ │ │ │ ├── RenameCollection.graphql │ │ │ │ │ │ ├── UpdateRequest.graphql │ │ │ │ │ │ ├── UpdateTeamEnvironment.graphql │ │ │ │ │ │ ├── CreateTeamEnvironment.graphql │ │ │ │ │ │ ├── MoveRESTTeamCollection.graphql │ │ │ │ │ │ ├── CreateChildCollection.graphql │ │ │ │ │ │ ├── AcceptTeamInvitation.graphql │ │ │ │ │ │ ├── RenameTeam.graphql │ │ │ │ │ │ ├── UpdateLookUpRequestOrder.graphql │ │ │ │ │ │ ├── UpdateTeamMemberRole.graphql │ │ │ │ │ │ ├── CreateTeamInvitation.graphql │ │ │ │ │ │ ├── CreateRequestInCollection.graphql │ │ │ │ │ │ └── CreateTeam.graphql │ │ │ │ │ ├── queries │ │ │ │ │ │ ├── Me.graphql │ │ │ │ │ │ ├── ExportAsJSON.graphql │ │ │ │ │ │ ├── GetUserInfo.graphql │ │ │ │ │ │ ├── ResolveShortcode.graphql │ │ │ │ │ │ ├── GetCollectionTitle.graphql │ │ │ │ │ │ ├── GetMyShortcodes.graphql │ │ │ │ │ │ ├── GetSingleRequest.graphql │ │ │ │ │ │ ├── RootCollectionsOfTeam.graphql │ │ │ │ │ │ ├── GetSingleCollection.graphql │ │ │ │ │ │ ├── GetCollectionChildrenIDs.graphql │ │ │ │ │ │ ├── GetCollectionRequests.graphql │ │ │ │ │ │ ├── GetTeamEnvironments.graphql │ │ │ │ │ │ ├── pendingInvites.graphql │ │ │ │ │ │ ├── GetCollectionChildren.graphql │ │ │ │ │ │ ├── GetTeam.graphql │ │ │ │ │ │ ├── GetTeamMembers.graphql │ │ │ │ │ │ ├── GetInviteDetails.graphql │ │ │ │ │ │ └── GetMyTeams.graphql │ │ │ │ │ └── subscriptions │ │ │ │ │ │ ├── ShortcodeDeleted.graphql │ │ │ │ │ │ ├── TeamMemberRemoved.graphql │ │ │ │ │ │ ├── TeamRequestDeleted.graphql │ │ │ │ │ │ ├── TeamInvitationRemoved.graphql │ │ │ │ │ │ ├── TeamCollectionRemoved.graphql │ │ │ │ │ │ ├── ShortcodeCreated.graphql │ │ │ │ │ │ ├── TeamInvitationAdded.graphql │ │ │ │ │ │ ├── TeamEnvironmentDeleted.graphql │ │ │ │ │ │ ├── TeamRequestMoved.graphql │ │ │ │ │ │ ├── TeamRequestAdded.graphql │ │ │ │ │ │ ├── TeamRequestUpdated.graphql │ │ │ │ │ │ ├── TeamEnvironmentCreated.graphql │ │ │ │ │ │ ├── TeamEnvironmentUpdated.graphql │ │ │ │ │ │ ├── TeamCollectionAdded.graphql │ │ │ │ │ │ ├── TeamCollectionMoved.graphql │ │ │ │ │ │ ├── TeamCollectionUpdated.graphql │ │ │ │ │ │ ├── TeamMemberAdded.graphql │ │ │ │ │ │ ├── TeamMemberUpdated.graphql │ │ │ │ │ │ ├── TeamRequestOrderUpdated.graphql │ │ │ │ │ │ └── TeamCollectionOrderUpdated.graphql │ │ │ │ ├── QueryErrors.ts │ │ │ │ ├── types │ │ │ │ │ ├── TeamName.ts │ │ │ │ │ └── Email.ts │ │ │ │ └── mutations │ │ │ │ │ └── Profile.ts │ │ │ ├── functional │ │ │ │ ├── error.ts │ │ │ │ ├── formData.ts │ │ │ │ ├── taskEither.ts │ │ │ │ ├── files.ts │ │ │ │ ├── json.ts │ │ │ │ └── debug.ts │ │ │ ├── dev.ts │ │ │ ├── utils │ │ │ │ ├── JsonFormattedError.ts │ │ │ │ ├── userAgent.ts │ │ │ │ ├── date.ts │ │ │ │ ├── uri.js │ │ │ │ ├── __tests__ │ │ │ │ │ └── b64.spec.js │ │ │ │ ├── clipboard.ts │ │ │ │ └── debounce.js │ │ │ ├── shortcodes │ │ │ │ └── Shortcode.ts │ │ │ ├── curl │ │ │ │ └── index.ts │ │ │ ├── types │ │ │ │ └── HoppRealtimeLog.ts │ │ │ ├── editor │ │ │ │ ├── linting │ │ │ │ │ ├── linter.ts │ │ │ │ │ └── json.ts │ │ │ │ └── completion │ │ │ │ │ └── index.ts │ │ │ ├── teams │ │ │ │ ├── TeamEnvironment.ts │ │ │ │ ├── TeamRequest.ts │ │ │ │ └── TeamCollection.ts │ │ │ ├── terndoc │ │ │ │ └── pw-pre.json │ │ │ ├── platformutils.ts │ │ │ ├── import-export │ │ │ │ ├── export │ │ │ │ │ ├── hopp.ts │ │ │ │ │ └── index.ts │ │ │ │ └── import │ │ │ │ │ └── importers.ts │ │ │ ├── lenses │ │ │ │ ├── rawLens.ts │ │ │ │ ├── xmlLens.ts │ │ │ │ ├── pdfLens.ts │ │ │ │ ├── jsonLens.ts │ │ │ │ ├── htmlLens.ts │ │ │ │ ├── audioLens.ts │ │ │ │ ├── imageLens.ts │ │ │ │ └── videoLens.ts │ │ │ ├── editorutils.ts │ │ │ ├── rest │ │ │ │ └── default.ts │ │ │ ├── migrations.ts │ │ │ ├── typeutils.ts │ │ │ ├── collection │ │ │ │ └── affectedIndex.ts │ │ │ ├── app │ │ │ │ └── index.ts │ │ │ └── preRequest.ts │ │ ├── platform │ │ │ ├── history.ts │ │ │ ├── settings.ts │ │ │ ├── collections.ts │ │ │ ├── environments.ts │ │ │ ├── tab.ts │ │ │ ├── interceptors.ts │ │ │ └── inspectors.ts │ │ ├── types │ │ │ └── ts-utils.ts │ │ ├── components │ │ │ ├── app │ │ │ │ ├── spotlight │ │ │ │ │ └── entry │ │ │ │ │ │ └── IconSelected.vue │ │ │ │ ├── ShortcutsEntry.vue │ │ │ │ └── Announcement.vue │ │ │ ├── lenses │ │ │ │ └── renderers │ │ │ │ │ └── mixins │ │ │ │ │ └── TextContentRendererMixin.js │ │ │ └── teams │ │ │ │ └── Modal.vue │ │ ├── layouts │ │ │ └── empty.vue │ │ ├── modules │ │ │ ├── v-focus.ts │ │ │ └── head.ts │ │ └── vitest.d.ts │ ├── .prettierrc.js │ ├── .prettierignore │ ├── assets │ │ └── icons │ │ │ ├── brands │ │ │ └── facebook.svg │ │ │ ├── star-off.svg │ │ │ ├── insomnia.svg │ │ │ └── auth │ │ │ ├── microsoft.svg │ │ │ ├── email.svg │ │ │ ├── github.svg │ │ │ └── google.svg │ ├── gql-codegen.yml │ └── .gitignore ├── hoppscotch-sh-admin │ ├── .dockerignore │ ├── locales │ │ ├── af.json │ │ ├── ar.json │ │ ├── ca.json │ │ ├── cn.json │ │ ├── cs.json │ │ ├── da.json │ │ ├── de.json │ │ ├── el.json │ │ ├── es.json │ │ ├── fi.json │ │ ├── fr.json │ │ ├── he.json │ │ ├── hi.json │ │ ├── hu.json │ │ ├── id.json │ │ ├── it.json │ │ ├── ja.json │ │ ├── ko.json │ │ ├── nl.json │ │ ├── no.json │ │ ├── pl.json │ │ ├── pt.json │ │ ├── ro.json │ │ ├── ru.json │ │ ├── sr.json │ │ ├── sv.json │ │ ├── tr.json │ │ ├── tw.json │ │ ├── uk.json │ │ ├── vi.json │ │ └── pt-br.json │ ├── Caddyfile │ ├── src │ │ ├── layouts │ │ │ ├── empty.vue │ │ │ └── default.vue │ │ ├── composables │ │ │ ├── toast.ts │ │ │ ├── i18n.ts │ │ │ └── useSidebar.ts │ │ ├── helpers │ │ │ ├── backend │ │ │ │ └── gql │ │ │ │ │ ├── mutations │ │ │ │ │ ├── RemoveTeam.graphql │ │ │ │ │ ├── MakeUserAdmin.graphql │ │ │ │ │ ├── RemoveUserAsAdmin.graphql │ │ │ │ │ ├── RemoveUserByAdmin.graphql │ │ │ │ │ ├── TeamInvitationRemoved.graphql │ │ │ │ │ ├── RevokeTeamInvitation.graphql │ │ │ │ │ ├── TeamInvitationAdded.graphql │ │ │ │ │ ├── InviteNewUser.graphql │ │ │ │ │ ├── RenameTeam.graphql │ │ │ │ │ ├── RemoveUserFromTeamByAdmin.graphql │ │ │ │ │ ├── UserInfo.graphql │ │ │ │ │ ├── AcceptTeamInvitation.graphql │ │ │ │ │ ├── AddUserToTeamByAdmin.graphql │ │ │ │ │ ├── CreateTeamInvitation.graphql │ │ │ │ │ ├── ChangeUserRoleInTeamByAdmin.graphql │ │ │ │ │ └── CreateTeam.graphql │ │ │ │ │ └── queries │ │ │ │ │ ├── Metrics.graphql │ │ │ │ │ ├── InvitedUsers.graphql │ │ │ │ │ ├── pendingInvites.graphql │ │ │ │ │ ├── TeamList.graphql │ │ │ │ │ ├── UsersList.graphql │ │ │ │ │ └── TeamInfo.graphql │ │ │ ├── errors.ts │ │ │ ├── axiosConfig.ts │ │ │ └── Email.ts │ │ ├── pages │ │ │ └── settings.vue │ │ ├── vite-env.d.ts │ │ ├── shims-vue.d.ts │ │ ├── modules │ │ │ ├── v-focus.ts │ │ │ ├── i18n.ts │ │ │ └── ui.ts │ │ ├── App.vue │ │ └── components │ │ │ └── app │ │ │ └── Toast.vue │ ├── public │ │ └── favicon.ico │ ├── tsconfig.node.json │ ├── gql-codegen.yml │ ├── assets │ │ └── icons │ │ │ └── auth │ │ │ ├── microsoft.svg │ │ │ ├── email.svg │ │ │ ├── github.svg │ │ │ └── google.svg │ ├── .gitignore │ ├── index.html │ ├── prod_run.mjs │ └── Dockerfile ├── hoppscotch-cli │ ├── jest.setup.ts │ ├── bin │ │ └── hopp │ ├── src │ │ ├── __tests__ │ │ │ ├── samples │ │ │ │ ├── malformed-collection2.json │ │ │ │ └── env-flag-envs.json │ │ │ ├── types.ts │ │ │ └── functions │ │ │ │ └── checks │ │ │ │ ├── isHoppCLIError.spec.ts │ │ │ │ └── isHoppErrnoException.spec.ts │ │ ├── types │ │ │ ├── commands.ts │ │ │ └── collections.ts │ │ ├── options │ │ │ └── test │ │ │ │ └── delay.ts │ │ ├── utils │ │ │ └── constants.ts │ │ └── tsconfig.json │ ├── .prettierrc │ ├── tsconfig.json │ └── tsup.config.ts ├── hoppscotch-js-sandbox │ ├── jest.setup.ts │ ├── src │ │ └── global.d.ts │ ├── .gitignore │ ├── .prettierrc.cjs │ ├── .prettierignore │ ├── jest.config.js │ └── tsup.config.ts ├── hoppscotch-selfhost-desktop │ ├── src-tauri │ │ ├── src │ │ │ ├── mac │ │ │ │ └── mod.rs │ │ │ └── win │ │ │ │ └── mod.rs │ │ ├── build.rs │ │ ├── .gitignore │ │ └── icons │ │ │ ├── 32x32.png │ │ │ ├── icon.icns │ │ │ ├── icon.ico │ │ │ ├── icon.png │ │ │ ├── 128x128.png │ │ │ ├── 128x128@2x.png │ │ │ ├── StoreLogo.png │ │ │ ├── Square30x30Logo.png │ │ │ ├── Square44x44Logo.png │ │ │ ├── Square71x71Logo.png │ │ │ ├── Square89x89Logo.png │ │ │ ├── Square107x107Logo.png │ │ │ ├── Square142x142Logo.png │ │ │ ├── Square150x150Logo.png │ │ │ ├── Square284x284Logo.png │ │ │ └── Square310x310Logo.png │ ├── src │ │ ├── api │ │ │ ├── queries │ │ │ │ ├── GetCurrentRESTSession.graphql │ │ │ │ ├── GetUserSettings.graphql │ │ │ │ ├── GetUserEnvironments.graphql │ │ │ │ ├── GetGlobalEnvironments.graphql │ │ │ │ ├── CreateUserEnvironment.graphql │ │ │ │ ├── ExportUserCollectionsToJSON.graphql │ │ │ │ ├── GetRootGQLUserCollections.graphql │ │ │ │ ├── GetUserRootCollections.graphql │ │ │ │ └── GetRestUserHistory.graphql │ │ │ ├── mutations │ │ │ │ ├── DeleteUserEnvironments.graphql │ │ │ │ ├── DeleteUserRequest.graphql │ │ │ │ ├── ClearGlobalEnvironments.graphql │ │ │ │ ├── ToggleHistoryStarStatus.graphql │ │ │ │ ├── RemoveRequestFromHistory.graphql │ │ │ │ ├── DeleteUserCollection.graphql │ │ │ │ ├── CreateUserSettings.graphql │ │ │ │ ├── UpdateUserSettings.graphql │ │ │ │ ├── CreateGQLRootUserCollection.graphql │ │ │ │ ├── CreateRESTRootUserCollection.graphql │ │ │ │ ├── DeleteAllUserHistory.graphql │ │ │ │ ├── CreateUserGlobalEnvironment.graphql │ │ │ │ ├── UpdateGQLUserRequest.graphql │ │ │ │ ├── RenameUserCollection.graphql │ │ │ │ ├── UpdateRESTUserRequest.graphql │ │ │ │ ├── UpdateUserCollectionOrder.graphql │ │ │ │ ├── MoveUserCollection.graphql │ │ │ │ ├── CreateUserEnvironment.graphql │ │ │ │ ├── UpdateUserEnvironment.graphql │ │ │ │ ├── UpdateUserSession.graphql │ │ │ │ ├── CreateGQLUserRequest.graphql │ │ │ │ ├── CreateUserHistory.graphql │ │ │ │ ├── CreateGQLChildUserCollection.graphql │ │ │ │ ├── CreateRESTChildUserCollection.graphql │ │ │ │ ├── CreateRESTUserRequest.graphql │ │ │ │ └── MoveUserRequest.graphql │ │ │ └── subscriptions │ │ │ │ ├── UserEnvironmentDeleted.graphql │ │ │ │ ├── UserHistoryDeleted.graphql │ │ │ │ ├── UserCollectionRemoved.graphql │ │ │ │ ├── UserSettingsUpdated.graphql │ │ │ │ ├── UserHistoryDeletedMany.graphql │ │ │ │ ├── UserCollectionMoved.graphql │ │ │ │ ├── UserRequestCreated.graphql │ │ │ │ ├── UserRequestDeleted.graphql │ │ │ │ ├── UserRequestUpdated.graphql │ │ │ │ ├── UserCollectionCreated.graphql │ │ │ │ ├── UserCollectionUpdated.graphql │ │ │ │ ├── UserEnvironmentCreated.graphql │ │ │ │ ├── UserEnvironmentUpdated.graphql │ │ │ │ ├── UserHistoryCreated.graphql │ │ │ │ ├── UserHistoryUpdated.graphql │ │ │ │ ├── UserRequestMoved.graphql │ │ │ │ └── UserCollectionOrderUpdated.graphql │ │ ├── vite-env.d.ts │ │ └── platform │ │ │ └── settings │ │ │ └── settings.sync.ts │ ├── .vscode │ │ └── extensions.json │ ├── tsconfig.node.json │ ├── .gitignore │ └── gql-codegen.yml ├── dioc │ ├── lib │ │ └── main.ts │ ├── index.d.ts │ ├── vue.d.ts │ ├── testing.d.ts │ ├── vitest.config.ts │ ├── vite.config.ts │ ├── .gitignore │ └── tsconfig.json ├── hoppscotch-ui │ ├── .prettierrc.cjs │ ├── src │ │ ├── index.ts │ │ ├── components │ │ │ ├── index.ts │ │ │ ├── button │ │ │ │ └── index.ts │ │ │ └── smart │ │ │ │ ├── Spinner.vue │ │ │ │ └── FileChip.vue │ │ ├── stories │ │ │ ├── Spinner.story.vue │ │ │ ├── Item.story.vue │ │ │ ├── Checkbox.story.vue │ │ │ ├── ProgressRing.story.vue │ │ │ ├── Toggle.story.vue │ │ │ ├── Button.story.vue │ │ │ ├── SlideOver.story.vue │ │ │ ├── Modal.story.vue │ │ │ ├── ConfirmModal.story.vue │ │ │ ├── Link.story.vue │ │ │ ├── Radio.story.vue │ │ │ └── Tab.story.vue │ │ └── env.d.ts │ ├── public │ │ └── favicon.ico │ ├── .prettierignore │ ├── histoire.setup.ts │ ├── .gitignore │ └── histoire.config.ts ├── codemirror-lang-graphql │ ├── .gitignore │ ├── README.md │ ├── .npmignore │ ├── tsconfig.json │ └── rollup.config.js ├── hoppscotch-selfhost-web │ ├── Caddyfile │ ├── src │ │ ├── api │ │ │ ├── queries │ │ │ │ ├── GetCurrentRESTSession.graphql │ │ │ │ ├── GetUserSettings.graphql │ │ │ │ ├── GetUserEnvironments.graphql │ │ │ │ ├── GetGlobalEnvironments.graphql │ │ │ │ ├── CreateUserEnvironment.graphql │ │ │ │ ├── ExportUserCollectionsToJSON.graphql │ │ │ │ ├── GetUserRootCollections.graphql │ │ │ │ ├── GetRootGQLUserCollections.graphql │ │ │ │ └── GetRestUserHistory.graphql │ │ │ ├── mutations │ │ │ │ ├── DeleteUserEnvironments.graphql │ │ │ │ ├── DeleteUserRequest.graphql │ │ │ │ ├── ClearGlobalEnvironments.graphql │ │ │ │ ├── ToggleHistoryStarStatus.graphql │ │ │ │ ├── RemoveRequestFromHistory.graphql │ │ │ │ ├── CreateUserSettings.graphql │ │ │ │ ├── DeleteUserCollection.graphql │ │ │ │ ├── UpdateUserSettings.graphql │ │ │ │ ├── CreateGQLRootUserCollection.graphql │ │ │ │ ├── CreateRESTRootUserCollection.graphql │ │ │ │ ├── DeleteAllUserHistory.graphql │ │ │ │ ├── CreateUserGlobalEnvironment.graphql │ │ │ │ ├── UpdateGQLUserRequest.graphql │ │ │ │ ├── RenameUserCollection.graphql │ │ │ │ ├── UpdateRESTUserRequest.graphql │ │ │ │ ├── UpdateUserCollectionOrder.graphql │ │ │ │ ├── MoveUserCollection.graphql │ │ │ │ ├── CreateUserEnvironment.graphql │ │ │ │ ├── UpdateUserEnvironment.graphql │ │ │ │ ├── UpdateUserSession.graphql │ │ │ │ ├── CreateUserHistory.graphql │ │ │ │ ├── CreateGQLChildUserCollection.graphql │ │ │ │ ├── CreateGQLUserRequest.graphql │ │ │ │ ├── CreateRESTUserRequest.graphql │ │ │ │ ├── CreateRESTChildUserCollection.graphql │ │ │ │ └── MoveUserRequest.graphql │ │ │ └── subscriptions │ │ │ │ ├── UserEnvironmentDeleted.graphql │ │ │ │ ├── UserHistoryDeleted.graphql │ │ │ │ ├── UserCollectionRemoved.graphql │ │ │ │ ├── UserSettingsUpdated.graphql │ │ │ │ ├── UserHistoryDeletedMany.graphql │ │ │ │ ├── UserCollectionMoved.graphql │ │ │ │ ├── UserRequestCreated.graphql │ │ │ │ ├── UserRequestDeleted.graphql │ │ │ │ ├── UserRequestUpdated.graphql │ │ │ │ ├── UserCollectionCreated.graphql │ │ │ │ ├── UserCollectionUpdated.graphql │ │ │ │ ├── UserEnvironmentCreated.graphql │ │ │ │ ├── UserEnvironmentUpdated.graphql │ │ │ │ ├── UserHistoryCreated.graphql │ │ │ │ ├── UserHistoryUpdated.graphql │ │ │ │ ├── UserRequestMoved.graphql │ │ │ │ └── UserCollectionOrderUpdated.graphql │ │ ├── vite-env.d.ts │ │ └── platform │ │ │ └── settings │ │ │ └── settings.sync.ts │ ├── tsconfig.node.json │ ├── .gitignore │ ├── prod_run.mjs │ ├── gql-codegen.yml │ └── Dockerfile └── hoppscotch-data │ ├── src │ ├── type-utils.d.ts │ ├── index.ts │ ├── environment │ │ └── v │ │ │ └── 0.ts │ ├── utils │ │ └── record.ts │ ├── rest │ │ └── content-types.ts │ └── graphql │ │ └── v │ │ └── 1.ts │ ├── tsconfig.json │ ├── vite.config.ts │ └── tsconfig.decl.json ├── .dockerignore ├── pnpm-workspace.yaml ├── .github ├── FUNDING.yml ├── dependabot.yml ├── semantic.yml └── ISSUE_TEMPLATE │ └── config.yml ├── firestore.indexes.json ├── .firebaserc ├── .husky ├── pre-commit └── commit-msg ├── commitlint.config.js ├── .prettierignore ├── CHANGELOG.md ├── .prettierrc.js ├── aio.Caddyfile ├── .editorconfig ├── jsconfig.json ├── .devcontainer └── devcontainer.json ├── .vscode └── extensions.json ├── healthcheck.sh ├── firebase.json └── firestore.rules /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=false 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/cross-env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/eslint: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | **/*/node_modules 3 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/CNAME: -------------------------------------------------------------------------------- 1 | hoppscotch.io -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/**' -------------------------------------------------------------------------------- /packages/hoppscotch-backend/.dockerignore: -------------------------------------------------------------------------------- 1 | ./node_modules 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/.dockerignore: -------------------------------------------------------------------------------- 1 | ./node_modules 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/af.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/ar.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/ca.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/cn.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/cs.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/da.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/de.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/el.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/es.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/fi.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/he.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/hi.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/hu.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/id.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/it.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/ja.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/ko.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/nl.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/no.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/pl.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/pt.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/ro.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/ru.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/sr.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/sv.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/tr.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/tw.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/uk.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/vi.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/locales/pt-br.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/global.d.ts: -------------------------------------------------------------------------------- 1 | import '@relmify/jest-fp-ts'; 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/jest.setup.ts: -------------------------------------------------------------------------------- 1 | import "@relmify/jest-fp-ts"; 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: hoppscotch 2 | open_collective: hoppscotch 3 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/jest.setup.js: -------------------------------------------------------------------------------- 1 | require('@relmify/jest-fp-ts'); 2 | -------------------------------------------------------------------------------- /firestore.indexes.json: -------------------------------------------------------------------------------- 1 | { 2 | "indexes": [], 3 | "fieldOverrides": [] 4 | } 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-js-sandbox/jest.setup.ts: -------------------------------------------------------------------------------- 1 | require("@relmify/jest-fp-ts") 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-js-sandbox/src/global.d.ts: -------------------------------------------------------------------------------- 1 | import "@relmify/jest-fp-ts" 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/src/mac/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod window; 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/src/win/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod window; 2 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "postwoman-api" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/dioc/lib/main.ts: -------------------------------------------------------------------------------- 1 | export * from "./container" 2 | export * from "./service" 3 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false 3 | } 4 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run pre-commit 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-js-sandbox/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | .husky/ 4 | dist 5 | lib -------------------------------------------------------------------------------- /packages/hoppscotch-js-sandbox/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./components" 2 | export * from "./plugin" 3 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["@commitlint/config-conventional"], 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./button" 2 | export * from "./smart" 3 | -------------------------------------------------------------------------------- /packages/dioc/index.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from "./dist/main.d.ts" 2 | export * from "./dist/main.d.ts" 3 | -------------------------------------------------------------------------------- /packages/dioc/vue.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from "./dist/vue.d.ts" 2 | export * from "./dist/vue.d.ts" 3 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all" 4 | } 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/composables/head.ts: -------------------------------------------------------------------------------- 1 | export { useHead as usePageHead } from "@vueuse/head" 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx --no-install commitlint --edit "" 5 | -------------------------------------------------------------------------------- /packages/codemirror-lang-graphql/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | package-lock.json 3 | /dist 4 | /src/*.d.ts 5 | -------------------------------------------------------------------------------- /packages/codemirror-lang-graphql/README.md: -------------------------------------------------------------------------------- 1 | A [CodeMirror 6](https://codemirror.net/6) language plugin for GraphQL -------------------------------------------------------------------------------- /packages/dioc/testing.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from "./dist/testing.d.ts" 2 | export * from "./dist/testing.d.ts" 3 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/Caddyfile: -------------------------------------------------------------------------------- 1 | :8080 { 2 | try_files {path} / 3 | root * /site 4 | file_server 5 | } 6 | -------------------------------------------------------------------------------- /packages/codemirror-lang-graphql/.npmignore: -------------------------------------------------------------------------------- 1 | /src 2 | /test 3 | /node_modules 4 | rollup.config.js 5 | tsconfig.json 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/Caddyfile: -------------------------------------------------------------------------------- 1 | :8080 { 2 | try_files {path} / 3 | root * /site 4 | file_server 5 | } 6 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .dependabot 2 | .github 3 | .nuxt 4 | .hoppscotch 5 | .vscode 6 | package-lock.json 7 | node_modules 8 | dist -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | Visit [releases](https://github.com/hoppscotch/hoppscotch/releases) for full changelog. 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/types/RequestTypes.ts: -------------------------------------------------------------------------------- 1 | export enum ReqType { 2 | REST = 'REST', 3 | GQL = 'GQL', 4 | } 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/DeleteUser.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteUser { 2 | deleteUser 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/platform/history.ts: -------------------------------------------------------------------------------- 1 | export type HistoryPlatformDef = { 2 | initHistorySync: () => void 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/platform/settings.ts: -------------------------------------------------------------------------------- 1 | export type SettingsPlatformDef = { 2 | initSettingsSync: () => void 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/layouts/empty.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/types/Passwordless.ts: -------------------------------------------------------------------------------- 1 | export type DeviceIdentifierToken = { 2 | deviceIdentifier: string; 3 | }; 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/bin/hopp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | // * The entry point of the CLI 3 | require("../dist").cli(process.argv); 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/icon.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/platform/collections.ts: -------------------------------------------------------------------------------- 1 | export type CollectionsPlatformDef = { 2 | initCollectionsSync: () => void 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-ui/public/favicon.ico -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/banner.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/favicon.ico -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/platform/environments.ts: -------------------------------------------------------------------------------- 1 | export type EnvironmentsPlatformDef = { 2 | initEnvironmentsSync: () => void 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | -------------------------------------------------------------------------------- /packages/dioc/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vitest/config" 2 | 3 | export default defineConfig({ 4 | test: { 5 | 6 | } 7 | }) 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/admin/admin.model.ts: -------------------------------------------------------------------------------- 1 | import { ObjectType } from '@nestjs/graphql'; 2 | 3 | @ObjectType() 4 | export class Admin {} 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/composables/toast.ts: -------------------------------------------------------------------------------- 1 | import { useToasted } from "@hoppscotch/vue-toasted" 2 | 3 | export const useToast = useToasted 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/LeaveTeam.graphql: -------------------------------------------------------------------------------- 1 | mutation LeaveTeam($teamID: ID!) { 2 | leaveTeam(teamID: $teamID) 3 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/types/ts-utils.ts: -------------------------------------------------------------------------------- 1 | export type KeysMatching = { 2 | [K in keyof T]-?: T[K] extends V ? K : never 3 | }[keyof T] 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-js-sandbox/.prettierignore: -------------------------------------------------------------------------------- 1 | .dependabot 2 | .github 3 | .hoppscotch 4 | .vscode 5 | package-lock.json 6 | node_modules 7 | dist 8 | lib -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-sh-admin/public/favicon.ico -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/DeleteTeam.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteTeam($teamID: ID!) { 2 | deleteTeam(teamID: $teamID) 3 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/Me.graphql: -------------------------------------------------------------------------------- 1 | query Me { 2 | me { 3 | uid 4 | displayName 5 | photoURL 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/functional/error.ts: -------------------------------------------------------------------------------- 1 | export const throwError = (message: string): never => { 2 | throw new Error(message) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-data/src/type-utils.d.ts: -------------------------------------------------------------------------------- 1 | interface Object { 2 | hasOwnProperty(key: K): this is Record; 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/composables/toast.ts: -------------------------------------------------------------------------------- 1 | import { useToasted } from '@hoppscotch/vue-toasted'; 2 | 3 | export const useToast = useToasted; 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] 4 | } 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/__tests__/samples/malformed-collection2.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "v": 1, 4 | "name": "tests", 5 | "folders": [] 6 | } 7 | ] 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/components/app/spotlight/entry/IconSelected.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/DeleteShortcode.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteShortcode($code: ID!) { 2 | revokeShortcode(code: $code) 3 | } -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/RemoveTeam.graphql: -------------------------------------------------------------------------------- 1 | mutation RemoveTeam($uid: ID!) { 2 | deleteTeamByAdmin(teamID: $uid) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/pages/settings.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/auth/dto/signin-magic.dto.ts: -------------------------------------------------------------------------------- 1 | // Inputs to initiate Magic-Link auth flow 2 | export class SignInMagicDto { 3 | email: string; 4 | } 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/icons/pwa-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/icons/pwa-128x128.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/icons/pwa-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/icons/pwa-16x16.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/icons/pwa-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/icons/pwa-192x192.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/icons/pwa-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/icons/pwa-256x256.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/icons/pwa-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/icons/pwa-32x32.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/icons/pwa-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/icons/pwa-512x512.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/queries/GetCurrentRESTSession.graphql: -------------------------------------------------------------------------------- 1 | query GetCurrentRESTSession { 2 | me { 3 | currentRESTSession 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/queries/GetCurrentRESTSession.graphql: -------------------------------------------------------------------------------- 1 | query GetCurrentRESTSession { 2 | me { 3 | currentRESTSession 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/MakeUserAdmin.graphql: -------------------------------------------------------------------------------- 1 | mutation MakeUserAdmin($uid: ID!) { 2 | makeUserAdmin(userUID: $uid) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/icons/pwa-1024x1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/icons/pwa-1024x1024.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/images/banner-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/images/banner-dark.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/images/banner-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-common/public/images/banner-light.png -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/ExportAsJSON.graphql: -------------------------------------------------------------------------------- 1 | query ExportAsJSON($teamID: ID!) { 2 | exportCollectionsToJSON(teamID: $teamID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/DeleteUserEnvironments.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteUserEnvironment($id: ID!) { 2 | deleteUserEnvironment(id: $id) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/DeleteUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteUserRequest($requestID: ID!) { 2 | deleteUserRequest(id: $requestID) 3 | } 4 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | trailingComma: "es5", 4 | singleQuote: false, 5 | printWidth: 80, 6 | useTabs: false, 7 | tabWidth: 2 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/QueryErrors.ts: -------------------------------------------------------------------------------- 1 | export type UserQueryError = "user/not_found" 2 | 3 | export type MyTeamsQueryError = "ea/not_invite_or_admin" 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/DeleteRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteRequest($requestID: ID!) { 2 | deleteRequest(requestID: $requestID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/DeleteTeamEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteTeamEnvironment($id: ID!){ 2 | deleteTeamEnvironment (id: $id ) 3 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/ShortcodeDeleted.graphql: -------------------------------------------------------------------------------- 1 | subscription ShortcodeDeleted { 2 | myShortcodesRevoked { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/DeleteUserEnvironments.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteUserEnvironment($id: ID!) { 2 | deleteUserEnvironment(id: $id) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/DeleteUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteUserRequest($requestID: ID!) { 2 | deleteUserRequest(id: $requestID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/RemoveUserAsAdmin.graphql: -------------------------------------------------------------------------------- 1 | mutation RemoveUserAsAdmin($uid: ID!) { 2 | removeUserAsAdmin(userUID: $uid) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/RemoveUserByAdmin.graphql: -------------------------------------------------------------------------------- 1 | mutation RemoveUserByAdmin($uid: ID!) { 2 | removeUserByAdmin(userUID: $uid) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserEnvironmentDeleted.graphql: -------------------------------------------------------------------------------- 1 | subscription UserEnvironmentDeleted { 2 | userEnvironmentDeleted { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamMemberRemoved.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamMemberRemoved($teamID: ID!) { 2 | teamMemberRemoved(teamID: $teamID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserEnvironmentDeleted.graphql: -------------------------------------------------------------------------------- 1 | subscription UserEnvironmentDeleted { 2 | userEnvironmentDeleted { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/queries/GetUserSettings.graphql: -------------------------------------------------------------------------------- 1 | query GetUserSettings { 2 | me { 3 | settings { 4 | id 5 | properties 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserHistoryDeleted.graphql: -------------------------------------------------------------------------------- 1 | subscription userHistoryDeleted { 2 | userHistoryDeleted { 3 | id 4 | reqType 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/components/button/index.ts: -------------------------------------------------------------------------------- 1 | export { default as HoppButtonPrimary } from "./Primary.vue" 2 | export { default as HoppButtonSecondary } from "./Secondary.vue" 3 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": true, 3 | "trailingComma": "es5", 4 | "singleQuote": false, 5 | "printWidth": 80, 6 | "useTabs": false, 7 | "tabWidth": 2 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/RevokeTeamInvitation.graphql: -------------------------------------------------------------------------------- 1 | mutation RevokeTeamInvitation($inviteID: ID!) { 2 | revokeTeamInvitation(inviteID: $inviteID) 3 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetUserInfo.graphql: -------------------------------------------------------------------------------- 1 | query GetUserInfo { 2 | me { 3 | uid 4 | displayName 5 | email 6 | photoURL 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/ResolveShortcode.graphql: -------------------------------------------------------------------------------- 1 | query ResolveShortcode($code: ID!) { 2 | shortcode(code: $code) { 3 | id 4 | request 5 | } 6 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamRequestDeleted.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamRequestDeleted($teamID: ID!) { 2 | teamRequestDeleted(teamID: $teamID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/queries/GetUserSettings.graphql: -------------------------------------------------------------------------------- 1 | query GetUserSettings { 2 | me { 3 | settings { 4 | id 5 | properties 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserHistoryDeleted.graphql: -------------------------------------------------------------------------------- 1 | subscription userHistoryDeleted { 2 | userHistoryDeleted { 3 | id 4 | reqType 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserCollectionRemoved.graphql: -------------------------------------------------------------------------------- 1 | subscription UserCollectionRemoved { 2 | userCollectionRemoved { 3 | id 4 | type 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserSettingsUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserSettingsUpdated { 2 | userSettingsUpdated { 3 | id 4 | properties 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/TeamInvitationRemoved.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamInvitationRemoved($teamID: ID!) { 2 | teamInvitationRemoved(teamID: $teamID) 3 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/DeleteCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteCollection($collectionID: ID!) { 2 | deleteCollection(collectionID: $collectionID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamInvitationRemoved.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamInvitationRemoved($teamID: ID!) { 2 | teamInvitationRemoved(teamID: $teamID) 3 | } -------------------------------------------------------------------------------- /packages/hoppscotch-data/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./rest" 2 | export * from "./graphql" 3 | export * from "./collection" 4 | export * from "./rawKeyValue" 5 | export * from "./environment" 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "Vue.volar", 4 | "tauri-apps.tauri-vscode", 5 | "rust-lang.rust-analyzer" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserCollectionRemoved.graphql: -------------------------------------------------------------------------------- 1 | subscription UserCollectionRemoved { 2 | userCollectionRemoved { 3 | id 4 | type 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserSettingsUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserSettingsUpdated { 2 | userSettingsUpdated { 3 | id 4 | properties 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/ClearGlobalEnvironments.graphql: -------------------------------------------------------------------------------- 1 | mutation ClearGlobalEnvironments($id: ID!) { 2 | clearGlobalEnvironments(id: $id) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/ToggleHistoryStarStatus.graphql: -------------------------------------------------------------------------------- 1 | mutation ToggleHistoryStarStatus($id: ID!) { 2 | toggleHistoryStarStatus(id: $id) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/.prettierignore: -------------------------------------------------------------------------------- 1 | .dependabot 2 | .github 3 | .hoppscotch 4 | .vscode 5 | package-lock.json 6 | node_modules 7 | dist 8 | static 9 | components.d.ts 10 | src/types 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "postgresql" -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/types/CollectionFolder.ts: -------------------------------------------------------------------------------- 1 | export interface CollectionFolder { 2 | id?: string; 3 | folders: CollectionFolder[]; 4 | requests: any[]; 5 | name: string; 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/types/commands.ts: -------------------------------------------------------------------------------- 1 | export type TestCmdOptions = { 2 | env: string | undefined; 3 | delay: string | undefined; 4 | }; 5 | 6 | export type HOPP_ENV_FILE_EXT = "json"; 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamCollectionRemoved.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamCollectionRemoved($teamID: ID!) { 2 | teamCollectionRemoved(teamID: $teamID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/dev.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * A constant specifying whether the app is running in the development server 3 | */ 4 | export const APP_IS_IN_DEV_MODE = import.meta.env.DEV 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/ClearGlobalEnvironments.graphql: -------------------------------------------------------------------------------- 1 | mutation ClearGlobalEnvironments($id: ID!) { 2 | clearGlobalEnvironments(id: $id) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/ToggleHistoryStarStatus.graphql: -------------------------------------------------------------------------------- 1 | mutation ToggleHistoryStarStatus($id: ID!) { 2 | toggleHistoryStarStatus(id: $id) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/RemoveRequestFromHistory.graphql: -------------------------------------------------------------------------------- 1 | mutation RemoveRequestFromHistory($id: ID!) { 2 | removeRequestFromHistory(id: $id) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserHistoryDeletedMany.graphql: -------------------------------------------------------------------------------- 1 | subscription UserHistoryDeletedMany { 2 | userHistoryDeletedMany { 3 | count 4 | reqType 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/RevokeTeamInvitation.graphql: -------------------------------------------------------------------------------- 1 | mutation RevokeTeamInvitation($inviteID: ID!) { 2 | revokeTeamInviteByAdmin(inviteID: $inviteID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | trailingComma: "es5", 4 | singleQuote: false, 5 | printWidth: 80, 6 | useTabs: false, 7 | tabWidth: 2 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/RemoveTeamMember.graphql: -------------------------------------------------------------------------------- 1 | mutation RemoveTeamMember($userUid: ID!, $teamID: ID!) { 2 | removeTeamMember(userUid: $userUid, teamID: $teamID) 3 | } -------------------------------------------------------------------------------- /packages/hoppscotch-js-sandbox/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: "ts-jest", 3 | testEnvironment: "jsdom", 4 | collectCoverage: true, 5 | setupFilesAfterEnv: ["./jest.setup.ts"], 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baiy/hoppscotch-utools/HEAD/packages/hoppscotch-selfhost-desktop/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/RemoveRequestFromHistory.graphql: -------------------------------------------------------------------------------- 1 | mutation RemoveRequestFromHistory($id: ID!) { 2 | removeRequestFromHistory(id: $id) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserHistoryDeletedMany.graphql: -------------------------------------------------------------------------------- 1 | subscription UserHistoryDeletedMany { 2 | userHistoryDeletedMany { 3 | count 4 | reqType 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/TeamInvitationAdded.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamInvitationAdded($teamID: ID!) { 2 | teamInvitationAdded(teamID: $teamID) { 3 | id 4 | } 5 | } -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | /// 4 | -------------------------------------------------------------------------------- /aio.Caddyfile: -------------------------------------------------------------------------------- 1 | :3000 { 2 | try_files {path} / 3 | root * /site/selfhost-web 4 | file_server 5 | } 6 | 7 | :3100 { 8 | try_files {path} / 9 | root * /site/sh-admin 10 | file_server 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/auth/dto/verify-magic.dto.ts: -------------------------------------------------------------------------------- 1 | // Inputs to verify and sign a user in via magic-link 2 | export class VerifyMagicDto { 3 | deviceIdentifier: string; 4 | token: string; 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateShortcode.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateShortcode($request: String!) { 2 | createShortcode(request: $request) { 3 | id 4 | request 5 | } 6 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetCollectionTitle.graphql: -------------------------------------------------------------------------------- 1 | query GetCollectionTitle($collectionID: ID!) { 2 | collection(collectionID: $collectionID) { 3 | title 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/ShortcodeCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription ShortcodeCreated { 2 | myShortcodesCreated { 3 | id 4 | request 5 | createdOn 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamInvitationAdded.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamInvitationAdded($teamID: ID!) { 2 | teamInvitationAdded(teamID: $teamID) { 3 | id 4 | } 5 | } -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/DeleteUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteUserCollection($userCollectionID: ID!) { 2 | deleteUserCollection(userCollectionID: $userCollectionID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateUserSettings.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserSettings($properties: String!) { 2 | createUserSettings(properties: $properties) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/DeleteUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteUserCollection($userCollectionID: ID!) { 2 | deleteUserCollection(userCollectionID: $userCollectionID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/UpdateUserSettings.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateUserSettings($properties: String!) { 2 | updateUserSettings(properties: $properties) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateUserSettings.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserSettings($properties: String!) { 2 | createUserSettings(properties: $properties) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/UpdateUserSettings.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateUserSettings($properties: String!) { 2 | updateUserSettings(properties: $properties) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/Metrics.graphql: -------------------------------------------------------------------------------- 1 | query Metrics { 2 | admin { 3 | usersCount 4 | teamsCount 5 | teamRequestsCount 6 | teamCollectionsCount 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.vue' { 2 | import { defineComponent } from 'vue'; 3 | const Component: ReturnType; 4 | export default Component; 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/__tests__/types.ts: -------------------------------------------------------------------------------- 1 | import { ExecException } from "child_process"; 2 | 3 | export type ExecResponse = { 4 | error: ExecException | null; 5 | stdout: string; 6 | stderr: string; 7 | }; 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/images/cover.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/composables/theming.ts: -------------------------------------------------------------------------------- 1 | import { inject } from "vue" 2 | import { HoppColorMode } from "~/modules/theming" 3 | 4 | export const useColorMode = () => inject("colorMode") as HoppColorMode 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetMyShortcodes.graphql: -------------------------------------------------------------------------------- 1 | query GetUserShortcodes($cursor: ID) { 2 | myShortcodes(cursor: $cursor) { 3 | id 4 | request 5 | createdOn 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/utils/JsonFormattedError.ts: -------------------------------------------------------------------------------- 1 | export class JsonFormattedError extends Error { 2 | constructor(jsonObject: any) { 3 | super(JSON.stringify(jsonObject, null, 2)) 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateGQLRootUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateGQLRootUserCollection($title: String!) { 2 | createGQLRootUserCollection(title: $title) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/InviteNewUser.graphql: -------------------------------------------------------------------------------- 1 | mutation InviteNewUser($inviteeEmail: String!) { 2 | inviteNewUser(inviteeEmail: $inviteeEmail) { 3 | inviteeEmail 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamEnvironmentDeleted.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamEnvironmentDeleted ($teamID: ID!) { 2 | teamEnvironmentDeleted(teamID: $teamID) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateGQLRootUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateGQLRootUserCollection($title: String!) { 2 | createGQLRootUserCollection(title: $title) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateRESTRootUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateRESTRootUserCollection($title: String!) { 2 | createRESTRootUserCollection(title: $title) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/DeleteAllUserHistory.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteAllUserHistory($reqType: ReqType!) { 2 | deleteAllUserHistory(reqType: $reqType) { 3 | count 4 | reqType 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/RenameTeam.graphql: -------------------------------------------------------------------------------- 1 | mutation RenameTeam($uid: ID!, $name: String!) { 2 | renameTeamByAdmin(teamID: $uid, newName: $name) { 3 | id 4 | name 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/ImportFromJSON.graphql: -------------------------------------------------------------------------------- 1 | mutation importFromJSON($jsonString: String!, $teamID: ID!) { 2 | importCollectionsFromJSON(jsonString: $jsonString, teamID: $teamID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateRESTRootUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateRESTRootUserCollection($title: String!) { 2 | createRESTRootUserCollection(title: $title) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/DeleteAllUserHistory.graphql: -------------------------------------------------------------------------------- 1 | mutation DeleteAllUserHistory($reqType: ReqType!) { 2 | deleteAllUserHistory(reqType: $reqType) { 3 | count 4 | reqType 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateUserGlobalEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserGlobalEnvironment($variables: String!) { 2 | createUserGlobalEnvironment(variables: $variables) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateUserGlobalEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserGlobalEnvironment($variables: String!) { 2 | createUserGlobalEnvironment(variables: $variables) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserCollectionMoved.graphql: -------------------------------------------------------------------------------- 1 | subscription UserCollectionMoved { 2 | userCollectionMoved { 3 | id 4 | parent { 5 | id 6 | } 7 | type 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/auth/guards/jwt-auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | import { AuthGuard } from '@nestjs/passport'; 3 | 4 | @Injectable() 5 | export class JwtAuthGuard extends AuthGuard('jwt') {} 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/__tests__/samples/env-flag-envs.json: -------------------------------------------------------------------------------- 1 | { 2 | "URL": "https://echo.hoppscotch.io", 3 | "HOST": "echo.hoppscotch.io", 4 | "X-COUNTRY": "IN", 5 | "BODY_VALUE": "body_value", 6 | "BODY_KEY": "body_key" 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserCollectionMoved.graphql: -------------------------------------------------------------------------------- 1 | subscription UserCollectionMoved { 2 | userCollectionMoved { 3 | id 4 | parent { 5 | id 6 | } 7 | type 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/RemoveUserFromTeamByAdmin.graphql: -------------------------------------------------------------------------------- 1 | mutation RemoveUserFromTeamByAdmin($userUid: ID!, $teamID: ID!) { 2 | removeUserFromTeamByAdmin(userUid: $userUid, teamID: $teamID) 3 | } 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: weekly 7 | time: '00:00' 8 | open-pull-requests-limit: 0 9 | reviewers: 10 | - liyasthomas 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/composables/i18n.ts: -------------------------------------------------------------------------------- 1 | import { flow } from "fp-ts/function" 2 | import { useI18n as _useI18n } from "vue-i18n" 3 | 4 | export const useI18n = flow(_useI18n, (x) => x.t) 5 | 6 | export const useFullI18n = _useI18n 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateNewRootCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateNewRootCollection($title: String!, $teamID: ID!) { 2 | createRootCollection(title: $title, teamID: $teamID) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetSingleRequest.graphql: -------------------------------------------------------------------------------- 1 | query GetSingleRequest($requestID: ID!) { 2 | request(requestID: $requestID) { 3 | id 4 | collectionID 5 | title 6 | request 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserRequestCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserRequestCreated { 2 | userRequestCreated { 3 | id 4 | collectionID 5 | title 6 | request 7 | type 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserRequestDeleted.graphql: -------------------------------------------------------------------------------- 1 | subscription UserRequestDeleted { 2 | userRequestDeleted { 3 | id 4 | collectionID 5 | title 6 | request 7 | type 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserRequestUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserRequestUpdated { 2 | userRequestUpdated { 3 | id 4 | collectionID 5 | title 6 | request 7 | type 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/components/smart/Spinner.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/app.controller.ts: -------------------------------------------------------------------------------- 1 | import { Controller, Get } from '@nestjs/common'; 2 | 3 | @Controller('ping') 4 | export class AppController { 5 | @Get() 6 | ping(): string { 7 | return 'Success'; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/.prettierignore: -------------------------------------------------------------------------------- 1 | .dependabot 2 | .github 3 | .nuxt 4 | .hoppscotch 5 | .vscode 6 | package-lock.json 7 | node_modules 8 | dist 9 | static 10 | components.d.ts 11 | src/types 12 | src/helpers/backend/graphql.ts 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/UpdateCollectionOrder.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateCollectionOrder($collectionID: ID!, $destCollID: ID) { 2 | updateCollectionOrder(collectionID: $collectionID, destCollID: $destCollID) 3 | } 4 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/RootCollectionsOfTeam.graphql: -------------------------------------------------------------------------------- 1 | query RootCollectionsOfTeam($teamID: ID!, $cursor: ID) { 2 | rootCollectionsOfTeam(teamID: $teamID, cursor: $cursor) { 3 | id 4 | title 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamRequestMoved.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamRequestMoved($teamID: ID!) { 2 | requestMoved(teamID: $teamID) { 3 | id 4 | collectionID 5 | request 6 | title 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/shortcodes/Shortcode.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines how a Shortcode is represented in the ShortcodeListAdapter 3 | */ 4 | export interface Shortcode { 5 | id: string 6 | request: string 7 | createdOn: Date 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserRequestCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserRequestCreated { 2 | userRequestCreated { 3 | id 4 | collectionID 5 | title 6 | request 7 | type 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserRequestDeleted.graphql: -------------------------------------------------------------------------------- 1 | subscription UserRequestDeleted { 2 | userRequestDeleted { 3 | id 4 | collectionID 5 | title 6 | request 7 | type 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserRequestUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserRequestUpdated { 2 | userRequestUpdated { 3 | id 4 | collectionID 5 | title 6 | request 7 | type 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/composables/i18n.ts: -------------------------------------------------------------------------------- 1 | import { flow } from "fp-ts/function" 2 | import { useI18n as _useI18n } from "vue-i18n" 3 | 4 | export const useI18n = flow(_useI18n, (x) => x.t) 5 | 6 | export const useFullI18n = _useI18n 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/auth/guards/rt-jwt-auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@nestjs/common'; 2 | import { AuthGuard } from '@nestjs/passport'; 3 | 4 | @Injectable() 5 | export class RTJwtAuthGuard extends AuthGuard('jwt-refresh') {} 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateDuplicateEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateDuplicateEnvironment($id: ID!){ 2 | createDuplicateEnvironment (id: $id ){ 3 | id 4 | teamID 5 | name 6 | variables 7 | } 8 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/MoveRESTTeamRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation MoveRESTTeamRequest($collectionID: ID!, $requestID: ID!) { 2 | moveRequest(destCollID: $collectionID, requestID: $requestID) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/RenameCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation RenameCollection($newTitle: String!, $collectionID: ID!) { 2 | renameCollection(newTitle: $newTitle, collectionID: $collectionID) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/UpdateRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateRequest($data: UpdateTeamRequestInput!, $requestID: ID!) { 2 | updateRequest(data: $data, requestID: $requestID) { 3 | id 4 | title 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamRequestAdded.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamRequestAdded($teamID: ID!) { 2 | teamRequestAdded(teamID: $teamID) { 3 | id 4 | collectionID 5 | request 6 | title 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/layouts/empty.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/UpdateGQLUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateGQLUserRequest($id: ID!, $request: String!, $title: String) { 2 | updateGQLUserRequest(id: $id, request: $request, title: $title) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserCollectionCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserCollectionCreated { 2 | userCollectionCreated { 3 | parent { 4 | id 5 | } 6 | id 7 | title 8 | type 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserCollectionUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription userCollectionUpdated { 2 | userCollectionUpdated { 3 | id 4 | title 5 | type 6 | parent { 7 | id 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserEnvironmentCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserEnvironmentCreated { 2 | userEnvironmentCreated { 3 | id 4 | isGlobal 5 | name 6 | userUid 7 | variables 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserEnvironmentUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserEnvironmentUpdated { 2 | userEnvironmentUpdated { 3 | id 4 | userUid 5 | name 6 | variables 7 | isGlobal 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamRequestUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamRequestUpdated($teamID: ID!) { 2 | teamRequestUpdated(teamID: $teamID) { 3 | id 4 | collectionID 5 | request 6 | title 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/utils/userAgent.ts: -------------------------------------------------------------------------------- 1 | export const browserIsChrome = () => 2 | /Chrome/i.test(navigator.userAgent) && /Google/i.test(navigator.vendor) 3 | 4 | export const browserIsFirefox = () => /Firefox/i.test(navigator.userAgent) 5 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/UpdateGQLUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateGQLUserRequest($id: ID!, $request: String!, $title: String) { 2 | updateGQLUserRequest(id: $id, request: $request, title: $title) { 3 | id 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserCollectionCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserCollectionCreated { 2 | userCollectionCreated { 3 | parent { 4 | id 5 | } 6 | id 7 | title 8 | type 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserCollectionUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription userCollectionUpdated { 2 | userCollectionUpdated { 3 | id 4 | title 5 | type 6 | parent { 7 | id 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserEnvironmentCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserEnvironmentCreated { 2 | userEnvironmentCreated { 3 | id 4 | isGlobal 5 | name 6 | userUid 7 | variables 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserEnvironmentUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserEnvironmentUpdated { 2 | userEnvironmentUpdated { 3 | id 4 | userUid 5 | name 6 | variables 7 | isGlobal 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/queries/GetUserEnvironments.graphql: -------------------------------------------------------------------------------- 1 | query GetUserEnvironments { 2 | me { 3 | environments { 4 | id 5 | isGlobal 6 | name 7 | userUid 8 | variables 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/InvitedUsers.graphql: -------------------------------------------------------------------------------- 1 | query InvitedUsers { 2 | admin { 3 | invitedUsers { 4 | adminUid 5 | adminEmail 6 | inviteeEmail 7 | invitedOn 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/queries/GetUserEnvironments.graphql: -------------------------------------------------------------------------------- 1 | query GetUserEnvironments { 2 | me { 3 | environments { 4 | id 5 | isGlobal 6 | name 7 | userUid 8 | variables 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module "*.vue" { 4 | import type { DefineComponent } from "vue" 5 | const component: DefineComponent<{}, {}, any> 6 | export default component 7 | } 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | charset = utf-8 10 | trim_trailing_whitespace = true 11 | insert_final_newline = true 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamEnvironmentCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamEnvironmentCreated ($teamID: ID!) { 2 | teamEnvironmentCreated(teamID: $teamID) { 3 | id 4 | teamID 5 | name 6 | variables 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamEnvironmentUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamEnvironmentUpdated ($teamID: ID!) { 2 | teamEnvironmentUpdated(teamID: $teamID) { 3 | id 4 | teamID 5 | name 6 | variables 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/curl/index.ts: -------------------------------------------------------------------------------- 1 | import { flow } from "fp-ts/function" 2 | import { cloneDeep } from "lodash-es" 3 | import { parseCurlCommand } from "./curlparser" 4 | 5 | export const parseCurlToHoppRESTReq = flow(parseCurlCommand, cloneDeep) 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module "*.vue" { 4 | import type { DefineComponent } from "vue"; 5 | const component: DefineComponent<{}, {}, any>; 6 | export default component; 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/queries/GetGlobalEnvironments.graphql: -------------------------------------------------------------------------------- 1 | query GetGlobalEnvironments { 2 | me { 3 | globalEnvironments { 4 | id 5 | isGlobal 6 | name 7 | userUid 8 | variables 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/test/jest-e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "moduleFileExtensions": ["js", "json", "ts"], 3 | "rootDir": ".", 4 | "testEnvironment": "node", 5 | "testRegex": ".e2e-spec.ts$", 6 | "transform": { 7 | "^.+\\.(t|j)s$": "ts-jest" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetSingleCollection.graphql: -------------------------------------------------------------------------------- 1 | query GetSingleCollection($collectionID: ID!) { 2 | collection(collectionID: $collectionID) { 3 | id 4 | title 5 | parent { 6 | id 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/queries/GetGlobalEnvironments.graphql: -------------------------------------------------------------------------------- 1 | query GetGlobalEnvironments { 2 | me { 3 | globalEnvironments { 4 | id 5 | isGlobal 6 | name 7 | userUid 8 | variables 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserHistoryCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserHistoryCreated { 2 | userHistoryCreated { 3 | id 4 | reqType 5 | request 6 | responseMetadata 7 | isStarred 8 | executedOn 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserHistoryUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserHistoryUpdated { 2 | userHistoryUpdated { 3 | id 4 | reqType 5 | request 6 | responseMetadata 7 | isStarred 8 | executedOn 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/Spinner.story.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "~/*": ["./*"], 6 | "@/*": ["./*"], 7 | "~~/*": ["./*"], 8 | "@@/*": ["./*"] 9 | } 10 | }, 11 | "exclude": ["node_modules", ".nuxt", "dist"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/pubsub/pubsub.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { PubSubService } from './pubsub.service'; 3 | 4 | @Module({ 5 | providers: [PubSubService], 6 | exports: [PubSubService], 7 | }) 8 | export class PubSubModule {} 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetCollectionChildrenIDs.graphql: -------------------------------------------------------------------------------- 1 | query GetCollectionChildrenIDs($collectionID: ID!, $cursor: ID) { 2 | collection(collectionID: $collectionID) { 3 | children(cursor: $cursor) { 4 | id 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamCollectionAdded.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamCollectionAdded($teamID: ID!) { 2 | teamCollectionAdded(teamID: $teamID) { 3 | id 4 | title 5 | parent { 6 | id 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamCollectionMoved.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamCollectionMoved($teamID: ID!) { 2 | teamCollectionMoved(teamID: $teamID) { 3 | id 4 | title 5 | parent { 6 | id 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserHistoryCreated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserHistoryCreated { 2 | userHistoryCreated { 3 | id 4 | reqType 5 | request 6 | responseMetadata 7 | isStarred 8 | executedOn 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserHistoryUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserHistoryUpdated { 2 | userHistoryUpdated { 3 | id 4 | reqType 5 | request 6 | responseMetadata 7 | isStarred 8 | executedOn 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetCollectionRequests.graphql: -------------------------------------------------------------------------------- 1 | query GetCollectionRequests($collectionID: ID!, $cursor: ID) { 2 | requestsInCollection(collectionID: $collectionID, cursor: $cursor) { 3 | id 4 | title 5 | request 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetTeamEnvironments.graphql: -------------------------------------------------------------------------------- 1 | query GetTeamEnvironments($teamID: ID!){ 2 | team(teamID: $teamID){ 3 | teamEnvironments{ 4 | id 5 | name 6 | variables 7 | teamID 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/pendingInvites.graphql: -------------------------------------------------------------------------------- 1 | query GetPendingInvites($teamID: ID!) { 2 | team(teamID: $teamID) { 3 | id 4 | teamInvitations { 5 | inviteeRole 6 | inviteeEmail 7 | id 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamCollectionUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamCollectionUpdated($teamID: ID!) { 2 | teamCollectionUpdated(teamID: $teamID) { 3 | id 4 | title 5 | parent { 6 | id 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/pendingInvites.graphql: -------------------------------------------------------------------------------- 1 | query GetPendingInvites($teamID: ID!) { 2 | team(teamID: $teamID) { 3 | id 4 | teamInvitations { 5 | inviteeRole 6 | inviteeEmail 7 | id 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/prisma/prisma.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common/decorators'; 2 | import { PrismaService } from './prisma.service'; 3 | 4 | @Module({ 5 | providers: [PrismaService], 6 | exports: [PrismaService], 7 | }) 8 | export class PrismaModule {} 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetCollectionChildren.graphql: -------------------------------------------------------------------------------- 1 | query GetCollectionChildren($collectionID: ID!, $cursor: ID) { 2 | collection(collectionID: $collectionID) { 3 | children(cursor: $cursor) { 4 | id 5 | title 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamMemberAdded.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamMemberAdded($teamID: ID!) { 2 | teamMemberAdded(teamID: $teamID) { 3 | membershipID 4 | user { 5 | uid 6 | email 7 | } 8 | role 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts", "meta.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/UpdateTeamEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateTeamEnvironment($variables: String!,$id: ID!,$name: String!){ 2 | updateTeamEnvironment( variables: $variables ,id: $id ,name: $name){ 3 | variables 4 | name 5 | id 6 | } 7 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamMemberUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamMemberUpdated($teamID: ID!) { 2 | teamMemberUpdated(teamID: $teamID) { 3 | membershipID 4 | user { 5 | uid 6 | email 7 | } 8 | role 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/types/HoppRealtimeLog.ts: -------------------------------------------------------------------------------- 1 | export type HoppRealtimeLogLine = { 2 | prefix?: string 3 | payload: string 4 | source: string 5 | color?: string 6 | ts: number | undefined 7 | } 8 | 9 | export type HoppRealtimeLog = HoppRealtimeLogLine[] 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/RenameUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation RenameUserCollection($userCollectionID: ID!, $newTitle: String!) { 2 | renameUserCollection( 3 | userCollectionID: $userCollectionID 4 | newTitle: $newTitle 5 | ) { 6 | id 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts", "meta.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/RenameUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation RenameUserCollection($userCollectionID: ID!, $newTitle: String!) { 2 | renameUserCollection( 3 | userCollectionID: $userCollectionID 4 | newTitle: $newTitle 5 | ) { 6 | id 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/UpdateRESTUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateRESTUserRequest($id: ID!, $title: String!, $request: String!) { 2 | updateRESTUserRequest(id: $id, title: $title, request: $request) { 3 | id 4 | collectionID 5 | request 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/UpdateUserCollectionOrder.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateUserCollectionOrder($collectionID: ID!, $nextCollectionID: ID) { 2 | updateUserCollectionOrder( 3 | collectionID: $collectionID 4 | nextCollectionID: $nextCollectionID 5 | ) 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/team/decorators/requires-team-role.decorator.ts: -------------------------------------------------------------------------------- 1 | import { TeamMemberRole } from '@prisma/client'; 2 | import { SetMetadata } from '@nestjs/common'; 3 | 4 | export const RequiresTeamRole = (...roles: TeamMemberRole[]) => 5 | SetMetadata('requiresTeamRole', roles); 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/types/AuthUser.ts: -------------------------------------------------------------------------------- 1 | import { User } from '@prisma/client'; 2 | 3 | export type AuthUser = User; 4 | 5 | export interface SSOProviderProfile { 6 | provider: string; 7 | id: string; 8 | } 9 | 10 | export type IsAdmin = { 11 | isAdmin: boolean; 12 | }; 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/UpdateRESTUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateRESTUserRequest($id: ID!, $title: String!, $request: String!) { 2 | updateRESTUserRequest(id: $id, title: $title, request: $request) { 3 | id 4 | collectionID 5 | request 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/UpdateUserCollectionOrder.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateUserCollectionOrder($collectionID: ID!, $nextCollectionID: ID) { 2 | updateUserCollectionOrder( 3 | collectionID: $collectionID 4 | nextCollectionID: $nextCollectionID 5 | ) 6 | } 7 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/nest-cli.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/nest-cli", 3 | "collection": "@nestjs/schematics", 4 | "sourceRoot": "src", 5 | "compilerOptions": { 6 | "assets": [ 7 | "**/*.hbs" 8 | ], 9 | "watchAssets": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/MoveUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation MoveUserCollection($destCollectionID: ID, $userCollectionID: ID!) { 2 | moveUserCollection( 3 | destCollectionID: $destCollectionID 4 | userCollectionID: $userCollectionID 5 | ) { 6 | id 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/UserInfo.graphql: -------------------------------------------------------------------------------- 1 | query UserInfo($uid: ID!) { 2 | admin { 3 | userInfo(userUid: $uid) { 4 | uid 5 | displayName 6 | email 7 | isAdmin 8 | photoURL 9 | createdOn 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/TeamList.graphql: -------------------------------------------------------------------------------- 1 | query TeamList($cursor: ID, $take: Int) { 2 | admin { 3 | allTeams(cursor: $cursor, take: $take) { 4 | id 5 | name 6 | members { 7 | membershipID 8 | } 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateTeamEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateTeamEnvironment($variables: String!,$teamID: ID!,$name: String!){ 2 | createTeamEnvironment( variables: $variables ,teamID: $teamID ,name: $name){ 3 | variables 4 | name 5 | teamID 6 | } 7 | } -------------------------------------------------------------------------------- /packages/hoppscotch-js-sandbox/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "tsup" 2 | 3 | export default defineConfig({ 4 | entry: ["src/index.ts"], 5 | outDir: "./lib/", 6 | format: ["esm", "cjs"], 7 | dts: true, 8 | splitting: true, 9 | sourcemap: true, 10 | clean: true, 11 | }) 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/MoveUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation MoveUserCollection($destCollectionID: ID, $userCollectionID: ID!) { 2 | moveUserCollection( 3 | destCollectionID: $destCollectionID 4 | userCollectionID: $userCollectionID 5 | ) { 6 | id 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.github/semantic.yml: -------------------------------------------------------------------------------- 1 | # Always validate the PR title AND all the commits 2 | titleAndCommits: true 3 | # Allows use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns") 4 | # this is only relevant when using commitsOnly: true (or titleAndCommits: true) 5 | allowMergeCommits: true 6 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/MoveRESTTeamCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation MoveRESTTeamCollection($collectionID: ID!, $parentCollectionID: ID) { 2 | moveCollection( 3 | collectionID: $collectionID 4 | parentCollectionID: $parentCollectionID 5 | ) { 6 | id 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/editor/linting/linter.ts: -------------------------------------------------------------------------------- 1 | export type LinterResult = { 2 | message: string 3 | severity: "warning" | "error" 4 | from: { line: number; ch: number } 5 | to: { line: number; ch: number } 6 | } 7 | export type LinterDefinition = (text: string) => Promise 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/queries/CreateUserEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserEnvironment($name: String!, $variables: String!) { 2 | createUserEnvironment(name: $name, variables: $variables) { 3 | id 4 | userUid 5 | name 6 | variables 7 | isGlobal 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserRequestMoved.graphql: -------------------------------------------------------------------------------- 1 | subscription UserRequestMoved { 2 | userRequestMoved { 3 | request { 4 | id 5 | collectionID 6 | type 7 | } 8 | nextRequest { 9 | id 10 | collectionID 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateUserEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserEnvironment($name: String!, $variables: String!) { 2 | createUserEnvironment(name: $name, variables: $variables) { 3 | id 4 | userUid 5 | name 6 | variables 7 | isGlobal 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/queries/CreateUserEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserEnvironment($name: String!, $variables: String!) { 2 | createUserEnvironment(name: $name, variables: $variables) { 3 | id 4 | userUid 5 | name 6 | variables 7 | isGlobal 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserRequestMoved.graphql: -------------------------------------------------------------------------------- 1 | subscription UserRequestMoved { 2 | userRequestMoved { 3 | request { 4 | id 5 | collectionID 6 | type 7 | } 8 | nextRequest { 9 | id 10 | collectionID 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateUserEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserEnvironment($name: String!, $variables: String!) { 2 | createUserEnvironment(name: $name, variables: $variables) { 3 | id 4 | userUid 5 | name 6 | variables 7 | isGlobal 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/components/smart/FileChip.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /packages/codemirror-lang-graphql/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "target": "es6", 5 | "module": "es2020", 6 | "newLine": "lf", 7 | "declaration": true, 8 | "moduleResolution": "node", 9 | "allowJs": true 10 | }, 11 | "include": ["src/*"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetTeam.graphql: -------------------------------------------------------------------------------- 1 | query GetTeam($teamID: ID!) { 2 | team(teamID: $teamID) { 3 | id 4 | name 5 | teamMembers { 6 | membershipID 7 | user { 8 | uid 9 | email 10 | } 11 | role 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Hoppscotch", 3 | "image": "mcr.microsoft.com/devcontainers/typescript-node:18", 4 | "forwardPorts": [3000], 5 | "features": { 6 | "ghcr.io/NicoVIII/devcontainer-features/pnpm:1": {} 7 | }, 8 | "postCreateCommand": "cp .env.example .env && pnpm i" 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateChildCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateChildCollection( 2 | $childTitle: String! 3 | $collectionID: ID! 4 | ) { 5 | createChildCollection( 6 | childTitle: $childTitle 7 | collectionID: $collectionID 8 | ) { 9 | id 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetTeamMembers.graphql: -------------------------------------------------------------------------------- 1 | query GetTeamMembers($teamID: ID!, $cursor: ID) { 2 | team(teamID: $teamID) { 3 | members(cursor: $cursor) { 4 | membershipID 5 | user { 6 | uid 7 | email 8 | } 9 | role 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/UpdateUserEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateUserEnvironment($id: ID!, $name: String!, $variables: String!) { 2 | updateUserEnvironment(id: $id, name: $name, variables: $variables) { 3 | id 4 | userUid 5 | name 6 | variables 7 | isGlobal 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/AcceptTeamInvitation.graphql: -------------------------------------------------------------------------------- 1 | mutation AcceptTeamInvitation($inviteID: ID!) { 2 | acceptTeamInvitation(inviteID: $inviteID) { 3 | membershipID 4 | role 5 | user { 6 | uid 7 | displayName 8 | photoURL 9 | email 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/teams/TeamEnvironment.ts: -------------------------------------------------------------------------------- 1 | import { Environment } from "@hoppscotch/data" 2 | 3 | /** 4 | * Defines how a Team Environment is represented in the TeamEnvironmentAdapter 5 | */ 6 | export interface TeamEnvironment { 7 | id: string 8 | teamID: string 9 | environment: Environment 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/UpdateUserEnvironment.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateUserEnvironment($id: ID!, $name: String!, $variables: String!) { 2 | updateUserEnvironment(id: $id, name: $name, variables: $variables) { 3 | id 4 | userUid 5 | name 6 | variables 7 | isGlobal 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/UpdateUserSession.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateUserSession( 2 | $currentSession: String! 3 | $sessionType: SessionType! 4 | ) { 5 | updateUserSessions( 6 | currentSession: $currentSession 7 | sessionType: $sessionType 8 | ) { 9 | currentRESTSession 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/histoire.setup.ts: -------------------------------------------------------------------------------- 1 | import "./src/assets/scss/styles.scss" 2 | import "./src/assets/scss/themes.scss" 3 | import "virtual:windi.css" 4 | import "@fontsource-variable/inter" 5 | import "@fontsource-variable/material-symbols-rounded" 6 | import "@fontsource-variable/roboto-mono" 7 | 8 | export function setupVue3() {} 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module "*.vue" { 4 | import { DefineComponent } from "vue" 5 | // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/UpdateUserSession.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateUserSession( 2 | $currentSession: String! 3 | $sessionType: SessionType! 4 | ) { 5 | updateUserSessions( 6 | currentSession: $currentSession 7 | sessionType: $sessionType 8 | ) { 9 | currentRESTSession 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/AcceptTeamInvitation.graphql: -------------------------------------------------------------------------------- 1 | mutation AcceptTeamInvitation($inviteID: ID!) { 2 | acceptTeamInvitation(inviteID: $inviteID) { 3 | membershipID 4 | role 5 | user { 6 | uid 7 | displayName 8 | photoURL 9 | email 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/utils/date.ts: -------------------------------------------------------------------------------- 1 | export function shortDateTime(date: string | number | Date) { 2 | return new Date(date).toLocaleString("en-US", { 3 | year: "numeric", 4 | month: "short", 5 | day: "numeric", 6 | hour: "numeric", 7 | minute: "numeric", 8 | second: "numeric", 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateUserHistory.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserHistory( 2 | $reqData: String! 3 | $resMetadata: String! 4 | $reqType: ReqType! 5 | ) { 6 | createUserHistory( 7 | reqData: $reqData 8 | resMetadata: $resMetadata 9 | reqType: $reqType 10 | ) { 11 | id 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/RenameTeam.graphql: -------------------------------------------------------------------------------- 1 | mutation RenameTeam($newName: String!, $teamID: ID!) { 2 | renameTeam(newName: $newName, teamID: $teamID) { 3 | id 4 | name 5 | teamMembers { 6 | membershipID 7 | user { 8 | uid 9 | } 10 | role 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/teams/TeamRequest.ts: -------------------------------------------------------------------------------- 1 | import { HoppRESTRequest } from "@hoppscotch/data" 2 | 3 | /** 4 | * Defines how a Teams request is represented in TeamCollectionAdapter 5 | */ 6 | export interface TeamRequest { 7 | id: string 8 | collectionID: string 9 | title: string 10 | request: HoppRESTRequest 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/terndoc/pw-pre.json: -------------------------------------------------------------------------------- 1 | { 2 | "!name": "pw-pre", 3 | "pw": { 4 | "env": { 5 | "set": "fn(key: string, value: string)", 6 | "get": "fn(key: string) -> string", 7 | "getResolve": "fn(key: string) -> string", 8 | "resolve": "fn(value: string) -> string" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateGQLUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateGQLUserRequest( 2 | $title: String! 3 | $request: String! 4 | $collectionID: ID! 5 | ) { 6 | createGQLUserRequest( 7 | title: $title 8 | request: $request 9 | collectionID: $collectionID 10 | ) { 11 | id 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateUserHistory.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateUserHistory( 2 | $reqData: String! 3 | $resMetadata: String! 4 | $reqType: ReqType! 5 | ) { 6 | createUserHistory( 7 | reqData: $reqData 8 | resMetadata: $resMetadata 9 | reqType: $reqType 10 | ) { 11 | id 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateGQLChildUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateGQLChildUserCollection( 2 | $title: String! 3 | $parentUserCollectionID: ID! 4 | ) { 5 | createGQLChildUserCollection( 6 | title: $title 7 | parentUserCollectionID: $parentUserCollectionID 8 | ) { 9 | id 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateGQLUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateGQLUserRequest( 2 | $title: String! 3 | $request: String! 4 | $collectionID: ID! 5 | ) { 6 | createGQLUserRequest( 7 | title: $title 8 | request: $request 9 | collectionID: $collectionID 10 | ) { 11 | id 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateRESTUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateRESTUserRequest( 2 | $collectionID: ID! 3 | $title: String! 4 | $request: String! 5 | ) { 6 | createRESTUserRequest( 7 | collectionID: $collectionID 8 | title: $title 9 | request: $request 10 | ) { 11 | id 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateGQLChildUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateGQLChildUserCollection( 2 | $title: String! 3 | $parentUserCollectionID: ID! 4 | ) { 5 | createGQLChildUserCollection( 6 | title: $title 7 | parentUserCollectionID: $parentUserCollectionID 8 | ) { 9 | id 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateRESTChildUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateRESTChildUserCollection( 2 | $title: String! 3 | $parentUserCollectionID: ID! 4 | ) { 5 | createRESTChildUserCollection( 6 | title: $title 7 | parentUserCollectionID: $parentUserCollectionID 8 | ) { 9 | id 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/CreateRESTUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateRESTUserRequest( 2 | $collectionID: ID! 3 | $title: String! 4 | $request: String! 5 | ) { 6 | createRESTUserRequest( 7 | collectionID: $collectionID 8 | title: $title 9 | request: $request 10 | ) { 11 | id 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/CreateRESTChildUserCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateRESTChildUserCollection( 2 | $title: String! 3 | $parentUserCollectionID: ID! 4 | ) { 5 | createRESTChildUserCollection( 6 | title: $title 7 | parentUserCollectionID: $parentUserCollectionID 8 | ) { 9 | id 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/Item.story.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/functional/formData.ts: -------------------------------------------------------------------------------- 1 | type FormDataEntry = { 2 | key: string 3 | value: string | Blob 4 | } 5 | 6 | export const toFormData = (values: FormDataEntry[]) => { 7 | const formData = new FormData() 8 | 9 | values.forEach(({ key, value }) => formData.append(key, value)) 10 | 11 | return formData 12 | } 13 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "antfu.iconify", 4 | "vue.volar", 5 | "esbenp.prettier-vscode", 6 | "dbaeumer.vscode-eslint", 7 | "editorconfig.editorconfig", 8 | "csstools.postcss", 9 | "folke.vscode-monorepo-workspace" 10 | ], 11 | "unwantedRecommendations": [ 12 | "octref.vetur" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/types/AuthError.ts: -------------------------------------------------------------------------------- 1 | import { HttpStatus } from '@nestjs/common'; 2 | 3 | /** 4 | ** Custom interface to handle errors specific to Auth module 5 | ** Since its REST we need to return the HTTP status code along with the error message 6 | */ 7 | export type AuthError = { 8 | message: string; 9 | statusCode: HttpStatus; 10 | }; 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/types/collections.ts: -------------------------------------------------------------------------------- 1 | import { HoppCollection, HoppRESTRequest } from "@hoppscotch/data"; 2 | import { HoppEnvs } from "./request"; 3 | 4 | export type CollectionRunnerParam = { 5 | collections: HoppCollection[]; 6 | envs: HoppEnvs; 7 | delay?: number; 8 | }; 9 | 10 | export type HoppCollectionFileExt = "json"; 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/UpdateLookUpRequestOrder.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateLookUpRequestOrder( 2 | $requestID: ID! 3 | $nextRequestID: ID 4 | $collectionID: ID! 5 | ) { 6 | updateLookUpRequestOrder( 7 | requestID: $requestID 8 | nextRequestID: $nextRequestID 9 | collectionID: $collectionID 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/UpdateTeamMemberRole.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateTeamMemberRole( 2 | $newRole: TeamMemberRole!, 3 | $userUid: ID!, 4 | $teamID: ID! 5 | ) { 6 | updateTeamMemberRole( 7 | newRole: $newRole 8 | userUid: $userUid 9 | teamID: $teamID 10 | ) { 11 | membershipID 12 | role 13 | } 14 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/platformutils.ts: -------------------------------------------------------------------------------- 1 | export function isAppleDevice() { 2 | return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) 3 | } 4 | 5 | export function getPlatformSpecialKey() { 6 | return isAppleDevice() ? "⌘" : "Ctrl" 7 | } 8 | 9 | export function getPlatformAlternateKey() { 10 | return isAppleDevice() ? "⌥" : "Alt" 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/UsersList.graphql: -------------------------------------------------------------------------------- 1 | # Write your query or mutation here 2 | query UsersList($cursor: ID, $take: Int) { 3 | admin { 4 | allUsers(cursor: $cursor, take: $take) { 5 | uid 6 | displayName 7 | email 8 | isAdmin 9 | photoURL 10 | createdOn 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/teams/TeamCollection.ts: -------------------------------------------------------------------------------- 1 | import { TeamRequest } from "./TeamRequest" 2 | 3 | /** 4 | * Defines how a Team Collection is represented in the TeamCollectionAdapter 5 | */ 6 | export interface TeamCollection { 7 | id: string 8 | title: string 9 | children: TeamCollection[] | null 10 | requests: TeamRequest[] | null 11 | } 12 | -------------------------------------------------------------------------------- /healthcheck.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curlCheck() { 4 | if ! curl -s --head "$1" | head -n 1 | grep -q "HTTP/1.[01] [23].."; then 5 | echo "URL request failed!" 6 | exit 1 7 | else 8 | echo "URL request succeeded!" 9 | fi 10 | } 11 | 12 | curlCheck "http://localhost:3000" 13 | curlCheck "http://localhost:3100" 14 | curlCheck "http://localhost:3170/ping" 15 | -------------------------------------------------------------------------------- /packages/dioc/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | 3 | export default defineConfig({ 4 | build: { 5 | lib: { 6 | entry: { 7 | index: './lib/main.ts', 8 | vue: './lib/vue.ts', 9 | testing: './lib/testing.ts', 10 | }, 11 | }, 12 | rollupOptions: { 13 | external: ['vue'], 14 | } 15 | }, 16 | }) 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetInviteDetails.graphql: -------------------------------------------------------------------------------- 1 | query GetInviteDetails($inviteID: ID!) { 2 | teamInvitation(inviteID: $inviteID) { 3 | id 4 | inviteeEmail 5 | inviteeRole 6 | team { 7 | id 8 | name 9 | } 10 | creator { 11 | uid 12 | displayName 13 | email 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/queries/ExportUserCollectionsToJSON.graphql: -------------------------------------------------------------------------------- 1 | query ExportUserCollectionsToJSON( 2 | $collectionID: ID 3 | $collectionType: ReqType! 4 | ) { 5 | exportUserCollectionsToJSON( 6 | collectionID: $collectionID 7 | collectionType: $collectionType 8 | ) { 9 | collectionType 10 | exportedCollection 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Help and support 3 | url: https://github.com/hoppscotch/hoppscotch#support 4 | about: Reach out to us on our Discord server or Telegram group or GitHub discussions. 5 | - name: Dedicated support 6 | url: mailto:support@hoppscotch.io 7 | about: Write to us if you'd like dedicated support using Hoppscotch 8 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/assets/icons/brands/facebook.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/assets/icons/star-off.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateTeamInvitation.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateTeamInvitation($inviteeEmail: String!, $inviteeRole: TeamMemberRole!, $teamID: ID!) { 2 | createTeamInvitation(inviteeRole: $inviteeRole, inviteeEmail: $inviteeEmail, teamID: $teamID) { 3 | id 4 | teamID 5 | creatorUid 6 | inviteeEmail 7 | inviteeRole 8 | } 9 | } -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/queries/ExportUserCollectionsToJSON.graphql: -------------------------------------------------------------------------------- 1 | query ExportUserCollectionsToJSON( 2 | $collectionID: ID 3 | $collectionType: ReqType! 4 | ) { 5 | exportUserCollectionsToJSON( 6 | collectionID: $collectionID 7 | collectionType: $collectionType 8 | ) { 9 | collectionType 10 | exportedCollection 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/AddUserToTeamByAdmin.graphql: -------------------------------------------------------------------------------- 1 | mutation AddUserToTeamByAdmin( 2 | $userEmail: String! 3 | $role: TeamMemberRole! 4 | $teamID: ID! 5 | ) { 6 | addUserToTeamByAdmin(role: $role, userEmail: $userEmail, teamID: $teamID) { 7 | membershipID 8 | role 9 | user { 10 | uid 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/CreateTeamInvitation.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateTeamInvitation($inviteeEmail: String!, $inviteeRole: TeamMemberRole!, $teamID: ID!) { 2 | createTeamInvitation(inviteeRole: $inviteeRole, inviteeEmail: $inviteeEmail, teamID: $teamID) { 3 | id 4 | teamID 5 | creatorUid 6 | inviteeEmail 7 | inviteeRole 8 | } 9 | } -------------------------------------------------------------------------------- /packages/dioc/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/subscriptions/UserCollectionOrderUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserCollectionOrderUpdated { 2 | userCollectionOrderUpdated { 3 | userCollection { 4 | id 5 | parent { 6 | id 7 | } 8 | } 9 | 10 | nextUserCollection { 11 | id 12 | parent { 13 | id 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/subscriptions/UserCollectionOrderUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription UserCollectionOrderUpdated { 2 | userCollectionOrderUpdated { 3 | userCollection { 4 | id 5 | parent { 6 | id 7 | } 8 | } 9 | 10 | nextUserCollection { 11 | id 12 | parent { 13 | id 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/ChangeUserRoleInTeamByAdmin.graphql: -------------------------------------------------------------------------------- 1 | mutation ChangeUserRoleInTeamByAdmin( 2 | $userUID: ID! 3 | $teamID: ID! 4 | $newRole: TeamMemberRole! 5 | ) { 6 | changeUserRoleInTeamByAdmin( 7 | userUID: $userUID 8 | teamID: $teamID 9 | newRole: $newRole 10 | ) { 11 | membershipID 12 | role 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateRequestInCollection.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateRequestInCollection($data: CreateTeamRequestInput!, $collectionID: ID!) { 2 | createRequestInCollection(data: $data, collectionID: $collectionID) { 3 | id 4 | collection { 5 | id 6 | team { 7 | id 8 | name 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/types/TeamName.ts: -------------------------------------------------------------------------------- 1 | import * as t from "io-ts" 2 | 3 | interface TeamNameBrand { 4 | readonly TeamName: unique symbol 5 | } 6 | 7 | export const TeamNameCodec = t.brand( 8 | t.string, 9 | (x): x is t.Branded => x.trim().length >= 6, 10 | "TeamName" 11 | ) 12 | 13 | export type TeamName = t.TypeOf 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-data/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "esnext", 5 | "lib": ["esnext", "DOM"], 6 | "moduleResolution": "node", 7 | "esModuleInterop": true, 8 | "strict": true, 9 | "strictNullChecks": true, 10 | "skipLibCheck": true, 11 | "resolveJsonModule": true 12 | }, 13 | "include": ["src/*.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/Checkbox.story.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/queries/GetMyTeams.graphql: -------------------------------------------------------------------------------- 1 | query GetMyTeams($cursor: ID) { 2 | myTeams(cursor: $cursor) { 3 | id 4 | name 5 | myRole 6 | ownersCount 7 | teamMembers { 8 | membershipID 9 | user { 10 | photoURL 11 | displayName 12 | email 13 | uid 14 | } 15 | role 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/queries/GetUserRootCollections.graphql: -------------------------------------------------------------------------------- 1 | query GetUserRootCollections { 2 | # the frontend doesnt paginate right now, so giving take a big enough value to get all collections at once 3 | rootRESTUserCollections(take: 99999) { 4 | id 5 | title 6 | type 7 | childrenREST { 8 | id 9 | title 10 | type 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/functional/taskEither.ts: -------------------------------------------------------------------------------- 1 | import * as TE from "fp-ts/TaskEither" 2 | 3 | /** 4 | * A utility type which gives you the type of the left value of a TaskEither 5 | */ 6 | export type TELeftType> = 7 | T extends TE.TaskEither< 8 | infer U, 9 | // eslint-disable-next-line 10 | infer _ 11 | > 12 | ? U 13 | : never 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/queries/GetRootGQLUserCollections.graphql: -------------------------------------------------------------------------------- 1 | query GetGQLRootUserCollections { 2 | # the frontend doesnt paginate right now, so giving take a big enough value to get all collections at once 3 | rootGQLUserCollections(take: 99999) { 4 | id 5 | title 6 | type 7 | childrenGQL { 8 | id 9 | title 10 | type 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/queries/GetUserRootCollections.graphql: -------------------------------------------------------------------------------- 1 | query GetUserRootCollections { 2 | # the frontend doesnt paginate right now, so giving take a big enough value to get all collections at once 3 | rootRESTUserCollections(take: 99999) { 4 | id 5 | title 6 | type 7 | childrenREST { 8 | id 9 | title 10 | type 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/queries/GetRootGQLUserCollections.graphql: -------------------------------------------------------------------------------- 1 | query GetGQLRootUserCollections { 2 | # the frontend doesnt paginate right now, so giving take a big enough value to get all collections at once 3 | rootGQLUserCollections(take: 99999) { 4 | id 5 | title 6 | type 7 | childrenGQL { 8 | id 9 | title 10 | type 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/errors.ts: -------------------------------------------------------------------------------- 1 | /* No cookies were found in the auth request 2 | * (AuthService) 3 | */ 4 | export const COOKIES_NOT_FOUND = 'auth/cookies_not_found' as const; 5 | 6 | export const UNAUTHORIZED = 'Unauthorized' as const; 7 | 8 | // Sometimes the backend returns Unauthorized error message as follows: 9 | export const GRAPHQL_UNAUTHORIZED = '[GraphQL] Unauthorized' as const; 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamRequestOrderUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamRequestOrderUpdated($teamID: ID!) { 2 | requestOrderUpdated(teamID: $teamID) { 3 | request { 4 | id 5 | collectionID 6 | request 7 | title 8 | } 9 | nextRequest { 10 | id 11 | collectionID 12 | request 13 | title 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/badge-dark.svg: -------------------------------------------------------------------------------- 1 | ▶ Run in Hoppscotch 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/badge-light.svg: -------------------------------------------------------------------------------- 1 | ▶ Run in Hoppscotch 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/public/badge.svg: -------------------------------------------------------------------------------- 1 | ▶ Run in Hoppscotch 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/import-export/export/hopp.ts: -------------------------------------------------------------------------------- 1 | import { HoppRESTRequest, HoppCollection } from "@hoppscotch/data" 2 | import { pipe } from "fp-ts/function" 3 | import * as TE from "fp-ts/TaskEither" 4 | import { HoppExporter } from "." 5 | 6 | const exporter: HoppExporter> = (content) => 7 | pipe(content, JSON.stringify, TE.right) 8 | 9 | export default exporter 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/admin/decorators/gql-admin.decorator.ts: -------------------------------------------------------------------------------- 1 | import { createParamDecorator, ExecutionContext } from '@nestjs/common'; 2 | import { GqlExecutionContext } from '@nestjs/graphql'; 3 | 4 | export const GqlAdmin = createParamDecorator( 5 | (data: unknown, context: ExecutionContext) => { 6 | const ctx = GqlExecutionContext.create(context); 7 | return ctx.getContext().req.user; 8 | }, 9 | ); 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-data/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { tuple } from "io-ts" 2 | import { resolve } from "path" 3 | import { defineConfig } from "vite" 4 | 5 | export default defineConfig({ 6 | build: { 7 | outDir: "./dist", 8 | emptyOutDir: true, 9 | lib: { 10 | entry: resolve(__dirname, "src/index.ts"), 11 | fileName: "hoppscotch-data", 12 | formats: ["es", "cjs"], 13 | }, 14 | }, 15 | }) 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/gql-codegen.yml: -------------------------------------------------------------------------------- 1 | overwrite: true 2 | schema: "../../gql-gen/*.gql" 3 | generates: 4 | src/helpers/backend/graphql.ts: 5 | documents: 'src/**/*.graphql' 6 | plugins: 7 | - 'typescript' 8 | - 'typescript-operations' 9 | - 'typed-document-node' 10 | - 'urql-introspection' 11 | src/helpers/backend/graphql.schema.json: 12 | plugins: 13 | - 'introspection' 14 | -------------------------------------------------------------------------------- /packages/codemirror-lang-graphql/rollup.config.js: -------------------------------------------------------------------------------- 1 | import typescript from "rollup-plugin-ts" 2 | import { lezer } from "@lezer/generator/rollup" 3 | 4 | export default { 5 | input: "src/index.js", 6 | external: (id) => id != "tslib" && !/^(\.?\/|\w:)/.test(id), 7 | output: [ 8 | { file: "dist/index.cjs", format: "cjs" }, 9 | { dir: "./dist", format: "es" }, 10 | ], 11 | plugins: [lezer(), typescript()], 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/lenses/rawLens.ts: -------------------------------------------------------------------------------- 1 | import { defineAsyncComponent } from "vue" 2 | import { Lens } from "./lenses" 3 | 4 | const rawLens: Lens = { 5 | lensName: "response.raw", 6 | isSupportedContentType: () => true, 7 | renderer: "raw", 8 | rendererImport: defineAsyncComponent( 9 | () => import("~/components/lenses/renderers/RawLensRenderer.vue") 10 | ), 11 | } 12 | 13 | export default rawLens 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/modules/v-focus.ts: -------------------------------------------------------------------------------- 1 | import { nextTick } from "vue" 2 | import { HoppModule } from "." 3 | 4 | /* 5 | Declares a `v-focus` directive that can be used for components 6 | to acquire focus instantly once mounted 7 | */ 8 | 9 | export default { 10 | onVueAppInit(app) { 11 | app.directive("focus", { 12 | mounted: (el) => nextTick(() => el.focus()), 13 | }) 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/options/test/delay.ts: -------------------------------------------------------------------------------- 1 | import { error } from "../../types/errors"; 2 | 3 | export function parseDelayOption(delay: string): number { 4 | const maybeInt = Number.parseInt(delay) 5 | 6 | if(!Number.isNaN(maybeInt)) { 7 | return maybeInt 8 | } else { 9 | throw error({ 10 | code: "INVALID_ARGUMENT", 11 | data: "Expected '-d, --delay' value to be number", 12 | }) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | import { ResponseErrorPair } from "../interfaces/response"; 2 | 3 | export const responseErrors: ResponseErrorPair = { 4 | 501: "REQUEST NOT SUPPORTED", 5 | 408: "NETWORK TIMEOUT", 6 | 400: "BAD REQUEST", 7 | } as const; 8 | 9 | /** 10 | * Default decimal precision to round-off calculated HRTime time in seconds. 11 | */ 12 | export const DEFAULT_DURATION_PRECISION: number = 3; 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/modules/v-focus.ts: -------------------------------------------------------------------------------- 1 | import { nextTick } from "vue" 2 | import { HoppModule } from "." 3 | 4 | /* 5 | Declares a `v-focus` directive that can be used for components 6 | to acquire focus instantly once mounted 7 | */ 8 | 9 | export default { 10 | onVueAppInit(app) { 11 | app.directive("focus", { 12 | mounted: (el) => nextTick(() => el.focus()), 13 | }) 14 | }, 15 | } 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | # Environment Variables 27 | .env 28 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/assets/icons/insomnia.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/mutations/CreateTeam.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateTeam($name: String!) { 2 | createTeam(name: $name) { 3 | id 4 | name 5 | members { 6 | membershipID 7 | role 8 | user { 9 | uid 10 | displayName 11 | email 12 | photoURL 13 | } 14 | } 15 | myRole 16 | ownersCount 17 | editorsCount 18 | viewersCount 19 | } 20 | } -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/gql/subscriptions/TeamCollectionOrderUpdated.graphql: -------------------------------------------------------------------------------- 1 | subscription TeamCollectionOrderUpdated($teamID: ID!) { 2 | collectionOrderUpdated(teamID: $teamID) { 3 | collection { 4 | id 5 | title 6 | parent { 7 | id 8 | } 9 | } 10 | nextCollection { 11 | id 12 | title 13 | parent { 14 | id 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/ProgressRing.story.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-data/src/environment/v/0.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod" 2 | import { defineVersion } from "verzod" 3 | 4 | export const V0_SCHEMA = z.object({ 5 | id: z.optional(z.string()), 6 | name: z.string(), 7 | variables: z.array( 8 | z.object({ 9 | key: z.string(), 10 | value: z.string(), 11 | }) 12 | ) 13 | }) 14 | 15 | export default defineVersion({ 16 | initial: true, 17 | schema: V0_SCHEMA 18 | }) 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/Toggle.story.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "commonjs", 5 | "outDir": ".", 6 | "rootDir": ".", 7 | "strict": true, 8 | "moduleResolution": "node", 9 | "resolveJsonModule": true, 10 | "esModuleInterop": true, 11 | "skipLibCheck": true, 12 | "forceConsistentCasingInFileNames": true, 13 | "composite": true 14 | }, 15 | "files": ["package.json"] 16 | } 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/guards/throttler-behind-proxy.guard.ts: -------------------------------------------------------------------------------- 1 | import { ThrottlerGuard } from '@nestjs/throttler'; 2 | import { Injectable } from '@nestjs/common'; 3 | 4 | @Injectable() 5 | export class ThrottlerBehindProxyGuard extends ThrottlerGuard { 6 | protected async getTracker(req: Record): Promise { 7 | return req.ips.length ? req.ips[0] : req.ip; // individualize IP extraction to meet your own needs 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/utils/uri.js: -------------------------------------------------------------------------------- 1 | export function parseUrlAndPath(value) { 2 | const result = {} 3 | try { 4 | const url = new URL(value) 5 | result.url = url.origin 6 | result.path = url.pathname 7 | } catch (e) { 8 | const uriRegex = value.match( 9 | /^((http[s]?:\/\/)?(<<[^/]+>>)?[^/]*|)(\/?.*)$/ 10 | ) 11 | result.url = uriRegex[1] 12 | result.path = uriRegex[4] 13 | } 14 | return result 15 | } 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/mutations/MoveUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation MoveUserRequest( 2 | $sourceCollectionID: ID! 3 | $requestID: ID! 4 | $destinationCollectionID: ID! 5 | $nextRequestID: ID 6 | ) { 7 | moveUserRequest( 8 | sourceCollectionID: $sourceCollectionID 9 | requestID: $requestID 10 | destinationCollectionID: $destinationCollectionID 11 | nextRequestID: $nextRequestID 12 | ) { 13 | id 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/mutations/MoveUserRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation MoveUserRequest( 2 | $sourceCollectionID: ID! 3 | $requestID: ID! 4 | $destinationCollectionID: ID! 5 | $nextRequestID: ID 6 | ) { 7 | moveUserRequest( 8 | sourceCollectionID: $sourceCollectionID 9 | requestID: $requestID 10 | destinationCollectionID: $destinationCollectionID 11 | nextRequestID: $nextRequestID 12 | ) { 13 | id 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/Button.story.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/layouts/default.vue: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/mutations/Profile.ts: -------------------------------------------------------------------------------- 1 | import { runMutation } from "../GQLClient" 2 | import { 3 | DeleteUserDocument, 4 | DeleteUserMutation, 5 | DeleteUserMutationVariables, 6 | } from "../graphql" 7 | 8 | type DeleteUserErrors = "user/not_found" 9 | 10 | export const deleteUser = () => 11 | runMutation< 12 | DeleteUserMutation, 13 | DeleteUserMutationVariables, 14 | DeleteUserErrors 15 | >(DeleteUserDocument, {}) 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/lenses/xmlLens.ts: -------------------------------------------------------------------------------- 1 | import { defineAsyncComponent } from "vue" 2 | import { Lens } from "./lenses" 3 | 4 | const xmlLens: Lens = { 5 | lensName: "response.xml", 6 | isSupportedContentType: (contentType) => /\bxml\b/i.test(contentType), 7 | renderer: "xmlres", 8 | rendererImport: defineAsyncComponent( 9 | () => import("~/components/lenses/renderers/XMLLensRenderer.vue") 10 | ), 11 | } 12 | 13 | export default xmlLens 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/decorators/gql-user.decorator.ts: -------------------------------------------------------------------------------- 1 | import { createParamDecorator, ExecutionContext } from '@nestjs/common'; 2 | import { GqlExecutionContext } from '@nestjs/graphql'; 3 | 4 | export const GqlUser = createParamDecorator( 5 | (data: unknown, context: ExecutionContext) => { 6 | const ctx = GqlExecutionContext.create(context); 7 | const { req, headers } = ctx.getContext(); 8 | return headers ? headers.user : req.user; 9 | }, 10 | ); 11 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/tsup.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "tsup"; 2 | 3 | export default defineConfig({ 4 | entry: [ "./src/index.ts" ], 5 | outDir: "./dist/", 6 | format: ["cjs"], 7 | platform: "node", 8 | sourcemap: true, 9 | bundle: true, 10 | target: "node12", 11 | skipNodeModulesBundle: false, 12 | esbuildOptions(options) { 13 | options.bundle = true 14 | }, 15 | noExternal: [ 16 | /\w+/ 17 | ], 18 | clean: true, 19 | }); 20 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/api/queries/GetRestUserHistory.graphql: -------------------------------------------------------------------------------- 1 | query GetRESTUserHistory { 2 | me { 3 | RESTHistory { 4 | id 5 | userUid 6 | reqType 7 | request 8 | responseMetadata 9 | isStarred 10 | executedOn 11 | } 12 | 13 | GQLHistory { 14 | id 15 | userUid 16 | reqType 17 | request 18 | responseMetadata 19 | isStarred 20 | executedOn 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/mutations/CreateTeam.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateTeam($userUid: ID!, $name: String!) { 2 | createTeamByAdmin(userUid: $userUid, name: $name) { 3 | id 4 | name 5 | members { 6 | membershipID 7 | role 8 | user { 9 | uid 10 | displayName 11 | email 12 | photoURL 13 | } 14 | } 15 | ownersCount 16 | editorsCount 17 | viewersCount 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/modules/i18n.ts: -------------------------------------------------------------------------------- 1 | import { createI18n } from 'vue-i18n'; 2 | import { HoppModule } from '.'; 3 | import messages from '@intlify/unplugin-vue-i18n/messages'; 4 | 5 | export default { 6 | onVueAppInit(app) { 7 | const i18n = createI18n({ 8 | locale: 'en', 9 | messages, 10 | fallbackLocale: 'en', 11 | legacy: false, 12 | allowComposition: true, 13 | }); 14 | app.use(i18n); 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/user/user.data.handler.ts: -------------------------------------------------------------------------------- 1 | import * as T from 'fp-ts/Task'; 2 | import * as TO from 'fp-ts/TaskOption'; 3 | import { AuthUser } from '../types/AuthUser'; 4 | 5 | /** 6 | * Defines how external services should handle User Data and User data related operations and actions. 7 | */ 8 | export interface UserDataHandler { 9 | canAllowUserDeletion: (user: AuthUser) => TO.TaskOption; 10 | onUserDelete: (user: AuthUser) => T.Task; 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "commonjs", 5 | "outDir": "../dist", 6 | "rootDir": ".", 7 | "strict": true, 8 | "moduleResolution": "node", 9 | "resolveJsonModule": true, 10 | "esModuleInterop": true, 11 | "skipLibCheck": true, 12 | "forceConsistentCasingInFileNames": true 13 | }, 14 | "references": [ 15 | { 16 | "path": "../" 17 | } 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/assets/icons/auth/microsoft.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-data/src/utils/record.ts: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Modify a record value with a mapping function 4 | * @param name The key to update 5 | * @param func The value to update 6 | * @returns The updated record 7 | */ 8 | export const recordUpdate = 9 | < 10 | X extends {}, 11 | K extends keyof X, 12 | R 13 | >(name: K, func: (input: X[K]) => R) => 14 | (x: X): Omit & { [x in K]: R } => ({ 15 | ...x, 16 | [name]: func(x[name]) 17 | }) 18 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/api/queries/GetRestUserHistory.graphql: -------------------------------------------------------------------------------- 1 | query GetRESTUserHistory { 2 | me { 3 | RESTHistory { 4 | id 5 | userUid 6 | reqType 7 | request 8 | responseMetadata 9 | isStarred 10 | executedOn 11 | } 12 | 13 | GQLHistory { 14 | id 15 | userUid 16 | reqType 17 | request 18 | responseMetadata 19 | isStarred 20 | executedOn 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/editorutils.ts: -------------------------------------------------------------------------------- 1 | const mimeToMode = { 2 | "text/plain": "text/x-yaml", 3 | "text/html": "htmlmixed", 4 | "application/xml": "application/xml", 5 | "application/hal+json": "application/ld+json", 6 | "application/vnd.api+json": "application/ld+json", 7 | "application/json": "application/ld+json", 8 | } 9 | 10 | export function getEditorLangForMimeType(mimeType: string): string { 11 | return mimeToMode[mimeType] || "text/x-yaml" 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/platform/tab.ts: -------------------------------------------------------------------------------- 1 | import { PersistableTabState } from "~/services/tab" 2 | import { HoppUser } from "./auth" 3 | import { HoppRESTDocument } from "~/helpers/rest/document" 4 | 5 | export type TabStatePlatformDef = { 6 | loadTabStateFromSync: () => Promise | null> 7 | writeCurrentTabState: ( 8 | user: HoppUser, 9 | persistableTabState: PersistableTabState 10 | ) => Promise 11 | } 12 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/vitest.d.ts: -------------------------------------------------------------------------------- 1 | import type { Assertion, AsymmetricMatchersContaining } from "vitest" 2 | 3 | interface CustomMatchers { 4 | toBeLeft(expected: unknown): R 5 | toBeRight(): R 6 | toEqualLeft(expected: unknown): R 7 | toSubsetEqualRight(expected: unknown): R 8 | } 9 | 10 | declare module 'vitest' { 11 | interface Assertion extends CustomMatchers {} 12 | interface AsymmetricMatchersContaining extends CustomMatchers {} 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/assets/icons/auth/microsoft.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/lenses/pdfLens.ts: -------------------------------------------------------------------------------- 1 | import { defineAsyncComponent } from "vue" 2 | import { Lens } from "./lenses" 3 | 4 | const pdfLens: Lens = { 5 | lensName: "response.pdf", 6 | isSupportedContentType: (contentType) => 7 | /\bapplication\/pdf\b/i.test(contentType), 8 | renderer: "pdfres", 9 | rendererImport: defineAsyncComponent( 10 | () => import("~/components/lenses/renderers/PDFLensRenderer.vue") 11 | ), 12 | } 13 | 14 | export default pdfLens 15 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/user/user.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { UserResolver } from './user.resolver'; 3 | import { PubSubModule } from 'src/pubsub/pubsub.module'; 4 | import { UserService } from './user.service'; 5 | import { PrismaModule } from 'src/prisma/prisma.module'; 6 | 7 | @Module({ 8 | imports: [PubSubModule, PrismaModule], 9 | providers: [UserResolver, UserService], 10 | exports: [UserService], 11 | }) 12 | export class UserModule {} 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/assets/icons/auth/email.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/assets/icons/auth/email.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/SlideOver.story.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-data/tsconfig.decl.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2017", 4 | "module": "esnext", 5 | "lib": ["esnext", "DOM"], 6 | "moduleResolution": "node", 7 | "esModuleInterop": true, 8 | "strict": true, 9 | "strictNullChecks": true, 10 | "skipLibCheck": true, 11 | "resolveJsonModule": true, 12 | "declaration": true, 13 | "emitDeclarationOnly": true, 14 | "declarationDir": "./dist" 15 | }, 16 | "include": ["src/*.ts"] 17 | } 18 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | # Sitemap 27 | .sitemap-gen 28 | 29 | # Backend Code generation 30 | src/api/generated 31 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/axiosConfig.ts: -------------------------------------------------------------------------------- 1 | import axios from 'axios'; 2 | 3 | const baseConfig = { 4 | headers: { 5 | 'Content-type': 'application/json', 6 | }, 7 | withCredentials: true, 8 | }; 9 | 10 | const gqlApi = axios.create({ 11 | ...baseConfig, 12 | baseURL: import.meta.env.VITE_BACKEND_GQL_URL, 13 | }); 14 | 15 | const restApi = axios.create({ 16 | ...baseConfig, 17 | baseURL: import.meta.env.VITE_BACKEND_API_URL, 18 | }); 19 | 20 | export { gqlApi, restApi }; 21 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/decorators/rt-cookie.decorator.ts: -------------------------------------------------------------------------------- 1 | import { createParamDecorator, ExecutionContext } from '@nestjs/common'; 2 | import { GqlExecutionContext } from '@nestjs/graphql'; 3 | 4 | /** 5 | ** Decorator to fetch refresh_token from cookie 6 | */ 7 | export const RTCookie = createParamDecorator( 8 | (data: unknown, context: ExecutionContext) => { 9 | const ctx = GqlExecutionContext.create(context); 10 | return ctx.getContext().req.cookies['refresh_token']; 11 | }, 12 | ); 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/lenses/jsonLens.ts: -------------------------------------------------------------------------------- 1 | import { defineAsyncComponent } from "vue" 2 | import { isJSONContentType } from "../utils/contenttypes" 3 | import { Lens } from "./lenses" 4 | 5 | const jsonLens: Lens = { 6 | lensName: "response.json", 7 | isSupportedContentType: isJSONContentType, 8 | renderer: "json", 9 | rendererImport: defineAsyncComponent( 10 | () => import("~/components/lenses/renderers/JSONLensRenderer.vue") 11 | ), 12 | } 13 | 14 | export default jsonLens 15 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/utils/__tests__/b64.spec.js: -------------------------------------------------------------------------------- 1 | import { describe, expect, test } from "vitest" 2 | import { decodeB64StringToArrayBuffer } from "../b64" 3 | 4 | describe("decodeB64StringToArrayBuffer", () => { 5 | test("decodes content correctly", () => { 6 | expect( 7 | decodeB64StringToArrayBuffer("aG9wcHNjb3RjaCBpcyBhd2Vzb21lIQ==") 8 | ).toEqual(Buffer.from("hoppscotch is awesome!", "utf-8").buffer) 9 | }) 10 | 11 | // TODO : More tests for binary data ? 12 | }) 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/composables/useSidebar.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue'; 2 | 3 | /** isOpen is used to indicate whether the sidebar is now visible on the screen */ 4 | const isOpen = ref(false); 5 | /** isExpanded is used to indicate whether the sidebar is now expanded to also include page names or the sidebar is compressed to show just the icons */ 6 | const isExpanded = ref(true); 7 | 8 | export function useSidebar() { 9 | return { 10 | isOpen, 11 | isExpanded, 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/guards/gql-auth.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, ExecutionContext } from '@nestjs/common'; 2 | import { GqlExecutionContext } from '@nestjs/graphql'; 3 | import { AuthGuard } from '@nestjs/passport'; 4 | 5 | @Injectable() 6 | export class GqlAuthGuard extends AuthGuard('jwt') { 7 | getRequest(context: ExecutionContext) { 8 | const ctx = GqlExecutionContext.create(context); 9 | const { req, headers } = ctx.getContext(); 10 | return headers ? headers : req; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/lenses/htmlLens.ts: -------------------------------------------------------------------------------- 1 | import { defineAsyncComponent } from "vue" 2 | import { Lens } from "./lenses" 3 | 4 | const htmlLens: Lens = { 5 | lensName: "response.html", 6 | isSupportedContentType: (contentType) => 7 | /\btext\/html|application\/xhtml\+xml\b/i.test(contentType), 8 | renderer: "htmlres", 9 | rendererImport: defineAsyncComponent( 10 | () => import("~/components/lenses/renderers/HTMLLensRenderer.vue") 11 | ), 12 | } 13 | 14 | export default htmlLens 15 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/modules/ui.ts: -------------------------------------------------------------------------------- 1 | import { HoppModule } from '.'; 2 | import { plugin as HoppUI, HoppUIPluginOptions } from '@hoppscotch/ui'; 3 | 4 | const HoppUIOptions: HoppUIPluginOptions = {}; 5 | 6 | export default { 7 | onVueAppInit(app) { 8 | // disable eslint for this line. it's a hack because there's some unknown type error 9 | // eslint-disable-next-line @typescript-eslint/ban-ts-comment 10 | // @ts-ignore 11 | app.use(HoppUI, HoppUIOptions); 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/prisma/prisma.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common'; 2 | import { PrismaClient } from '@prisma/client'; 3 | 4 | @Injectable() 5 | export class PrismaService 6 | extends PrismaClient 7 | implements OnModuleInit, OnModuleDestroy 8 | { 9 | constructor() { 10 | super(); 11 | } 12 | async onModuleInit() { 13 | await this.$connect(); 14 | } 15 | 16 | async onModuleDestroy() { 17 | await this.$disconnect(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /firebase.json: -------------------------------------------------------------------------------- 1 | { 2 | "firestore": { 3 | "rules": "firestore.rules", 4 | "indexes": "firestore.indexes.json" 5 | }, 6 | "hosting": { 7 | "predeploy": [ 8 | "mv .env.example .env && npm install -g pnpm && pnpm i && pnpm run generate" 9 | ], 10 | "public": "packages/hoppscotch-web/dist", 11 | "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], 12 | "rewrites": [ 13 | { 14 | "source": "**", 15 | "destination": "/index.html" 16 | } 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/shortcode/shortcode.model.ts: -------------------------------------------------------------------------------- 1 | import { Field, ID, ObjectType } from '@nestjs/graphql'; 2 | 3 | @ObjectType() 4 | export class Shortcode { 5 | @Field(() => ID, { 6 | description: 'The shortcode. 12 digit alphanumeric.', 7 | }) 8 | id: string; 9 | 10 | @Field({ 11 | description: 'JSON string representing the request data', 12 | }) 13 | request: string; 14 | 15 | @Field({ 16 | description: 'Timestamp of when the Shortcode was created', 17 | }) 18 | createdOn: Date; 19 | } 20 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | # Sitemap Generation Artifacts (see vite.config.ts) 27 | .sitemap-gen 28 | 29 | # Backend Code generation 30 | src/api/generated -------------------------------------------------------------------------------- /packages/hoppscotch-ui/histoire.config.ts: -------------------------------------------------------------------------------- 1 | import { HstVue } from "@histoire/plugin-vue" 2 | import { defineConfig } from "histoire" 3 | 4 | export default defineConfig({ 5 | theme: { 6 | title: "Hoppscotch Design • Hoppscotch", 7 | logo: { 8 | square: "/logo.svg", 9 | light: "/logo.svg", 10 | dark: "/logo.svg", 11 | }, 12 | logoHref: "/", 13 | favicon: "favicon.ico", 14 | }, 15 | setupFile: "histoire.setup.ts", 16 | plugins: [HstVue()], 17 | viteIgnorePlugins: ["vite:dts"], 18 | }) 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/guards/gql-throttler.guard.ts: -------------------------------------------------------------------------------- 1 | import { ExecutionContext, Injectable } from '@nestjs/common'; 2 | import { GqlExecutionContext } from '@nestjs/graphql'; 3 | import { ThrottlerGuard } from '@nestjs/throttler'; 4 | 5 | @Injectable() 6 | export class GqlThrottlerGuard extends ThrottlerGuard { 7 | getRequestResponse(context: ExecutionContext) { 8 | const gqlCtx = GqlExecutionContext.create(context); 9 | const ctx = gqlCtx.getContext(); 10 | return { req: ctx.req, res: ctx.res }; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/platform/interceptors.ts: -------------------------------------------------------------------------------- 1 | import { Service } from "dioc" 2 | import { Interceptor } from "~/services/interceptor.service" 3 | 4 | export type PlatformInterceptorDef = 5 | | { type: "standalone"; interceptor: Interceptor } 6 | | { 7 | type: "service" 8 | service: typeof Service & { ID: string } & { 9 | new (): Service & Interceptor 10 | } 11 | } 12 | 13 | export type InterceptorsPlatformDef = { 14 | default: string 15 | interceptors: PlatformInterceptorDef[] 16 | } 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/Email.ts: -------------------------------------------------------------------------------- 1 | import * as t from "io-ts" 2 | 3 | const emailRegex = 4 | /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ 5 | 6 | interface EmailBrand { 7 | readonly Email: unique symbol 8 | } 9 | 10 | export const EmailCodec = t.brand( 11 | t.string, 12 | (x): x is t.Branded => emailRegex.test(x), 13 | "Email" 14 | ) 15 | 16 | export type Email = t.TypeOf 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/types/input-types.args.ts: -------------------------------------------------------------------------------- 1 | import { ArgsType, Field, ID, InputType } from '@nestjs/graphql'; 2 | 3 | @ArgsType() 4 | @InputType() 5 | export class PaginationArgs { 6 | @Field(() => ID, { 7 | nullable: true, 8 | defaultValue: undefined, 9 | description: 'Cursor for pagination, ID of the last item in the list', 10 | }) 11 | cursor: string; 12 | 13 | @Field({ 14 | nullable: true, 15 | defaultValue: 10, 16 | description: 'Number of items to fetch', 17 | }) 18 | take: number; 19 | } 20 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/components/lenses/renderers/mixins/TextContentRendererMixin.js: -------------------------------------------------------------------------------- 1 | export default { 2 | props: { 3 | response: {}, 4 | }, 5 | computed: { 6 | responseBodyText() { 7 | if (typeof this.response.body === "string") return this.response.body 8 | else { 9 | const res = new TextDecoder("utf-8").decode(this.response.body) 10 | 11 | // HACK: Temporary trailing null character issue from the extension fix 12 | return res.replace(/\0+$/, "") 13 | } 14 | }, 15 | }, 16 | } 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/Modal.story.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/functional/files.ts: -------------------------------------------------------------------------------- 1 | import * as TO from "fp-ts/TaskOption" 2 | 3 | export const readFileAsText = (file: File) => 4 | TO.tryCatch( 5 | () => 6 | new Promise((resolve, reject) => { 7 | const reader = new FileReader() 8 | 9 | reader.onload = () => { 10 | resolve(reader.result as string) 11 | } 12 | 13 | reader.onerror = () => { 14 | reject(new Error("File err")) 15 | } 16 | 17 | reader.readAsText(file) 18 | }) 19 | ) 20 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | pnpm-lock.yaml 10 | 11 | node_modules 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | # Editor directories and files 17 | .idea 18 | .DS_Store 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | 25 | # GQL generated files 26 | src/helpers/backend/graphql.ts 27 | src/helpers/backend/graphql.schema.json 28 | 29 | # Vite Generated Files 30 | vite.config.ts.timestamp-*.js 31 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | Hoppscotch Admin 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/backend/types/Email.ts: -------------------------------------------------------------------------------- 1 | import * as t from "io-ts" 2 | 3 | const emailRegex = 4 | /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ 5 | 6 | interface EmailBrand { 7 | readonly Email: unique symbol 8 | } 9 | 10 | export const EmailCodec = t.brand( 11 | t.string, 12 | (x): x is t.Branded => emailRegex.test(x), 13 | "Email" 14 | ) 15 | 16 | export type Email = t.TypeOf 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/lenses/audioLens.ts: -------------------------------------------------------------------------------- 1 | import { defineAsyncComponent } from "vue" 2 | import { Lens } from "./lenses" 3 | 4 | const audioLens: Lens = { 5 | lensName: "response.audio", 6 | isSupportedContentType: (contentType) => 7 | /\baudio\/(?:wav|mpeg|mp4|aac|aacp|ogg|webm|x-caf|flac|mp3|)\b/i.test( 8 | contentType 9 | ), 10 | renderer: "audiores", 11 | rendererImport: defineAsyncComponent( 12 | () => import("~/components/lenses/renderers/AudioLensRenderer.vue") 13 | ), 14 | } 15 | 16 | export default audioLens 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/prod_run.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | import { execSync } from "child_process" 3 | import fs from "fs" 4 | 5 | const envFileContent = Object.entries(process.env) 6 | .filter(([env]) => env.startsWith("VITE_")) 7 | .map( 8 | ([env, val]) => 9 | `${env}=${val.startsWith('"') && val.endsWith('"') ? val : `"${val}"`}` 10 | ) 11 | .join("\n") 12 | 13 | fs.writeFileSync("build.env", envFileContent) 14 | 15 | execSync(`npx import-meta-env -x build.env -e build.env -p "/site/**/*"`) 16 | 17 | fs.rmSync("build.env") 18 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/rest/default.ts: -------------------------------------------------------------------------------- 1 | import { HoppRESTRequest, RESTReqSchemaVersion } from "@hoppscotch/data" 2 | 3 | export const getDefaultRESTRequest = (): HoppRESTRequest => ({ 4 | v: RESTReqSchemaVersion, 5 | endpoint: "https://echo.hoppscotch.io", 6 | name: "Untitled", 7 | params: [], 8 | headers: [], 9 | method: "GET", 10 | auth: { 11 | authType: "none", 12 | authActive: true, 13 | }, 14 | preRequestScript: "", 15 | testScript: "", 16 | body: { 17 | contentType: null, 18 | body: null, 19 | }, 20 | }) 21 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/prod_run.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | import { execSync } from "child_process" 3 | import fs from "fs" 4 | 5 | const envFileContent = Object.entries(process.env) 6 | .filter(([env]) => env.startsWith("VITE_")) 7 | .map(([env, val]) => `${env}=${ 8 | (val.startsWith("\"") && val.endsWith("\"")) 9 | ? val 10 | : `"${val}"` 11 | }`) 12 | .join("\n") 13 | 14 | fs.writeFileSync("build.env", envFileContent) 15 | 16 | execSync(`npx import-meta-env -x build.env -e build.env -p "/site/**/*"`) 17 | 18 | fs.rmSync("build.env") 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/admin/invited-user.model.ts: -------------------------------------------------------------------------------- 1 | import { ObjectType, ID, Field } from '@nestjs/graphql'; 2 | 3 | @ObjectType() 4 | export class InvitedUser { 5 | @Field(() => ID, { 6 | description: 'Admin UID', 7 | }) 8 | adminUid: string; 9 | 10 | @Field({ 11 | description: 'Admin email', 12 | }) 13 | adminEmail: string; 14 | 15 | @Field({ 16 | description: 'Invitee email', 17 | }) 18 | inviteeEmail: string; 19 | 20 | @Field({ 21 | description: 'Date when the user invitation was sent', 22 | }) 23 | invitedOn: Date; 24 | } 25 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/lenses/imageLens.ts: -------------------------------------------------------------------------------- 1 | import { defineAsyncComponent } from "vue" 2 | import { Lens } from "./lenses" 3 | 4 | const imageLens: Lens = { 5 | lensName: "response.image", 6 | isSupportedContentType: (contentType) => 7 | /\bimage\/(?:gif|jpeg|png|webp|bmp|svg\+xml|x-icon|vnd\.microsoft\.icon)\b/i.test( 8 | contentType 9 | ), 10 | renderer: "imageres", 11 | rendererImport: defineAsyncComponent( 12 | () => import("~/components/lenses/renderers/ImageLensRenderer.vue") 13 | ), 14 | } 15 | 16 | export default imageLens 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/types/Email.ts: -------------------------------------------------------------------------------- 1 | import * as t from 'io-ts'; 2 | 3 | interface EmailBrand { 4 | readonly Email: unique symbol; 5 | } 6 | 7 | // The validation branded type for an email 8 | export const EmailCodec = t.brand( 9 | t.string, 10 | (x): x is t.Branded => 11 | /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test( 12 | x, 13 | ), 14 | 'Email', 15 | ); 16 | 17 | export type Email = t.TypeOf; 18 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/components/app/ShortcutsEntry.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 23 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/editor/completion/index.ts: -------------------------------------------------------------------------------- 1 | export type CompletionEntry = { 2 | text: string 3 | meta: string 4 | score: number 5 | } 6 | 7 | export type CompleterResult = { 8 | /** 9 | * List of completions to display 10 | */ 11 | completions: CompletionEntry[] 12 | } 13 | 14 | export type Completer = ( 15 | /** 16 | * The contents of the editor 17 | */ 18 | text: string, 19 | /** 20 | * Position where the completer is fired 21 | */ 22 | completePos: { line: number; ch: number } 23 | ) => Promise 24 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/lenses/videoLens.ts: -------------------------------------------------------------------------------- 1 | import { defineAsyncComponent } from "vue" 2 | import { Lens } from "./lenses" 3 | 4 | const videoLens: Lens = { 5 | lensName: "response.video", 6 | isSupportedContentType: (contentType) => 7 | /\bvideo\/(?:webm|x-m4v|quicktime|x-ms-wmv|x-flv|mpeg|x-msvideo|x-ms-asf|mp4|)\b/i.test( 8 | contentType 9 | ), 10 | renderer: "videores", 11 | rendererImport: defineAsyncComponent( 12 | () => import("~/components/lenses/renderers/VideoLensRenderer.vue") 13 | ), 14 | } 15 | 16 | export default videoLens 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/migrations.ts: -------------------------------------------------------------------------------- 1 | import { settingsStore, applySetting } from "~/newstore/settings" 2 | 3 | /* 4 | * This file contains all the migrations we have to perform overtime in various (persisted) 5 | * state/store entries 6 | */ 7 | 8 | export function performMigrations(): void { 9 | // Migrate old default proxy URL to the new proxy URL (if not set / overridden) 10 | if ( 11 | settingsStore.value.PROXY_URL === "https://hoppscotch.apollosoftware.xyz/" 12 | ) { 13 | applySetting("PROXY_URL", "https://proxy.hoppscotch.io/") 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/platform/inspectors.ts: -------------------------------------------------------------------------------- 1 | import { Service } from "dioc" 2 | import { Inspector } from "~/services/inspection" 3 | 4 | /** 5 | * Defines an added interceptor by the platform 6 | */ 7 | export type PlatformInspectorsDef = { 8 | // We are keeping this as the only mode for now 9 | // So that if we choose to add other modes, we can do without breaking 10 | type: "service" 11 | service: typeof Service & { ID: string } & { 12 | new (): Service & Inspector 13 | } 14 | } 15 | 16 | export type InspectorsPlatformDef = PlatformInspectorsDef[] 17 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/ConfirmModal.story.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/gql-codegen.yml: -------------------------------------------------------------------------------- 1 | overwrite: true 2 | schema: "../../gql-gen/*.gql" 3 | generates: 4 | src/helpers/backend/graphql.ts: 5 | documents: "src/**/*.graphql" 6 | plugins: 7 | - add: 8 | content: > 9 | /* eslint-disable */ 10 | // Auto-generated file (DO NOT EDIT!!!), refer gql-codegen.yml 11 | - typescript 12 | - typescript-operations 13 | - typed-document-node 14 | - typescript-urql-graphcache 15 | 16 | src/helpers/backend/backend-schema.json: 17 | plugins: 18 | - urql-introspection 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/gql-codegen.yml: -------------------------------------------------------------------------------- 1 | overwrite: true 2 | schema: "../../gql-gen/*.gql" 3 | generates: 4 | src/api/generated/graphql.ts: 5 | documents: "src/**/*.graphql" 6 | plugins: 7 | - add: 8 | content: > 9 | /* eslint-disable */ 10 | // Auto-generated file (DO NOT EDIT!!!), refer gql-codegen.yml 11 | - typescript 12 | - typescript-operations 13 | - typed-document-node 14 | - typescript-urql-graphcache 15 | 16 | src/api/generated/backend-schema.json: 17 | plugins: 18 | - urql-introspection 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/gql-codegen.yml: -------------------------------------------------------------------------------- 1 | overwrite: true 2 | schema: "../../gql-gen/*.gql" 3 | generates: 4 | src/api/generated/graphql.ts: 5 | documents: "src/**/*.graphql" 6 | plugins: 7 | - add: 8 | content: > 9 | /* eslint-disable */ 10 | // Auto-generated file (DO NOT EDIT!!!), refer gql-codegen.yml 11 | - typescript 12 | - typescript-operations 13 | - typed-document-node 14 | - typescript-urql-graphcache 15 | 16 | src/api/generated/backend-schema.json: 17 | plugins: 18 | - urql-introspection 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/utils/clipboard.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copies a given string to the clipboard using 3 | * the legacy exec method 4 | * 5 | * @param content The content to be copied 6 | */ 7 | export function copyToClipboard(content: string) { 8 | if (navigator.clipboard) { 9 | navigator.clipboard.writeText(content) 10 | } else { 11 | const dummy = document.createElement("textarea") 12 | document.body.appendChild(dummy) 13 | dummy.value = content 14 | dummy.select() 15 | document.execCommand("copy") 16 | document.body.removeChild(dummy) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-data/src/rest/content-types.ts: -------------------------------------------------------------------------------- 1 | export const knownContentTypes = { 2 | "application/json": "json", 3 | "application/ld+json": "json", 4 | "application/hal+json": "json", 5 | "application/vnd.api+json": "json", 6 | "application/xml": "xml", 7 | "application/x-www-form-urlencoded": "multipart", 8 | "multipart/form-data": "multipart", 9 | "text/html": "html", 10 | "text/plain": "plain", 11 | } 12 | 13 | export type ValidContentTypes = keyof typeof knownContentTypes 14 | 15 | export const ValidContentTypesList = Object.keys(knownContentTypes) as ValidContentTypes[] 16 | -------------------------------------------------------------------------------- /firestore.rules: -------------------------------------------------------------------------------- 1 | service cloud.firestore { 2 | match /databases/{database}/documents { 3 | // Make sure the uid of the requesting user matches name of the user 4 | // document. The wildcard expression {userId} makes the userId variable 5 | // available in rules. 6 | match /users/{userId} { 7 | allow read, write, create, update, delete: if request.auth.uid != null && request.auth.uid == userId; 8 | } 9 | match /users/{userId}/{document=**} { 10 | allow read, write, create, update, delete: if request.auth.uid != null && request.auth.uid == userId; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/dioc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ESNext", "DOM"], 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "declaration": true, 10 | "sourceMap": true, 11 | "outDir": "dist", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "esModuleInterop": true, 15 | "noUnusedLocals": true, 16 | "noUnusedParameters": true, 17 | "noImplicitReturns": true, 18 | "skipLibCheck": true 19 | }, 20 | "include": ["lib"] 21 | } 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/admin/guards/gql-admin.guard.ts: -------------------------------------------------------------------------------- 1 | import { Injectable, ExecutionContext, CanActivate } from '@nestjs/common'; 2 | import { GqlExecutionContext } from '@nestjs/graphql'; 3 | 4 | @Injectable() 5 | export class GqlAdminGuard implements CanActivate { 6 | canActivate(context: ExecutionContext): boolean { 7 | const ctx = GqlExecutionContext.create(context); 8 | const { req, headers } = ctx.getContext(); 9 | const request = headers ? headers : req; 10 | const user = request.user; 11 | if (user.isAdmin) return true; 12 | else return false; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/functional/json.ts: -------------------------------------------------------------------------------- 1 | import * as O from "fp-ts/Option" 2 | import { flow } from "fp-ts/function" 3 | 4 | /** 5 | * Checks and Parses JSON string 6 | * @param str Raw JSON data to be parsed 7 | * @returns Option type with some(JSON data) or none 8 | */ 9 | export const safeParseJSON = (str: string): O.Option => 10 | O.tryCatch(() => JSON.parse(str)) 11 | 12 | /** 13 | * Checks if given string is a JSON string 14 | * @param str Raw string to be checked 15 | * @returns If string is a JSON string 16 | */ 17 | export const isJSON = flow(safeParseJSON, O.isSome) 18 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/typeutils.ts: -------------------------------------------------------------------------------- 1 | export type FieldEquals = { 2 | // eslint-disable-next-line 3 | [_x in K]: Vals[number] 4 | } 5 | 6 | export const objectFieldIncludes = < 7 | T, 8 | K extends keyof T, 9 | V extends readonly T[K][], 10 | >( 11 | obj: T, 12 | field: K, 13 | values: V 14 | // eslint-disable-next-line 15 | ): obj is T & { [_x in K]: V[number] } => values.includes(obj[field]) 16 | 17 | export const valueIncludes = ( 18 | obj: T, 19 | values: V 20 | ): obj is V[number] => values.includes(obj) 21 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/modules/head.ts: -------------------------------------------------------------------------------- 1 | import { createHead, useHead } from "@vueuse/head" 2 | import { APP_INFO } from "~/../meta" 3 | import { HoppModule } from "." 4 | 5 | export default { 6 | onVueAppInit(app) { 7 | const head = createHead({ 8 | title: `${APP_INFO.name} • ${APP_INFO.shortDescription}`, 9 | titleTemplate(title) { 10 | return title === "Hoppscotch" ? title : `${title} • Hoppscotch` 11 | }, 12 | }) 13 | 14 | app.use(head) 15 | }, 16 | 17 | onRootSetup() { 18 | // Load the defaults into the app 19 | useHead({}) 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/Dockerfile: -------------------------------------------------------------------------------- 1 | # Initial stage, just build the app 2 | FROM node:lts as builder 3 | 4 | WORKDIR /usr/src/app 5 | 6 | RUN npm i -g pnpm 7 | 8 | COPY . . 9 | RUN pnpm install --force --frozen-lockfile 10 | 11 | WORKDIR /usr/src/app/packages/hoppscotch-sh-admin/ 12 | RUN pnpm run build 13 | 14 | 15 | # Final stage, take the build artifacts and package it into a static Caddy server 16 | FROM caddy:2-alpine 17 | WORKDIR /site 18 | COPY packages/hoppscotch-sh-admin/Caddyfile /etc/caddy/Caddyfile 19 | COPY --from=builder /usr/src/app/packages/hoppscotch-sh-admin/dist/ . 20 | 21 | EXPOSE 8080 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/mailer/MailDescriptions.ts: -------------------------------------------------------------------------------- 1 | export type MailDescription = { 2 | template: 'team-invitation'; 3 | variables: { 4 | invitee: string; 5 | invite_team_name: string; 6 | action_url: string; 7 | }; 8 | }; 9 | 10 | export type UserMagicLinkMailDescription = { 11 | template: 'user-invitation'; 12 | variables: { 13 | inviteeEmail: string; 14 | magicLink: string; 15 | }; 16 | }; 17 | 18 | export type AdminUserInvitationMailDescription = { 19 | template: 'user-invitation'; 20 | variables: { 21 | inviteeEmail: string; 22 | magicLink: string; 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/Dockerfile: -------------------------------------------------------------------------------- 1 | # Initial stage, just build the app 2 | FROM node:lts as builder 3 | 4 | WORKDIR /usr/src/app 5 | 6 | RUN npm i -g pnpm 7 | 8 | COPY . . 9 | RUN pnpm install --force --frozen-lockfile 10 | 11 | WORKDIR /usr/src/app/packages/hoppscotch-selfhost-web/ 12 | RUN pnpm run build 13 | 14 | 15 | # Final stage, take the build artifacts and package it into a static Caddy server 16 | FROM caddy:2-alpine 17 | WORKDIR /site 18 | COPY packages/hoppscotch-selfhost-web/Caddyfile /etc/caddy/Caddyfile 19 | COPY --from=builder /usr/src/app/packages/hoppscotch-selfhost-web/dist/ . 20 | 21 | EXPOSE 8080 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 23 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/import-export/export/index.ts: -------------------------------------------------------------------------------- 1 | import * as TE from "fp-ts/TaskEither" 2 | import { HoppRESTRequest, HoppCollection } from "@hoppscotch/data" 3 | 4 | export type HoppExporter = (content: T) => TE.TaskEither 5 | 6 | export type HoppExporterDefinition = { 7 | name: string 8 | exporter: () => Promise> 9 | } 10 | 11 | export const RESTCollectionExporters: HoppExporterDefinition< 12 | HoppCollection 13 | >[] = [ 14 | { 15 | name: "Hoppscotch REST Collection JSON", 16 | exporter: () => import("./hopp").then((m) => m.default), 17 | }, 18 | ] 19 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/components/teams/Modal.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 31 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/functional/debug.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Logs the current value and returns the same value 3 | * @param x The value to log 4 | * @returns The parameter `x` passed to this 5 | */ 6 | export const trace = (x: T) => { 7 | console.log(x) 8 | return x 9 | } 10 | 11 | /** 12 | * Logs the annotated current value and returns the same value 13 | * @param name The name of the log 14 | * @curried_param `x` The value to log 15 | * @returns The parameter `x` passed to this 16 | */ 17 | export const namedTrace = 18 | (name: string) => 19 | (x: T) => { 20 | console.log(`${name}:`, x) 21 | return x 22 | } 23 | -------------------------------------------------------------------------------- /packages/hoppscotch-data/src/graphql/v/1.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod" 2 | import { defineVersion } from "verzod" 3 | 4 | export const GQLHeader = z.object({ 5 | key: z.string().catch(""), 6 | value: z.string().catch(""), 7 | active: z.boolean().catch(true) 8 | }) 9 | 10 | export type GQLHeader = z.infer 11 | 12 | export const V1_SCHEMA = z.object({ 13 | v: z.literal(1), 14 | name: z.string(), 15 | url: z.string(), 16 | headers: z.array(GQLHeader).catch([]), 17 | query: z.string(), 18 | variables: z.string(), 19 | }) 20 | 21 | export default defineVersion({ 22 | initial: true, 23 | schema: V1_SCHEMA 24 | }) 25 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/components/app/Announcement.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 23 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/user-collection/user-collection.module.ts: -------------------------------------------------------------------------------- 1 | import { Module } from '@nestjs/common'; 2 | import { UserCollectionService } from './user-collection.service'; 3 | import { UserCollectionResolver } from './user-collection.resolver'; 4 | import { PrismaModule } from 'src/prisma/prisma.module'; 5 | import { UserModule } from 'src/user/user.module'; 6 | import { PubSubModule } from 'src/pubsub/pubsub.module'; 7 | 8 | @Module({ 9 | imports: [PrismaModule, UserModule, PubSubModule], 10 | providers: [UserCollectionService, UserCollectionResolver], 11 | exports: [UserCollectionService], 12 | }) 13 | export class UserCollectionModule {} 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/__tests__/functions/checks/isHoppCLIError.spec.ts: -------------------------------------------------------------------------------- 1 | import { isHoppCLIError } from "../../../utils/checks"; 2 | 3 | describe("isHoppCLIError", () => { 4 | test("NULL error value.", () => { 5 | expect(isHoppCLIError(null)).toBeFalsy(); 6 | }); 7 | 8 | test("Non-existing code property.", () => { 9 | expect(isHoppCLIError({ name: "name" })).toBeFalsy(); 10 | }); 11 | 12 | test("Invalid code value.", () => { 13 | expect(isHoppCLIError({ code: 2 })).toBeFalsy(); 14 | }); 15 | 16 | test("Valid code value.", () => { 17 | expect(isHoppCLIError({ code: "TEST_SCRIPT_ERROR" })).toBeTruthy(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/assets/icons/auth/github.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/editor/linting/json.ts: -------------------------------------------------------------------------------- 1 | import { convertIndexToLineCh } from "../utils" 2 | import { LinterDefinition, LinterResult } from "./linter" 3 | import jsonParse from "~/helpers/jsonParse" 4 | 5 | const linter: LinterDefinition = (text) => { 6 | try { 7 | jsonParse(text) 8 | return Promise.resolve([]) 9 | } catch (e: any) { 10 | return Promise.resolve([ 11 | { 12 | from: convertIndexToLineCh(text, e.start), 13 | to: convertIndexToLineCh(text, e.end), 14 | message: e.message, 15 | severity: "error", 16 | }, 17 | ]) 18 | } 19 | } 20 | 21 | export default linter 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/assets/icons/auth/github.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/Link.story.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 21 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/src/team-invitation/input-type.args.ts: -------------------------------------------------------------------------------- 1 | import { ArgsType, Field, ID } from '@nestjs/graphql'; 2 | import { TeamMemberRole } from 'src/team/team.model'; 3 | 4 | @ArgsType() 5 | export class CreateTeamInvitationArgs { 6 | @Field(() => ID, { 7 | name: 'teamID', 8 | description: 'ID of the Team ID to invite from', 9 | }) 10 | teamID: string; 11 | 12 | @Field({ name: 'inviteeEmail', description: 'Email of the user to invite' }) 13 | inviteeEmail: string; 14 | 15 | @Field(() => TeamMemberRole, { 16 | name: 'inviteeRole', 17 | description: 'Role to be given to the user', 18 | }) 19 | inviteeRole: TeamMemberRole; 20 | } 21 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/collection/affectedIndex.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Get the indexes that are affected by the reorder 3 | * @param from index of the item before reorder 4 | * @param to index of the item after reorder 5 | * @returns Map of from to to 6 | */ 7 | 8 | export function getAffectedIndexes(from: number, to: number) { 9 | const indexes = new Map() 10 | indexes.set(from, to) 11 | if (from < to) { 12 | for (let i = from + 1; i <= to; i++) { 13 | indexes.set(i, i - 1) 14 | } 15 | } else { 16 | for (let i = from - 1; i >= to; i--) { 17 | indexes.set(i, i + 1) 18 | } 19 | } 20 | return indexes 21 | } 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/utils/debounce.js: -------------------------------------------------------------------------------- 1 | // Debounce is a higher order function which makes its enclosed function be executed 2 | // only if the function wasn't called again till 'delay' time has passed, this helps reduce impact of heavy working 3 | // functions which might be called frequently 4 | // NOTE : Don't use lambda functions as this doesn't get bound properly in them, use the 'function (args) {}' format 5 | const debounce = (func, delay) => { 6 | let inDebounce 7 | return function (...args) { 8 | clearTimeout(inDebounce) 9 | inDebounce = setTimeout(() => func.apply(this, args), delay) 10 | } 11 | } 12 | 13 | export default debounce 14 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-web/src/platform/settings/settings.sync.ts: -------------------------------------------------------------------------------- 1 | import { settingsStore } from "@hoppscotch/common/newstore/settings" 2 | 3 | import { getSyncInitFunction } from "../../lib/sync" 4 | 5 | import { StoreSyncDefinitionOf } from "../../lib/sync" 6 | 7 | import { updateUserSettings } from "./settings.api" 8 | 9 | export const settingsSyncDefinition: StoreSyncDefinitionOf< 10 | typeof settingsStore 11 | > = { 12 | applySetting() { 13 | updateUserSettings(JSON.stringify(settingsStore.value)) 14 | }, 15 | } 16 | 17 | export const settingsSyncer = getSyncInitFunction( 18 | settingsStore, 19 | settingsSyncDefinition, 20 | () => true 21 | ) 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/helpers/backend/gql/queries/TeamInfo.graphql: -------------------------------------------------------------------------------- 1 | query TeamInfo($teamID: ID!) { 2 | admin { 3 | teamInfo(teamID: $teamID) { 4 | id 5 | name 6 | 7 | teamMembers { 8 | membershipID 9 | role 10 | user { 11 | uid 12 | displayName 13 | email 14 | photoURL 15 | } 16 | } 17 | teamInvitations { 18 | id 19 | inviteeEmail 20 | inviteeRole 21 | } 22 | teamEnvironments { 23 | id 24 | name 25 | } 26 | ownersCount 27 | editorsCount 28 | viewersCount 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /packages/hoppscotch-selfhost-desktop/src/platform/settings/settings.sync.ts: -------------------------------------------------------------------------------- 1 | import { settingsStore } from "@hoppscotch/common/newstore/settings" 2 | 3 | import { getSyncInitFunction } from "../../lib/sync" 4 | 5 | import { StoreSyncDefinitionOf } from "../../lib/sync" 6 | 7 | import { updateUserSettings } from "./settings.api" 8 | 9 | export const settingsSyncDefinition: StoreSyncDefinitionOf< 10 | typeof settingsStore 11 | > = { 12 | applySetting() { 13 | updateUserSettings(JSON.stringify(settingsStore.value)) 14 | }, 15 | } 16 | 17 | export const settingsSyncer = getSyncInitFunction( 18 | settingsStore, 19 | settingsSyncDefinition, 20 | () => true 21 | ) 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | # Environment Variables 27 | .env 28 | 29 | # Backend Code generation 30 | src/helpers/backend/graphql.ts 31 | src/helpers/backend/backend-schema.json 32 | 33 | # vite-plugin-pages-sitemap generates its files in the public directory 34 | public/robots.txt 35 | public/sitemap.xml 36 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/app/index.ts: -------------------------------------------------------------------------------- 1 | import { platform } from "~/platform" 2 | 3 | let initialized = false 4 | 5 | export function initializeApp() { 6 | if (!initialized) { 7 | try { 8 | platform.auth.performAuthInit() 9 | platform.sync.settings.initSettingsSync() 10 | platform.sync.collections.initCollectionsSync() 11 | platform.sync.history.initHistorySync() 12 | platform.sync.environments.initEnvironmentsSync() 13 | platform.analytics?.initAnalytics() 14 | 15 | initialized = true 16 | } catch (e) { 17 | // initializeApp throws exception if we reinitialize 18 | initialized = true 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-cli/src/__tests__/functions/checks/isHoppErrnoException.spec.ts: -------------------------------------------------------------------------------- 1 | import { isHoppErrnoException } from "../../../utils/checks"; 2 | 3 | describe("isHoppErrnoException", () => { 4 | test("NULL exception value.", () => { 5 | expect(isHoppErrnoException(null)).toBeFalsy(); 6 | }); 7 | 8 | test("Non-existing name property.", () => { 9 | expect(isHoppErrnoException({ what: "what" })).toBeFalsy(); 10 | }); 11 | 12 | test("Invalid name value.", () => { 13 | expect(isHoppErrnoException({ name: 3 })).toBeFalsy(); 14 | }); 15 | 16 | test("Valid name value.", () => { 17 | expect(isHoppErrnoException({ name: "name" })).toBeTruthy(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/src/components/app/Toast.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 29 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/.gitignore: -------------------------------------------------------------------------------- 1 | # compiled output 2 | /dist 3 | /node_modules 4 | 5 | .vscode 6 | 7 | .env 8 | 9 | 10 | # Logs 11 | logs 12 | *.log 13 | npm-debug.log* 14 | pnpm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | lerna-debug.log* 18 | 19 | # OS 20 | .DS_Store 21 | 22 | # Tests 23 | /coverage 24 | /.nyc_output 25 | 26 | # IDEs and editors 27 | /.idea 28 | .project 29 | .classpath 30 | .c9/ 31 | *.launch 32 | .settings/ 33 | *.sublime-workspace 34 | 35 | # IDE - VSCode 36 | .vscode/* 37 | !.vscode/settings.json 38 | !.vscode/tasks.json 39 | !.vscode/launch.json 40 | !.vscode/extensions.json 41 | 42 | # Generated artifacts (GQL Schema SDL generation etc.) 43 | gen/ 44 | -------------------------------------------------------------------------------- /packages/hoppscotch-backend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": true, 5 | "removeComments": true, 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "allowSyntheticDefaultImports": true, 9 | "target": "es2017", 10 | "sourceMap": true, 11 | "outDir": "./dist", 12 | "baseUrl": "./", 13 | "incremental": true, 14 | "skipLibCheck": true, 15 | "strict": false, 16 | "strictNullChecks": false, 17 | "noImplicitAny": false, 18 | "strictBindCallApply": false, 19 | "forceConsistentCasingInFileNames": false, 20 | "noFallthroughCasesInSwitch": true, 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/Radio.story.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 23 | -------------------------------------------------------------------------------- /packages/hoppscotch-ui/src/stories/Tab.story.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 22 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/assets/icons/auth/google.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 16 | 20 | 24 | 25 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/import-export/import/importers.ts: -------------------------------------------------------------------------------- 1 | import HoppRESTCollImporter from "./hopp" 2 | import OpenAPIImporter from "./openapi" 3 | import PostmanImporter from "./postman" 4 | import InsomniaImporter from "./insomnia" 5 | import GistImporter from "./gist" 6 | import MyCollectionsImporter from "./myCollections" 7 | 8 | export const RESTCollectionImporters = [ 9 | HoppRESTCollImporter, 10 | OpenAPIImporter, 11 | PostmanImporter, 12 | InsomniaImporter, 13 | GistImporter, 14 | MyCollectionsImporter, 15 | ] as const 16 | 17 | export const URLImporters = [ 18 | HoppRESTCollImporter, 19 | OpenAPIImporter, 20 | PostmanImporter, 21 | InsomniaImporter, 22 | ] as const 23 | -------------------------------------------------------------------------------- /packages/hoppscotch-common/src/helpers/preRequest.ts: -------------------------------------------------------------------------------- 1 | import { runPreRequestScript } from "@hoppscotch/js-sandbox" 2 | import { Environment } from "@hoppscotch/data" 3 | import { cloneDeep } from "lodash-es" 4 | import { 5 | getCurrentEnvironment, 6 | getGlobalVariables, 7 | } from "~/newstore/environments" 8 | 9 | export const getCombinedEnvVariables = () => ({ 10 | global: cloneDeep(getGlobalVariables()), 11 | selected: cloneDeep(getCurrentEnvironment().variables), 12 | }) 13 | 14 | export const getFinalEnvsFromPreRequest = ( 15 | script: string, 16 | envs: { 17 | global: Environment["variables"] 18 | selected: Environment["variables"] 19 | } 20 | ) => runPreRequestScript(script, envs) 21 | -------------------------------------------------------------------------------- /packages/hoppscotch-sh-admin/assets/icons/auth/google.svg: -------------------------------------------------------------------------------- 1 | 7 | 8 | 12 | 16 | 20 | 24 | 25 | --------------------------------------------------------------------------------