POST http://dev-cleanfy.cozystay.com/graphql/

GraphQL requests

99 HTTP queries on GraphQL endpoint(s)

Refresh with latest query
200 June 11, 2026 08:39 schema: default 752cd5
# Time Info
1 475 ms
query GetDashboard(...) {
dashboard(...)
}
200 June 11, 2026 08:39 schema: default 515433
# Time Info
1 737 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 08:39 schema: default 2b7fd0
# Time Info
1 1461 ms
query GetDashboard(...) {
dashboard(...)
}
200 June 11, 2026 08:17 schema: default e19e58
# Time Info
1 375 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 08:17 schema: default a7cee5
# Time Info
1 149 ms
query GetUnassignedPropertyCount(...) {
unassignedPropertyCount(...)
}
200 June 11, 2026 07:59 schema: default a8df1d
# Time Info
1 693 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 07:57 schema: default 47e24b
# Time Info
1 307 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 07:57 schema: default d1ddff
# Time Info
1 167 ms
query GetUnassignedPropertyCount(...) {
unassignedPropertyCount(...)
}
200 June 11, 2026 07:54 schema: default 0e3e1c
# Time Info
1 610 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 07:54 schema: default fa359f
# Time Info
1 700 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 07:53 schema: default fc13c4
# Time Info
1 247 ms
query GetPropertyById(...) {
property_by_id(...)
}
200 June 11, 2026 07:52 schema: default fc33d0
# Time Info
1 288 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 07:52 schema: default 97c579
# Time Info
1 107 ms
query GetUnassignedPropertyCount(...) {
unassignedPropertyCount(...)
}
200 June 11, 2026 07:51 schema: default df6589
# Time Info
1 2060 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 07:49 schema: default f1944f
# Time Info
1 205 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 07:49 schema: default e01ac6
# Time Info
1 148 ms
query GetUnassignedPropertyCount(...) {
unassignedPropertyCount(...)
}
200 June 11, 2026 07:49 schema: default 5e7916
# Time Info
1 367 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 07:49 schema: default a5dc53
# Time Info
1 284 ms
query GetPropertyCities(...) {
propertyCities(...)
}
200 June 11, 2026 07:01 schema: default d6e1aa
# Time Info
1 594 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 07:01 schema: default ffea16
# Time Info
1 1615 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 06:55 schema: default 26654b
# Time Info
1 570 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:46 schema: default df014a
# Time Info
1 1789 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:46 schema: default b35a10
# Time Info
1 1983 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:27 schema: default 3278c9
# Time Info
1 1422 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:27 schema: default 5b7da7
# Time Info
1 321 ms
mutation UpdateTaskNote(...) {
update_task_note(...)
}
200 June 11, 2026 06:27 schema: default f9ac5e
# Time Info
1 1471 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:27 schema: default a8c4a0
# Time Info
1 504 ms
mutation AddTaskNote(...) {
add_task_note(...)
}
200 June 11, 2026 06:27 schema: default 394503
# Time Info
1 1523 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:26 schema: default 06e048
# Time Info
1 18408 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 06:25 schema: default 3c06e9
# Time Info
1 1071 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 06:25 schema: default 28c73a
# Time Info
1 20210 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 06:07 schema: default cc109b
# Time Info
1 420 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:06 schema: default 9fc2e6
# Time Info
1 217 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 06:06 schema: default f6c7b3
# Time Info
1 339 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 06:06 schema: default 1f7179
# Time Info
1 385 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 06:06 schema: default 05e9c6
# Time Info
1 295 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 06:06 schema: default ae92ce
# Time Info
1 343 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 06:06 schema: default 5701b2
# Time Info
1 395 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 06:06 schema: default 65401d
# Time Info
1 441 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 06:04 schema: default 4ce256
# Time Info
1 549 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:04 schema: default 6386f7
# Time Info
1 656 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 06:03 schema: default 4bdde5
# Time Info
1 548 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:03 schema: default f82e3b
# Time Info
1 634 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 06:03 schema: default ddecb8
# Time Info
1 388 ms
mutation CancelTask(...) {
cancel_task(...)
}
200 June 11, 2026 06:03 schema: default 8a394f
# Time Info
1 449 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 06:03 schema: default bfe073
# Time Info
1 636 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 06:03 schema: default 6665a7
# Time Info
1 469 ms
query GetDashboard(...) {
dashboard(...)
}
200 June 11, 2026 06:03 schema: default d4be62
# Time Info
1 671 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 06:03 schema: default aabf65
# Time Info
1 750 ms
query GetDashboard(...) {
dashboard(...)
}
200 June 11, 2026 06:03 schema: default 910c76
# Time Info
1 459 ms
query GetTaskById(...) {
task_by_id(...)
}
Variables:
[
  "id" => 103924
]
query GetTaskById($id: Int!) {
  task_by_id(id: $id) {
    __typename
    ... on CheckInTask {
      id
      status
      priority
      todoDate
      inspectionStatus
      createdAt
      startedAt
      completedAt
      cancelledAt
      inspectedAt
      assignee {
        id
        email
        fullName
        __typename
      }
      completedBy {
        id
        fullName
        __typename
      }
      inspectedBy {
        id
        fullName
        __typename
      }
      property {
        id
        nickname
        address
        numberOfBeds
        numberOfBathrooms
        __typename
      }
      reservation {
        id
        checkInDate
        checkOutDate
        customerName
        guestCount
        platformCode
        platformOrderId
        confirmationCode
        __typename
      }
      company {
        id
        companyName
        __typename
      }
      photos {
        id
        fileName
        category
        passed
        signedUrl
        __typename
      }
      checklistItems {
        id
        title
        key
        isRequired
        requiresPhoto
        passed
        sortOrder
        photos {
          id
          fileName
          category
          signedUrl
          __typename
        }
        __typename
      }
      issues {
        id
        code
        description
        status
        createdAt
        __typename
      }
      taskNotes {
        id
        content
        createdAt
        createdBy {
          id
          fullName
          __typename
        }
        __typename
      }
      auditLogs {
        id
        action
        createdAt
        newValue
        oldValue
        metadata
        note {
          id
          content
          __typename
        }
        performedBy {
          id
          fullName
          __typename
        }
        __typename
      }
      __typename
    }
    ... on DepartureCleaningTask {
      id
      status
      priority
      todoDate
      inspectionStatus
      createdAt
      startedAt
      completedAt
      cancelledAt
      inspectedAt
      assignee {
        id
        email
        fullName
        __typename
      }
      completedBy {
        id
        fullName
        __typename
      }
      inspectedBy {
        id
        fullName
        __typename
      }
      property {
        id
        nickname
        address
        numberOfBeds
        numberOfBathrooms
        __typename
      }
      reservation {
        id
        checkInDate
        checkOutDate
        customerName
        guestCount
        platformCode
        platformOrderId
        confirmationCode
        __typename
      }
      company {
        id
        companyName
        __typename
      }
      photos {
        id
        fileName
        category
        passed
        signedUrl
        __typename
      }
      checklistItems {
        id
        title
        key
        isRequired
        requiresPhoto
        passed
        sortOrder
        photos {
          id
          fileName
          category
          signedUrl
          __typename
        }
        __typename
      }
      issues {
        id
        code
        description
        status
        createdAt
        __typename
      }
      taskNotes {
        id
        content
        createdAt
        createdBy {
          id
          fullName
          __typename
        }
        __typename
      }
      auditLogs {
        id
        action
        createdAt
        newValue
        oldValue
        metadata
        note {
          id
          content
          __typename
        }
        performedBy {
          id
          fullName
          __typename
        }
        __typename
      }
      __typename
    }
    ... on MaintenanceTask {
      id
      status
      priority
      todoDate
      inspectionStatus
      createdAt
      startedAt
      completedAt
      cancelledAt
      inspectedAt
      assignee {
        id
        email
        fullName
        __typename
      }
      completedBy {
        id
        fullName
        __typename
      }
      inspectedBy {
        id
        fullName
        __typename
      }
      property {
        id
        nickname
        address
        numberOfBeds
        numberOfBathrooms
        __typename
      }
      reservation {
        id
        checkInDate
        checkOutDate
        customerName
        guestCount
        platformCode
        platformOrderId
        confirmationCode
        __typename
      }
      company {
        id
        companyName
        __typename
      }
      photos {
        id
        fileName
        category
        passed
        signedUrl
        __typename
      }
      checklistItems {
        id
        title
        key
        isRequired
        requiresPhoto
        passed
        sortOrder
        photos {
          id
          fileName
          category
          signedUrl
          __typename
        }
        __typename
      }
      issues {
        id
        code
        description
        status
        createdAt
        __typename
      }
      taskNotes {
        id
        content
        createdAt
        createdBy {
          id
          fullName
          __typename
        }
        __typename
      }
      auditLogs {
        id
        action
        createdAt
        newValue
        oldValue
        metadata
        note {
          id
          content
          __typename
        }
        performedBy {
          id
          fullName
          __typename
        }
        __typename
      }
      __typename
    }
    ... on OneTimeCleaningTask {
      id
      status
      priority
      todoDate
      inspectionStatus
      createdAt
      startedAt
      completedAt
      cancelledAt
      inspectedAt
      assignee {
        id
        email
        fullName
        __typename
      }
      completedBy {
        id
        fullName
        __typename
      }
      inspectedBy {
        id
        fullName
        __typename
      }
      property {
        id
        nickname
        address
        numberOfBeds
        numberOfBathrooms
        __typename
      }
      reservation {
        id
        checkInDate
        checkOutDate
        customerName
        guestCount
        platformCode
        platformOrderId
        confirmationCode
        __typename
      }
      company {
        id
        companyName
        __typename
      }
      photos {
        id
        fileName
        category
        passed
        signedUrl
        __typename
      }
      checklistItems {
        id
        title
        key
        isRequired
        requiresPhoto
        passed
        sortOrder
        photos {
          id
          fileName
          category
          signedUrl
          __typename
        }
        __typename
      }
      issues {
        id
        code
        description
        status
        createdAt
        __typename
      }
      taskNotes {
        id
        content
        createdAt
        createdBy {
          id
          fullName
          __typename
        }
        __typename
      }
      auditLogs {
        id
        action
        createdAt
        newValue
        oldValue
        metadata
        note {
          id
          content
          __typename
        }
        performedBy {
          id
          fullName
          __typename
        }
        __typename
      }
      __typename
    }
  }
}
[
  "data" => [
    "task_by_id" => [
      "__typename" => "CheckInTask"
      "id" => 103924
      "status" => "ASSIGNED"
      "priority" => "MEDIUM"
      "todoDate" => "2026-09-18T22:00:00Z"
      "inspectionStatus" => "NOT_APPLICABLE"
      "createdAt" => "2026-02-14T23:04:38Z"
      "startedAt" => null
      "completedAt" => null
      "cancelledAt" => null
      "inspectedAt" => null
      "assignee" => [
        "id" => 446
        "email" => "hfszhouqinglin@163.com"
        "fullName" => "Zhou Hong"
        "__typename" => "Account"
      ]
      "completedBy" => null
      "inspectedBy" => null
      "property" => [
        "id" => 2268
        "nickname" => "HS 4570-2/1B/Hong"
        "address" => "4570 West 13th Avenue, Vancouver, BC V6R 2V4, Canada"
        "numberOfBeds" => 2
        "numberOfBathrooms" => 1
        "__typename" => "Property"
      ]
      "reservation" => [
        "id" => 63886
        "checkInDate" => "2026-09-18T22:00:00Z"
        "checkOutDate" => "2026-10-01T18:00:00Z"
        "customerName" => "Lena Usadel"
        "guestCount" => 2
        "platformCode" => "BOOKING_COM"
        "platformOrderId" => "5495554933"
        "confirmationCode" => null
        "__typename" => "Reservation"
      ]
      "company" => [
        "id" => 1
        "companyName" => "Cozystay cleaning"
        "__typename" => "Company"
      ]
      "photos" => []
      "checklistItems" => []
      "issues" => []
      "taskNotes" => []
      "auditLogs" => []
    ]
  ]
]
200 June 11, 2026 05:55 schema: default 245e1a
# Time Info
1 585 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:55 schema: default 36e6ae
# Time Info
1 313 ms
mutation UpdateTaskNote(...) {
update_task_note(...)
}
200 June 11, 2026 05:55 schema: default c94855
# Time Info
1 584 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:55 schema: default ed86b3
# Time Info
1 513 ms
mutation AddTaskNote(...) {
add_task_note(...)
}
200 June 11, 2026 05:55 schema: default 172158
# Time Info
1 556 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:52 schema: default 06b463
# Time Info
1 422 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:52 schema: default 8342ff
# Time Info
1 675 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 05:52 schema: default fd703b
# Time Info
1 326 ms
query GetAccounts(...) {
accounts(...)
}
200 June 11, 2026 05:52 schema: default d05df7
# Time Info
1 323 ms
query GetAccounts(...) {
accounts(...)
}
200 June 11, 2026 05:52 schema: default 19d3d5
# Time Info
1 326 ms
query GetAccounts(...) {
accounts(...)
}
200 June 11, 2026 05:52 schema: default 19c199
# Time Info
1 145 ms
query GetAssignees(...) {
assignees(...)
}
200 June 11, 2026 05:50 schema: default 6f21ac
# Time Info
1 427 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:50 schema: default ee6370
# Time Info
1 621 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 05:50 schema: default a20070
# Time Info
1 329 ms
query GetAccounts(...) {
accounts(...)
}
200 June 11, 2026 05:49 schema: default 30c4c5
# Time Info
1 343 ms
query GetAccounts(...) {
accounts(...)
}
200 June 11, 2026 05:49 schema: default 77c954
# Time Info
1 191 ms
query GetAssignees(...) {
assignees(...)
}
200 June 11, 2026 05:49 schema: default 235647
# Time Info
1 108 ms
query GetTeams(...) {
teams(...)
}
200 June 11, 2026 05:49 schema: default e4ef08
# Time Info
1 432 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:49 schema: default d4a964
# Time Info
1 672 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 05:48 schema: default 43ee29
# Time Info
1 887 ms
query GetInspectionTasks(...) {
tasks(...)
}
200 June 11, 2026 05:47 schema: default 440530
# Time Info
1 541 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:46 schema: default b30922
# Time Info
1 502 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:46 schema: default c9f2d7
# Time Info
1 4328 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 05:42 schema: default 112a81
# Time Info
1 568 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:41 schema: default e8e565
# Time Info
1 1603 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 05:40 schema: default feee4e
# Time Info
1 609 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 05:40 schema: default 556717
# Time Info
1 698 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 05:40 schema: default 9d95ea
# Time Info
1 536 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:40 schema: default 68695a
# Time Info
1 404 ms
mutation StartTask(...) {
start_task(...)
}
200 June 11, 2026 05:39 schema: default d55de1
# Time Info
1 434 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:39 schema: default 165c08
# Time Info
1 453 ms
query GetTaskById(...) {
task_by_id(...)
}
200 June 11, 2026 05:34 schema: default c69555
# Time Info
1 313 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default 324ed0
# Time Info
1 220 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default 174e44
# Time Info
1 410 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default 7fcd78
# Time Info
1 386 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default fc6675
# Time Info
1 435 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default a7a70f
# Time Info
1 317 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default d1b580
# Time Info
1 298 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default 401255
# Time Info
1 295 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default 1e7a0d
# Time Info
1 423 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default c1fd8e
# Time Info
1 421 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:34 schema: default e8ae35
# Time Info
1 522 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:32 schema: default b4ee1d
# Time Info
1 936 ms
query GetTasks(...) {
tasks(...)
}
200 June 11, 2026 05:32 schema: default 5df0d0
# Time Info
1 270 ms
query GetAssignees(...) {
assignees(...)
}
200 June 11, 2026 05:32 schema: default a06f80
# Time Info
1 507 ms
query GetProperties(...) {
properties(...)
}
200 June 11, 2026 05:30 schema: default 5f32c5
# Time Info
1 2017 ms
query GetDashboard(...) {
dashboard(...)
}
200 June 11, 2026 05:30 schema: default f88eec
# Time Info
1 281 ms
query GetIssues(...) {
issues(...)
}
200 June 11, 2026 05:30 schema: default 808f94
# Time Info
1 186 ms
query GetUnassignedPropertyCount(...) {
unassignedPropertyCount(...)
}
200 June 11, 2026 05:30 schema: default 85c4f0
# Time Info
1 2618 ms
mutation LoginAccount(...) {
login_account(...)
}

