Skip to content

feat: add auth and courses response DTO types - #6

Closed
TomikeDS wants to merge 2 commits into
mainfrom
feat/2-move-dto-types
Closed

TomikeDS wants to merge 2 commits into
mainfrom
feat/2-move-dto-types

Conversation

@TomikeDS

@TomikeDS TomikeDS commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

What

Moves backend response DTO types for auth and courses into the shared package as framework-agnostic TypeScript interfaces.

Auth types (src/auth/types.ts)

Response types: AuthResponse, RefreshTokenResponse, LogoutResponse, ForgotPasswordResponse, ResetPasswordResponse
Request types: RegisterRequest, LoginRequest, RefreshTokenRequest, LogoutRequest, ForgotPasswordRequest, ResetPasswordRequest

Course types (src/courses/types.ts)

Response types: CourseResponse, EnrollmentStatusResponse, CourseRegistrationResponse, EnrolledCourseResponse
Request types: CreateCourseRequest, UpdateCourseRequest, CourseFilterRequest

Verification

  • npm run lint (tsc --noEmit) passes
  • npm run build (tsup) produces CJS + ESM + DTS for all three entry points

Depends on PR #5 (scaffold).

Closes #2

- package.json with @weacademy/bytechain-shared, tsup build, exports map
  (root, ./auth, ./courses), and public publish config
- tsup.config.ts with cjs+esm+dts output for all three entry points
- tsconfig.json with strict mode and bundler module resolution
- src/index.ts, src/auth/index.ts, src/courses/index.ts entry points
- .github/workflows/ci.yml (type check, build, test)
- .gitignore

Closes #1
Move backend response DTO types into the shared package:

Auth types (src/auth/types.ts):
- AuthResponse, RefreshTokenResponse, LogoutResponse, ForgotPasswordResponse,
  ResetPasswordResponse
- Request DTOs: RegisterRequest, LoginRequest, RefreshTokenRequest,
  LogoutRequest, ForgotPasswordRequest, ResetPasswordRequest

Course types (src/courses/types.ts):
- CourseResponse, EnrollmentStatusResponse, CourseRegistrationResponse,
  EnrolledCourseResponse
- Request DTOs: CreateCourseRequest, UpdateCourseRequest, CourseFilterRequest

Both modules now re-export from index.ts for clean imports.

Closes #2
@TomikeDS

TomikeDS commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Closing: the linked issue is not assigned to the PR author. Please get the issue assigned before opening a PR.

@TomikeDS TomikeDS closed this Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move backend response DTO types for auth and courses into the package

2 participants