chore(legacy): relocate v1 dataconnect source
This commit is contained in:
325
legacy/dataconnect-v1/connector/invoiceTemplate/queries.gql
Normal file
325
legacy/dataconnect-v1/connector/invoiceTemplate/queries.gql
Normal file
@@ -0,0 +1,325 @@
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# LIST ALL (admin/debug)
|
||||
# ----------------------------------------------------------
|
||||
query listInvoiceTemplates(
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
invoiceTemplates(offset: $offset, limit: $limit) {
|
||||
id
|
||||
name
|
||||
ownerId
|
||||
|
||||
vendorId
|
||||
businessId
|
||||
orderId
|
||||
|
||||
paymentTerms
|
||||
invoiceNumber
|
||||
issueDate
|
||||
dueDate
|
||||
hub
|
||||
managerName
|
||||
vendorNumber
|
||||
roles
|
||||
charges
|
||||
otherCharges
|
||||
subtotal
|
||||
amount
|
||||
notes
|
||||
staffCount
|
||||
chargesCount
|
||||
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
vendor { id companyName }
|
||||
business { id businessName email contactName }
|
||||
order { id eventName status orderType }
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# GET BY ID
|
||||
# ----------------------------------------------------------
|
||||
query getInvoiceTemplateById($id: UUID!) @auth(level: USER) {
|
||||
invoiceTemplate(id: $id) {
|
||||
id
|
||||
name
|
||||
ownerId
|
||||
|
||||
vendorId
|
||||
businessId
|
||||
orderId
|
||||
|
||||
paymentTerms
|
||||
invoiceNumber
|
||||
issueDate
|
||||
dueDate
|
||||
hub
|
||||
managerName
|
||||
vendorNumber
|
||||
roles
|
||||
charges
|
||||
otherCharges
|
||||
subtotal
|
||||
amount
|
||||
notes
|
||||
staffCount
|
||||
chargesCount
|
||||
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
vendor { id companyName }
|
||||
business { id businessName email contactName }
|
||||
order { id eventName status orderType }
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# LIST BY OWNER (my templates)
|
||||
# ----------------------------------------------------------
|
||||
query listInvoiceTemplatesByOwnerId(
|
||||
$ownerId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
invoiceTemplates(
|
||||
where: { ownerId: { eq: $ownerId } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { updatedAt: DESC }
|
||||
) {
|
||||
id
|
||||
name
|
||||
ownerId
|
||||
|
||||
vendorId
|
||||
businessId
|
||||
orderId
|
||||
|
||||
paymentTerms
|
||||
invoiceNumber
|
||||
issueDate
|
||||
dueDate
|
||||
hub
|
||||
managerName
|
||||
vendorNumber
|
||||
roles
|
||||
charges
|
||||
otherCharges
|
||||
subtotal
|
||||
amount
|
||||
notes
|
||||
staffCount
|
||||
chargesCount
|
||||
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
vendor { id companyName }
|
||||
business { id businessName email contactName }
|
||||
order { id eventName status orderType }
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# LIST BY VENDOR (templates tied to a vendor)
|
||||
# ----------------------------------------------------------
|
||||
query listInvoiceTemplatesByVendorId(
|
||||
$vendorId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
invoiceTemplates(
|
||||
where: { vendorId: { eq: $vendorId } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { updatedAt: DESC }
|
||||
) {
|
||||
id
|
||||
name
|
||||
ownerId
|
||||
|
||||
vendorId
|
||||
businessId
|
||||
orderId
|
||||
|
||||
paymentTerms
|
||||
invoiceNumber
|
||||
issueDate
|
||||
dueDate
|
||||
hub
|
||||
managerName
|
||||
vendorNumber
|
||||
roles
|
||||
charges
|
||||
otherCharges
|
||||
subtotal
|
||||
amount
|
||||
notes
|
||||
staffCount
|
||||
chargesCount
|
||||
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
vendor { id companyName }
|
||||
business { id businessName email contactName }
|
||||
order { id eventName status orderType }
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# LIST BY BUSINESS (templates tied to a business)
|
||||
# ----------------------------------------------------------
|
||||
query listInvoiceTemplatesByBusinessId(
|
||||
$businessId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
invoiceTemplates(
|
||||
where: { businessId: { eq: $businessId } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { updatedAt: DESC }
|
||||
) {
|
||||
id
|
||||
name
|
||||
ownerId
|
||||
|
||||
vendorId
|
||||
businessId
|
||||
orderId
|
||||
|
||||
paymentTerms
|
||||
invoiceNumber
|
||||
issueDate
|
||||
dueDate
|
||||
hub
|
||||
managerName
|
||||
vendorNumber
|
||||
roles
|
||||
charges
|
||||
otherCharges
|
||||
subtotal
|
||||
amount
|
||||
notes
|
||||
staffCount
|
||||
chargesCount
|
||||
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
vendor { id companyName }
|
||||
business { id businessName email contactName }
|
||||
order { id eventName status orderType }
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# LIST BY ORDER (templates tied to a specific order)
|
||||
# ----------------------------------------------------------
|
||||
query listInvoiceTemplatesByOrderId(
|
||||
$orderId: UUID!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
invoiceTemplates(
|
||||
where: { orderId: { eq: $orderId } }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { updatedAt: DESC }
|
||||
) {
|
||||
id
|
||||
name
|
||||
ownerId
|
||||
|
||||
vendorId
|
||||
businessId
|
||||
orderId
|
||||
|
||||
paymentTerms
|
||||
invoiceNumber
|
||||
issueDate
|
||||
dueDate
|
||||
hub
|
||||
managerName
|
||||
vendorNumber
|
||||
roles
|
||||
charges
|
||||
otherCharges
|
||||
subtotal
|
||||
amount
|
||||
notes
|
||||
staffCount
|
||||
chargesCount
|
||||
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
vendor { id companyName }
|
||||
business { id businessName email contactName }
|
||||
order { id eventName status orderType }
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------
|
||||
# SEARCH (by name) within an owner
|
||||
# ----------------------------------------------------------
|
||||
query searchInvoiceTemplatesByOwnerAndName(
|
||||
$ownerId: UUID!
|
||||
$name: String!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) @auth(level: USER) {
|
||||
invoiceTemplates(
|
||||
where: {
|
||||
ownerId: { eq: $ownerId }
|
||||
name: { eq: $name }
|
||||
}
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
orderBy: { updatedAt: DESC }
|
||||
) {
|
||||
id
|
||||
name
|
||||
ownerId
|
||||
|
||||
vendorId
|
||||
businessId
|
||||
orderId
|
||||
|
||||
paymentTerms
|
||||
invoiceNumber
|
||||
issueDate
|
||||
dueDate
|
||||
hub
|
||||
managerName
|
||||
vendorNumber
|
||||
roles
|
||||
charges
|
||||
otherCharges
|
||||
subtotal
|
||||
amount
|
||||
notes
|
||||
staffCount
|
||||
chargesCount
|
||||
|
||||
createdAt
|
||||
updatedAt
|
||||
createdBy
|
||||
|
||||
vendor { id companyName }
|
||||
business { id businessName email contactName }
|
||||
order { id eventName status orderType }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user