{
  "openapi": "3.1.1",
  "info": {
    "title": "yostay-api | v1",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.yostay.id/"
    }
  ],
  "paths": {
    "/api/Account/Login": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/Register": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegisterDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/Edit": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EditUserDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EditUserDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EditUserDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/GetList": {
      "post": {
        "tags": [
          "Account"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetAccountListRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/GetAccountListRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/GetAccountListRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/Delete": {
      "delete": {
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "targetId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Account/GetAvailableRoles": {
      "post": {
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Channel/Airbnb/ConnectionLink": {
      "post": {
        "tags": [
          "Channel/Airbnb"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAirbnbConnectionLinkDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAirbnbConnectionLinkDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAirbnbConnectionLinkDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Channel/Airbnb/Callback": {
      "get": {
        "tags": [
          "Channel/Airbnb"
        ],
        "parameters": [
          {
            "name": "success",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "channel_id",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Channel/Airbnb/Get": {
      "get": {
        "tags": [
          "Channel/Airbnb"
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Channel/Airbnb/GetListings": {
      "get": {
        "tags": [
          "Channel/Airbnb"
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Channel/Airbnb/Import": {
      "post": {
        "tags": [
          "Channel/Airbnb"
        ],
        "parameters": [
          {
            "name": "channelId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/api/Channel/Property/GetList": {
      "get": {
        "tags": [
          "Channel/Property"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "CreateAirbnbConnectionLinkDto": {
        "type": "object",
        "properties": {
          "propertyIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "channelId": {
            "type": [
              "null",
              "string"
            ]
          },
          "token": {
            "type": [
              "null",
              "string"
            ]
          },
          "title": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EditUserDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "null",
              "string"
            ]
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "profilePicturePath": {
            "type": [
              "null",
              "string"
            ]
          },
          "roles": {
            "$ref": "#/components/schemas/RegisterRoleDto"
          },
          "isActive": {
            "type": "boolean"
          },
          "newPassword": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "GetAccountListRequest": {
        "type": "object",
        "properties": {
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "skip": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "take": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "filter": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "LoginRequest": {
        "type": "object",
        "properties": {
          "userName": {
            "type": [
              "null",
              "string"
            ]
          },
          "password": {
            "type": [
              "null",
              "string"
            ]
          },
          "rememberMe": {
            "type": "boolean"
          }
        }
      },
      "RegisterDto": {
        "type": "object",
        "properties": {
          "userName": {
            "type": [
              "null",
              "string"
            ]
          },
          "password": {
            "type": [
              "null",
              "string"
            ]
          },
          "confirmPassword": {
            "type": [
              "null",
              "string"
            ]
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "profilePicturePath": {
            "type": [
              "null",
              "string"
            ]
          },
          "roles": {
            "$ref": "#/components/schemas/RegisterRoleDto"
          }
        }
      },
      "RegisterRoleDto": {
        "type": "object",
        "properties": {
          "superAdmin": {
            "type": "boolean"
          },
          "host": {
            "type": "boolean"
          },
          "coHost": {
            "type": "boolean"
          },
          "finance": {
            "type": "boolean"
          },
          "cleaner": {
            "type": "boolean"
          }
        }
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT Authorization header using the Bearer scheme.",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "tags": [
    {
      "name": "Account",
      "x-displayName": "Account"
    },
    {
      "name": "Channel/Airbnb",
      "x-displayName": "Airbnb"
    },
    {
      "name": "Channel/Property",
      "x-displayName": "Property"
    }
  ],
  "x-tagGroups": [
    {
      "name": "API",
      "tags": [
        "Account"
      ]
    },
    {
      "name": "Channel",
      "tags": [
        "Channel/Airbnb",
        "Channel/Property"
      ]
    }
  ]
}