-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(schema, api-client): Migrate auth types to @keyshade/schema #532
Conversation
…tion tests - Add schemas for auth - Update workspace deleteResponse schema to have void type and add a test for it. - Export types with T prefixed for auth and workspace
…precated index.types - Import new auth schema types from keyshade/schema - Import existing workspace and pagination types from @keyshade/schema - Remove existing index.types and auth.types from api-client
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
The test is failing. Did you try to implement the fix you talked about? Rest looks good. |
Yeah, the fix is almost done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the changes LGTM
## [2.8.0](v2.7.0...v2.8.0) (2024-12-03) ### 🚀 Features * **api:** Add workspace removal notification email template ([#476](#476)) ([40b754f](40b754f)) * **cli:** Store `metrics_enabled` key in profile config ([#536](#536)) ([9283b22](9283b22)) * **package, api, cli:** Add api-key schemas and types; Fix schema inconsistencies; Minor fix for CLI build errors ([#557](#557)) ([126d024](126d024)) * **platform:** Added screen for CREATE NEW PROJECT ([#540](#540)) ([b644633](b644633)) * **platform:** Updated the empty state of dashboard ([#522](#522)) ([28739d9](28739d9)) * **schema, api-client:** Migrate auth types to @keyshade/schema ([#532](#532)) ([d880098](d880098)) * **schema, api-client:** Migrate event schemas and types to @keyshade/schema ([#546](#546)) ([a3267de](a3267de)) * **schema, api-client:** Migrate integration schemas and types to @keyshade/schema ([#547](#547)) ([08868c3](08868c3)) * **schema, api-client:** Migrate project schemas and environment schemas along with their types to @keyshade/schema ([#538](#538)) ([c468af0](c468af0)) * **schema, api-client:** Migrate [secure] types and schemas to @keyshade/schema ([#539](#539)) ([bc3100b](bc3100b)) * **schema, api-client:** Migrate user types and schemas to @keyshade/schema ([#535](#535)) ([c24695e](c24695e)) * **schema, api-client:** Migrate variable schemas and types to @keyshade/schema ([#545](#545)) ([0ee8f9a](0ee8f9a)) * **schema, api-client:** Migrate workspace-membership schemas and types to @keyshade/schema ([#569](#569)) ([4398969](4398969)) * **schema, api-client:** Migrate workspace-role schemas and types to @keyshade/schema ([#568](#568)) ([9efbf2d](9efbf2d)) * **schema:** Add User type inference from UserSchema ([#574](#574)) ([84c1db5](84c1db5)) ### 🐛 Bug Fixes * **api:** Incorrect oauth redirect url ([58d96e5](58d96e5)) * **platform:** Resolve loading SVG blocking input field interaction ([#571](#571)) ([30f4f65](30f4f65)) ### 📚 Documentation * Add pictures to Bruno setup ([#541](#541)) ([210c0fd](210c0fd)) * Migrate to Bruno ([#525](#525)) ([1793d92](1793d92)) ### 🔧 Miscellaneous Chores * **ci:** Add script to validate schema package ([59e4280](59e4280)) * Fixed codecov client version ([a998ae4](a998ae4)) * **package:** Fixed tests and did housekeeping ([#544](#544)) ([40008e3](40008e3)) * Update test coverage settings ([5b27e32](5b27e32)) * Update Turbo to 2.3.1 ([#564](#564)) ([3a63823](3a63823)) * **web:** Update dockerfile ([10d9cc5](10d9cc5)) ### 🔨 Code Refactoring * **api-client, schema:** Add workspace's schemas and types in @keyshade/schema ([#520](#520)) ([7c8ee5d](7c8ee5d))
User description
Description
@keyshade/schema
:auth
,workspace
andpagination
fromindex.types.ts
.index.types.d.ts
toindex.types.ts
due to typescript ignoring .d.ts.@keyshade/api-client
:tsconfig
for external module imports.Related to #519
Dependencies
Mention any dependencies/packages used
Future Improvements
Mention any improvements to be done in future related to any file/feature
Mentions
Mention and tag the people
Screenshots of relevant screens
Add screenshots of relevant screens
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
enhancement, tests
Description
@keyshade/schema
and updated all relevant imports in theapi-client
package.ResendOTPRequestSchema
andResendOTPResponseSchema
in theschema
package using zod.api-client
and replaced them with imports from@keyshade/schema
.z.void()
forDeleteWorkspaceResponseSchema
and addedid
fields to various response schemas.Changes walkthrough 📝
19 files
auth.ts
Update auth controller to use schema package
packages/api-client/src/controllers/auth.ts
@keyshade/schema
forResendOTPRequest
andResendOTPResponse
.@api-client/types
.environment.ts
Update environment controller to use schema package
packages/api-client/src/controllers/environment.ts
ClientResponse
to use@keyshade/schema
.event.ts
Update event controller to use schema package
packages/api-client/src/controllers/event.ts
ClientResponse
to use@keyshade/schema
.integration.ts
Update integration controller to use schema package
packages/api-client/src/controllers/integration.ts
ClientResponse
to use@keyshade/schema
.project.ts
Update project controller to use schema package
packages/api-client/src/controllers/project.ts
ClientResponse
to use@keyshade/schema
.secret.ts
Update secret controller to use schema package
packages/api-client/src/controllers/secret.ts
ClientResponse
to use@keyshade/schema
.user.ts
Update user controller to use schema package
packages/api-client/src/controllers/user.ts
ClientResponse
to use@keyshade/schema
.variable.ts
Update variable controller to use schema package
packages/api-client/src/controllers/variable.ts
ClientResponse
to use@keyshade/schema
.workspace-membership.ts
Update workspace membership controller to use schema package
packages/api-client/src/controllers/workspace-membership.ts
ClientResponse
to use@keyshade/schema
.workspace-role.ts
Update workspace role controller to use schema package
packages/api-client/src/controllers/workspace-role.ts
ClientResponse
to use@keyshade/schema
.pagination-parser.ts
Update pagination parser to use schema package
packages/api-client/src/core/pagination-parser.ts
PageRequest
to use@keyshade/schema
.response-parser.ts
Update response parser to use schema package
packages/api-client/src/core/response-parser.ts
ClientResponse
andResponseError
to use@keyshade/schema
.auth.types.ts
Remove deprecated auth types
packages/api-client/src/types/auth.types.ts
ResendOTPRequest
andResendOTPResponse
interfaces.index.types.ts
Remove deprecated index types
packages/api-client/src/types/index.types.ts
@keyshade/schema
.auth.ts
Add auth schemas using zod
packages/schema/src/auth/auth.ts
ResendOTPRequestSchema
andResendOTPResponseSchema
using zod.auth.types.ts
Add auth type exports
packages/schema/src/auth/auth.types.ts
ResendOTPRequest
andResendOTPResponse
.index.ts
Export auth schemas and types
packages/schema/src/index.ts
index.types.d.ts
Add T-prefixed type exports for auth and workspace
packages/schema/src/index.types.d.ts
workspace.ts
Update workspace schemas and add id fields
packages/schema/src/workspace/workspace.ts
DeleteWorkspaceResponseSchema
to usez.void()
.id
field to various response schemas.2 files
auth.spec.ts
Add tests for auth schemas
packages/schema/tests/auth.spec.ts
ResendOTPRequestSchema
andResendOTPResponseSchema
.workspace.spec.ts
Add test for workspace delete response schema
packages/schema/tests/workspace.spec.ts
DeleteWorkspaceResponseSchema
.