Schema: default

input AcceptTaskInput {
  taskId: Int!

  """Optional acceptance note"""
  note: String

  """Photos to attach to the acceptance note"""
  photos: [AttachPhotoInput!]
}

type Account {
  id: Int!

  """Full Name of a Account"""
  fullName: String

  """Password of a Account"""
  password: String

  """Email of a Account"""
  email: String

  """Phone number of a Account"""
  phone: String

  """Active Status of a Account"""
  isActive: Boolean

  """All role assignments"""
  roles: [AccountRole]

  """Current context (selected company/team and roles)"""
  current: AccountCurrent

  """Companies user has access to (from roles)"""
  companies: [Company]

  """Teams user has access to (from roles)"""
  teams: [Team]
}

"""Paginated list of accounts"""
type AccountConnection {
  """List of account edges"""
  edges: [AccountEdge!]!

  """Total number of accounts matching the filters"""
  totalCount: Int!
}

"""Current context information for an account"""
type AccountCurrent {
  """System-level role (ADMIN, FINANCE_VIEWER, or null)"""
  systemRole: RoleName

  """Currently selected company context"""
  company: Company

  """Role in current company context"""
  companyRole: RoleName

  """Currently selected team context"""
  team: Team

  """Role in current team context"""
  teamRole: RoleName
}

"""Account edge for pagination"""
type AccountEdge {
  """The account"""
  node: Account!
}

"""Filter criteria for accounts"""
input AccountFilters {
  """Search by full name"""
  name: TextFilter

  """Search by email"""
  email: TextFilter

  """Filter by active status"""
  isActive: BooleanFilter

  """Filter by role name (LEFT JOIN account_role)"""
  roleName: TextFilter

  """Filter by team ID (via account_role)"""
  teamId: IdFilter
}

