A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository.
$ pnpm install
# development
$ pnpm run start
# watch mode
$ pnpm run start:dev
$ pnpm run prisma:migrate:reset
$ pnpm run prisma:migrate:deploy
$ pnpm run prisma:seed
The application runs on http://localhost:3000/
.
The available routes are:
- Query Params:
offset
(number
) - The page numberlimit
(number
) - The number of items per pagefromId
(number
) - The id of the last item in the previous page. Can not be used withoffset
sortBy
(object
) - An object with the keys being the fields from the medspa object and the values being the sort order (asc or desc)- Example:
'sortBy[name]=asc&sortBy[id]=desc'
- Example:
- Return Body: Array of:
id
(number
) - ID of the medspaname
(string
) - Name of the Medspa- addresses (array of objects) - List of addresses associated to this Medspa:
id
(string
) - Address IDaddressLine1
(string
) - Address Line 1addressLine2
(string
|null
) - Address Line 2addressLine3
(string
|null
) - Address Line 3addressLine4
(string
|null
) - Address Line 4number
(string
|null
) - Building numbersublocality
(string
|null
) - Smaller locality entry, such as neighborhood or blocklocality
(string
|null
) - City, town, vilage, etcadministrativeArea
(string
|null
) - State, County, province, etc.postalCode
(string
) - Postal (zip) coderegionCode
(string
) - 2-character string of the country (Example: US)createdAt
(Date
) - When the Address was createdupdatedAt
(Date
) - Last time the Address was updateddeletedAt
(Date
|null
) - Whether (and when) the Address was deleted
- contacts (array of objects) - List of contacts associated to this Medspa:
id
(string
) - ID of the contactcontactType
(PHONE_NUMBER
|EMAIL
) - Type of the contactvalue
(string
) - The value associated to this contact.- Example: The contact type as
EMAIL
, and the value asjohn.doe@example.com
- Example: The contact type as
createdAt
(Date
) - When the contact was createdupdatedAt
(Date
) - Last time the contact was updateddeletedAt
(Date
|null
) - Whether (and when) the contact was deleted
createdAt
(Date
) - When the Medspa was createdupdatedAt
(Date
) - Last time the Medspa was updateddeletedAt
(Date
|null
) - Whether (and when) the Medspa was deleted
- Route Params:
:id
- ID of the medspa
- Return Body:
id
(number
) - ID of the medspaname
(string
) - Name of the MedspacreatedAt
(Date
) - When the Medspa was createdupdatedAt
(Date
) - Last time the Medspa was updateddeletedAt
(Date
|null
) - Whether (and when) the med spa was deleted
- Route Params:
:medspaId
- ID of the medspa
- Query Params:
offset
(number
) - The page numberlimit
(number
) - The number of items per pagefromId
(number
) - The id of the last item in the previous page. Can not be used withoffset
sortBy
(object
) - An object with the keys being the fields from the medspa object and the values being the sort order (asc or desc)
- Return Body: Array of:
id
(number
) - ID of the servicename
(string
) - Name of the servicedescription
(string |null
) - description of the serviceprice
(number
) - how much the service costsduration
(number
) - duration (in seconds) of the service sessionmedSpaId
(number
) - ID of the parent MedSpacreatedAt
(Date
) - When the service was createdupdatedAt
(Date
) - Last time the service was updateddeletedAt
(Date
|null
) - Whether (and when) the service was deleted
- Route Params:
:medspaId
- ID of the medspa:serviceId
- ID of the service
- Return Body:
id
(number
) - ID of the servicename
(string
) - Name of the servicedescription
(string |null
) - description of the serviceprice
(number
) - how much the service costsduration
(number
) - duration (in seconds) of the service sessionmedSpaId
(number
) - ID of the parent MedSpacreatedAt
(Date
) - When the service was createdupdatedAt
(Date
) - Last time the service was updateddeletedAt
(Date
|null
) - Whether (and when) the service was deleted
- Route Params:
:medspaId
- ID of the medspa
- Request Body:
name
(string
) - Name of the servicedescription
(string, optional) - description of the serviceprice
(number
) - how much the service costsduration
(number
) - duration (in seconds) of the service session
- Return Body:
id
(number
) - ID of the servicename
(string
) - Name of the servicedescription
(string |null
) - description of the serviceprice
(number
) - how much the service costsduration
(number
) - duration (in seconds) of the service sessionmedSpaId
(number
) - ID of the parent MedSpacreatedAt
(Date
) - When the service was createdupdatedAt
(Date
) - Last time the service was updateddeletedAt
(Date
|null
) - Whether (and when) the service was deleted
- Route Params:
:medspaId
- ID of the medspa:serviceId
- ID of the service
- Request Body:
name
(string
, optional) - Name of the servicedescription
(string
, optional) - description of the serviceprice
(number
, optional) - how much the service costsduration
(number
, optional) - duration (in seconds) of the service session
- Return Body:
id
(number
) - ID of the servicename
(string
) - Name of the servicedescription
(string |null
) - description of the serviceprice
(number
) - how much the service costsduration
(number
) - duration (in seconds) of the service sessionmedSpaId
(number
) - ID of the parent MedSpacreatedAt
(Date
) - When the service was createdupdatedAt
(Date
) - Last time the service was updateddeletedAt
(Date
|null
) - Whether (and when) the service was deleted
- Route Params:
:medspaId
- ID of the medspa:serviceId
- ID of the service
- Return Body:
Empty
- Route Params:
:medspaId
- ID of the medspa
- Query Params:
offset
(number
) - The page numberlimit
(number
) - The number of items per pagefromId
(number
) - The id of the last item in the previous page. Can not be used withoffset
sortBy
(object
) - An object with the keys being the fields from the medspa object and the values being the sort order (asc or desc)status
('SCHEDULED'
|'COMPLETED'
|'CANCELLED'
) - filter the appointments by the status
- Return Body: Array of:
id
(number
) - ID of the appointmentmedSpaId
(number
) - ID of the parent MedSpastartTime
(Date
) - When this appointment startstotalPrice
(number
) - how much all services in this appointment coststotalDuration
(number
) - total duration (in seconds) of the aggregate of services in this appointmentstatus
('SCHEDULED'
|'COMPLETED'
|'CANCELLED'
) - status of the appointmentservices
(array of objects) - An array of services to be executed in this appointment:id
(number
) - ID of the servicename
(string
) - name of the serviceprice
(number
) - how much the service costsduration
(number
) - duration (in seconds) of the service session
createdAt
(Date
) - When the appointment was createdupdatedAt
(Date
) - Last time the appointment was updateddeletedAt
(Date
|null
) - Whether (and when) the appointment was deleted
- Route Params:
:medspaId
- ID of the medspa:appointmentId
- ID of the appointment
- Return Body:
id
(number
) - ID of the appointmentmedSpaId
(number
) - ID of the parent MedSpastartTime
(Date
) - When this appointment startstotalPrice
(number
) - how much all services in this appointment coststotalDuration
(number
) - total duration (in seconds) of the aggregate of services in this appointmentstatus
('SCHEDULED'
|'COMPLETED'
|'CANCELLED'
) - status of the appointmentservices
(array of objects) - An array of services to be executed in this appointment:id
(number
) - ID of the servicename
(string
) - name of the serviceprice
(number
) - how much the service costsduration
(number
) - duration (in seconds) of the service session
createdAt
(Date
) - When the appointment was createdupdatedAt
(Date
) - Last time the appointment was updateddeleted
(Date
|null
) - Whether (and when) the appointment was deleted
- Route Params:
:medspaId
- ID of the medspa
- Request Body:
start
(Date
) - When the appointment should startservices
(array of objects) - List of services to be associated with this appointmentserviceId
(number
) - The ID of the service
- Return Body:
id
(number
) - ID of the appointmentmedSpaId
(number
) - ID of the parent MedSpastartTime
(Date
) - When this appointment startstotalPrice
(number
) - how much all services in this appointment coststotalDuration
(number
) - total duration (in seconds) of the aggregate of services in this appointmentstatus
('SCHEDULED'
|'COMPLETED'
|'CANCELLED'
) - status of the appointmentservices
(array of objects) - An array of services to be executed in this appointment:id
(number
) - ID of the servicename
(string
) - name of the serviceprice
(number
) - how much the service costsduration
(number
) - duration (in seconds) of the service session
createdAt
(Date
) - When the appointment was createdupdatedAt
(Date
) - Last time the appointment was updateddeleted
(Date
|null
) - Whether (and when) the appointment was deleted
- Route Params:
:medspaId
- ID of the medspa:appointmentId
- ID of the appointment
- Request Body:
start
(Date
, optional) - When the appointment should startstatus
('COMPLETED'
|'CANCELLED'
, optional) - Change the status of the appointment
- Return Body:
id
(number
) - ID of the appointmentmedSpaId
(number
) - ID of the parent MedSpastartTime
(Date
) - When this appointment startstotalPrice
(number
) - how much all services in this appointment coststotalDuration
(number
) - total duration (in seconds) of the aggregate of services in this appointmentstatus
('SCHEDULED'
|'COMPLETED'
|'CANCELLED'
) - status of the appointmentservices
(array of objects) - An array of services to be executed in this appointment:id
(number
) - ID of the servicename
(string
) - name of the serviceprice
(number
) - how much the service costsduration
(number
) - duration (in seconds) of the service session
createdAt
(Date
) - When the appointment was createdupdatedAt
(Date
) - Last time the appointment was updateddeleted
(Date
|null
) - Whether (and when) the appointment was deleted