nexus-4/frontend/schema.graphql
2026-01-26 10:55:11 -05:00

575 lines
12 KiB
GraphQL

"""
Indicates that an Input Object is a OneOf Input Object (and thus requires exactly one of its field be provided)
"""
directive @oneOf on INPUT_OBJECT
type Account {
city: String!
createdAt: NaiveDateTime!
customerId: ID!
endDate: NaiveDate
id: ID!
name: String!
primaryContactEmail: String!
primaryContactFirstName: String!
primaryContactLastName: String!
primaryContactPhone: String!
secondaryContactEmail: String
secondaryContactFirstName: String
secondaryContactLastName: String
secondaryContactPhone: String
startDate: NaiveDate!
state: String!
streetAddress: String!
updatedAt: NaiveDateTime!
zipCode: String!
}
input CreateAccountInput {
city: String!
customerId: ID!
endDate: NaiveDate
name: String!
primaryContactEmail: String!
primaryContactFirstName: String!
primaryContactLastName: String!
primaryContactPhone: String!
secondaryContactEmail: String
secondaryContactFirstName: String
secondaryContactLastName: String
secondaryContactPhone: String
startDate: NaiveDate!
state: String!
streetAddress: String!
zipCode: String!
}
input CreateCustomerInput {
billingCity: String!
billingContactFirstName: String!
billingContactLastName: String!
billingEmail: String!
billingState: String!
billingStreetAddress: String!
billingTerms: String!
billingZipCode: String!
endDate: NaiveDate
name: String!
primaryContactEmail: String!
primaryContactFirstName: String!
primaryContactLastName: String!
primaryContactPhone: String!
secondaryContactEmail: String
secondaryContactFirstName: String
secondaryContactLastName: String
secondaryContactPhone: String
startDate: NaiveDate!
}
input CreateInvoiceInput {
customerId: ID!
date: NaiveDate!
datePaid: NaiveDate
paymentType: String
sentAt: NaiveDateTime
status: String!
totalAmount: String!
}
input CreateLaborInput {
accountId: ID!
amount: String!
endDate: NaiveDate
startDate: NaiveDate!
}
input CreateProfileInput {
email: String!
firstName: String!
lastName: String!
primaryPhone: String!
role: String!
secondaryPhone: String
userId: ID!
}
input CreateProjectInput {
accountId: ID
amount: String!
completedAt: NaiveDateTime
customerId: ID!
date: NaiveDate!
labor: String!
notes: String
status: String!
}
input CreateReportInput {
date: NaiveDate!
notes: String
teamMemberId: ID!
}
input CreateRevenueInput {
accountId: ID!
amount: String!
endDate: NaiveDate
startDate: NaiveDate!
}
input CreateScheduleInput {
accountId: ID!
endDate: NaiveDate
fridayService: Boolean!
mondayService: Boolean!
saturdayService: Boolean!
scheduleException: String
startDate: NaiveDate!
sundayService: Boolean!
thursdayService: Boolean!
tuesdayService: Boolean!
wednesdayService: Boolean!
weekendService: Boolean!
}
input CreateServiceInput {
accountId: ID!
completedAt: NaiveDateTime
date: NaiveDate!
deadlineEnd: NaiveDateTime!
deadlineStart: NaiveDateTime!
notes: String
status: String!
}
input CreateUserInput {
email: String!
isActive: Boolean!
password: String!
username: String!
}
type Customer {
billingCity: String!
billingContactFirstName: String!
billingContactLastName: String!
billingEmail: String!
billingState: String!
billingStreetAddress: String!
billingTerms: String!
billingZipCode: String!
createdAt: NaiveDateTime!
endDate: NaiveDate
id: ID!
name: String!
primaryContactEmail: String!
primaryContactFirstName: String!
primaryContactLastName: String!
primaryContactPhone: String!
secondaryContactEmail: String
secondaryContactFirstName: String
secondaryContactLastName: String
secondaryContactPhone: String
startDate: NaiveDate!
updatedAt: NaiveDateTime!
}
type Invoice {
createdAt: NaiveDateTime!
customerId: ID!
date: NaiveDate!
datePaid: NaiveDate
id: ID!
paymentType: String
sentAt: NaiveDateTime
status: String!
totalAmount: String!
updatedAt: NaiveDateTime!
}
type Labor {
accountId: ID!
amount: String!
createdAt: NaiveDateTime!
endDate: NaiveDate
id: ID!
startDate: NaiveDate!
updatedAt: NaiveDateTime!
}
type Mutation {
createAccount(input: CreateAccountInput!): Account!
createCustomer(input: CreateCustomerInput!): Customer!
createInvoice(input: CreateInvoiceInput!): Invoice!
createLabor(input: CreateLaborInput!): Labor!
createProfile(input: CreateProfileInput!): Profile!
createProject(input: CreateProjectInput!): Project!
createReport(input: CreateReportInput!): Report!
createRevenue(input: CreateRevenueInput!): Revenue!
createSchedule(input: CreateScheduleInput!): Schedule!
createService(input: CreateServiceInput!): Service!
createUser(input: CreateUserInput!): User!
deleteAccount(id: ID!): Boolean!
deleteCustomer(id: ID!): Boolean!
deleteInvoice(id: ID!): Boolean!
deleteLabor(id: ID!): Boolean!
deleteProfile(id: ID!): Boolean!
deleteProject(id: ID!): Boolean!
deleteReport(id: ID!): Boolean!
deleteRevenue(id: ID!): Boolean!
deleteSchedule(id: ID!): Boolean!
deleteService(id: ID!): Boolean!
deleteUser(id: ID!): Boolean!
updateAccount(id: ID!, input: UpdateAccountInput!): Account!
updateCustomer(id: ID!, input: UpdateCustomerInput!): Customer!
updateInvoice(id: ID!, input: UpdateInvoiceInput!): Invoice!
updateLabor(id: ID!, input: UpdateLaborInput!): Labor!
updateProfile(id: ID!, input: UpdateProfileInput!): Profile!
updateProject(id: ID!, input: UpdateProjectInput!): Project!
updateReport(id: ID!, input: UpdateReportInput!): Report!
updateRevenue(id: ID!, input: UpdateRevenueInput!): Revenue!
updateSchedule(id: ID!, input: UpdateScheduleInput!): Schedule!
updateService(id: ID!, input: UpdateServiceInput!): Service!
updateUser(id: ID!, input: UpdateUserInput!): User!
}
"""
ISO 8601 calendar date without timezone.
Format: %Y-%m-%d
# Examples
* `1994-11-13`
* `2000-02-24`
"""
scalar NaiveDate
"""
ISO 8601 combined date and time without timezone.
# Examples
* `2015-07-01T08:59:60.123`,
"""
scalar NaiveDateTime
type Profile {
createdAt: NaiveDateTime!
email: String!
firstName: String!
id: ID!
lastName: String!
primaryPhone: String!
role: String!
secondaryPhone: String
updatedAt: NaiveDateTime!
userId: ID!
}
type Project {
accountId: ID
amount: String!
completedAt: NaiveDateTime
createdAt: NaiveDateTime!
customerId: ID!
date: NaiveDate!
id: ID!
labor: String!
notes: String
status: String!
updatedAt: NaiveDateTime!
}
type Query {
account(id: ID!): Account
accounts(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Account!]!
accountsByCustomer(customerId: ID!): [Account!]!
customer(id: ID!): Customer
customers(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Customer!]!
invoice(id: ID!): Invoice
invoices(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Invoice!]!
invoicesByCustomer(customerId: ID!): [Invoice!]!
invoicesByStatus(status: String!): [Invoice!]!
labor(id: ID!): Labor
labors(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Labor!]!
laborsByAccount(accountId: ID!): [Labor!]!
profile(id: ID!): Profile
profileByUser(userId: ID!): Profile
profiles(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Profile!]!
profilesByRole(role: String!): [Profile!]!
project(id: ID!): Project
projects(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Project!]!
projectsByAccount(accountId: ID!): [Project!]!
projectsByCustomer(customerId: ID!): [Project!]!
projectsByStatus(status: String!): [Project!]!
report(id: ID!): Report
reports(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Report!]!
reportsByDate(date: NaiveDate!): [Report!]!
reportsByTeamMember(teamMemberId: ID!): [Report!]!
revenue(id: ID!): Revenue
revenues(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Revenue!]!
revenuesByAccount(accountId: ID!): [Revenue!]!
schedule(id: ID!): Schedule
schedules(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Schedule!]!
schedulesByAccount(accountId: ID!): [Schedule!]!
searchAccounts(name: String!): [Account!]!
searchCustomers(name: String!): [Customer!]!
service(id: ID!): Service
services(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [Service!]!
servicesByAccount(accountId: ID!): [Service!]!
servicesByStatus(status: String!): [Service!]!
user(id: ID!): User
userByEmail(email: String!): User
userByUsername(username: String!): User
users(
"""Number of items to return"""
limit: Int! = 10
"""Number of items to skip"""
offset: Int! = 0
): [User!]!
}
type Report {
createdAt: NaiveDateTime!
date: NaiveDate!
id: ID!
notes: String
teamMemberId: ID!
updatedAt: NaiveDateTime!
}
type Revenue {
accountId: ID!
amount: String!
createdAt: NaiveDateTime!
endDate: NaiveDate
id: ID!
startDate: NaiveDate!
updatedAt: NaiveDateTime!
}
type Schedule {
accountId: ID!
createdAt: NaiveDateTime!
endDate: NaiveDate
fridayService: Boolean!
id: ID!
mondayService: Boolean!
saturdayService: Boolean!
scheduleException: String
startDate: NaiveDate!
sundayService: Boolean!
thursdayService: Boolean!
tuesdayService: Boolean!
updatedAt: NaiveDateTime!
wednesdayService: Boolean!
weekendService: Boolean!
}
type Service {
accountId: ID!
completedAt: NaiveDateTime
createdAt: NaiveDateTime!
date: NaiveDate!
deadlineEnd: NaiveDateTime!
deadlineStart: NaiveDateTime!
id: ID!
notes: String
status: String!
updatedAt: NaiveDateTime!
}
input UpdateAccountInput {
city: String
customerId: ID
endDate: NaiveDate
name: String
primaryContactEmail: String
primaryContactFirstName: String
primaryContactLastName: String
primaryContactPhone: String
secondaryContactEmail: String
secondaryContactFirstName: String
secondaryContactLastName: String
secondaryContactPhone: String
startDate: NaiveDate
state: String
streetAddress: String
zipCode: String
}
input UpdateCustomerInput {
billingCity: String
billingContactFirstName: String
billingContactLastName: String
billingEmail: String
billingState: String
billingStreetAddress: String
billingTerms: String
billingZipCode: String
endDate: NaiveDate
name: String
primaryContactEmail: String
primaryContactFirstName: String
primaryContactLastName: String
primaryContactPhone: String
secondaryContactEmail: String
secondaryContactFirstName: String
secondaryContactLastName: String
secondaryContactPhone: String
startDate: NaiveDate
}
input UpdateInvoiceInput {
customerId: ID
date: NaiveDate
datePaid: NaiveDate
paymentType: String
sentAt: NaiveDateTime
status: String
totalAmount: String
}
input UpdateLaborInput {
accountId: ID
amount: String
endDate: NaiveDate
startDate: NaiveDate
}
input UpdateProfileInput {
email: String
firstName: String
lastName: String
primaryPhone: String
role: String
secondaryPhone: String
userId: ID
}
input UpdateProjectInput {
accountId: ID
amount: String
completedAt: NaiveDateTime
customerId: ID
date: NaiveDate
labor: String
notes: String
status: String
}
input UpdateReportInput {
date: NaiveDate
notes: String
teamMemberId: ID
}
input UpdateRevenueInput {
accountId: ID
amount: String
endDate: NaiveDate
startDate: NaiveDate
}
input UpdateScheduleInput {
accountId: ID
endDate: NaiveDate
fridayService: Boolean
mondayService: Boolean
saturdayService: Boolean
scheduleException: String
startDate: NaiveDate
sundayService: Boolean
thursdayService: Boolean
tuesdayService: Boolean
wednesdayService: Boolean
weekendService: Boolean
}
input UpdateServiceInput {
accountId: ID
completedAt: NaiveDateTime
date: NaiveDate
deadlineEnd: NaiveDateTime
deadlineStart: NaiveDateTime
notes: String
status: String
}
input UpdateUserInput {
email: String
isActive: Boolean
password: String
username: String
}
type User {
createdAt: NaiveDateTime!
email: String!
id: ID!
isActive: Boolean!
updatedAt: NaiveDateTime!
username: String!
}