input AccountInput {
  """Full Name of a Account"""
  full_name: String

  """Password of a Account"""
  password: String

  """Email of a Account"""
  email: String

  """Phone number of a Account"""
  phone: String

  """Active Status of a Account"""
  is_active: Boolean

  """Timezone of account"""
  timezone: String

  """notification token"""
  push_token: String
}

"""Role assignment with scope"""
type AccountRole {
  id: Int!

  """Role name"""
  role: RoleName!

  """Scope level"""
  scope: RoleScope!

  """Company for ORG/TEAM scope"""
  company: Company

  """Team for TEAM scope"""
  team: Team
  isActive: Boolean!

  """The account this role belongs to"""
  account: Account
  createdAt: String!
}

"""Fields available for sorting accounts"""
enum AccountSortField {
  """Sort by full name"""
  FULL_NAME

  """Sort by email"""
  EMAIL

  """Sort by creation date"""
  CREATED_AT
}

"""Input for querying accounts"""
input AccountsInput {
  """View scope - TEAM, COMPANY, or GLOBAL"""
  scope: ViewScope!

  """Optional filter criteria"""
  filters: AccountFilters

  """Field to sort by"""
  sortBy: AccountSortField = 

  """Sort direction"""
  sortOrder: SortOrder = ASC

  """Maximum number of results"""
  limit: Int = 50

  """Number of results to skip"""
  offset: Int = 0
}

input AddPaymentInput {
  billingId: Int!

  """Payment amount in cents"""
  amount: Int!

  """Payment method (e.g., BANK_TRANSFER, CASH, CHECK)"""
  method: String!
  paidAt: DateTime!
  note: String
}

input AddTaskNoteInput {
  taskId: Int!

  """Note content"""
  content: String!

  """Photos to attach to this note"""
  photos: [AttachPhotoInput!]
}

type Amenity {
  id: Int!

  """amenities code"""
  amenity_code: String
}

"""App version configuration for upgrade prompts"""
type AppVersionConfig {
  """Minimum supported version - below this forces an upgrade"""
  minVersion: String!

  """Latest available version - below this suggests an optional upgrade"""
  latestVersion: String!
}

input AssignAccountToTeamInput {
  """ID of the account to assign"""
  accountId: Int!

  """ID of the team to assign the account to"""
  teamId: Int!

  """Role for the account in the team"""
  role: RoleName!

  """Company the team belongs to"""
  companyId: Int!
}

input AssignPropertyToTeamInput {
  """ID of the property to assign"""
  propertyId: Int!

  """ID of the team to assign the property to"""
  teamId: Int!

  """
  Optional account ID to set as default assignee (must be an active member of the target team)
  """
  defaultAssigneeId: Int
}

input AssignTaskInput {
  taskId: Int!

  """Account ID of the assignee"""
  assigneeId: Int!

  """Optional note for the assignee"""
  note: String

  """Photos to attach to the assignment note"""
  photos: [AttachPhotoInput!]
}

"""Input for attaching a pre-uploaded photo to a mutation"""
input AttachPhotoInput {
  """Cloud storage object name from getUploadUrl"""
  objectName: String!

  """Optional category for the photo"""
  category: PhotoCategory

  """GPS latitude where photo was taken"""
  latitude: Float

  """GPS longitude where photo was taken"""
  longitude: Float

  """Timestamp when photo was captured"""
  capturedAt: DateTime

  """Device information"""
  deviceInfo: String

  """File size in bytes"""
  fileSize: Int
}

enum AuditAction {
  """Task created"""
  CREATED

  """Status change"""
  STATUS_CHANGE

  """Status transition"""
  STATUS_CHANGED

  """Assignee changed"""
  ASSIGNED

  """Task started"""
  STARTED

  """Task completed"""
  COMPLETED

  """Task inspected"""
  INSPECTED

  """Inspection passed"""
  INSPECTION_PASSED

  """Inspection failed"""
  INSPECTION_FAILED

  """Task blocked"""
  BLOCKED

  """Task unblocked"""
  UNBLOCKED

  """Note added"""
  NOTE_ADDED

  """Photo added"""
  PHOTO_ADDED

  """Checklist item completed"""
  CHECKLIST_COMPLETED

  """Checklist item uncompleted"""
  CHECKLIST_UNCOMPLETED

  """Checklist photo added"""
  CHECKLIST_PHOTO_ADDED

  """Reminder notification sent"""
  REMINDER_SENT

  """Task escalated to manager"""
  ESCALATED

  """Task sent back for redo"""
  REQUEST_REDO

  """Task rescheduled to new date"""
  RESCHEDULED

  """Task priority changed"""
  PRIORITY_CHANGED

  """Task duplicated from another task"""
  DUPLICATED
}

type AuditLogNote {
  id: Int!
  content: String!
  auditLog: TaskAuditLog

  """Photos attached to this note"""
  photos: [NotePhoto!]!
  createdBy: Account
  createdAt: DateTime!
}

input BatchAssignTasksInput {
  """List of task IDs to assign"""
  taskIds: [Int!]!

  """Account ID of the assignee"""
  assigneeId: Int!
}

"""Result of a batch task assignment operation"""
type BatchAssignTasksResult {
  """Number of tasks successfully assigned"""
  updatedCount: Int!

  """The updated tasks"""
  tasks: [TaskInterface!]!
}

"""Monthly billing record for a vendor team"""
type Billing {
  id: Int!
  teamId: Int!
  periodStart: DateTime!
  periodEnd: DateTime!
  status: BillingStatus!
  invoiceCode: String!

  """Total amount in cents"""
  totalAmount: Int!

  """Remaining balance due in cents"""
  balanceDue: Int!
  confirmedAt: DateTime
  createdAt: DateTime!
  team: Team
  confirmedBy: Account
  lineItems: [BillingLineItem!]!
  payments: [Payment!]!
  auditLogs: [BillingAuditLog!]!
}

enum BillingAuditAction {
  """Billing record created (auto-generated)"""
  CREATED

  """Billing confirmed by admin"""
  CONFIRMED

  """Line item unit price modified"""
  LINE_ITEM_UPDATED

  """Payment recorded"""
  PAYMENT_ADDED

  """Billing status changed"""
  STATUS_CHANGED
}

"""Audit log entry for billing lifecycle events"""
type BillingAuditLog {
  id: Int!
  action: BillingAuditAction!
  oldValue: String
  newValue: String

  """JSON metadata (line item changes, payment details, etc.)"""
  metadata: String
  performedBy: Account
  createdAt: DateTime!
}

type BillingConnection {
  edges: [BillingEdge!]!
  totalCount: Int!
}

type BillingEdge {
  node: Billing!
}

"""A single task line item within a billing record"""
type BillingLineItem {
  id: Int!
  billingId: Int!
  taskId: Int!
  propertyId: Int

  """Unit price in cents"""
  unitPrice: Int!

  """Photo pass rate percentage"""
  rating: Float
  createdAt: DateTime!
  task: TaskInterface
  property: Property
}

enum BillingStatus {
  """No payment received"""
  UNPAID

  """Partial payment received"""
  PARTIAL_PAID

  """Fully paid"""
  FULLY_PAID
}

input BillingsInput {
  teamId: Int
  status: BillingStatus

  """Filter billings starting from this date (YYYY-MM-DD)"""
  periodStart: String

  """Filter billings ending before this date (YYYY-MM-DD)"""
  periodEnd: String
  limit: Int = 50
  offset: Int = 0
}

input BlockTaskInput {
  taskId: Int!

  """Reason for blocking the task"""
  reason: String!

  """Additional notes"""
  note: String

  """Photos to attach to the block note"""
  photos: [AttachPhotoInput!]
}

"""Filter for boolean fields"""
input BooleanFilter {
  """Filter operator"""
  operator: BooleanFilterOperator!

  """
  Boolean value as string: "true" or "false"
  """
  value: String
}

"""Operators for boolean filter"""
enum BooleanFilterOperator {
  """Equals"""
  EQ
}

input CancelTaskInput {
  taskId: Int!

  """Optional cancellation reason"""
  reason: String

  """Photos to attach to the cancellation note"""
  photos: [AttachPhotoInput!]
}

"""Check-in task with simplified workflow (no inspection)"""
type CheckInTask implements TaskInterface {
  id: Int!
  todoDate: DateTime!
  dueAt: DateTime
  dayInfo: DayInfo!
  status: TaskStatus!
  priority: TaskPriority!
  startedAt: DateTime
  completedAt: DateTime
  updatedAt: DateTime
  createdAt: DateTime
  inspectionStatus: InspectionStatus!
  inspectedAt: DateTime

  """Photo pass rate percentage (passed / reviewed × 100)"""
  photoPassRate: Float
  cancelledAt: DateTime

  """Payment unit price for this task"""
  unitPrice: Int
  company: Company
  property: Property
  reservation: Reservation
  assignee: Account
  completedBy: Account
  inspectedBy: Account

  """Issue that triggered the creation of this task"""
  sourceIssue: Issue
  taskNotes: [TaskNote!]!
  auditLogs(
    """Optional filter - only return audit logs with these actions"""
    actions: [AuditAction!]
  ): [TaskAuditLog!]!
  checklistItems: [TaskChecklistItem!]!
  photos: [Photo!]!

  """Issues linked to this task"""
  issues: [Issue!]!
}

