chore(legacy): relocate v1 dataconnect source
This commit is contained in:
163
legacy/dataconnect-v1/connector/invoice/mutations.gql
Normal file
163
legacy/dataconnect-v1/connector/invoice/mutations.gql
Normal file
@@ -0,0 +1,163 @@
|
||||
|
||||
mutation createInvoice(
|
||||
$status: InvoiceStatus!
|
||||
|
||||
$vendorId: UUID!
|
||||
$businessId: UUID!
|
||||
$orderId: UUID!
|
||||
$shiftId: UUID
|
||||
|
||||
$paymentTerms: InovicePaymentTerms
|
||||
$invoiceNumber: String!
|
||||
$issueDate: Timestamp!
|
||||
$dueDate: Timestamp!
|
||||
$hub: String
|
||||
$managerName: String
|
||||
$vendorNumber: String
|
||||
$roles: Any
|
||||
$charges: Any
|
||||
$otherCharges: Float
|
||||
$subtotal: Float
|
||||
$amount: Float!
|
||||
$notes: String
|
||||
|
||||
$staffCount: Int
|
||||
$chargesCount: Int
|
||||
|
||||
) @auth(level: USER) {
|
||||
invoice_insert(
|
||||
data: {
|
||||
status: $status
|
||||
|
||||
vendorId: $vendorId
|
||||
businessId: $businessId
|
||||
orderId: $orderId
|
||||
shiftId: $shiftId
|
||||
|
||||
paymentTerms: $paymentTerms
|
||||
invoiceNumber: $invoiceNumber
|
||||
issueDate: $issueDate
|
||||
dueDate: $dueDate
|
||||
hub: $hub
|
||||
managerName: $managerName
|
||||
vendorNumber: $vendorNumber
|
||||
roles: $roles
|
||||
charges: $charges
|
||||
otherCharges: $otherCharges
|
||||
subtotal: $subtotal
|
||||
amount: $amount
|
||||
notes: $notes
|
||||
|
||||
staffCount: $staffCount
|
||||
chargesCount: $chargesCount
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation updateInvoice(
|
||||
$id: UUID!
|
||||
|
||||
$status: InvoiceStatus
|
||||
|
||||
$vendorId: UUID
|
||||
$businessId: UUID
|
||||
$orderId: UUID
|
||||
$shiftId: UUID
|
||||
|
||||
$paymentTerms: InovicePaymentTerms
|
||||
$invoiceNumber: String
|
||||
$issueDate: Timestamp
|
||||
$dueDate: Timestamp
|
||||
$hub: String
|
||||
$managerName: String
|
||||
$vendorNumber: String
|
||||
$roles: Any
|
||||
$charges: Any
|
||||
$otherCharges: Float
|
||||
$subtotal: Float
|
||||
$amount: Float
|
||||
$notes: String
|
||||
|
||||
$staffCount: Int
|
||||
$chargesCount: Int
|
||||
|
||||
|
||||
$disputedItems: Any
|
||||
$disputeReason: String
|
||||
$disputeDetails: String
|
||||
) @auth(level: USER) {
|
||||
invoice_update(
|
||||
id: $id
|
||||
data: {
|
||||
status: $status
|
||||
|
||||
vendorId: $vendorId
|
||||
businessId: $businessId
|
||||
orderId: $orderId
|
||||
shiftId: $shiftId
|
||||
|
||||
paymentTerms: $paymentTerms
|
||||
invoiceNumber: $invoiceNumber
|
||||
issueDate: $issueDate
|
||||
dueDate: $dueDate
|
||||
hub: $hub
|
||||
managerName: $managerName
|
||||
vendorNumber: $vendorNumber
|
||||
roles: $roles
|
||||
charges: $charges
|
||||
otherCharges: $otherCharges
|
||||
subtotal: $subtotal
|
||||
amount: $amount
|
||||
notes: $notes
|
||||
|
||||
staffCount: $staffCount
|
||||
chargesCount: $chargesCount
|
||||
|
||||
disputedItems: $disputedItems
|
||||
disputeReason: $disputeReason
|
||||
disputeDetails: $disputeDetails
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
mutation deleteInvoice($id: UUID!) @auth(level: USER) {
|
||||
invoice_delete(id: $id)
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# APPROVE INVOICE
|
||||
# Called by the client to approve a shift-day completion record.
|
||||
# Sets status to APPROVED, triggering the invoice-ready state.
|
||||
# ------------------------------------------------------------
|
||||
mutation approveInvoice($id: UUID!) @auth(level: USER) {
|
||||
invoice_update(
|
||||
id: $id
|
||||
data: {
|
||||
status: APPROVED
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------
|
||||
# DISPUTE INVOICE
|
||||
# Called by the client to dispute a shift-day completion record.
|
||||
# Sets status to DISPUTED and stores the dispute details.
|
||||
# ------------------------------------------------------------
|
||||
mutation disputeInvoice(
|
||||
$id: UUID!
|
||||
$disputedItems: Any
|
||||
$disputeReason: String!
|
||||
$disputeDetails: String
|
||||
) @auth(level: USER) {
|
||||
invoice_update(
|
||||
id: $id
|
||||
data: {
|
||||
status: DISPUTED
|
||||
disputedItems: $disputedItems
|
||||
disputeReason: $disputeReason
|
||||
disputeDetails: $disputeDetails
|
||||
}
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user