mutation CreateVendor(
  $vendorNumber: String!,
  $legalName: String!,
  $region: VendorRegion!,
  $platformType: VendorPlatformType!,
  $primaryContactEmail: String!,
  $approvalStatus: VendorApprovalStatus!,
  $isActive: Boolean
) @auth(level: USER) {
  vendor_insert(
    data: {
      vendorNumber: $vendorNumber
      legalName: $legalName
      region: $region
      platformType: $platformType
      primaryContactEmail: $primaryContactEmail
      approvalStatus: $approvalStatus
      isActive: $isActive
    }
  )
}

mutation UpdateVendor(
  $id: UUID!,
  $vendorNumber: String,
  $legalName: String,
  $region: VendorRegion,
  $platformType: VendorPlatformType,
  $primaryContactEmail: String,
  $approvalStatus: VendorApprovalStatus,
  $isActive: Boolean
) @auth(level: USER) {
  vendor_update(
    id: $id,
    data: {
      vendorNumber: $vendorNumber
      legalName: $legalName
      region: $region
      platformType: $platformType
      primaryContactEmail: $primaryContactEmail
      approvalStatus: $approvalStatus
      isActive: $isActive
    }
  )
}

mutation DeleteVendor(
  $id: UUID!
) @auth(level: USER) {
  vendor_delete(id: $id)
}