type ChecklistPhoto implements Photo {
  id: Int!
  fileName: String!
  category: PhotoCategory
  fileSize: Int
  signedUrl: String!
  passed: Boolean
  task: TaskInterface!
  checklistItem: TaskChecklistItem!
}

"""Input for closing an issue"""
input CloseIssueInput {
  """Issue ID to close"""
  issueId: Int!

  """Optional note about why the issue is closed"""
  note: String
}

type Company {
  id: Int!

  """Name of a company"""
  companyName: String

  """Phone number"""
  phoneNumber: String

  """Email address"""
  email: String

  """Cleaning rules of the company"""
  cleaningRules: String

  """Count of properties with no team assigned in this company"""
  unassignedPropertyCount: Int!
}

input CompleteTaskInput {
  taskId: Int!

  """Optional completion note"""
  note: String

  """Photos to attach to the completion note"""
  photos: [AttachPhotoInput!]

  """
  Set to true if damage check was completed and NO damage was found. If damage
  was found, create an issue first using create_issue mutation (for
  departure/one-time cleaning tasks)
  """
  damageCheckCompleted: Boolean
}

input ConfirmBillingInput {
  billingId: Int!
}

"""Input for creating a new issue/damage report"""
input CreateIssueInput {
  """Property ID this issue belongs to (required)"""
  propertyId: Int!

  """Task ID this issue is related to (optional)"""
  taskId: Int

  """Issue code/identifier (e.g., DAMAGE, MAINTENANCE, SUPPLY)"""
  code: String!

  """Detailed description of the issue"""
  description: String

  """Photos documenting the issue"""
  photos: [AttachPhotoInput!]
}

input CreateTaskInput {
  """Related status"""
  status: String

  """Related priority"""
  priority: String

  """Related assignee ID"""
  assigneeId: Int

  """uploaded image ids"""
  images: [Int!]

  """To Do time"""
  todoDate: DateTime

  """task type"""
  taskType: String

  """reservation external_order_id for link task and order"""
  reservationId: String

  """listing id for task"""
  listingId: Int

  """description for task"""
  description: String

  """related task"""
  relatedTaskId: Int

  """reporter account id"""
  reportedBy: Int
  damageItemId: Int

  """Issue ID to link as the source issue for this task"""
  issueId: Int

  """Payment unit price (defaults to property cleaningFee if not provided)"""
  unitPrice: Int

  """Team ID to override user context team (admin only)"""
  teamId: Int
}

"""Aggregated dashboard data for the web console home page"""
type DashboardData {
  """Tasks in TODO or ASSIGNED status"""
  pendingTaskCount: Int!

  """Tasks in IN_PROGRESS status"""
  inProgressTaskCount: Int!

  """Tasks completed today"""
  completedTodayCount: Int!

  """Issues in OPEN status (DAMAGE only)"""
  openIssueCount: Int!

  """Properties without a vendor team"""
  unassignedPropertyCount: Int!

  """Tasks past due date that are not completed or cancelled"""
  overdueTaskCount: Int!

  """Completed tasks with PENDING inspection status"""
  pendingInspectionCount: Int!

  """Recent audit log entries across all tasks"""
  recentActivity: [RecentActivityItem!]!

  """Next upcoming tasks sorted by date"""
  upcomingTasks: [TaskInterface!]!
}

"""Filter for date fields with timezone support"""
input DateFilter {
  """Filter operator"""
  operator: DateFilterOperator!

  """Date value (YYYY-MM-DD format)"""
  value: String

  """End date for BETWEEN operator (YYYY-MM-DD format)"""
  valueTo: String

  """
  Timezone for date interpretation (e.g., America/Vancouver). Defaults to UTC.
  """
  timezone: String
}

"""Operators for date filter"""
enum DateFilterOperator {
  """Equals (full day)"""
  EQ

  """Greater than (after end of day)"""
  GT

  """Greater than or equal (from start of day)"""
  GTE

  """Less than (before start of day)"""
  LT

  """Less than or equal (until end of day)"""
  LTE

  """Between two dates (inclusive)"""
  BETWEEN
}

scalar DateTime

"""Date information for a task's todo date"""
type DayInfo {
  """Date in YYYY-MM-DD format (grouping key)"""
  date: String!

  """Year (e.g. 2024)"""
  year: Int!

  """Month of the year"""
  month: Month!

  """Day of month (1-31)"""
  day: Int!

  """Day of the week"""
  dayOfWeek: DayOfWeek!
}

"""Day of the week"""
enum DayOfWeek {
  SUNDAY
  MONDAY
  TUESDAY
  WEDNESDAY
  THURSDAY
  FRIDAY
  SATURDAY
}

input DeleteTaskNoteInput {
  """ID of the note to delete"""
  noteId: Int!
}

"""Departure cleaning task with full workflow including inspection"""
type DepartureCleaningTask implements TaskInterface {
  id: Int!
  todoDate: DateTime!
  dueAt: DateTime
  dayInfo: DayInfo!
  status: TaskStatus!
  priority: TaskPriority!
  startedAt: DateTime
  completedAt: DateTime
  updatedAt: DateTime
  createdAt: DateTime
  inspectionStatus: InspectionStatus!
  inspectedAt: DateTime

  """Photo pass rate percentage (passed / reviewed × 100)"""
  photoPassRate: Float
  cancelledAt: DateTime

  """Payment unit price for this task"""
  unitPrice: Int

  """Whether damage check was completed during task"""
  damageCheckCompleted: Boolean!

  """Next upcoming reservation for the same property"""
  nextReservation: Reservation
  company: Company
  property: Property
  reservation: Reservation
  assignee: Account
  completedBy: Account
  inspectedBy: Account

  """Issue that triggered the creation of this task"""
  sourceIssue: Issue
  taskNotes: [TaskNote!]!
  auditLogs(
    """Optional filter - only return audit logs with these actions"""
    actions: [AuditAction!]
  ): [TaskAuditLog!]!
  checklistItems: [TaskChecklistItem!]!
  photos: [Photo!]!

  """Issues linked to this task"""
  issues: [Issue!]!
}

input DuplicateTaskInput {
  taskId: Int!

  """Scheduled date for the duplicated task"""
  todoDate: DateTime!
}

"""Input for generating monthly billing"""
input GenerateBillingInput {
  """
  Target month in YYYY-MM format. Defaults to previous month if omitted.
  """
  month: String
}

"""Result of billing generation"""
type GenerateBillingResult {
  """Number of billing records generated"""
  generated: Int!

  """Number of teams skipped (already billed or no tasks)"""
  skipped: Int!
}

"""Input for requesting a signed upload URL"""
input GetUploadUrlInput {
  """MIME type of the file (e.g., image/jpeg)"""
  contentType: String!

  """File extension (e.g., jpg, png)"""
  fileExtension: String!

  """Optional task ID for organizing uploads"""
  taskId: Int
}

"""Filter for ID/integer fields"""
input IdFilter {
  """Filter operator"""
  operator: IdFilterOperator!

  """Single ID value (for EQ)"""
  value: Int

  """Multiple ID values (for IN)"""
  values: [Int!]
}

"""Operators for ID filter"""
enum IdFilterOperator {
  """Equals"""
  EQ

  """In list"""
  IN

  """Is null"""
  IS_NULL

  """Is not null"""
  IS_NOT_NULL
}

input InspectTaskInput {
  taskId: Int!

  """True to approve, false to reject, null for redo"""
  approved: Boolean

  """True to request redo (returns task to in-progress)"""
  redo: Boolean

  """Inspection feedback, rejection reason, or redo instructions"""
  note: String

  """Photos to attach to the inspection note"""
  photos: [AttachPhotoInput!]
}

"""Inspection status for tasks that require inspection"""
enum InspectionStatus {
  """Task doesn't require inspection"""
  NOT_APPLICABLE

  """Awaiting inspection"""
  PENDING

  """Inspection passed"""
  PASSED

  """Inspection failed, needs rework"""
  FAILED
}

input InviteAccountInput {
  """Email address for the new account"""
  email: String!

  """Full name of the new user"""
  fullName: String!

  """Role to assign to the new user"""
  role: RoleName!

  """Company to assign the role in"""
  companyId: Int!

  """Team to assign the role in (required for TEAM-scope roles)"""
  teamId: Int
}

"""An issue/damage report related to a task"""
type Issue {
  id: Int!

  """Issue code/identifier"""
  code: String!

  """Issue description"""
  description: String

  """Issue status"""
  status: IssueStatus!

  """Property this issue belongs to"""
  property: Property!
  task: TaskInterface

  """Tasks created from this issue"""
  downstreamTasks: [TaskInterface!]!

  """Account who reported this issue"""
  reportedBy: Account

  """Photos attached to this issue"""
  photos: [IssuePhoto!]!

  """Audit log entries for this issue"""
  auditLogs(
    """Optional filter - only return audit logs with these actions"""
    actions: [IssueAuditAction!]
  ): [IssueAuditLog!]!
  createdAt: DateTime!
  updatedAt: DateTime
}

