Untitled
unknown
plain_text
a year ago
33 kB
4
Indexable
// destinations /** * @openapi * /v1/destinations: * post: * summary: Create a new destination * description: Create a new destination with the provided details. * tags: [Destinations] * requestBody: * required: true * content: * application/json: * schema: * type: object * required: * - country * - city * - description * - hasChalets * - hasVillas * - hasApartments * properties: * country: * type: string * description: The country of the destination. * city: * type: string * description: The city of the destination. * description: * type: string * description: A brief description of the destination. * image: * type: object * properties: * url: * type: string * description: The URL of the destination's image. * hasChalets: * type: boolean * description: Whether the destination has chalets or not. * hasVillas: * type: boolean * description: Whether the destination has villas or not. * hasApartments: * type: boolean * description: Whether the destination has apartments or not. * responses: * '201': * description: Destination created successfully. * '400': * description: Bad Request - Invalid destination data provided. * '401': * description: Unauthorized - User does not have permission to create a destination. * '500': * description: Internal Server Error - An error occurred while processing the request. * * get: * summary: Display destinations * description: Retrieve a list of destinations based on optional query parameters. * tags: [Destinations] * parameters: * - in: query * name: hasChalets * schema: * type: boolean * description: Filter destinations by whether they have chalets or not. * - in: query * name: hasVillas * schema: * type: boolean * description: Filter destinations by whether they have villas or not. * - in: query * name: hasApartments * schema: * type: boolean * description: Filter destinations by whether they have apartments or not. * - in: query * name: page * schema: * type: integer * description: The page number for pagination. * - in: query * name: itemsPerPage * schema: * type: integer * description: The number of items per page for pagination. * responses: * '200': * description: Destinations retrieved successfully. * '400': * description: Bad Request - Invalid query parameters. * '401': * description: Unauthorized - Missing or invalid authentication token. * '403': * description: Forbidden - User does not have permission to view destinations. * '500': * description: Internal Server Error - An error occurred while processing the request. * /v1/destinations/{slug}: * put: * summary: Edit a destination * description: Edit an existing destination with the provided details. * tags: [Destinations] * parameters: * - in: path * name: slug * required: true * description: Unique slug identifier for the destination to be edited. * schema: * type: string * requestBody: * required: true * content: * application/json: * schema: * type: object * properties: * country: * type: string * description: The updated country of the destination. * city: * type: string * description: The updated city of the destination. * description: * type: string * description: The updated description of the destination. * image: * type: object * properties: * url: * type: string * description: The updated URL of the destination's image. * hasChalets: * type: boolean * description: Whether the destination has chalets after the update. * hasVillas: * type: boolean * description: Whether the destination has villas after the update. * hasApartments: * type: boolean * description: Whether the destination has apartments after the update. * responses: * '200': * description: Destination updated successfully. * '400': * description: Bad Request - Invalid input data. * '401': * description: Unauthorized - Missing or invalid authentication token. * '404': * description: Not Found - Destination not found. * '500': * description: Internal Server Error - An error occurred while processing the request. * /v1/destinations/approve/{slug}/{approvalRequestId}: * put: * summary: Approve or reject destination edit * description: Approve or reject an edit request for a destination. * tags: [Destinations] * parameters: * - in: path * name: slug * required: true * description: Unique slug identifier for the destination. * schema: * type: string * - in: path * name: approvalRequestId * required: true * description: Unique identifier for the approval request. * schema: * type: string * requestBody: * required: true * content: * application/json: * schema: * type: object * properties: * isApproved: * type: boolean * description: Indicates whether the edit request is approved or rejected. * responses: * '200': * description: Edit request approved or rejected successfully. * '400': * description: Bad Request - Invalid input data. * '401': * description: Unauthorized - Missing or invalid authentication token. * '404': * description: Not Found - Destination not found. * '500': * description: Internal Server Error - An error occurred while processing the request. */ // amenities /** * @openapi * /v1/accommodations/amenity: * post: * summary: Add an amenity * description: Add a new amenity with the provided details. * tags: [Amenities] * requestBody: * required: true * content: * application/json: * schema: * type: object * required: * - title * - category * properties: * title: * type: string * description: The title of the amenity. * category: * type: string * enum: * - WELLNESS * - SECURITY_AND_PRIVACY * - INTERIOR_COMFORT * - TECHNOLOGY_AND_ENTERTAINMENT * - OUTDOOR_SPACES * - LOCATIONS * - SPACIAL * description: The category of the amenity. * responses: * '201': * description: Amenity added successfully. * '400': * description: Bad Request - Invalid input data. * '401': * description: Unauthorized - Missing or invalid authentication token. * '409': * description: Conflict - Amenity title already exists. * '500': * description: Internal Server Error - An error occurred while processing the request. * * get: * summary: Display all amenities * description: Retrieve a list of all amenities. * tags: [Amenities] * responses: * '200': * description: Amenities retrieved successfully. * '401': * description: Unauthorized - Missing or invalid authentication token. * '500': * description: Internal Server Error - An error occurred while processing the request. */ // facilities /** * @openapi * /v1/accommodations/facility: * post: * summary: Add a facility * description: Add a new facility with the provided details. * tags: [Facilities] * requestBody: * required: true * content: * application/json: * schema: * type: object * required: * - title * - category * properties: * title: * type: string * description: The title of the facility. * category: * type: string * enum: * - BEDROOM * - LIVING_ROOM * - KITCHEN * - BATHROOM * - DINING_ROOM * - OTHER_ROOM * - OTHER_AREA * - OUTDOOR_AREA * - WELLNESS * - ENTERTAINMENT * description: The category of the facility. * responses: * '201': * description: Facility added successfully. * '400': * description: Bad Request - Invalid input data. * '401': * description: Unauthorized - Missing or invalid authentication token. * '409': * description: Conflict - Facility already exists. * '500': * description: Internal Server Error - An error occurred while processing the request. * * get: * summary: Display all facilities * description: Retrieve a list of all facilities. * tags: [Facilities] * responses: * '200': * description: Facilities retrieved successfully. * '401': * description: Unauthorized - Missing or invalid authentication token. * '500': * description: Internal Server Error - An error occurred while processing the request. */ // accommodations /** * @openapi * /v1/accommodations: * post: * summary: Create a new accommodation * description: Create a new accommodation with the provided details. * tags: [Accommodations] * requestBody: * required: true * content: * application/json: * schema: * type: object * properties: * name: * type: string * description: The name of the accommodation. * type: * type: string * enum: * - APARTMENT * - VILLA * - CHALET * - HOUSE * description: The type of the accommodation. * location: * type: string * example: * "662b666ffe92a1509d35e97c" * description: The ID of the destination where the accommodation is located. * detailedLocation: * type: string * description: Detailed location information of the accommodation. * geoLocation: * type: object * properties: * latitude: * type: number * description: The latitude coordinate of the accommodation. * longitude: * type: number * description: The longitude coordinate of the accommodation. * country: * type: string * description: The country of the accommodation. * city: * type: string * description: The city of the accommodation. * label: * type: string * description: The label of the accommodation. * address: * type: string * description: The address of the accommodation. * guestsCount: * type: number * minimum: 1 * description: The number of guests the accommodation can accommodate. * childrenCount: * type: number * description: The number of children the accommodation can accommodate. * bedroomsCount: * type: number * minimum: 1 * description: The number of bedrooms in the accommodation. * bathroomsCount: * type: number * minimum: 1 * description: The number of bathrooms in the accommodation. * surfaceArea: * type: object * properties: * value: * type: number * description: The surface area value. * unit: * type: string * enum: * - M2 * - FT2 * description: The unit of the surface area (e.g., "m²"). * policies: * type: array * items: * type: string * description: Array of policies associated with the accommodation. * amenities: * type: array * items: * type: string * example: * ["6630c6525822a11909f9a193"] * description: Array of amenity IDs associated with the accommodation. * prices: * type: array * items: * type: object * properties: * from: * type: string * format: date-time * description: The start date for the price range. * to: * type: string * format: date-time * description: The end date for the price range. * price: * type: number * description: The price for the accommodation during the specified period. * currency: * type: object * properties: * label: * type: string * description: The label of the currency. * code: * type: string * description: The code of the currency (e.g., "EUR"). * symbol: * type: string * description: The symbol of the currency (e.g., "€"). * priceUnit: * type: string * enum: * - WEEK * - DAY * description: The unit of the price (e.g., "WEEK"). * priceType: * type: string * enum: * - NET_PRICE * - GROSS_PRICE * description: The type of the price (e.g., "NET_PRICE"). * isAvailable: * type: boolean * description: Indicates whether the accommodation is available during the specified period. * description: Array of price ranges associated with the accommodation. * layouts: * type: array * items: * type: object * properties: * title: * type: string * description: The name of the layout. * order: * type: number * description: The order of the layout. * image: * type: string * description: The URL of the image for the layout. * facilities: * type: array * items: * type: string * example: * ["662b6bbec6f1500452e30520"] * description: Array of facility IDs associated with the layout. * description: Array of layouts associated with the accommodation. * description: * type: string * description: Description of the accommodation. * nearbyLocations: * type: array * items: * type: string * description: Array of nearby locations to the accommodation. * categories: * type: array * items: * type: string * enum: * - WITH_SWIMMING_POOL * - SKI_IN_SKI_OUT * - WITH_SAUNA * - WITH_STEAM_ROOM * - WITH_Cinema * - NEAR_DOWNTOWN * - FOR_SHARING * - CATERED * - FAMILY * - MOUNTAIN_VIEW * - PET_FRIENDLY * description: Array of categories associated with the accommodation. * seasons: * type: array * items: * type: string * enum: * - SUMMER * - WINTER * description: Array of seasons associated with the accommodation. * services: * type: array * items: * type: string * enum: * - SELF_CATERED * - BED_AND_BREAKFAST * - CATERED * - HALF_BOARD * description: Array of services associated with the accommodation. * responses: * '201': * description: Accommodation created successfully. * '400': * description: Bad Request - Invalid input data. * '401': * description: Unauthorized - Missing or invalid authentication token. * '409': * description: Conflict - Accommodation already exists. * '500': * description: Internal Server Error - An error occurred while processing the request. * * * get: * summary: Display all accommodations * description: Retrieve a list of all accommodations based on optional query parameters. * tags: [Accommodations] * parameters: * - in: query * name: from * schema: * type: string * format: date-time * description: The start date for filtering by price range. * - in: query * name: to * schema: * type: string * format: date-time * description: The end date for filtering by price range. * - in: query * name: category * schema: * type: string * enum: * - WITH_SWIMMING_POOL * - SKI_IN_SKI_OUT * - WITH_SAUNA * - WITH_STEAM_ROOM * - WITH_Cinema * - NEAR_DOWNTOWN * - FOR_SHARING * - CATERED * - FAMILY * - MOUNTAIN_VIEW * - PET_FRIENDLY * description: The category for filtering accommodations. * - in: query * name: season * schema: * type: string * enum: * - SUMMER * - WINTER * description: The season for filtering accommodations. * - in: query * name: services * schema: * type: string * description: The services for filtering accommodations. * - in: query * name: type * schema: * type: string * description: The type of accommodation. * - in: query * name: guestsCountMin * schema: * type: integer * description: The minimum number of guests the accommodation can accommodate. * - in: query * name: guestsCountMax * schema: * type: integer * description: The maximum number of guests the accommodation can accommodate. * - in: query * name: childrenCountMin * schema: * type: integer * description: The minimum number of children the accommodation can accommodate. * - in: query * name: childrenCountMax * schema: * type: integer * description: The maximum number of children the accommodation can accommodate. * - in: query * name: bedroomsCountMin * schema: * type: integer * description: The minimum number of bedrooms in the accommodation. * - in: query * name: bedroomsCountMax * schema: * type: integer * description: The maximum number of bedrooms in the accommodation. * - in: query * name: bathroomsCountMin * schema: * type: integer * description: The minimum number of bathrooms in the accommodation. * - in: query * name: bathroomsCountMax * schema: * type: integer * description: The maximum number of bathrooms in the accommodation. * - in: query * name: priceMin * schema: * type: integer * description: The minimum price for the accommodation. * - in: query * name: priceMax * schema: * type: integer * description: The maximum price for the accommodation. * - in: query * name: countries * schema: * type: string * description: The countries where the accommodations are located. * - in: query * name: cities * schema: * type: string * description: The cities where the accommodations are located. * - in: query * name: locations * schema: * type: string * description: The locations where the accommodations are located. * - in: query * name: amenities * schema: * type: string * description: The amenities provided by the accommodations. * - in: query * name: facilities * schema: * type: string * description: The facilities provided by the accommodations. * - in: query * name: page * schema: * type: integer * description: The page number for pagination. * - in: query * name: itemsPerPage * schema: * type: integer * description: The number of items per page for pagination. * responses: * '200': * description: Accommodations retrieved successfully. * '401': * description: Unauthorized - Missing or invalid authentication token. * '500': * description: Internal Server Error - An error occurred while processing the request. * /v1/accommodations/{slug}: * put: * summary: Edit an accommodation * description: Edit an existing accommodation with the provided slug. * tags: [Accommodations] * parameters: * - in: path * name: slug * required: true * description: The slug of the accommodation to be edited. * schema: * type: string * requestBody: * required: true * content: * application/json: * schema: * type: object * properties: * description: * type: string * description: The new description of the accommodation. * guestsCount: * type: integer * minimum: 1 * description: The new count of guests the accommodation can accommodate. * childrenCount: * type: integer * description: The new count of children the accommodation can accommodate. * bedroomsCount: * type: integer * minimum: 1 * description: The new count of bedrooms in the accommodation. * bathroomsCount: * type: integer * minimum: 1 * description: The new count of bathrooms in the accommodation. * surfaceArea: * type: object * properties: * value: * type: number * format: double * unit: * type: string * enum: * - M2 * - FT2 * description: The new surface area of the accommodation. * policies: * type: array * items: * type: string * description: The new policies of the accommodation. * prices: * type: array * items: * type: object * properties: * price: * type: number * format: double * currency: * type: object * properties: * label: * type: string * code: * type: string * symbol: * type: string * priceUnit: * type: string * enum: * - DAY * - HOUR * - WEEK * - MONTH * priceType: * type: string * enum: * - GROSS_PRICE * - NET_PRICE * isAvailable: * type: boolean * description: The new prices for the accommodation. * layouts: * type: array * items: * type: object * properties: * title: * type: string * description: The title of the layout. * order: * type: integer * format: int32 * description: The order of the layout. * image: * type: string * format: uri * description: The URL of the image for the layout. * description: The new layouts of the accommodation. * nearbyLocations: * type: array * items: * type: string * description: The new nearby locations of the accommodation. * categories: * type: array * items: * type: string * enum: * - WITH_SWIMMING_POOL * - SKI_IN_SKI_OUT * - WITH_SAUNA' * - WITH_STEAM_ROOM * - WITH_CINEMA * - NEAR_DOWNTOWN * - FOR_SHARING * - CATERED * - FAMILY * - MOUNTAIN_VIEW * - PET_FRIENDLY * description: The new categories of the accommodation. * seasons: * type: array * items: * type: string * enum: * - SUMMER * - WINTER * description: The new seasons of the accommodation. * services: * type: array * items: * type: string * enum: [ 'SELF_CATERED', 'SERVICE_2', 'SERVICE_3' ] * description: The new services provided by the accommodation. * oldId: * type: string * description: The old ID of the accommodation. * responses: * '200': * description: Accommodation updated successfully. * '400': * description: Bad Request - Invalid input data. * '401': * description: Unauthorized - Missing or invalid authentication token. * '404': * description: Not Found - Accommodation not found. * '500': * description: Internal Server Error - An error occurred while processing the request. * * * * /v1/accommodations/approve/{slug}/{approvalRequestId}: * put: * summary: Approve or reject an accommodation edit * description: Approve or reject a pending edit request for the specified accommodation. * tags: [Accommodations] * parameters: * - in: path * name: slug * required: true * description: The slug of the accommodation for which the edit request is made. * schema: * type: string * - in: path * name: approvalRequestId * required: true * description: The ID of the approval request to be approved or rejected. * schema: * type: string * requestBody: * required: true * content: * application/json: * schema: * type: object * properties: * isApproved: * type: boolean * description: Whether the edit request is approved or not. * responses: * '200': * description: Accommodation edit request approved or rejected successfully. * '400': * description: Bad Request - Invalid input data. * '401': * description: Unauthorized - Missing or invalid authentication token. * '404': * description: Not Found - Accommodation or approval request not found. * '500': * description: Internal Server Error - An error occurred while processing the request. */
Editor is loading...
Leave a Comment