- More about backend architecture and design
- Express.js error handling and logging layers
- Zod schema validation and type inference
- Better TypeScript typing of Express entities
- TS utilities like
Omit
andPartial
-
POST
/cards
- headers:
x-api-key
- body:
employeeId: number, type: enum
- headers:
-
POST
/cards/:id/activate
- body:
cvc: string, password: string
-
POST
/cards/:id/recharge
- headers:
x-api-key
- body:
amount: number
- headers:
-
POST
/cards/:id/block
- body:
password: string
-
POST
/cards/:id/unblock
- body:
password: string
-
POST
/cards/virtual
- body:
id: number, password: string
-
GET
/cards/:id/balance
-
DELETE
/cards/:id
- body:
id: number, password: string
-
POST
/purchase
- body:
cardId: number password: string businessId: number amount: number
-
POST
/purchase/online
- body:
cardId: number number: string name: string expirationDate: string securityCode: string businessId: number amount: number