enum IssueAuditAction {
  """Issue created"""
  CREATED

  """Status changed"""
  STATUS_CHANGED

  """Issue updated"""
  UPDATED

  """Issue resolved"""
  RESOLVED

  """Issue closed"""
  CLOSED
}

type IssueAuditLog {
  id: Int!
  action: IssueAuditAction!
  oldValue: String
  newValue: String

  """JSON metadata"""
  metadata: String
  performedBy: Account
  createdAt: DateTime!
}

"""Paginated list of issues"""
type IssueConnection {
  """List of issue edges"""
  edges: [IssueEdge!]!

  """Total number of issues matching the filters"""
  totalCount: Int!
}

"""Issue edge for pagination"""
type IssueEdge {
  """The issue"""
  node: Issue!
}

"""Filter criteria for issues"""
input IssueFilters {
  """Filter by property ID"""
  propertyId: IdFilter

  """Filter by task ID"""
  taskId: IdFilter

  """Filter by issue status"""
  status: IssueStatusFilter

  """Search by issue code"""
  code: TextFilter

  """Filter by creation date"""
  createdAt: DateFilter

  """Filter by reporter account ID"""
  reportedById: IdFilter
}

type IssuePhoto implements Photo {
  id: Int!
  fileName: String!
  category: PhotoCategory
  fileSize: Int
  signedUrl: String!
  passed: Boolean
  issue: Issue!
}

"""Fields available for sorting issues"""
enum IssueSortField {
  """Sort by creation date"""
  CREATED_AT

  """Sort by status"""
  STATUS

  """Sort by code"""
  CODE
}

"""Status of an issue"""
enum IssueStatus {
  """Issue is open and needs attention"""
  OPEN

  """Issue is being addressed"""
  IN_PROGRESS

  """Issue has been resolved"""
  RESOLVED

  """Issue has been closed"""
  CLOSED
}

"""Filter for issue status"""
input IssueStatusFilter {
  """Filter operator"""
  operator: IssueStatusFilterOperator!

  """Single status value (for EQ)"""
  value: IssueStatus

  """Multiple status values (for IN/NOT_IN)"""
  values: [IssueStatus!]
}

"""Operators for issue status filter"""
enum IssueStatusFilterOperator {
  """Equals"""
  EQ

  """In list"""
  IN

  """Not in list"""
  NOT_IN
}

"""Input for querying issues"""
input IssuesInput {
  """View scope - TEAM, COMPANY, or GLOBAL"""
  scope: ViewScope!

  """Optional filter criteria"""
  filters: IssueFilters

  """Field to sort by"""
  sortBy: IssueSortField = 

  """Sort direction"""
  sortOrder: SortOrder = DESC

  """Maximum number of results"""
  limit: Int = 50

  """Number of results to skip"""
  offset: Int = 0
}

type LogInSuccess {
  id: Int!

  """Full Name of a Account"""
  fullName: String

  """Email of a Account"""
  email: String

  """Phone number of a Account"""
  phone: String

  """Active Status of a Account"""
  isActive: Boolean

  """Account roles with scope"""
  accountRoles: [AccountRole!]!

  """Current context (selected company/team and roles)"""
  current: AccountCurrent

  """Companies user has access to (from roles)"""
  companies: [Company]

  """Teams user has access to (from roles)"""
  teams: [Team]

  """Token"""
  token: String
}

input LoginInput {
  """Email of the account"""
  email: String!

  """Password of the account"""
  password: String!

  """Timezone of account"""
  timezone: String

  """Firebase notification token"""
  push_token: String
}

"""Maintenance task with vendor and scheduling tracking"""
type MaintenanceTask implements TaskInterface {
  id: Int!
  todoDate: DateTime!
  dueAt: DateTime
  dayInfo: DayInfo!
  status: TaskStatus!
  priority: TaskPriority!
  startedAt: DateTime
  completedAt: DateTime
  updatedAt: DateTime
  createdAt: DateTime
  inspectionStatus: InspectionStatus!
  inspectedAt: DateTime

  """Photo pass rate percentage (passed / reviewed × 100)"""
  photoPassRate: Float
  cancelledAt: DateTime

  """Payment unit price for this task"""
  unitPrice: Int

  """Type of maintenance work"""
  maintenanceType: MaintenanceType

  """Actual cost in cents"""
  actualCost: Int

  """Name of the vendor/contractor"""
  vendorName: String

  """Vendor contact phone"""
  vendorPhone: String
  company: Company
  property: Property

  """Optional linked reservation"""
  reservation: Reservation
  assignee: Account
  completedBy: Account
  inspectedBy: Account

  """Issue that triggered the creation of this task"""
  sourceIssue: Issue
  taskNotes: [TaskNote!]!
  auditLogs(
    """Optional filter - only return audit logs with these actions"""
    actions: [AuditAction!]
  ): [TaskAuditLog!]!
  checklistItems: [TaskChecklistItem!]!
  photos: [Photo!]!

  """Issues linked to this task"""
  issues: [Issue!]!
}

"""Type of maintenance work"""
enum MaintenanceType {
  """Plumbing work"""
  PLUMBING

  """Electrical work"""
  ELECTRICAL

  """Heating/cooling systems"""
  HVAC

  """Appliance repair"""
  APPLIANCE

  """Structural repairs"""
  STRUCTURAL

  """Exterior/landscaping"""
  EXTERIOR

  """General maintenance"""
  GENERAL

  """Other maintenance type"""
  OTHER
}

"""Mark a photo as passed or failed during inspection"""
input MarkPhotoPassedInput {
  """Photo ID to mark"""
  photoId: Int!

  """True for passed, false for failed"""
  passed: Boolean!
}

"""Month of the year"""
enum Month {
  JAN
  FEB
  MAR
  APR
  MAY
  JUN
  JUL
  AUG
  SEP
  OCT
  NOV
  DEC
}

type Mutation {
  create_account(input: AccountInput!): Account
  login_account(input: LoginInput!): LogInSuccess
  send_phone_verification_code(input: PhoneVerificationInput!): PhoneVerificationResponse
  verify_phone_code(input: VerifyPhoneCodeInput!): VerificationTokenResponse
  register_account(input: RegisterAccountInput!): Account
  update_task(input: TaskInput!): TaskInterface
  update_password(input: ResetPasswordInput): Account
  update_property(input: UpdatePropertyInput): Property
  assign_property_to_team(input: AssignPropertyToTeamInput!): Property!
  verify_code(input: VerifyCodeInput): ResetPassword
  request_code(input: RequestCodeInput): ResetPassword
  create_task(input: CreateTaskInput!): TaskInterface!

  """Set the current company/team context for the user"""
  set_context(input: SetContextInput!): LogInSuccess!
  logout_account: Account

  """Start a task (transition from TODO/ASSIGNED to IN_PROGRESS)"""
  start_task(input: StartTaskInput!): TaskInterface!

  """Complete a task (transition from IN_PROGRESS to COMPLETED)"""
  complete_task(input: CompleteTaskInput!): TaskInterface!

  """Block a task with a reason"""
  block_task(input: BlockTaskInput!): TaskInterface!

  """Unblock a previously blocked task"""
  unblock_task(taskId: Int!): TaskInterface!

  """Inspect a completed task (approve or reject)"""
  inspect_task(input: InspectTaskInput!): TaskInterface!

  """Generate monthly billing for all teams. Admin only."""
  generate_billing(input: GenerateBillingInput!): GenerateBillingResult!

  """Confirm a billing record, locking line item prices"""
  confirm_billing(input: ConfirmBillingInput!): Billing!

  """Update unit price of a billing line item (only before confirm)"""
  update_billing_line_item(input: UpdateBillingLineItemInput!): BillingLineItem!

  """Record a payment for a billing"""
  add_payment(input: AddPaymentInput!): Payment!

  """
  Review a checklist spot — pass or fail a cleaning area during inspection
  """
  review_checklist_spot(input: ReviewChecklistSpotInput!): TaskChecklistItem!

  """Mark a photo as passed or failed during inspection review"""
  mark_photo_passed(input: MarkPhotoPassedInput!): Photo!

  """Add a note to a task"""
  add_task_note(input: AddTaskNoteInput!): TaskNote!

  """Update the content of an existing task note"""
  update_task_note(input: UpdateTaskNoteInput!): TaskNote!

  """Soft-delete a task note"""
  delete_task_note(input: DeleteTaskNoteInput!): Boolean!

  """Cancel a task"""
  cancel_task(input: CancelTaskInput!): TaskInterface!

  """Assign a task to a team member"""
  assign_task(input: AssignTaskInput!): TaskInterface!

  """Accept an assigned task"""
  accept_task(input: AcceptTaskInput!): TaskInterface!

  """Reschedule a task to a new date"""
  reschedule_task(input: RescheduleTaskInput!): TaskInterface!

  """Update the priority of a task"""
  update_task_priority(input: UpdateTaskPriorityInput!): TaskInterface!

  """Duplicate a task with a new scheduled date"""
  duplicate_task(input: DuplicateTaskInput!): TaskInterface!

  """Batch assign multiple tasks to the same assignee"""
  batch_assign_tasks(input: BatchAssignTasksInput!): BatchAssignTasksResult!

  """Create a new issue/damage report linked to a property"""
  create_issue(input: CreateIssueInput!): Issue!

  """Update status and/or description of an issue"""
  update_issue(input: UpdateIssueInput!): Issue!

  """Mark an issue as resolved"""
  resolve_issue(input: ResolveIssueInput!): Issue!

  """Mark an issue as closed"""
  close_issue(input: CloseIssueInput!): Issue!

  """Update company profile information"""
  update_company(input: UpdateCompanyInput!): Company!

  """Invite a new user by creating an account with a role assignment"""
  invite_account(input: InviteAccountInput!): Account!

  """Suspend an account (set isActive = false)"""
  suspend_account(input: SuspendAccountInput!): Account!

  """Reactivate a previously suspended account"""
  reactivate_account(input: ReactivateAccountInput!): Account!

  """Assign an account to a team with a specific role"""
  assign_account_to_team(input: AssignAccountToTeamInput!): AccountRole!

  """
  Remove an account from a team and optionally reassign their open tasks
  """
  remove_account_from_team(input: RemoveAccountFromTeamInput!): Account!

  """Update the role on an existing AccountRole record"""
  update_account_role(input: UpdateAccountRoleInput!): AccountRole!

  """Get a signed URL for direct upload to cloud storage"""
  get_upload_url(input: GetUploadUrlInput!): PhotoUploadUrl!

  """Register a photo after successful upload to cloud storage"""
  register_photo(input: RegisterPhotoInput!): Photo!

  """Unregister (soft delete) a photo"""
  unregister_photo(
    """ID of the photo to unregister"""
    id: Int!
  ): Boolean!
}

