Skip to content
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

PACKAGE: Update schema package to contain all the zod types #519

Closed
12 tasks done
rajdip-b opened this issue Nov 5, 2024 · 3 comments
Closed
12 tasks done

PACKAGE: Update schema package to contain all the zod types #519

rajdip-b opened this issue Nov 5, 2024 · 3 comments
Assignees
Labels
difficulty: 4 priority: urgent scope: api-client scope: schema type: chore Release drafter tag for tagging PRs related to making patches to general code

Comments

@rajdip-b
Copy link
Member

rajdip-b commented Nov 5, 2024

Description

The schema package is meant to be used by all the other apps and packages. We would like it to have the type definitions and the zod schemas.

The api-client is currently holding the request and response types. We would like to move them out to schema package.

Solution

For every module, we would like to do this:

  • Create a folder with the module name in schema. For example environment, project, etc.
  • Add 2 files in here: modulename.ts and modulename.types.ts.
  • modulename.ts would have the following zod schemas: the module base type, all request types, all response types.
  • modulename.types.ts would be exporting the inferred types
  • The top level index.ts file would be exporting everything.
  • Update api-client package to use the types from schema.

Tasks

Here are the modules which we need to work on:

@rajdip-b
Copy link
Member Author

@muntaxir4 thanks for the prompt work!

@rajdip-b
Copy link
Member Author

@muntaxir4 updated the details

@rajdip-b rajdip-b reopened this Nov 22, 2024
@muntaxir4
Copy link
Contributor

@muntaxir4 thanks for the prompt work!

My pleasure. I will try to implement the 3 more schemas from today onwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: 4 priority: urgent scope: api-client scope: schema type: chore Release drafter tag for tagging PRs related to making patches to general code
Projects
None yet
Development

No branches or pull requests

2 participants