type NotePhoto implements Photo {
  id: Int!
  fileName: String!
  category: PhotoCategory
  fileSize: Int
  signedUrl: String!
  passed: Boolean
  task: TaskInterface!
  note: TaskNote!
}

"""One-time cleaning task with full workflow"""
type OneTimeCleaningTask implements TaskInterface {
  id: Int!
  todoDate: DateTime!
  dueAt: DateTime
  dayInfo: DayInfo!
  status: TaskStatus!
  priority: TaskPriority!
  startedAt: DateTime
  completedAt: DateTime
  updatedAt: DateTime
  createdAt: DateTime
  inspectionStatus: InspectionStatus!
  inspectedAt: DateTime

  """Photo pass rate percentage (passed / reviewed × 100)"""
  photoPassRate: Float
  cancelledAt: DateTime

  """Payment unit price for this task"""
  unitPrice: Int
  company: Company
  property: Property

  """Optional linked reservation"""
  reservation: Reservation
  assignee: Account
  completedBy: Account
  inspectedBy: Account

  """Issue that triggered the creation of this task"""
  sourceIssue: Issue
  taskNotes: [TaskNote!]!
  auditLogs(
    """Optional filter - only return audit logs with these actions"""
    actions: [AuditAction!]
  ): [TaskAuditLog!]!
  checklistItems: [TaskChecklistItem!]!
  photos: [Photo!]!

  """Issues linked to this task"""
  issues: [Issue!]!
}

"""A payment record for a billing"""
type Payment {
  id: Int!
  billingId: Int!

  """Payment amount in cents"""
  amount: Int!
  method: String!
  paidAt: DateTime!
  note: String
  createdAt: DateTime!
  paidBy: Account
}

input PhoneVerificationInput {
  """Phone number in international format (e.g., +17785134038)"""
  phone: String!
}

type PhoneVerificationResponse {
  """Whether the operation was successful"""
  success: Boolean!

  """Message"""
  message: String

  """Expiration time in ISO 8601 format"""
  expires_at: String
}

"""Base interface for all photo types"""
interface Photo {
  id: Int!
  fileName: String!
  category: PhotoCategory
  fileSize: Int

  """Short-lived signed URL for reading the photo from cloud storage"""
  signedUrl: String!

  """Whether this photo passed inspection review (null = not reviewed)"""
  passed: Boolean
}

enum PhotoCategory {
  """Before cleaning"""
  BEFORE

  """After cleaning"""
  AFTER

  """Checklist item proof"""
  CHECKLIST

  """Damage documentation"""
  DAMAGE

  """Issue documentation"""
  ISSUE

  """Supply-related"""
  SUPPLY

  """Inspection photos"""
  INSPECTION
}

"""Type of photo determining which entity it belongs to"""
enum PhotoType {
  """Photo attached directly to a task"""
  TASK

  """Photo attached to a task note"""
  NOTE

  """Photo attached to a checklist item"""
  CHECKLIST

  """Photo attached to an issue"""
  ISSUE
}

"""Signed URL for direct cloud upload"""
type PhotoUploadUrl {
  """Signed URL for PUT request to upload file"""
  uploadUrl: String!

  """Public URL where file will be accessible after upload"""
  publicUrl: String!

  """Cloud storage object name (use in registerPhoto)"""
  objectName: String!

  """ISO timestamp when the upload URL expires"""
  expiresAt: String!
}

scalar PriceDisplay

"""Input for querying properties"""
input PropertiesInput {
  """View scope - TEAM, COMPANY, or GLOBAL"""
  scope: ViewScope!

  """Optional filter criteria"""
  filters: PropertyFilters

  """Field to sort by"""
  sortBy: PropertySortField = 

  """Sort direction"""
  sortOrder: SortOrder = DESC

  """Maximum number of results"""
  limit: Int = 50

  """Number of results to skip"""
  offset: Int = 0
}

type Property {
  id: Int!

  """Nickname of a Property"""
  nickname: String

  """Address of a Property"""
  address: String

  """External ID of a Property"""
  externalId: String

  """Company Id of a Property"""
  companyId: Int

  """property is active"""
  isActive: Boolean

  """property need send key"""
  needKey: Boolean

  """City of the property"""
  city: String

  """Number of beds in the property"""
  numberOfBeds: Int

  """Number of bathrooms in the property"""
  numberOfBathrooms: Int

  """Latitude coordinate of the property"""
  latitude: Float

  """Longitude coordinate of the property"""
  longitude: Float

  """Vendor team assigned to this property"""
  team: Team

  """Default assignee for this property"""
  assignee: Account

  """Cleaning fee for this property"""
  cleaningFee: Int

  """Scheduled new cleaning fee (takes effect on cleaningFeeEffectiveDate)"""
  newCleaningFee: Int

  """Date when newCleaningFee takes effect"""
  cleaningFeeEffectiveDate: DateTime

  """Number of tasks for this property"""
  taskCount: Int!

  """Number of issues for this property"""
  issueCount: Int!

  """Number of reservations for this property"""
  reservationCount: Int!
  reservations: [Reservation!]
  amenities: [Amenity!]

  """Tasks for this property"""
  tasks: [TaskInterface!]!

  """Issues reported for this property"""
  issues: [Issue!]!
}

"""Paginated list of properties"""
type PropertyConnection {
  """List of property edges"""
  edges: [PropertyEdge!]!

  """Total number of properties matching the filters"""
  totalCount: Int!
}

"""Property edge for pagination"""
type PropertyEdge {
  """The property"""
  node: Property!
}

"""Filter criteria for properties"""
input PropertyFilters {
  """Search by property name (nickname)"""
  name: TextFilter

  """Filter by team ID"""
  teamId: IdFilter

  """Filter by active status"""
  isActive: BooleanFilter
}

"""Fields available for sorting properties"""
enum PropertySortField {
  """Sort by property name"""
  NAME

  """Sort by creation date"""
  CREATED_AT

  """Sort by ID"""
  ID
}

type Query {
  """App version configuration for upgrade prompts (no auth required)"""
  app_version_config: AppVersionConfig
  account_by_id(
    """Resolves User using its id."""
    id: Int!
  ): Account

  """List assignees based on ViewScope and current context"""
  assignees(
    """View scope - TEAM, COMPANY, or GLOBAL"""
    scope: ViewScope!

    """Optional team ID to filter assignees by specific team"""
    teamId: Int
  ): [Account!]!
  list_team_assignees: [Account!]! @deprecated(reason: "Use assignees(scope: TEAM) instead")
  list_company_assignees: [Account!]! @deprecated(reason: "Use assignees(scope: COMPANY) instead")

  """List vendor teams for current company context"""
  teams: [Team!]!

  """List distinct property cities for the current scope"""
  propertyCities(scope: ViewScope!): [String!]!

  """
  Count of properties with no team assigned. Admin sees global count, others see current company count.
  """
  unassignedPropertyCount: Int!

  """
  Query properties with flexible filtering, pagination, and scope-based authorization
  """
  properties(
    """Filter, sort, and pagination options"""
    input: PropertiesInput!
  ): PropertyConnection!

  """
  Query accounts with flexible filtering, pagination, and scope-based authorization
  """
  accounts(
    """Filter, sort, and pagination options"""
    input: AccountsInput!
  ): AccountConnection!

  """
  Query reservations with flexible filtering, pagination, and scope-based authorization
  """
  reservations(
    """Filter, sort, and pagination options"""
    input: ReservationsInput!
  ): ReservationConnection!
  list_amenities(
    """the property id"""
    id: Int!
  ): [Amenity!] @deprecated(reason: "Use the properties query instead")
  list_properties: [Property!]! @deprecated(reason: "Use properties(input: {scope: ...}) instead")
  count_tasks_dates: TaskListFutureTypeCount! @deprecated(reason: "Use the tasks query with filters instead")
  count_tasks_types(showToday: Boolean, showFuture: Boolean): TaskListTypeCount! @deprecated(reason: "Use the tasks query with filters instead")
  tasks_by_dates(after: DateTime, assigneeId: Int, assigneeFilter: String, taskType: String): [TaskListItem!]! @deprecated(reason: "Use the tasks query with filters instead")
  list_tasks(before: DateTime, assigneeId: Int, assigneeFilter: String, taskType: String, date: DateTime, completed: Boolean!, skip: Int, size: Int): [TaskInterface!] @deprecated(reason: "Use the tasks query with filters instead")
  property_by_id(
    """Resolves Property using its id."""
    id: Int!
  ): Property
  reservation_by_id(
    """Resolves Reservation using its id."""
    id: Int!
  ): Reservation
  task_by_id(
    """Resolves Task using its id."""
    id: Int!
  ): TaskUnion

  """
  Query tasks with flexible filtering, pagination, and scope-based authorization
  """
  tasks(
    """Filter, sort, and pagination options"""
    input: TasksInput!
  ): TaskConnection!

  """
  Query issues with flexible filtering, pagination, and scope-based authorization
  """
  issues(
    """Filter, sort, and pagination options"""
    input: IssuesInput!
  ): IssueConnection!
  issue_by_id(
    """Resolves Issue using its id."""
    id: Int!
  ): Issue

  """Aggregated dashboard data — stats, alerts, activity, upcoming tasks"""
  dashboard(
    """View scope for data filtering"""
    scope: ViewScope!
  ): DashboardData!

  """Query billing records with filtering"""
  billings(input: BillingsInput!): BillingConnection!
  billing_by_id(id: Int!): Billing
}

input ReactivateAccountInput {
  """ID of the account to reactivate"""
  accountId: Int!
}

"""A recent activity entry from task audit logs"""
type RecentActivityItem {
  id: Int!
  action: String!
  taskId: Int!
  taskType: String
  propertyName: String
  performedBy: Account
  createdAt: DateTime!
}

input RegisterAccountInput {
  """User's full name"""
  full_name: String!

  """Email address"""
  email: String!

  """Phone number (international format)"""
  phone: String!

  """Verification token (obtained from verify_phone_code)"""
  verification_token: String!

  """Account password"""
  password: String!

  """User roles (optional, defaults to ROLE_MEMBER)"""
  roles: [String]

  """Team name (optional, will auto-join or create team)"""
  team_name: String!
}

"""Input for registering a photo after upload"""
input RegisterPhotoInput {
  """Cloud storage object name from getUploadUrl"""
  objectName: String!

  """Type of photo (TASK, NOTE, CHECKLIST, ISSUE)"""
  photoType: PhotoType!

  """ID of the related entity (task, note, checklist item, or issue)"""
  relatedId: Int!

  """Optional category for the photo"""
  category: PhotoCategory

  """GPS latitude where photo was taken"""
  latitude: Float

  """GPS longitude where photo was taken"""
  longitude: Float

  """Timestamp when photo was captured"""
  capturedAt: DateTime

  """Device information"""
  deviceInfo: String

  """File size in bytes"""
  fileSize: Int
}

input RemoveAccountFromTeamInput {
  """ID of the account to remove from the team"""
  accountId: Int!

  """ID of the team to remove the account from"""
  teamId: Int!

  """Company the team belongs to"""
  companyId: Int!

  """Optional account ID to reassign open tasks to"""
  reassignTasksToAccountId: Int
}

input RequestCodeInput {
  """Email address for request verify code"""
  email: String
}

input RescheduleTaskInput {
  taskId: Int!

  """New scheduled date for the task"""
  todoDate: DateTime!

  """Optional reason for rescheduling"""
  reason: String
}

type Reservation {
  id: Int!
  listingId: String
  customerName: String
  guestCount: Int!
  checkInDate: DateTime!
  checkOutDate: DateTime!
  statusCode: String!
  platformCode: String!
  currency: String
  total: PriceDisplay
  isPaid: Boolean
  platformOrderId: String
  confirmationCode: String

  """The property associated with this reservation"""
  property: Property
  lastMinuteBooking: Boolean
  visualStart: String
  visualEnd: String
}

"""Paginated list of reservations"""
type ReservationConnection {
  """List of reservation edges"""
  edges: [ReservationEdge!]!

  """Total number of reservations matching the filters"""
  totalCount: Int!
}

"""Reservation edge for pagination"""
type ReservationEdge {
  """The reservation"""
  node: Reservation!
}

"""Filter criteria for reservations"""
input ReservationFilters {
  """Filter by check-in date"""
  checkInDate: DateFilter

  """Filter by check-out date"""
  checkOutDate: DateFilter

  """Search by customer name"""
  customerName: TextFilter

  """Filter by property ID"""
  propertyId: IdFilter

  """Filter by reservation status code"""
  statusCode: TextFilter
}

"""Fields available for sorting reservations"""
enum ReservationSortField {
  """Sort by check-in date"""
  CHECK_IN_DATE

  """Sort by check-out date"""
  CHECK_OUT_DATE

  """Sort by creation date"""
  CREATED_AT
}

"""Input for querying reservations"""
input ReservationsInput {
  """View scope - TEAM, COMPANY, or GLOBAL"""
  scope: ViewScope!

  """Optional filter criteria"""
  filters: ReservationFilters

  """Field to sort by"""
  sortBy: ReservationSortField = 

  """Sort direction"""
  sortOrder: SortOrder = DESC

  """Maximum number of results"""
  limit: Int = 50

  """Number of results to skip"""
  offset: Int = 0
}

type ResetPassword {
  success: Boolean!
}

input ResetPasswordInput {
  """new Password of a Account"""
  new_password: String

  """repeat Password of a Account"""
  confirmed_password: String
  verify_code: Int
  email: String
}

"""Input for resolving an issue"""
input ResolveIssueInput {
  """Issue ID to resolve"""
  issueId: Int!

  """Optional note about the resolution"""
  note: String
}

"""Review a checklist spot (cleaning area) during inspection"""
input ReviewChecklistSpotInput {
  """TaskChecklistItem ID to review"""
  checklistItemId: Int!

  """True for passed, false for failed"""
  passed: Boolean!
}

enum RoleName {
  """System administrator"""
  ADMIN

  """Read-only financial access"""
  FINANCE_VIEWER

  """Full org operations"""
  SUPERVISOR

  """Team vendor manager"""
  VENDOR_MANAGER

  """Worker"""
  CLEANER
}

enum RoleScope {
  """Platform-wide"""
  SYSTEM

  """Company-scoped"""
  ORGANIZATION

  """Team-scoped"""
  TEAM
}

"""Input for setting user context (company and team)"""
input SetContextInput {
  """Company ID to set as current context"""
  companyId: Int!

  """Team ID to set as current context (optional for org-level users)"""
  teamId: Int
}

"""Sort order direction"""
enum SortOrder {
  """Ascending order"""
  ASC

  """Descending order"""
  DESC
}

input StartTaskInput {
  taskId: Int!

  """Optional note (attached to audit log)"""
  note: String

  """Photos to attach to the note"""
  photos: [AttachPhotoInput!]
}

input SuspendAccountInput {
  """ID of the account to suspend"""
  accountId: Int!

  """Optional reason for suspension"""
  reason: String
}

type TaskAuditLog {
  id: Int!
  action: AuditAction!
  oldValue: String
  newValue: String

  """JSON metadata"""
  metadata: String

  """Note explaining this transition (with photos)"""
  note: AuditLogNote
  performedBy: Account
  createdAt: DateTime!
}

type TaskChecklistItem {
  id: Int!
  title: String!
  description: String
  isCompleted: Boolean!
  isRequired: Boolean!
  requiresPhoto: Boolean!
  sortOrder: Int!
  key: String
  completedBy: Account
  completedAt: DateTime

  """
  Inspection review result: true=passed, false=failed, null=not reviewed
  """
  passed: Boolean
  photos: [ChecklistPhoto!]!
}

"""Paginated list of tasks"""
type TaskConnection {
  """List of task edges"""
  edges: [TaskEdge!]!

  """Total number of tasks matching the filters"""
  totalCount: Int!
}

"""Task edge for pagination"""
type TaskEdge {
  """
  The task (concrete type: DepartureCleaningTask, CheckInTask, MaintenanceTask, or OneTimeCleaningTask)
  """
  node: TaskUnion!
}

"""Filter criteria for tasks"""
input TaskFilters {
  """Filter by task date (includes timezone for date range calculation)"""
  todoDate: DateFilter

  """Filter by task cancellation date"""
  cancelDate: DateFilter

  """Filter by task status (supports EQ, IN, NOT_IN operators)"""
  status: TaskStatusFilter

  """Filter by task type (supports EQ, IN, NOT_IN operators)"""
  type: TaskTypeFilter

  """Filter by task priority (supports EQ, IN, NOT_IN operators)"""
  priority: TaskPriorityFilter

  """Filter by assignee ID"""
  assigneeId: IdFilter

  """Filter by property ID"""
  propertyId: IdFilter
}

input TaskInput {
  """Related task ID"""
  id: Int

  """Related status"""
  status: String

  """Related priority"""
  priority: String

  """Related assignee ID"""
  assigneeId: Int

  """To Do time"""
  todoDate: DateTime

  """task type"""
  taskType: String

  """reservation external_order_id for link task and order"""
  reservationId: String

  """listing id for task"""
  listingId: Int

  """listing id for task"""
  description: String

  """reporter account id"""
  reportedBy: Int
}

"""Common interface for all task types"""
interface TaskInterface {
  id: Int!
  todoDate: DateTime!
  dueAt: DateTime
  cancelledAt: DateTime

  """Parsed date information from todoDate"""
  dayInfo: DayInfo!
  status: TaskStatus!
  priority: TaskPriority!
  startedAt: DateTime
  completedAt: DateTime
  updatedAt: DateTime
  createdAt: DateTime
  inspectionStatus: InspectionStatus!
  inspectedAt: DateTime

  """
  Photo pass rate percentage (passed / reviewed × 100). Null if no photos reviewed.
  """
  photoPassRate: Float

  """Payment unit price for this task (defaults to property cleaningFee)"""
  unitPrice: Int
  company: Company
  property: Property
  reservation: Reservation
  assignee: Account
  completedBy: Account
  inspectedBy: Account

  """Issue that triggered the creation of this task"""
  sourceIssue: Issue
  taskNotes: [TaskNote!]!
  auditLogs(
    """Optional filter - only return audit logs with these actions"""
    actions: [AuditAction!]
  ): [TaskAuditLog!]!
  checklistItems: [TaskChecklistItem!]!
  photos: [Photo!]!

  """Issues linked to this task"""
  issues: [Issue!]!
}

type TaskListFutureTypeCount {
  today: Int!
  future: Int!
  completed: Int!
}

type TaskListItem {
  date: String!
  weekday: String!
  month: String!
  day: String!
  check_in_count: Int!
  check_out_count: Int!
  tasks: [TaskInterface!]!
}

type TaskListTypeCount {
  all: Int!
  check_in: Int!
  check_out: Int!
  maintenance: Int!
}

type TaskNote {
  id: Int!
  content: String!

  """Photos attached to this note"""
  photos: [NotePhoto!]!
  createdBy: Account
  createdAt: DateTime!
  updatedAt: DateTime
}

"""Task priority values"""
enum TaskPriority {
  """Low priority"""
  LOW

  """Medium priority"""
  MEDIUM

  """High priority"""
  HIGH
}

"""Filter for task priority"""
input TaskPriorityFilter {
  """Filter operator"""
  operator: TaskPriorityOperator!

  """Single priority value (for EQ)"""
  value: TaskPriority

  """Multiple priority values (for IN, NOT_IN)"""
  values: [TaskPriority!]
}

"""Operators for task priority filter"""
enum TaskPriorityOperator {
  """Equals"""
  EQ

  """In list"""
  IN

  """Not in list"""
  NOT_IN
}

"""Fields available for sorting tasks"""
enum TaskSortField {
  """Sort by task date"""
  TODO_DATE

  """Sort by creation date"""
  CREATED_AT

  """Sort by status"""
  STATUS

  """Sort by priority"""
  PRIORITY
}

"""Task status values"""
enum TaskStatus {
  """Task created, not started"""
  TODO

  """Task assigned to someone"""
  ASSIGNED

  """Cleaner accepted the task"""
  ACCEPTED

  """Work in progress"""
  IN_PROGRESS

  """Temporarily blocked"""
  BLOCKED

  """Work finished"""
  COMPLETED

  """Task cancelled"""
  CANCELLED
}

"""Filter for task status"""
input TaskStatusFilter {
  """Filter operator"""
  operator: TaskStatusOperator!

  """Single status value (for EQ)"""
  value: TaskStatus

  """Multiple status values (for IN, NOT_IN)"""
  values: [TaskStatus!]
}

"""Operators for task status filter"""
enum TaskStatusOperator {
  """Equals"""
  EQ

  """In list"""
  IN

  """Not in list"""
  NOT_IN
}

"""Task type values"""
enum TaskType {
  """Check in task"""
  CHECK_IN

  """Departure cleaning task"""
  CHECK_OUT

  """Maintenance task"""
  MAINTENANCE

  """One time cleaning task"""
  ONE_TIME_CLEANING
}

"""Filter for task type"""
input TaskTypeFilter {
  """Filter operator"""
  operator: TaskTypeOperator!

  """Single type value (for EQ)"""
  value: TaskType

  """Multiple type values (for IN, NOT_IN)"""
  values: [TaskType!]
}

"""Operators for task type filter"""
enum TaskTypeOperator {
  """Equals"""
  EQ

  """In list"""
  IN

  """Not in list"""
  NOT_IN
}

"""Union of all concrete task types (ensures schema export)"""
union TaskUnion = DepartureCleaningTask | CheckInTask | MaintenanceTask | OneTimeCleaningTask

"""Input for querying tasks"""
input TasksInput {
  """View scope - TEAM (mobile), COMPANY (web), or GLOBAL (admin)"""
  scope: ViewScope!

  """Optional filter criteria"""
  filters: TaskFilters

  """Field to sort by"""
  sortBy: TaskSortField = 

  """Sort direction"""
  sortOrder: SortOrder = ASC

  """Maximum number of results (max 200)"""
  limit: Int = 50

  """Number of results to skip"""
  offset: Int = 0
}

type Team {
  id: Int!

  """Name of a team"""
  teamName: String

  """Phone number"""
  phoneNumber: String

  """Email address"""
  email: String

  """Cleaning rules of the company"""
  cleaningRules: String

  """Company Id"""
  companyId: Int

  """Team members with roles"""
  members: [AccountRole]
}

"""Filter for text/string fields"""
input TextFilter {
  """Filter operator"""
  operator: TextFilterOperator!

  """Text value (for EQ, CONTAINS, STARTS_WITH, ENDS_WITH)"""
  value: String

  """Multiple text values (for IN)"""
  values: [String!]
}

"""Operators for text filter"""
enum TextFilterOperator {
  """Equals (exact match)"""
  EQ

  """Contains (case-insensitive)"""
  CONTAINS

  """Starts with (case-insensitive)"""
  STARTS_WITH

  """Ends with (case-insensitive)"""
  ENDS_WITH

  """In list (exact match)"""
  IN

  """Is null"""
  IS_NULL

  """Is not null"""
  IS_NOT_NULL
}

input UpdateAccountRoleInput {
  """ID of the AccountRole record to update"""
  accountRoleId: Int!

  """New role to assign (scope is automatically derived from role)"""
  newRole: RoleName!
}

input UpdateBillingLineItemInput {
  lineItemId: Int!

  """New unit price in cents"""
  unitPrice: Int!
}

"""Input for updating company profile"""
input UpdateCompanyInput {
  """Company ID to update"""
  companyId: Int!

  """Company name"""
  companyName: String

  """Company phone number"""
  phoneNumber: String

  """Company email"""
  email: String

  """Cleaning rules / instructions"""
  cleaningRules: String
}

"""Input for updating an existing issue"""
input UpdateIssueInput {
  """Issue ID to update"""
  issueId: Int!

  """New status for the issue"""
  status: IssueStatus

  """Updated description"""
  description: String
}

input UpdatePropertyInput {
  """Property to update"""
  property_id: Int!

  """Account ID to assign as default assignee"""
  assignee_id: Int

  """Team ID to assign this property to"""
  teamId: Int

  """Display name for the property"""
  nickname: String

  """Whether the property is active"""
  isActive: Boolean

  """Cleaning fee for this property"""
  cleaningFee: Int

  """Scheduled new cleaning fee"""
  newCleaningFee: Int

  """Date when newCleaningFee takes effect"""
  cleaningFeeEffectiveDate: DateTime
}

input UpdateTaskNoteInput {
  """ID of the note to update"""
  noteId: Int!

  """Updated note content"""
  content: String!
}

input UpdateTaskPriorityInput {
  taskId: Int!

  """New priority level for the task"""
  priority: TaskPriority!
}

type VerificationTokenResponse {
  """Verification token (for registration)"""
  verification_token: String!

  """Token expiration time (ISO 8601 format)"""
  expires_at: String!

  """Response message"""
  message: String
}

input VerifyCodeInput {
  """Temporary verification code for this account"""
  verify_code: Int

  """email to check related verify code"""
  email: String
}

input VerifyPhoneCodeInput {
  """Phone number(international format"""
  phone: String!

  """6-digit verification code"""
  verification_code: String!
}

"""
Scope for viewing resources - determines the resource boundary from user context
"""
enum ViewScope {
  """Resources for current context team only (mobile app always uses this)"""
  TEAM

  """All resources in current context company (web/admin only)"""
  COMPANY

  """All resources across companies (admin only)"""
  GLOBAL
}